Nothing Special   »   [go: up one dir, main page]

CN119201750A - Method, device and system for embedded test - Google Patents

Method, device and system for embedded test Download PDF

Info

Publication number
CN119201750A
CN119201750A CN202411684063.3A CN202411684063A CN119201750A CN 119201750 A CN119201750 A CN 119201750A CN 202411684063 A CN202411684063 A CN 202411684063A CN 119201750 A CN119201750 A CN 119201750A
Authority
CN
China
Prior art keywords
address value
program
program address
memory
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411684063.3A
Other languages
Chinese (zh)
Inventor
冯家龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kangao Xingye Technology Co ltd
Original Assignee
Shenzhen Kangao Xingye Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kangao Xingye Technology Co ltd filed Critical Shenzhen Kangao Xingye Technology Co ltd
Priority to CN202411684063.3A priority Critical patent/CN119201750A/en
Publication of CN119201750A publication Critical patent/CN119201750A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

本发明公开了一种嵌入式测试的方法、装置及系统,包括:通过信息监测模块监测处理功能单元访问存储器的程序地址值,所述信息监测模块为设置于所述处理功能单元之外的硬件单元;将所述程序地址值存储到存储单元中和/或者将所述程序地址值输出。本发明采用的是实时监测的方法,将监测处理功能单元访问存储器的程序地址值存储或者输出,达到相应程序进行软件测试的目的。

The present invention discloses a method, device and system for embedded testing, including: monitoring the program address value of a processing function unit accessing a memory through an information monitoring module, wherein the information monitoring module is a hardware unit arranged outside the processing function unit; storing the program address value in a storage unit and/or outputting the program address value. The present invention adopts a real-time monitoring method, storing or outputting the program address value of the monitoring processing function unit accessing a memory, so as to achieve the purpose of software testing of the corresponding program.

Description

