Embedded testing method and apparatus, and system

By introducing an information monitoring module into the controller chip to monitor and store program address values, the problem of low efficiency in existing dynamic white-box testing of software is solved, achieving efficient embedded testing, improving testing and R&D efficiency, and avoiding program complexity and errors.

WO2026108466A1PCT designated stage Publication Date: 2026-05-28SHENZHEN KANGAO XINGYE TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHENZHEN KANGAO XINGYE TECHNOLOGY CO LTD
Filing Date
2025-10-15
Publication Date
2026-05-28

AI Technical Summary

Technical Problem

Existing dynamic white-box testing methods for software are inefficient, difficult to implement, and may cause program errors due to code additions. Furthermore, black-box testing and prototype testing cannot be performed simultaneously.

Method used

An information monitoring module is used to monitor the program address values ​​accessed by the processing function unit to the memory, and to store or output them. This hardware unit works independently of the processing function unit, avoiding the need to add code to the program.

Benefits of technology

It improves testing efficiency, R&D efficiency, and production efficiency, avoids program complexity and error problems, and allows black-box testing and prototype testing to be carried out simultaneously.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025127719_28052026_PF_FP_ABST
    Figure CN2025127719_28052026_PF_FP_ABST
Patent Text Reader

Abstract

An embedded testing method and apparatus, and a system. The method comprises: by means of an information monitoring module, monitoring a program address value of a processing functional unit accessing a memory, the information monitoring module being a hardware unit provided outside of the processing functional unit; and 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, which stores or outputs a program address value from monitoring a processing functional unit accessing a memory, so as to achieve the purpose of software testing on a corresponding program.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus and system for embedded testing Technical Field

[0001] This application relates to a method, apparatus, and system for embedded testing, and in particular to a controller chip and a method, apparatus, and system for embedded testing thereof. Background Technology

[0002] With the development of chip technology, more and more functional modules are being integrated into chips. The amount of data processed by controller chips is increasing, and the programs that controller chips need to run are also becoming larger, potentially numbering in the hundreds of thousands or even millions. This creates the following requirement: to achieve the purpose of dynamic white-box testing of embedded software (hereinafter referred to as dynamic white-box testing).

[0003] In existing dynamic white-box testing of software, code instrumentation (hereinafter referred to as code instrumentation) is used to implement dynamic white-box testing. The inventors have found that the existing technology has the following shortcomings: 1. Instrumentation in the program requires the processor resources of the controller chip, resulting in longer execution times for previously used code with the same functionality, potentially introducing unexpected situations, increasing testing difficulty, and being inefficient; 2. Instrumentation requires adding code, which increases the program's length, altering previous program addresses. Calling these absolute addresses within the program can lead to unexpected situations, increasing testing difficulty; 3. In existing software testing, black-box testing, prototype testing, and dynamic white-box testing cannot be performed simultaneously, resulting in low testing efficiency. Summary of the Invention

[0004] To address the issues of low efficiency, high testing difficulty, and potential for errors due to code additions in existing dynamic white-box testing methods, this application provides a method, apparatus, and system for embedded testing. The method is as follows:

[0005] The information monitoring module monitors the program address values ​​of the processing function unit accessing the memory. The information monitoring module is a hardware unit located outside the processing function unit.

[0006] Store the program address value in a memory location and / or output the program address value.

[0007] Furthermore, before storing the program address value in the memory unit and / or outputting the program address value, the method also includes: determining whether the program address value has already been stored in the memory unit;

[0008] If the program address value is already stored in the memory location, the program terminates.

[0009] If the program address value is not stored in the memory location, store the program address value in the memory location and / or output the program address value.

[0010] Furthermore, the processing functional unit includes one of the following:

[0011] processor;

[0012] The processing unit inside the processor.

[0013] Furthermore, the monitoring of the program address value of the processing function unit accessing the memory is achieved by monitoring the program address on the chip bus.

[0014] An embedded testing apparatus, comprising:

[0015] The information monitoring module is used to monitor the program address value of the processing function unit accessing the memory. The information monitoring module is a hardware unit located outside the processing function unit.

[0016] The processing module is used to store program address values ​​into memory units and / or output program address values.

[0017] Furthermore, it also includes:

[0018] The comparison module is used to determine whether the program address value has already been stored in the memory location before storing the program address value in the memory location and / or outputting the program address value.

[0019] If the program address value is already stored in the memory location, the program terminates.

[0020] If the program address value is not stored in the memory location, store the program address value in the memory location and / or output the program address value.

[0021] Furthermore, the processing functional unit includes one of the following:

[0022] processor;

[0023] The processing unit inside the processor.

[0024] Furthermore, the monitoring of the program address value of the processing function unit accessing the memory is achieved by monitoring the program address on the chip bus.

[0025] An embedded testing system includes the embedded testing apparatus described in any of the above claims. The embedded testing system further includes embedded software, a processing function unit, a memory, a storage unit, and a terminal. The embedded software is stored in the memory. The embedded testing apparatus is used to monitor the program address value accessed by the processing function unit to 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.

[0026] This application's method uses an information monitoring module (a dedicated hardware unit located outside the processing functional unit) to monitor the program address values ​​accessed by the processing functional unit in memory, storing the program address values ​​in a memory unit and / or outputting the program address values. This eliminates the need to add code to the program and avoids additional resource consumption by the processing functional unit. The information monitoring module operates independently of the processing functional unit; the information monitoring module and the processing functional unit operate in parallel.

[0027] Dynamic white-box testing in software testing (short for embedded software testing, hereinafter the same) mainly tests and judges the executed program, that is, judges the instructions executed by the processing functional unit in the program. These instructions correspond to the program addresses of the instructions executed by the processing functional unit. Therefore, this application can judge the executed program by monitoring, storing and / or outputting the program address values ​​of the processing functional unit accessing the memory through the information monitoring module, thus achieving the purpose of dynamic white-box testing.

[0028] Compared to the code instrumentation methods used in existing dynamic white-box testing, this application employs an information monitoring module for external detection, which brings at least the following benefits:

[0029] 1. Existing code instrumentation methods require adding extra code, which consumes additional processing unit resources, increasing the execution time of each task, much like a slower processor. This added code may also cause problems and conflicts with the existing program, leading to malfunctions. This application, however, requires no modification to the source code. It uses an information monitoring module (hardware unit) located outside the processing unit to monitor the source code. Compared to existing code instrumentation methods, the execution time of each task remains unchanged, and the processor speed remains the same.

[0030] 2. Furthermore, existing code instrumentation methods require adding extra code, which alters the code length and changes the memory addresses of some programs. When the program accesses these absolute addresses, it malfunctions. To ensure the program functions correctly after adding this extra code, further adjustments are needed, increasing complexity and the likelihood of errors. This application, however, uses a hardware unit outside the processing unit—a unit independent of the source program—to monitor the source program. This requires no modification to the source program, and storage or output remains unaffected by the monitoring. It completely avoids the program complexity and errors caused by existing code instrumentation methods.

[0031] 3. Since no program modification is required, this application can also be used to perform dynamic white-box testing of software during program black-box testing and prototype testing. Compared with existing testing methods, this further greatly improves testing efficiency, R&D efficiency and production efficiency.

[0032] Existing code instrumentation methods are based on a combination of software testing and embedded software design (hereinafter referred to as "software design"). The method in this application combines chip design and application (hardware design), software testing, and software design. Building upon previous software testing and software design methods, this application innovatively introduces a hardware unit monitoring method, which significantly improves testing efficiency, R&D efficiency, and production efficiency while achieving the same results. Attached Figure Description

[0033] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0034] Figure 1 is a flowchart of an embodiment of the method of this application;

[0035] Figure 2 is a flowchart of another embodiment of the method of this application;

[0036] Figure 3 is a data storage schematic diagram of an embodiment of the method of this application;

[0037] Figure 4 is a structural framework diagram of an embodiment of the device of this application;

[0038] Figure 5 is another structural framework diagram of an embodiment of the device of this application;

[0039] Figure 6 is a structural framework diagram of an embodiment of the system of this application. Detailed Implementation

[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0041] It should be noted that, unless otherwise specified, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0042] In this application, unless otherwise stated, directional terms such as "upper," "lower," "top," and "bottom" are generally used in relation to the direction shown in the accompanying drawings, or in relation to the vertical, perpendicular, or gravitational direction of the component itself; similarly, for ease of understanding and description, "inner" and "outer" refer to the inner and outer contours of each component itself, but the above directional terms are not intended to limit this application.

[0043] It should be noted that in the various embodiments of this application, the corresponding functional units are modularized only for the sake of ease of explanation. In fact, these functional units can also be distributed in the various functional modules of the chip and then work together to complete the corresponding functions.

[0044] First, it should be noted that the terms used in the various embodiments of this application are explained as follows:

[0045] Processor: Short for processor core, it serves as the computational and control core of a controller chip. It is the final execution unit for information processing, data processing, and program execution, and is a crucial component of the controller chip. Examples include RISC-V core CPUs, ARM's M3, or other DSP cores. The processor in this application is not a standalone CPU like the Intel Pentium in a traditional PC computer.

[0046] MCU: Microcontroller chip, which is a general term for a processor and other related functional modules (such as program memory, data memory, PWM module, UART, etc.).

[0047] MPU: Microprocessor chip, a processor used in embedded systems, which is different from the CPU used in PCs.

[0048] Controller: An abbreviation for controller chip and embedded controller chip, including: MCU, DSP and MPU.

[0049] Chip: Also known as an integrated circuit (IC). It refers to a silicon wafer containing integrated circuits, which is very small and often part of a computer or other electronic device. The chip in this application is an embedded controller chip.

[0050] Embedded software refers to the operating system and application software embedded in hardware. Generally, in a system, a program is a specific manifestation of embedded software.

[0051] Embedded systems include one of the following: embedded hardware, which includes chips; or embedded software.

[0052] Embedded: is short for embedded system.

[0053] Instruction: Code that tells the processor to perform a specific function. A program is a collection of instructions grouped together to accomplish a particular function; in particular, a single instruction is also a program.

[0054] Address: Includes program address and data address.

[0055] Program address: This refers to the actual address in memory where a program is scheduled to run by the processor. The address of the instruction accessed by the processor can be called the instruction address or the program address.

[0056] Functional module: A unit within a chip that performs a specific function and can be directly or indirectly accessed or updated by the processor at any given time; also known as a peripheral device, peripheral module, peripheral functional module, etc. Generally, within a chip, functional modules include, but are not limited to, memory (e.g., ROM, OTP, FLASH, SRAM, SDRAM, etc.), timers, GPIO modules, PWM modules, etc. In particular, in multiprocessor chips, at any given time, some processors can also act as functional modules, allowing access or updates from other processors.

[0057] Module address: The address at which the content of a functional module is accessed or updated by the processor as data.

[0058] Data includes, but is not limited to: content stored in data storage within a program, or content that the processor can query, update, or perform other operations on.

[0059] Data address: The address corresponding to the processor's operations such as querying and updating data. In particular, programs and data can be stored in memory (including but not limited to ROM, OTP, FLASH, SRAM, SDRAM, etc.). Except for the address of the instruction corresponding to the software execution at a specific moment, which is the program address, the address of other instructions can be used as both program address and data address.

[0060] Memory: A functional module that can store programs and data, including but not limited to ROM, OTP, FLASH, SRAM, SDRAM, etc.

[0061] Terminal: Short for smart terminal, a device with input and output capabilities and information processing capabilities; including but not limited to: PCs, mobile phones, tablets, embedded devices, etc.

[0062] Information refers to the objects transmitted and processed by audio, messages, and communication systems, broadly encompassing all content disseminated in human society. In the context of chips, information can also be the value of one or more registers on the chip, the value of one or more combinational circuits, the value of one or more memory units, or a combination of the aforementioned.

[0063] Access includes processor queries and update actions on modules (i.e., reads and writes).

[0064] Manipulating data includes the processor's actions of querying and setting data.

[0065] Printing: A common term in embedded systems, referring to the output of information through external interfaces such as UART and USB on the chip.

[0066] Instrumentation: This involves inserting a piece of custom code into the codebase. The purpose of instrumentation is that, since the inserted code is compiled into the executable file, when the processor executes it, we can record / or output any information we want to know.

[0067] Code instrumentation, also known as program instrumentation, was first proposed by Professor JC Huang. It involves inserting probes (also known as "detectors," which are essentially code segments that collect information, such as assignment statements or function calls that collect coverage information) into the program while ensuring the original logical integrity of the program under test. By executing the probes and exposing characteristic data of the program's operation, and by analyzing this data, the control flow and data flow information of the program can be obtained, thereby obtaining dynamic information such as logical coverage, thus achieving the testing purpose.

[0068] Code instrumentation method: The method of using code instrumentation.

[0069] Instrumentation printing: A common term in embedded systems, referring to the method of adding extra code to a program to output relevant information, generally used for testing and debugging; this extra code increases the processor load and may also affect the normal operation of the embedded system.

[0070] Embedded testing: This is short for embedded system testing, encompassing the testing of embedded software and its system. Generally, embedded testing primarily focuses on the testing of embedded software. The embedded testing discussed in this application refers to the testing of such embedded software or systems containing such embedded software. Embedded testing includes embedded white-box testing and embedded black-box testing.

[0071] Black-box testing is a method of testing to determine whether each function works properly.

[0072] 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 and dynamic types. Static testing refers to analyzing and inspecting the program and documentation manually or using other tools without running the program.

[0073] Embedded white-box testing includes embedded software static white-box testing and embedded software dynamic white-box testing.

[0074] Static white-box testing of embedded software refers to the analysis and inspection of embedded programs and documentation by manual means or other tools without running the embedded program.

[0075] Embedded software dynamic white-box testing: This term, used in this application, refers to software dynamic white-box testing, a method for testing embedded software that combines the characteristics of dynamic testing and white-box testing. Dynamic testing focuses on the program's runtime state, while white-box testing emphasizes examining the internal structure and logic of the code. Dynamic white-box testing includes: logic coverage testing (including statement coverage testing, decision coverage testing, condition coverage testing, decision / condition coverage testing, condition combination coverage testing, and path coverage testing, etc.), basic path coverage testing, function coverage testing, loop path testing, program instrumentation testing, etc.

[0076] A controller chip contains a processor, which contains the instruction "jump". The chip's internal program addresses correspond to 0~0x1fff; the chip's internal data addresses correspond to 0x2000~0x2fff; the chip's internal peripheral addresses correspond to 0x3000~0x3fff, and address 0x3100 is the address of the I / O output data register. The "jump" instruction corresponds to the first 5 bits of the 32-bit instruction target code as "11100", which we consider equivalent. Additionally, the "jump 0x1000" instruction means "jump to address 0x1000", and its corresponding binary code in the 32-bit instruction target code is "1110 0000 0000 0000 0001 0000 0000 0000", which we also consider equivalent. Please refer to Figure 3. The program memory with the program address value of "0xa00" stores the instruction "jump 0x1000"; the data memory with the data address value of "0x2100" stores the data value "0xff00".

[0077] Please refer to Figure 1, which is a flowchart of a specific embodiment of an embedded testing method according to this application.

[0078] S100 monitors the program address value of the processing function unit accessing the memory through the information monitoring module, which is a hardware unit located outside the processing function unit.

[0079] Memory is a unit for storing programs. It includes, but is not limited to, program memory FLASH, ROM, OTP, SRAM, and other units with program storage functions.

[0080] The program address value is the address value of a specific instruction. Please refer to Figure 3. For example, the address "0xa00" of the instruction "jump 0x1000" is the program address value.

[0081] The monitoring and processing unit's access to memory program addresses can operate while the processing unit is in normal working condition, i.e., not in debug mode, not in interrupt mode, or not in an abnormal state, etc. The monitoring and processing unit's access to memory program addresses operates independently of the processing unit. The monitoring and processing unit's access to memory program addresses does not consume the processing unit's operating resources. The monitoring and processing unit's access to memory program addresses and the processing unit operate in parallel.

[0082] The processing functional unit includes one of the following:

[0083] processor;

[0084] The processing unit inside the processor.

[0085] The processing unit can be located inside the processor as part of the processor, or it can be a complete processor.

[0086] The monitoring and processing function unit accesses the program address value of the memory by monitoring the program address on the chip bus.

[0087] The program address value for the monitoring and processing function unit to access memory includes at least one of the following:

[0088] The program address value received by the monitoring and processing function unit;

[0089] The program address value issued by the monitoring and processing function unit.

[0090] Monitor the program address value received by the memory;

[0091] Monitor the program address value issued by the memory.

[0092] Monitoring the program address value of the processing function unit accessing the memory also includes: directly or indirectly obtaining the "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".

[0093] While monitoring the program address value of the processing unit accessing memory, it also determines the content of the instruction accessed at this moment, queries and / or modifies the relevant variables (the variables are in registers and memory); thus, it is possible to realize complex tests in dynamic white-box testing (such as condition coverage tests, etc.).

[0094] S200, store the program address value in the memory unit and / or output the program address value.

[0095] Output refers to the direct or indirect output of information through interfaces such as buses, Bluetooth, UART, and USB on a chip or module.

[0096] The processing module stores the program address value in a storage unit and / or outputs the program address value. This processing module is a hardware unit located outside the processing functional unit. Storing the program address value in the storage unit and / or outputting the program address value can operate when the processing functional unit is in a normal working state, i.e., not in a debugging state, not in an interrupted state, or not in an abnormal state, etc. Storing the program address value in the storage unit and / or outputting the program address value operates independently of the processing functional unit. Storing the program address value in the storage unit and / or outputting the program address value does not consume the processing functional unit's operating resources. Storing the program address value in the storage unit and / or outputting the program address value can work in parallel with the processing functional unit. Alternatively, the program address value can also be stored in the storage unit and / or output when the processing functional unit is in an abnormal working state.

[0097] The time for storing the program address value into the memory unit and / or outputting the program address value can be the moment when "the program address value of the processing function unit accessing the memory is monitored", or it can be any time after the occurrence of "the program address value of the processing function unit accessing the memory is monitored".

[0098] A storage unit includes at least one of the following two cases:

[0099] Internal storage units;

[0100] External storage unit.

[0101] Internal storage units refer to units with storage functions inside the chip; these include: registers, FIFO, SRAM, FLASH, etc.

[0102] External storage units refer to units with storage functions located outside the chip; these include: external FLASH, SRAM, USB flash drives, SD cards, hard drives, and other storage units connected to the chip.

[0103] Storing or transmitting indirect information equivalent to or containing the "program address value of the processing function unit accessing the memory" through other operations, or in conjunction with software, interrupts, or other external programmable devices, all fall under the category of "storing the program address value in the memory unit and / or outputting the program address value".

[0104] The method of this application also includes: a method that implicitly contains or includes the S100 and S200 operations; and a method that indirectly implements, is equivalent to, or can be transformed into the S100 and S200 operations.

[0105] As shown in Figure 3, although there may be many "jump 0x1000" instructions in the program, in this embodiment, the program address value "0xa00" accessing the memory by the processing function unit is detected and stored. We read this information (program address value "0xa00") from the storage unit, thereby knowing that the program has executed the instruction at program address value "0xa00" (instruction "jump 0x1000"), achieving the purpose of statement coverage testing in dynamic white-box software testing.

[0106] This application's method uses an information monitoring module to monitor the program address values ​​accessed by the processing functional unit in memory, storing the program address values ​​in a memory unit and / or outputting the program address values. This eliminates the need to add code to the program or consume additional processing functional unit resources. The information monitoring module operates independently of the processing functional unit; the information monitoring module and the processing functional unit operate in parallel.

[0107] Dynamic white-box testing in software testing requires testing and judging the executed program, that is, judging the instructions executed by the processing functional units in the program; these instructions correspond to the program addresses of the instructions executed by the processing functional units; therefore, this application can judge the executed program by monitoring, storing and / or outputting the program address values ​​of the processing functional units accessing the memory, thus achieving the purpose of dynamic white-box testing.

[0108] Existing code instrumentation methods require adding extra code, which consumes additional processing unit resources. Adding this code may cause problems and conflicts with the existing program. For example, if the original program took 200 clock cycles to complete one task loop, adding this code would increase the time to complete one task loop to 220 clock cycles, thus slowing down the processor. This is equivalent to a 20MHz processor outputting a pulse every 10µs before, but after code instrumentation, it outputs a pulse every 11µs, causing program malfunction. This application, however, does not require modification to the source code. It uses an information monitoring module (hardware unit) located outside the processing unit to monitor the source code. Compared to existing code instrumentation methods, the program's execution time for each task cycle remains unchanged, the processor speed remains the same, and no new problems or conflicts are introduced.

[0109] Furthermore, existing code instrumentation methods require adding extra code, which alters the code length and changes the memory addresses of some programs. When the program accesses these absolute addresses, it can malfunction. For example, in a program with remote upgrade capabilities, using remote communication to update a section of the program at absolute memory addresses (0x500-0x800), existing code instrumentation requires adding extra code, changing the address range to 0x510-0x810. This causes the program to malfunction after upgrading the code at addresses originally in the 0x500-0x800 range. To ensure the program functions correctly after adding this extra code, further adjustments are needed, further increasing the program's complexity and the likelihood of errors. This application uses an information monitoring module (hardware unit) set outside the processing function unit to monitor the source program. This means that the source program is monitored by an information monitoring module that is independent of the source program. No changes are needed to the source program, and the storage or output will not be affected by the detection. This completely avoids the program complexity caused by existing code instrumentation methods, and also avoids the program error problems caused by existing code instrumentation methods.

[0110] Since no program modification is required, dynamic white-box testing of the software can also be performed simultaneously in program black-box testing and prototype testing. Compared with existing testing methods (which cannot be performed simultaneously with black-box testing and prototype testing because the program may change due to modifications), this application greatly improves testing efficiency, R&D efficiency and production efficiency.

[0111] Please refer to Figure 2, which is a flowchart of another specific embodiment of an embedded testing method according to this application.

[0112] S100 monitors the program address value of the processing function unit accessing the memory through the information monitoring module, which is a hardware unit located outside the processing function unit.

[0113] S110, Determine whether the program address value has been stored in the memory unit;

[0114] If the program address value is already stored in the memory location, the program terminates.

[0115] If the memory cell does not contain the stored program address value, proceed to S200.

[0116] Determine whether the program address value has been stored in the memory cell, including whether the program address value has been stored in the memory cell inside or outside the chip.

[0117] S200, store the program address value in the memory unit and / or output the program address value.

[0118] Storing or transmitting indirect information equivalent to or containing the "program address value of the processing function unit accessing the memory" through other operations, or in conjunction with software, interrupts, or other external programmable devices, all fall under the category of "storing the program address value in the memory unit and / or outputting the program address value".

[0119] As shown in Figure 3, although the "jump 0x1000" instruction with a program address value of "0xa00" may be executed many times in the program, in this embodiment, we only store it once, thus saving storage space. We read this information (program address value "0xa00") from the storage unit, so that we can know that the program has executed the instruction with a program address value of "0xa00" (instruction "jump 0x1000"), achieving the purpose of statement coverage testing in dynamic white-box software testing, while saving storage space; it can also be stored n times (n is a positive integer greater than 1), where n is less than the number of times the "jump 0x1000" instruction with a program address value of "0xa00" is executed.

[0120] Please refer to Figures 4 and 5, which are structural framework diagrams of a specific embodiment of an embedded testing device according to this application.

[0121] In Figure 5, Device 1#, Device 2#, Device 3#, ..., Device n# are all the same embedded testing device, that is, the embedded testing device in this application. They are all located outside the processor and can work normally. The embedded testing device can be set up separately or in other hardware. The embedded testing device can be set up in different positions according to the needs of the structure. The device numbers in Figure 5 are only to distinguish the different positions of the embedded testing device.

[0122] An embedded testing apparatus, comprising:

[0123] Information monitoring module M100 is used to monitor the program address value of the processing function unit accessing the memory. The information monitoring module is a hardware unit located outside the processing function unit.

[0124] The processing functional unit includes one of the following:

[0125] processor;

[0126] The processing unit inside the processor.

[0127] The processing unit can be located inside the processor as part of the processor, or it can be a complete processor.

[0128] As shown in Figure 5, this device can be located inside the processor as part of the processor, or it can be located outside the processor as a complete module.

[0129] The monitoring and processing function unit accesses the program address value of the memory by monitoring the program address on the chip bus.

[0130] The program address value for the monitoring and processing function unit to access memory includes at least one of the following:

[0131] The program address value received by the monitoring and processing function unit;

[0132] The program address value issued by the monitoring and processing function unit.

[0133] Monitor the program address value received by the memory;

[0134] Monitor the program address value issued by the memory.

[0135] It also includes a comparison module M110, which is used to determine whether the program address value has already been stored in the memory unit.

[0136] If the comparison module determines that the program address value has already been stored in the memory unit, the program ends;

[0137] If the comparison module determines that the program address value is not stored in the storage unit, the processing module M200 will store the program address value in the storage unit and / or output the program address value.

[0138] The processing module M200 is a hardware unit located outside the processing function unit.

[0139] In this embodiment, the program address value is stored in the storage unit and / or output through the information monitoring module and processing module for analysis, achieving the purpose of dynamic white-box testing in software testing. Because this application does not require adding code to the program, it greatly improves testing efficiency, R&D efficiency, and production efficiency compared to existing testing methods.

[0140] Figure 6 is a structural framework diagram of an embedded testing system provided in another embodiment of this application.

[0141] The device in Figure 6 is the embedded testing device of this application. The embedded testing device is set inside the chip, but it can also be set in other hardware or set separately, as long as it is set outside the processor and can work normally.

[0142] An embedded testing system includes the embedded testing apparatus described in any of the above specific embodiments. The embedded testing system further includes embedded software, a processing unit, a memory, a storage unit, and a terminal. The embedded software is stored in the memory. Other modules in FIG6 include storage units. The embedded testing apparatus is used to monitor the program address values ​​accessed by the processing unit to the memory, store the program address values ​​in the storage unit, read the program address values ​​from the memory via the terminal, or output the program address values ​​from the memory to the terminal. By obtaining these program address values ​​from the memory, we can know that the program has executed the instruction at the program address value of that memory, achieving the purpose of dynamic white-box testing of the software.

[0143] Obviously, the embodiments described above are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort should fall within the scope of protection of this application.

[0144] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0145] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.

[0146] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for embedded testing, characterized in that, include: When the processing function unit is in normal working state, the program address value of the processing function unit accessing the memory is monitored by the information monitoring module. The information monitoring module is a hardware unit set outside the processing function unit. The normal working state includes the processing function unit not being in debug state, the processing function unit not being in interrupt state, or the processing function unit not being in abnormal state. Determine whether the program address value has already been stored in the storage unit; If the program address value is already stored in the storage unit, the program terminates; If the program address value is not stored in the storage unit, the processing module stores the program address value in the storage unit and / or outputs the program address value. The storage unit stores the program address value at least once. Storing the program address value in the storage unit and / or outputting the program address value are independent of the processing function unit. The processing function unit is a processor, and the processing module is a hardware unit located outside the processing function unit.

2. The embedded testing method according to claim 1, characterized in that, The monitoring and processing function unit accesses the program address value of the memory by monitoring the program address on the chip bus.

3. An embedded testing apparatus, characterized in that, include: An information monitoring module is used to monitor the program address value of the processing function unit accessing the memory when the processing function unit is in normal working state. The information monitoring module is a hardware unit set outside the processing function unit. The normal working state includes the processing function unit not being in debugging state, the processing function unit not being in interrupt state, or the processing function unit not being in abnormal state. A comparison module is used to determine whether the program address value has already been stored in the storage unit before storing the program address value in the storage unit and / or before outputting the program address value. If the program address value is already stored in the storage unit, the program terminates; The processing module, if the program address value is not stored in the storage unit, is used to store the program address value in the storage unit and / or output the program address value. The storage unit stores the program address value at least once. Storing the program address value in the storage unit and / or outputting the program address value is an operation independent of the processing function unit. The processing function unit is a processor, and the processing module is a hardware unit located outside the processing function unit.

4. The embedded testing apparatus according to claim 3, characterized in that, The monitoring and processing function unit accesses the program address value of the memory by monitoring the program address on the chip bus.

5. An embedded testing system, characterized in that, The embedded testing apparatus includes the embedded testing system according to any one of claims 3 to 4, the embedded testing system further includes embedded software, a processing function unit, a memory, a storage unit, and a terminal, the embedded software is stored in the memory, the embedded testing apparatus is used to monitor the program address value of the processing function unit 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.