Method, device and system for embedded test
Technical Field
The present application relates to a method, an apparatus, and a system for embedded testing, and more particularly, to a controller chip, and a method, an apparatus, and a system for embedded testing thereof.
Background
With the development of chip technology, more and more functional modules are integrated into the chip, the operation data volume of the controller chip is larger and more, and the program to be operated by the controller chip is also larger and more, and may have hundreds of thousands or even millions. There is a need to achieve the purpose of embedded software dynamic white-box testing (hereinafter referred to as software dynamic white-box testing).
In the existing software dynamic white box test process, a code instrumentation method (hereinafter referred to as code instrumentation method) is added in a program to realize the software dynamic white box test. The inventor finds that the prior art has the defects that 1, the instrumentation needs to occupy the running resources of a processor in a controller chip in a program, the same functional code time before running is longer, other accidents can be possibly introduced, the testing difficulty is increased, the efficiency is low, 2, the instrumentation needs to add codes in the program, the length of the program is prolonged due to the extra codes, the previous program addresses are changed, the accidents can be caused when the absolute addresses of the program are called in the program, the testing difficulty is increased, 3, in the existing software testing, the program black box testing, the prototype testing and the software dynamic white box testing cannot be simultaneously carried out, and the testing efficiency is low.
Disclosure of Invention
In order to solve the problems that the existing software dynamic white box test efficiency is low, the test difficulty is high, and program errors can be caused by adding codes. The application provides a method, a device and a system for embedded test. The method comprises the following steps:
The method comprises the steps that a program address value of a processing functional unit accessing a memory is monitored through an information monitoring module, wherein the information monitoring module is a hardware unit arranged outside the processing functional unit;
the program address value is stored in the memory unit and/or output.
Further, before storing the program address value in the storage unit and/or outputting the program address value, the method further comprises determining whether the program address value has been stored in the storage unit;
If the program address value is already stored in the storage unit, ending the program;
if the program address value is not stored in the memory unit, the program address value is stored in the memory unit and/or the program address value is output.
Further, the processing functional unit includes one of:
A processor;
A processing unit within the processor.
Further, monitoring the program address value of the processing function accessing the memory is accomplished by monitoring the program address on the chip bus.
An apparatus for embedded testing, comprising:
The information monitoring module is used for monitoring the program address value of the processing functional unit accessing the memory, and is a hardware unit arranged outside the processing functional unit;
and the processing module is used for storing the program address value into the storage unit and/or outputting the program address value.
Further, the method further comprises the following steps:
A comparison module for determining whether the program address value has been stored in the storage unit before storing the program address value in the storage unit and/or outputting the program address value,
If the program address value is already stored in the storage unit, ending the program;
if the program address value is not stored in the memory unit, the program address value is stored in the memory unit and/or the program address value is output.
Further, the processing functional unit includes one of:
A processor;
A processing unit within the processor.
Further, monitoring the program address value of the processing function accessing the memory is accomplished by monitoring the program address on the chip bus.
An embedded test system comprises any one of the embedded test devices, embedded software, a processing functional unit, a memory, a storage unit and a terminal, wherein the embedded software is arranged in the memory, the embedded test device is used for monitoring a program address value of the processing functional unit accessing the memory, storing the program address value of the memory into the storage unit, reading the program address value of the memory through the terminal or outputting the program address value of the memory to the terminal.
The method of the application uses the information monitoring module (a special hardware unit arranged outside the processing functional unit) to monitor the program address value of the processing functional unit accessing the memory, stores the program address value into the memory unit and/or outputs the program address value, without adding codes in the program, and additionally occupies the operation resources of the processing functional unit. The information monitoring module works independently of the processing functional unit, and the information monitoring module and the processing functional unit work in parallel.
The dynamic white box test in the software test (hereinafter referred to as the embedded software test) mainly tests and judges the executed program, namely, judges the instruction executed by the processing functional unit in the program, and the instruction corresponds to the program address corresponding to the instruction executed by the processing functional unit.
Compared with the code pile inserting method adopted in the existing dynamic white box test, the application adopts the information monitoring module to detect from the outside, and at least has the following beneficial effects:
1. The existing code instrumentation method needs to add extra codes, the codes need to occupy the operation resources of the processing functional units additionally, so that the processing operation time of each task of the program can be prolonged after the extra codes are added, the processing speed of a processor can be reduced, and problems and conflicts with the existing program can be caused after the codes are added, so that the program is abnormal in operation. The application uses the information monitoring module (hardware unit) outside the processing function unit without changing the source program, namely, the information monitoring module independent of the source program is used for monitoring the source program, compared with the existing code instrumentation method, the time of each task processing of the program operation is not changed, and the processing speed of the processor is not changed.
2. Meanwhile, the existing code instrumentation method needs to add additional codes, the added codes change the code length, so that the memory addresses of some programs and the previous programs change, when the absolute addresses of the programs are accessed in the programs, the programs cannot normally run, and in order to ensure the normal running of the programs added with the additional codes, the programs added with the codes need to be further adjusted, so that the complexity of the programs and the possibility of errors are further increased. The application monitors the source program by the hardware unit arranged outside the processing functional unit, namely, other units (namely, hardware) independent of the source program are used, the source program is not required to be changed, the storage or the output is not affected by the detection, the program complexity caused by the existing code instrumentation method can be completely avoided, and the program error problem caused by the existing code instrumentation method is also avoided.
3. Because the program is not required to be modified, the application can also be adopted to simultaneously carry out the software dynamic white box test in the program black box test and the prototype test, and compared with the existing test method, the application further greatly improves the test efficiency, the research and development efficiency and the production efficiency.
The existing code instrumentation method is a method based on the combination of software testing and embedded software design (hereinafter referred to as "software design"), and the method of the application is a method of combining chip design and application (hardware design), software testing and software design. Based on the prior software test and software design, the application innovatively introduces a hardware unit monitoring method, and greatly improves the test efficiency, the research and development efficiency and the production efficiency under the same effect.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
FIG. 1 is a flow chart of an embodiment of the method of the present application;
FIG. 2 is a flow chart of yet another embodiment of the method of the present application;
FIG. 3 is a schematic diagram of a data store of an embodiment of the method of the present application;
FIG. 4 is a structural frame diagram of an embodiment of the apparatus of the present application;
FIG. 5 is another structural frame diagram of an embodiment of the apparatus of the present application;
Fig. 6 is a structural framework diagram of an embodiment of the system of the present application.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
It is noted that all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless otherwise indicated.
In the present application, unless otherwise indicated, the use of orientation terms such as "upper, lower, top, bottom" are generally with respect to the orientation shown in the drawings or with respect to the component itself in the vertical, vertical or gravitational direction, and likewise, for ease of understanding and description, "inner, outer" refer to inner, outer relative to the profile of the component itself, but such orientation terms are not intended to limit the application.
It should be noted that in the various embodiments of the present application, for convenience of illustration only, the respective functional units are thus modularized, and in fact, the functional units may be distributed among the respective functional modules of the chip, and then perform the respective functions together.
It should be noted first that, in the various embodiments of the present application, the terms involved are explained as follows:
The processor is a processor core for short, is used as an operation and control core of a controller chip, is a final execution unit for information processing, data processing and program running, and is an important component of the controller chip, such as a RISC-V core CPU, an ARM M3 or other DSP cores and the like. The processor in the present application is not a separate CPU like an INTEL pentium in a conventional PC computer.
MCU, a microcontroller chip, a general term comprising a processor and other relevant functional modules (such as a program memory, a data memory, a PWM module, a UART, etc.).
MPU, microprocessor chip, processor applied to embedded system, and CPU applied to PC.
The controller, the controller chip and the embedded controller chip for short, comprise an MCU, a DSP and an MPU.
Chips are also known as integrated circuits (English: INTEGRATED CIRCUIT, IC). Refers to a silicon wafer containing integrated circuits that is small in size and is often part of a computer or other electronic device. The chip in the application is an embedded controller chip.
Embedded software, i.e., operating system and application software embedded in hardware. Typically, in a system, a program is embodied as embedded software.
The embedded system comprises one of embedded hardware, embedded software and embedded software, wherein the embedded hardware comprises a chip.
The embedded type is the short for the embedded system.
Instruction code telling the processor to perform a certain function. A program is a collection of instructions that are grouped together to perform a particular function, and in particular, a single instruction also belongs to the program.
Address including program address and data address.
Program address refers to the actual address in memory when the program is scheduled to run by the processor. The address of the instruction accessed by the processor may be called an instruction address or a program address.
Functional modules, namely units which complete specific functions in a chip and can be directly or indirectly accessed or updated by a processor at a specific moment, are also called peripheral devices, peripheral device modules, peripheral device functional modules and the like. Typically, within a chip, functional modules include, but are not limited to, memory (e.g., ROM, OTP, FLASH, SRAM, SDRAM, etc.), TIMER, GPIO modules, PWM modules, and the like. In particular, in a multiprocessor chip, some processors may also be accessed or updated as functional modules by other processors at a particular time.
Module address-the address where the functional module content is accessed or updated as data by the processor.
The data includes, but is not limited to, the content stored in the data memory in the program, or the content that the processor can query, update, etc.
And the data address is an address corresponding to operations such as inquiring, updating and the like of the data by the processor. In particular, programs and data may be stored in memory (including but not limited to ROM, OTP, FLASH, SRAM, SDRAM, etc.), and the addresses of other instructions may be used as program addresses as well as data addresses, except that the addresses of the instructions corresponding to the execution of the software at a particular time are program addresses.
Memory-functional blocks capable of storing programs and data, including but not limited to ROM, OTP, FLASH, SRAM, SDRAM, etc.
The terminal is short for intelligent terminal and is provided with equipment for inputting and outputting and processing information, including but not limited to PC, mobile phone, tablet, embedded equipment and the like.
Information refers to the objects transmitted and processed by audio, message and communication systems, and generally refers to all contents transmitted by human society. For a chip, the information may be the value of one or more registers on the chip, the value of one or more combining circuits, the value of one or more memories, or a combination of the foregoing.
Access includes processor queries and update actions (i.e., reads and writes) to the module.
Operational data, including processor query and setup actions on the data.
Printing, namely outputting information through UART, USB and the like on a chip to an external interface by using embedded common terms.
Inserting a section of self-defined code into the code. The purpose of instrumentation is that since the code that we insert will be compiled together into an executable file, when the processor executes the custom code that we insert during run-time, we can record and/or output any information we want to know, etc.
The code instrumentation, also called program instrumentation, was originally proposed by the professor J.C. Huang, which inserts some probes (also called "probes", essentially code segments for information collection, which may be assignment statements or function calls for collecting coverage information) into the program on the basis of guaranteeing the original logic integrity of the tested program, and through the execution of the probes and the throwing out of the feature data of the program operation, the control flow and data flow information of the program can be obtained through the analysis of these data, and further the dynamic information such as logic coverage can be obtained, thereby realizing the test purpose.
Code instrumentation method-a method of using code instrumentation.
Pile-in printing, namely an embedded common term, refers to a method for adding extra code to output related information in a program, and is generally used for testing and debugging, wherein the extra code can increase the load of a processor and possibly influence the normal operation of the embedded type.
The embedded test is an abbreviation of embedded system test, comprising embedded software and system test thereof, and generally the embedded test mainly works in the test of the embedded software. The embedded test of the present application refers to the testing of such embedded software or a system containing such embedded software. The embedded test comprises an embedded white box test and an embedded black box test.
The black box test is to test whether each function can be used normally.
White box testing, also known as structural testing, transparent box testing, logic driven testing, or code-based testing. White-box testing is divided into static testing and dynamic testing, wherein static testing refers to that programs and documents are analyzed and checked manually or by other tools without running the programs.
The embedded white box test comprises an embedded software static white box test and an embedded software dynamic white box test.
The embedded software static white box test refers to that the embedded program is not operated, and the embedded program and the document are analyzed and checked by manual or other tools.
The application relates to an embedded software dynamic white box test, in particular to a software dynamic white box test, a dynamic white box test or a white box test for short. Dynamic testing focuses on the running state of the program, while white-box testing focuses on checking the code internal structure and logic. The dynamic white-box test includes a logic overlay test (including a statement overlay test, a predicate overlay test, a conditional overlay test, a predicate/conditional overlay test, a conditional combination overlay test, a path overlay test, etc.), a basic path overlay test, a function overlay test, a loop path test, a program instrumentation test, etc.
A controller chip comprises a processor, the processor comprises an instruction "jump", the internal program address of the chip corresponds to 0-0 x1fff, the internal data address of the chip corresponds to 0x 2000-0 x2fff, the internal peripheral address of the chip corresponds to 0x 3000-0 x3fff, and the 0x3100 address is an IO output data register address. The "jump" instruction corresponds to the first 5 bits of binary code in the 32-bit instruction object code of "11100", which we consider equivalent to both. The "jump 0x1000" instruction refers to an instruction that jumps to the 0x1000 address, and the binary code in the object code of the corresponding 32-bit instruction is "1110 0000 0000 0000 0001 0000 0000 0000", which are considered as the same. Referring to FIG. 3, the program memory with program address value "0xa00" stores instruction "jump 0x1000", and the data memory with data address value "0x2100" stores data value "0xff00".
Referring to fig. 1, a flowchart of an embodiment of a method for embedded testing is shown.
S100, the program address value of the processing functional unit accessing the memory is monitored through an information monitoring module, wherein the information monitoring module is a hardware unit arranged outside the processing functional unit.
The memory is a unit that stores programs. Including but not limited to program memory FLASH, ROM, OTP, SRAM, as well as other units having stored program functions, etc.
The program address value is the address value of the specific instruction. Referring to FIG. 3, for example, the address "0xa00" of the instruction "jump 0x1000" is the program address value.
The program address value monitoring the access of the processing function unit to the memory may operate in a normal operating state of the processing function unit, i.e. the processing function unit is not in a debug state, or the processing function unit is not in an interrupt state, or the processing function unit is not in an exception state, etc. The monitoring of the program address value of the processing function unit accessing the memory works independently of the processing function unit. Monitoring the program address value of the processing function unit accessing the memory does not occupy processing function unit operating resources. The monitoring of the program address value of the processing function unit accessing the memory works in parallel with the processing function unit.
The processing functional unit includes one of:
A processor;
A processing unit within the processor.
The processing function may be located within the processor as part of the processor or may be a complete processor.
Monitoring the program address value of the processing function accessing the memory is accomplished by monitoring the program address on the chip bus.
Monitoring program address values of the processing functional unit accessing the memory includes at least one of:
monitoring a program address value received by a processing functional unit;
program address values issued by the processing function are monitored.
Monitoring a program address value received by a memory;
Program address values issued by the memory are monitored.
Monitoring the program address value of the processing function unit accessing the memory also includes directly or indirectly obtaining a "program address value of the processing function unit accessing the memory" and directly or indirectly obtaining indirect information equivalent to the "program address value of the processing function unit accessing the memory".
Monitoring the program address value of the processing functional unit accessing the memory, judging the accessed instruction content at the moment, and inquiring and/or modifying related variables (the variables are in registers and the memory), thereby realizing complex tests (such as condition coverage test and the like) in dynamic white-box tests.
S200, storing the program address value in the storage unit and/or outputting the program address value.
Output refers to directly or indirectly outputting information through a bus, bluetooth, UART, USB and other interfaces on a chip or a module.
And storing the program address value into a storage unit and/or outputting the program address value through a processing module, wherein the processing module is a hardware unit arranged outside the processing functional unit. Storing the program address value into the memory unit and/or outputting the program address value may operate in a state in which the processing function unit is in normal operation, i.e., the processing function unit is not in a debug state, or the processing function unit is not in an interrupt state, or the processing function unit is not in an abnormal state, or the like. Storing the program address value into the memory unit and/or outputting the program address value is operated independently of the processing function unit. Storing the program address value into the memory unit and/or outputting the program address value does not occupy processing function unit operating resources. The program address value is stored in the memory unit and/or the program address value output and processing function unit work in parallel. It is of course also possible to store the program address value in the memory unit and/or to output the program address value when the processing function unit is in an abnormal operating state.
The time for storing the program address value in the storage unit and/or outputting the program address value may be the time of "the program address value of the monitor processing function unit accessing the memory", or may be any time after the occurrence of "the program address value of the monitor processing function unit accessing the memory".
The memory unit comprises at least one of the following two cases:
An internal memory unit;
an external memory unit.
The internal memory unit refers to a unit with a memory function inside the chip, and comprises registers, FIFO, SRAM, FLASH and the like.
The external memory unit refers to a unit with a memory function outside the chip, and comprises a FLASH, an SRAM, a U disk, an SD card, a hard disk and the like which are externally connected with the outside of the chip and have the memory function.
By other operations, or in conjunction with software, interrupts, or other external programmable devices, the indirect information storage or transfer equivalent to or containing the "program address value of processing function unit accessing memory" is all "store program address value into memory unit and/or output program address value".
The method also comprises a method for stealth or stealth comprising the operations of S100 and S200, and a method which is indirectly realized and is equivalent to or can be converted into the operations of S100 and S200.
As shown in fig. 3, although there may be many "jump 0x1000" instructions in the program, in this embodiment, the program address value "0xa00" of the processing function unit access memory is monitored and stored. The information (program address value '0 xa 00') is read from the storage unit, so that the program can know that the program executes the instruction (instruction 'jump 0x 1000') of the program address value '0 xa 00', and the purpose of statement coverage test in the dynamic white box test of software is achieved.
The method of the application uses the information monitoring module to monitor the program address value of the processing function unit accessing the memory, stores the program address value into the memory unit and/or outputs the program address value, without adding codes in the program, and additionally occupies the operation resources of the processing function unit. The information monitoring module works independently of the processing functional unit, and the information monitoring module and the processing functional unit work in parallel.
The dynamic white box test in the software test needs to test and judge the executed program, namely, judge the instruction executed by the processing function unit in the program; the application can judge the executed program by monitoring, storing and/or outputting the program address value of the processing functional unit accessing the memory, thereby achieving the purpose of dynamic white box test.
The existing code instrumentation method needs to add extra codes, the codes need to occupy the running resources of the processing functional units additionally, and problems and conflicts with the existing program can be caused after the codes are added. For example, the original program needs 200 clock cycles to run 1 task cycle, and after adding the codes, the original program needs 220 clock cycles to change to 1 task cycle, so that the running time of the program task cycle after adding the additional codes becomes longer, and the processing speed of the processor becomes slower, which is equivalent to that the 20Mhz processor outputs a pulse by 10us before and changes to 11us to output a pulse after the code is inserted, and the program is abnormally run. The application uses the information monitoring module (hardware unit) outside the processing function unit without changing the source program, namely, the information monitoring module outside the source program is used for monitoring the source program, compared with the existing code instrumentation method, the program running each task period is unchanged, the processing speed of the processor is not changed, and new problems and conflicts are not introduced.
Meanwhile, the existing code instrumentation method needs to add extra codes, and the length of the codes is changed after the codes are added, so that the storage addresses of some programs and the former programs are changed. If the absolute addresses of the programs are accessed in the programs, the programs cannot normally run. For example, in a program with a remote upgrading function, a program with an absolute memory address is updated by using a remote communication technology, the program address to be upgraded is 0x 500-0 x800, an additional code is required to be added by using the existing code instrumentation method, the program address is 0x 510-0 x810, and thus, the program cannot normally run after being upgraded on the original program with 0x 500-0 x 800. To ensure proper operation of the program after the addition of the additional code, further adjustments to the program after the addition of the code are required, which further increases the complexity of the program and the likelihood of errors. The application monitors the source program by the information monitoring module (hardware unit) arranged outside the processing functional unit, namely, the information monitoring module independent of the source program is used for monitoring the source program, the source program is not required to be changed, the storage or the output is not affected by the detection, the program complexity caused by the existing code instrumentation method can be completely avoided, and the program error problem caused by the existing code instrumentation method is also avoided.
Because the program is not required to be modified, the application can also be adopted to simultaneously carry out the software dynamic white box test in the program black box test and the prototype test, and compared with the existing test method (the existing test method possibly changes the program because the program is modified and can not be simultaneously tested with the black box test and the prototype test), the application further greatly improves the test efficiency, the research and development efficiency and the production efficiency.
Referring to fig. 2, a flowchart of a method for embedded testing according to another embodiment of the present application is shown.
S100, the program address value of the processing functional unit accessing the memory is monitored through an information monitoring module, wherein the information monitoring module is a hardware unit arranged outside the processing functional unit.
S110, judging whether a program address value is stored in a storage unit or not;
If the program address value is already stored in the storage unit, ending the program;
if the program address value is not stored in the storage unit, S200 is performed.
Determining whether the program address value has been stored in the memory unit includes determining whether the program address value has been stored in a memory unit internal or external to the chip.
S200, storing the program address value in the storage unit and/or outputting the program address value.
By other operations, or in conjunction with software, interrupts, or other external programmable devices, the indirect information storage or transfer equivalent to or containing the "program address value of processing function unit accessing memory" is all "store program address value into memory unit and/or output program address value".
As shown in fig. 3, although the "jump 0x1000" instruction with the program address value of "0xa00" may be executed many times in the program, in this embodiment, we store only once, which saves the storage space. The information (program address value '0 xa 00') is read from the storage unit, so that the program can know that the program executes the instruction (instruction 'jump 0x 1000') with the program address value of '0 xa 00', the purpose of statement coverage test in the dynamic white box test of the software is achieved, and meanwhile, the storage space is saved.
Referring to fig. 4 and 5, a structural frame diagram of an embedded test device according to an embodiment of the application is shown.
In FIG. 5, device # 1, device # 2, device # 3 and device # n are all the same embedded test devices, i.e., the embedded test devices of the present application are all disposed outside the processor and can work normally, the devices for embedded test can be set independently or in other hardware, and can be set at different positions according to the requirements of the structure, and the numbers of the devices in fig. 5 are only different positions for distinguishing the devices for embedded test.
An apparatus for embedded testing, comprising:
the information monitoring module M100 is used for monitoring the program address value of the processing functional unit accessing the memory, and the information monitoring module M100 is a hardware unit arranged outside the processing functional unit.
The processing functional unit includes one of:
A processor;
A processing unit within the processor.
The processing function may be located within the processor as part of the processor or may be a complete processor.
As shown in FIG. 5, the apparatus may be located inside the processor as part of the processor or outside the processor as a complete module.
Monitoring the program address value of the processing function accessing the memory is accomplished by monitoring the program address on the chip bus.
Monitoring program address values of the processing functional unit accessing the memory includes at least one of:
monitoring a program address value received by a processing functional unit;
program address values issued by the processing function are monitored.
Monitoring a program address value received by a memory;
Program address values issued by the memory are monitored.
And also comprises a comparison module M110, wherein the comparison module M110 is used for judging whether the program address value is stored in the storage unit,
If the comparison module judges that the program address value is already stored in the storage unit, the program is ended;
If the comparison module determines that the program address value is not stored in the storage unit, the processing module M200 stores the program address value in the storage unit and/or outputs the program address value.
The processing module M200 is a hardware unit disposed outside the processing functional unit.
In this embodiment, the information monitoring module and the processing module store the program address value into the storage unit and/or output the program address value for analysis, so as to achieve the purpose of dynamic white-box testing in software testing. Because the application does not need to add codes in the program, compared with the existing test method, the test efficiency, the research and development efficiency and the production efficiency are greatly improved.
Fig. 6 is a structural frame diagram of an embedded test system according to another embodiment of the present application.
The device in fig. 6 is an embedded test device in the present application, and the embedded test device is disposed in a chip, and of course, may be disposed in other hardware, or may be disposed separately, so long as it is disposed outside the processor and can work normally.
An embedded test system comprising the embedded test device according to any one of the above embodiments, further comprising embedded software, a processing function unit, a memory, a storage unit, and a terminal, wherein the embedded software is in the memory, and the other modules in fig. 6 include the storage unit, the embedded test device is configured to monitor a program address value of the processing function unit for accessing the memory, store the program address value of the memory in the storage unit, read the program address value of the memory through the terminal, or output the program address value of the memory to the terminal. The program address values of the memories are acquired, so that the program can know that the program executes the instructions of the program address values of the memories, and the purpose of dynamic white box testing of the software is achieved.
It will be apparent that the embodiments described above are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present application. As used herein, the singular is also intended to include the plural unless the context clearly indicates otherwise, and furthermore, it is to be understood that the terms "comprises" and/or "comprising" when used in this specification are taken to specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein.
The above is only a preferred embodiment of the present application, and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (9)

1. A method of embedded testing, comprising:
the method comprises the steps that a program address value of a processing functional unit accessing a memory is monitored through an information monitoring module, wherein the information monitoring module is a hardware unit arranged outside the processing functional unit;
Storing the program address value in a memory unit and/or outputting the program address value.
2. The method of embedded testing according to claim 1, wherein before storing the program address value in a memory unit and/or outputting the program address value, the method of embedded testing further comprises determining whether the program address value has been stored in a memory unit;
if the program address value is already stored in the storage unit, ending the program;
If the program address value is not stored in the storage unit, the program address value is stored in the storage unit and/or the program address value is output.
3. The method of embedded testing of claim 1, wherein the processing functional unit comprises one of:
A processor;
A processing unit within the processor.
4. The method of embedded testing of claim 1, wherein the monitoring of program address values of the processing function accessing the memory is accomplished by monitoring program addresses on a chip bus.
5. An apparatus for embedded testing, comprising:
the information monitoring module is used for monitoring a program address value of the processing functional unit accessing the memory, and is a hardware unit arranged outside the processing functional unit;
And the processing module is used for storing the program address value into a storage unit and/or outputting the program address value.
6. The apparatus for embedded testing of claim 5, further comprising:
The comparison module is used for judging whether the program address value is stored in the storage unit or not before the program address value is stored in the storage unit and/or output;
if the program address value is already stored in the storage unit, ending the program;
If the program address value is not stored in the storage unit, the program address value is stored in the storage unit and/or the program address value is output.
7. The device for embedded testing of claim 5, wherein the processing function unit comprises one of:
A processor;
A processing unit within the processor.
8. The apparatus of claim 5, wherein the monitoring of program address values of the processing unit accessing the memory is accomplished by monitoring program addresses on the chip bus.
9. An embedded test system, characterized by comprising the embedded test device according to any one of claims 5-8, further comprising embedded software, a processing function unit, a memory, a storage unit and a terminal, wherein the embedded software is in the memory, the embedded test device is used for monitoring a program address value of the processing function unit accessing the memory, storing the program address value of the memory in the storage unit, reading the program address value of the memory through the terminal, or outputting the program address value of the memory to the terminal.
CN202411684063.3A 2024-11-22 2024-11-22 Method, device and system for embedded test Pending CN119201750A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411684063.3A CN119201750A (en) 2024-11-22 2024-11-22 Method, device and system for embedded test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411684063.3A CN119201750A (en) 2024-11-22 2024-11-22 Method, device and system for embedded test

Publications (1)

Publication Number Publication Date
CN119201750A true CN119201750A (en) 2024-12-27

Family

ID=94056723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411684063.3A Pending CN119201750A (en) 2024-11-22 2024-11-22 Method, device and system for embedded test

Country Status (1)

Country Link
CN (1) CN119201750A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1912849A (en) * 2006-09-01 2007-02-14 上海大学 Chip dynamic tracing method of microprocessor
CN101211309A (en) * 2006-12-29 2008-07-02 中兴通讯股份有限公司 Embedded system progress abnormal tracking position-finding method
CN101458725A (en) * 2007-12-14 2009-06-17 上海海尔集成电路有限公司 Microcontroller chip and debug method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1912849A (en) * 2006-09-01 2007-02-14 上海大学 Chip dynamic tracing method of microprocessor
CN101211309A (en) * 2006-12-29 2008-07-02 中兴通讯股份有限公司 Embedded system progress abnormal tracking position-finding method
CN101458725A (en) * 2007-12-14 2009-06-17 上海海尔集成电路有限公司 Microcontroller chip and debug method thereof

Similar Documents

Publication Publication Date Title
US4811345A (en) Methods and apparatus for providing a user oriented microprocessor test interface for a complex, single chip, general purpose central processing unit
US6145123A (en) Trace on/off with breakpoint register
KR100439781B1 (en) A data processor, an operation method thereof, a method of executing the debugging operation, and a method of correcting a disadvantage value among the data processor
US6598178B1 (en) Peripheral breakpoint signaler
US5717851A (en) Breakpoint detection circuit in a data processor and method therefor
US20030074650A1 (en) Debugger operating system for embedded systems
US8024620B2 (en) Dynamic address-type selection control in a data processing system
US7434103B2 (en) Program processing device
US7428661B2 (en) Test and debug processor and method
US20070011492A1 (en) Generation of trace data
US6760864B2 (en) Data processing system with on-chip FIFO for storing debug information and method therefor
US6052801A (en) Method and apparatus for providing breakpoints on a selectable address range
US7203819B2 (en) Program processing device
US7334114B2 (en) Real-time monitoring, alignment, and translation of CPU stalls or events
US7526756B2 (en) Address watch breakpoints with basing pointers
EP1125199A1 (en) Method of debugging a program thread
CN119201750A (en) Method, device and system for embedded test
US7051237B2 (en) Program-controlled unit
US7281162B2 (en) Program-controlled unit
US20020188813A1 (en) On-chip hardware breakpoint generator with comprehensive memory operation detection
US5991899A (en) Method and apparatus for a real-time diagnostic tool using a non-intrusive trace technique
CN119201749A (en) Embedded debugging method, device and system
US6510507B1 (en) Page address look-up range ram
US7716533B2 (en) System and method for trapping bus cycles
US6560698B1 (en) Register change summary resource

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination