A chip self-checking method and device, a storage medium and an electronic device

By using tightly coupled memory and registers of the self-test control unit to dynamically load self-test information in the chip, the problems of slow loading speed and high memory usage during chip self-test are solved, enabling rapid startup of electronic devices.

CN123159231APending Publication Date: 2026-11-24XG TECHNOLOGIES PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611438911.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2026-08-03
Filing Date
2026-09-16
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In chip design, the process of dynamically loading test vectors can result in slow loading speed, high memory consumption, and impact on device startup, especially in system-on-a-chip systems where the massive number of gate circuits leads to a superlinear increase in test data volume.

Method used

By writing self-test information from non-volatile memory to tightly coupled memory, and then from tightly coupled memory to the register of the self-test control unit, and updating the self-test information in the register of the self-test control unit, a test command is sent to the processor to be self-tested to trigger the self-test mode.

Benefits of technology

Dynamic loading of self-test information was achieved, improving the chip's self-test speed and ensuring rapid startup of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123159231A_ABST
    Figure CN123159231A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the chip technical field, and provides a chip self-checking method and device, a storage medium and an electronic device. The method is used for an integrated circuit, the integrated circuit includes a first processor, and the method includes: writing self-checking test information from a nonvolatile memory to a tightly coupled memory; writing the self-checking test information from the tightly coupled memory to a register of a self-checking control unit; updating the register of the self-checking control unit to the self-checking test information, and sending a first test instruction from the self-checking control unit to the first processor to be self-checked, so as to trigger the first processor to enter a self-checking mode based on the first test instruction. According to the embodiment of the present disclosure, the dynamic loading of the self-checking test information is realized based on the tightly coupled memory in the chip, thereby improving the chip self-checking speed and ensuring the fast start of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Singapore Patent Application No. 10202602683R, filed with the Intellectual Property Office of Singapore on August 3, 2026, entitled “CHIP SELF-TEST METHOD AND APPARATUS, STORAGE MEDIUM, AND ELECTRONIC DEVICE”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This disclosure relates to the field of chip technology, and in particular to a chip self-testing method, apparatus, storage medium and electronic device. Background Technology

[0003] In the chip design process, Design for Testability (DFT) is a method that embeds test structures and mechanisms during the chip design phase. This method can improve the testing results after chip manufacturing. DFT typically implements chip self-testing based on test vectors.

[0004] In test scenarios where DFT test vectors are not hard-coded into the hardware, the test vectors can be dynamically loaded by software or firmware for chip self-testing. However, the current process of dynamically loading test vectors suffers from slow loading speed, high memory consumption, and impact on device startup. Summary of the Invention

[0005] To address the aforementioned technical issues, this disclosure provides a chip self-testing method, apparatus, storage medium, and electronic device. Based on the tightly coupled memory in the chip, it enables dynamic loading of self-testing information, thereby improving the chip self-testing speed and ensuring rapid startup of the electronic device.

[0006] The first aspect of this disclosure provides a chip self-test method for an integrated circuit, the integrated circuit including a first processor, the method comprising: writing self-test information from non-volatile memory to tightly coupled memory; writing the self-test information from tightly coupled memory to a register of a self-test control unit; updating the register of the self-test control unit with self-test information; and sending a first test instruction to the first processor to be self-tested by the self-test control unit to trigger the first processor to enter a self-test mode based on the first test instruction.

[0007] A second aspect of this disclosure provides a chip self-testing device for an integrated circuit. The integrated circuit includes a first processor. The device includes: a first writing module for writing self-test information from non-volatile memory to tightly coupled memory; a second writing module for writing self-test information from tightly coupled memory to a register of a self-test control unit; and a first sending module for updating the self-test information in the register of the self-test control unit, and sending a first test command from the self-test control unit to the first processor to be self-tested, thereby triggering the first processor to enter a self-test mode based on the first test command.

[0008] A third aspect of this disclosure provides a computer program product that, when instructions in the computer program product are executed by a processor, causes the processor to perform the chip self-test method provided in the first aspect of this disclosure.

[0009] A fourth aspect of this disclosure provides an electronic device, the electronic device comprising: Processor; memory for storing processor-executable instructions; processor for reading executable instructions from memory and executing the instructions to implement the chip self-test method provided in the first aspect of this disclosure.

[0010] A fifth aspect of this disclosure provides a computer-readable storage medium storing a computer program for executing the chip self-test method provided in the first aspect of this disclosure.

[0011] The chip self-test method, apparatus, storage medium, and electronic device provided in the above embodiments of this disclosure dynamically load self-test information from non-volatile memory to tightly coupled memory, then from the tightly coupled memory to the register of a self-test control unit. Based on the updated self-test information in the register of the self-test control unit, the self-test control unit sends a first test command to a first processor to be self-tested, triggering the first processor to enter self-test mode. In this way, the electronic device dynamically loads self-test information based on the tightly coupled memory in the chip, thereby improving the chip self-test speed and ensuring rapid startup of the electronic device. Attached Figure Description

[0012] Figure 1 This is a schematic diagram of a chip self-test system architecture provided in an exemplary embodiment of this disclosure; Figure 2 This is a schematic flowchart of a chip self-test method provided in an exemplary embodiment of this disclosure; Figure 3 This is a flowchart of step S100 provided in an exemplary embodiment of this disclosure; Figure 4 This is a flowchart of step S110 provided in an exemplary embodiment of this disclosure; Figure 5 This is another schematic flowchart of a chip self-test method provided in an exemplary embodiment of this disclosure; Figure 6 This is a flowchart of step S600 provided in an exemplary embodiment of this disclosure; Figure 7 This is another schematic flowchart of a chip self-test method provided in an exemplary embodiment of this disclosure; Figure 8 This is yet another flowchart illustrating a chip self-testing method provided in an exemplary embodiment of this disclosure; Figure 9 This is a schematic diagram of the structure of a chip self-testing device provided in an exemplary embodiment of the present disclosure; Figure 10 This is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. Detailed Implementation

[0013] To explain this disclosure, exemplary embodiments of the disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the disclosure, and not all of them. It should be understood that the disclosure is not limited to exemplary embodiments.

[0014] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0015] Application Overview In a system-on-a-chip (SoC) integrating the cockpit and driver, there are a massive number of gate circuits. This sheer volume of gate circuits can lead to a superlinear increase in the amount of test data for Device Function Tests (DFT). Therefore, if the self-test vectors are hard-coded into the hardware during the DFT process, there is a risk of test data explosion (such as area overhead and wiring congestion). Thus, DFT can be based on software-loaded self-test vectors. However, software-loaded test vectors suffer from slow loading speeds, high memory consumption, and impact on device startup.

[0016] To address the aforementioned technical problems, this disclosure provides a chip self-test method, apparatus, storage medium, and electronic device. The method involves writing self-test information from non-volatile memory to tightly coupled memory, then writing the self-test information from the tightly coupled memory to the register of a self-test control unit. The self-test control unit updates its register with the new self-test information and sends a first test command to a first processor to be self-tested, triggering the first processor to enter self-test mode. In this way, the electronic device dynamically loads self-test information based on the tightly coupled memory within the chip, thereby improving the chip self-test speed and ensuring rapid startup of the electronic device.

[0017] Exemplary System Figure 1 This is an exemplary embodiment of the chip self-test system architecture diagram provided in this disclosure.

[0018] like Figure 1 As shown, in some embodiments, the chip self-test system 100 of this disclosure includes a first processor 110, a second processor 120, a non-volatile memory 130, a random access memory 140, and a self-test control unit 150 deployed on the same chip.

[0019] In some embodiments, the non-volatile memory 130 includes read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, etc.

[0020] In this embodiment of the disclosure, the non-volatile memory 130 is, for example, flash memory. Flash memory is characterized by erasure in "blocks", fast write speed, high integration, and low cost.

[0021] Flash memory can be configured to store self-test information.

[0022] Self-test information includes self-test vectors. A self-test vector is a set of predefined input stimulus sequences and corresponding expected output response values ​​used by an integrated circuit during the self-test process to verify whether the circuit function is normal.

[0023] The input stimulus sequence value refers to a specific set of data or signal combinations applied to the input terminal of the circuit under test. The expected output response value refers to the correct output result that the circuit should produce when operating normally under a given input. The chip self-test system 100 compares the actual output result of the circuit with the expected output response value. If the actual output result matches the expected output response value, the self-test is considered successful; if the actual output result does not match the expected output response value, the self-test is considered to have failed. In this way, the chip self-test system 100 can detect problems such as bridging short circuits and delay faults in the circuit based on the self-test information, and can also verify whether the circuit can correctly perform basic operations such as reading, writing, calculation, and state switching.

[0024] The second processor 120 can be a security coprocessor used to handle security-critical operations, including key management, authentication, and encryption / decryption of sensitive data, in a trusted execution environment.

[0025] The second processor 120 can be configured to perform the following operations: The self-test information is written from non-volatile memory to random access memory 140.

[0026] In this way, the self-test information is not hard-coded in the firmware, ensuring that the second processor 120 can flexibly load the self-test information into the random access memory 140.

[0027] Random access memory 140 is used to store program instructions executable by a processor (e.g., a first processor 110 or a second processor 120), or to store data (e.g., self-test information).

[0028] In some embodiments, the random access memory 140 includes static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), etc.

[0029] SRAM includes tightly-coupled memory (TCM). TCM is characterized by low latency, high determinism, and direct software controllability. TCM includes data tightly-coupled memory (DTCM) and instruction tightly-coupled memory (ITCM). Data tightly-coupled memory stores real-time data, sensitive variables, or test vectors for processor access. Instruction tightly-coupled memory stores critical code (such as interrupt service routines and secure boot code).

[0030] The second processor 120 can be configured to perform the following operations: The self-test information is written from non-volatile memory to tightly coupled data memory.

[0031] Thus, the second processor 120, while flexibly loading self-test information into the random access memory 140, can also implement functions such as temporary data acceleration, post-use release, and low-power preloading based on the tightly coupled data memory. These functions will be described in detail in subsequent embodiments of this disclosure, and will not be repeated here.

[0032] The self-test control unit 150 is a hardware module used to carry out on-chip self-test functions.

[0033] The second processor 120 is also configured to perform the following operations: The self-test information is written from the random access memory 140 to the register of the self-test control unit 150.

[0034] The first processor 110 can be the main system processor, used to handle user-level applications and system scheduling.

[0035] In some embodiments, the first processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0036] The self-test control unit 150 can be configured to perform the following operations: The register value is updated to self-test information, and a first test instruction is sent to the first processor 110 to trigger the first processor 110 to enter self-test mode.

[0037] The chip self-test system 100 shown in this embodiment dynamically loads self-test information from non-volatile memory to random access memory 140, then writes the self-test information from random access memory 140 to the register of a self-test control unit. Based on the updated self-test information in the register of the self-test control unit, the self-test control unit sends a first test command to a first processor to be self-tested, triggering the first processor to enter self-test mode. In this way, the electronic device dynamically loads self-test information based on the random access memory 140 in the chip, thereby improving the chip self-test speed and ensuring rapid startup of the electronic device.

[0038] Exemplary methods Figure 2 This is a schematic flowchart of a chip self-test method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices, such as... Figure 2 As shown, the chip self-test method can be specifically applied to integrated circuits in electronic devices. The integrated circuit includes a first processor, and the method includes the following steps: Step S100: Write the self-test information from the non-volatile memory to the tightly coupled memory.

[0039] In some embodiments, the integrated circuit further includes a second processor.

[0040] The electronic device can execute steps S100-S300 based on a dual-processor architecture of integrated circuits (i.e., an architecture in which the first processor and the second processor work together).

[0041] The second processor can also be used to support the SOC's boot and security monitoring functions.

[0042] In some embodiments, the second processor writes self-test information from non-volatile memory to tightly coupled memory.

[0043] By adopting this approach, although non-volatile memory can store self-test information for a long time, its read speed is much lower than that of on-chip static random access memory. Therefore, by having the second processor write the self-test information from non-volatile memory to tightly coupled memory, the second processor can read the data at high speed, avoiding the problem of long self-test time caused by the second processor frequently accessing slow external memory. This significantly shortens the instruction and data loading time, thereby accelerating the overall self-test speed of the electronic device.

[0044] Step S200: Write the self-test information from the tightly coupled memory into the register of the self-test control unit.

[0045] In some embodiments, the second processor writes self-test information from tightly coupled memory into the registers of the self-test control unit.

[0046] The self-test control unit is a hardware control module in an SOC that is responsible for the entire chip self-test process, and manages the self-test startup, test vector loading, test execution, mode switching, result judgment and resource release in a unified manner.

[0047] The second processor can write self-test information from tightly coupled memory to a dedicated register in the self-test control unit for storing test vectors.

[0048] In this way, the self-test control unit can achieve hardware-level autonomous triggering without the intervention of the second processor, thereby improving the self-test response speed.

[0049] By adopting this approach, the self-test control unit can independently start and complete the entire test process (such as generating stimuli, driving the module under test, capturing responses, and comparing results) based on register configuration, without the need for the second processor to participate in the self-test process in real time. This significantly reduces the burden on the second processor, allowing it to be used for other system initialization or application tasks, thereby improving the overall system efficiency.

[0050] In step S300, the self-test control unit updates the registers to the self-test information and sends a first test instruction to the first processor to be self-tested, thereby triggering the first processor to enter the self-test mode based on the first test instruction.

[0051] In some embodiments, in response to the register being updated to self-test information, the self-test control unit sends a first test instruction to the first processor to be self-tested, so as to trigger the first processor to enter self-test mode based on the first test instruction.

[0052] By adopting this approach, the electronic device sends the first test command based on the self-test control unit, rather than through a general-purpose software-accessible interrupt controller or register, thus ensuring the security and isolation of the self-test.

[0053] The technical solution disclosed herein dynamically loads self-test information from non-volatile memory to tightly coupled memory, then writes the self-test information from the tightly coupled memory to the register of the self-test control unit. Based on the self-test information updated in the register of the self-test control unit, the self-test control unit sends a first test command to the first processor to be self-tested, thereby triggering the first processor to enter self-test mode. In this way, the electronic device dynamically loads self-test information based on the tightly coupled memory in the chip, thereby improving the chip's self-test speed and ensuring rapid startup of the electronic device.

[0054] Figure 3 This is a flowchart of step S100 provided in an exemplary embodiment of this disclosure.

[0055] like Figure 3 As shown, step S100, writing the self-test information from non-volatile memory to tightly coupled memory, includes the following steps: In step S110, in response to the startup of the second processor, the second processor writes the self-test information from the non-volatile memory to the tightly coupled memory.

[0056] The second processor actively runs the self-test information loading task at startup, which allows the first processor to perform other initialization tasks at the same time, significantly shortening the preparation time from power-on to the start of self-test of the electronic device.

[0057] By adopting this approach, the electronic device achieves parallel loading of self-test tasks, shortens the overall initialization time, reduces the burden on the first processor, and improves the startup efficiency of the electronic device.

[0058] Figure 4 This is a flowchart of step S110 provided in an exemplary embodiment of this disclosure.

[0059] like Figure 4 As shown, the non-volatile memory includes flash memory. In step S110, in response to the startup of the second processor, the second processor writes self-test information from the non-volatile memory to the tightly coupled memory, including the following steps: In step S111, in response to the startup of the second processor, the second processor writes self-test information from flash memory to tightly coupled memory based on the direct memory access controller.

[0060] A direct memory access (DMA) controller is a dedicated hardware module used to enable high-speed data transfer between peripherals and memory (or between memory modules) without going through a central processing unit.

[0061] In some embodiments, the second processor may first initialize the direct memory access controller (DMC). Specifically, the second processor may configure parameters such as the source address, destination address, transfer length, transfer direction, and trigger conditions of the DMC, and start the DMC channel. Further, the DMC may take over the transfer process. Specifically, when a peripheral device (e.g., flash memory) is ready to send data, it may send a request to the DMC. The DMC can then control the bus based on the request to write data blocks from the flash memory to the tightly coupled memory. Further, after the data transfer is complete, the DMC may generate an interrupt signal to notify the second processor that the current transfer process has ended, allowing the second processor to perform subsequent processing. Throughout the process, the second processor may perform other tasks (such as calculations, scheduling, and handling other interrupts), configuring the data controlled by the DMC only at the beginning and end.

[0062] By adopting this implementation method, the second processor performs data migration based on the direct memory access controller, which improves the system throughput of the electronic device, avoids the second processor from executing inefficient data transfer loops, and reduces the load on the second processor.

[0063] Figure 5 This is another schematic flowchart of a chip self-test method provided in an exemplary embodiment of this disclosure.

[0064] like Figure 5 As shown, in step S300, after updating the self-test information in the register of the self-test control unit and sending a first test command to the first processor to be self-tested, thereby triggering the first processor to enter self-test mode based on the first test command, the process further includes: In step S400, the self-test control unit obtains the self-test result of the first processor.

[0065] In some embodiments, after the first processor completes its self-test, it can proactively report the self-test result to the self-test control unit; or, after the first processor completes its self-test, it can expose the self-test result to the self-test control unit so that the self-test control unit can directly obtain the self-test result.

[0066] Using this approach, the electronic device acquires results based on the self-test control unit, which does not consume the processor resources of the first and second processors, requires no operating system scheduling, and can meet the requirements of high real-time performance.

[0067] In step S500, the second processor polls the self-test control unit for the self-test results.

[0068] The second processor can poll the self-test control unit for the self-test results, which can trigger subsequent mode switching operations.

[0069] By adopting this approach, the electronic device polls the self-test control unit for self-test results based on the second processor, which enhances the observability and maintainability of the system and facilitates subsequent mode switching.

[0070] In step S600, after the second processor determines that the first processor has completed its self-test based on the self-test results, it causes the first processor to enter the working mode from the self-test mode.

[0071] The second processor ensures that the first processor only enters the working mode from the self-test mode if the self-test is successful, thus preventing a faulty processor from entering the working mode and participating in critical tasks. Furthermore, the second processor reduces the autonomous decision-making burden on the first processor, thereby reducing its system complexity.

[0072] By adopting this implementation method, the second processor ensures the security of the first processor in performing its functions, reduces the load on the first processor, and ensures the orderly startup of the system.

[0073] In step S700, the second processor clears the self-test information in the tightly coupled memory.

[0074] Tightly coupled memory is a low-latency, high-bandwidth, and expensive on-chip static random access memory. The self-test information and temporary self-test results used in the self-test phase are no longer useful after the first processor completes the self-test. The second processor can free up valuable tightly coupled memory storage resources by clearing the self-test information in the tightly coupled memory for use in the next stage (such as loading the operating system image).

[0075] By adopting this implementation method, the second processor can avoid memory conflicts and sensitive data leakage by promptly clearing the self-test information in the tightly coupled memory, thereby improving the system security of electronic devices.

[0076] The technical solution disclosed herein enables the electronic device to utilize tightly coupled memory in stages, ensuring not only flexible and dynamic loading of self-test vectors but also improved self-test speed, thereby ensuring rapid chip startup. Furthermore, after exiting the DFT test mode, the electronic device clears resources from the tightly coupled memory using the second processor, achieving resource-free operation of the tightly coupled memory during the first processor's operation, thus ensuring the performance of the first processor and the overall performance of the SOC.

[0077] Figure 6 This is a flowchart of step S600 provided in an exemplary embodiment of this disclosure.

[0078] like Figure 6As shown, in step S600, after the second processor determines that the first processor has completed its self-test based on the self-test result, it causes the first processor to enter the working mode from the self-test mode. This also includes the following steps: In step S610, after the second processor determines that the first processor has completed its self-test based on the self-test result, the second processor sends a reset signal to the first processor. The reset signal is used to control the first processor to exit the self-test mode.

[0079] The reset signal is a hardware-level control signal with deterministic timing, extremely low latency, and high priority.

[0080] The second processor controls the first processor to exit the self-test mode based on the reset signal, which can enhance the startup security and fault isolation capability of the first processor.

[0081] By adopting this implementation method, the second processor achieves precise and low-latency state control of the first processor based on the mechanism of sending a reset signal to the first processor, thereby improving self-test efficiency.

[0082] In step S620, the first processor responds to the reset signal, exits the self-test mode, and enters the working mode.

[0083] The first processor switches between self-test mode and working mode based on the reset signal, avoiding the problem that the first processor cannot reliably exit by relying solely on software instructions if an unrecoverable error (such as locking) occurs during the self-test process.

[0084] By adopting this approach, the first processor achieves mode switching based on a hardware-level reset signal, thereby improving fault tolerance.

[0085] Figure 7 This is another schematic flowchart of a chip self-test method provided in an exemplary embodiment of this disclosure.

[0086] like Figure 7 As shown, in step S700, after the second processor clears the self-test information in the tightly coupled memory, the following steps are also included: In step S800, the second processor sends a reset signal to the first processor. The reset signal is used to control the first processor to enter sleep mode.

[0087] In some embodiments, the second processor may proactively send a reset signal to the first processor based on system load, diagnostic needs, or security policies. This enables a trusted entity (i.e., the second processor) to uniformly control the power consumption state of the global processor, thereby improving the system reliability of the electronic device.

[0088] By adopting this implementation method, the second processor actively controls the first processor to enter sleep mode based on the reset signal, which can avoid the risk of loss of control caused by the first processor making its own decisions.

[0089] In step S900, the first processor responds to the reset signal and enters sleep mode.

[0090] The first processor switches between working mode and sleep mode based on the reset signal, avoiding the problem that the first processor cannot reliably exit by software instructions if an unrecoverable error (such as locking) occurs during operation.

[0091] By using this method, the first processor switches modes based on the reset signal and enters a low-power mode, which can reduce the system power consumption of electronic devices.

[0092] Step S1000: The second processor clears the resources in the tightly coupled memory.

[0093] The second processor clears the current resources in the tightly coupled memory, which can then be used to store self-test information. This allows for rapid self-testing based on the self-test information when the first processor exits low-power mode, thus improving the self-testing speed.

[0094] By adopting this implementation method, the second processor can avoid memory conflicts and sensitive data leakage by clearing resources in tightly coupled memory in a timely manner, and this process can serve as the basis for performing a self-test on the first processor again.

[0095] Step S1100: The second processor preloads self-test information into the tightly coupled memory.

[0096] In some embodiments, the second processor preloads self-test information from flash memory to tightly coupled memory based on a direct memory access controller.

[0097] By adopting this approach, in low-power scenarios such as sleep mode, electronic devices preload self-test information into tightly coupled memory, improving the startup speed of the first processor when it is woken up again, thereby ensuring that the first processor achieves fast startup characteristics and improving the chip's functional safety specifications.

[0098] Figure 8 This is another schematic flowchart of a chip self-test method provided in an exemplary embodiment of this disclosure.

[0099] like Figure 8 As shown, after step S1100, where the second processor preloads the self-test information into the tightly coupled memory, the following steps are also included: In step S1200, the second processor receives the wake-up source information, parses the wake-up source information, and obtains the parsing result corresponding to the wake-up source information. The wake-up source information includes at least one of the following: an interrupt signal sent by the first processor, a sensor signal sent by the sensor, a security message sent by the first processor, a remote security command sent by the server, and a self-test signal sent by the timer.

[0100] The electronic device receives wake-up source information based on the second processor in the dual-processor architecture, instead of the first processor. This eliminates the need for the first processor to parse the wake-up source information, reducing parsing time. Consequently, it can meet the chip's fast startup requirements in scenarios such as hot reset and sleep wake-up.

[0101] By adopting this implementation method, the electronic device receives and parses the wake-up source information based on the second processor in the dual-processor architecture, which reduces the startup time of the first processor and enables the first processor to perform self-tests in hot reset and sleep wake-up scenarios, thereby improving the system security of the electronic device.

[0102] In step S1300, if the second processor determines that the first processor needs to be woken up based on the parsing result, the second processor writes the self-test information from the tightly coupled memory into the register of the self-test control unit.

[0103] When the second processor determines that the first processor needs to be woken up, it configures the registers of the self-test control unit, thus avoiding the waste of resources in tightly coupled memory.

[0104] By adopting this approach, the electronic device enables on-demand loading and precise configuration of self-test information based on the second processor, preparing for the rapid startup of the first processor and improving the overall chip self-test efficiency.

[0105] In step S1400, in response to the update of the register value, the self-test control unit sends a first test instruction to the first processor to trigger the first processor to enter the self-test mode based on the first test instruction.

[0106] After the register value of the self-test control unit is updated, the self-test control unit immediately issues the first test command. This process has a low response delay, ensuring that the first processor can quickly enter the self-test mode.

[0107] By adopting this approach, the electronic device sends the first test command based on the self-test control unit, rather than through a general-purpose software-accessible interrupt controller or register, thus ensuring the security and isolation of the self-test.

[0108] The technical solution disclosed herein improves the chip startup speed and functional safety specifications in low-power mode by using a self-test process based on pre-loaded self-test information, thereby meeting the fast startup requirements of SOC in low-power mode.

[0109] In some embodiments, after step S1400, where the self-test control unit sends a first test instruction to the first processor in response to a register value update, to trigger the first processor to enter self-test mode based on the first test instruction, the method further includes: In step S1500, the self-test control unit obtains the self-test result of the first processor.

[0110] In step S1600, the second processor polls the self-test control unit for the self-test results.

[0111] In step S1700, after the second processor determines that the first processor has completed its self-test based on the self-test results, it causes the first processor to enter the working mode from the self-test mode.

[0112] In step S1800, the second processor clears the self-test information in the tightly coupled memory.

[0113] It should be noted that the specific implementation of steps S1500-S1800 can be found in steps S400-S700 of the aforementioned embodiments, and will not be repeated here in this disclosure.

[0114] The technical solution disclosed herein enables the electronic device to dynamically load self-test information by using tightly coupled memory in stages based on the second processor. This ensures that the first processor can perform self-tests in both hot reset and sleep / wake scenarios, and improves the startup speed of the first processor. Furthermore, after the first processor completes its self-test, the electronic device can clear the resources in the tightly coupled memory using the second processor, ensuring good chip performance during operation.

[0115] The solutions disclosed herein are not limited to the embodiments mentioned above.

[0116] Exemplary device The chip self-test method provided by the embodiments of this disclosure has been described above. It is understood that the chip self-test device, in order to implement the various functions of this chip self-test method, may include corresponding hardware and software for implementing the hardware functions.

[0117] Those skilled in the art will readily recognize that the steps of the chip self-test method described in conjunction with the embodiments of this disclosure can be implemented in hardware, in a software-driven hardware manner, or in a combination of hardware and software. Whether a function is executed in hardware or software-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0118] Figure 9 This is a schematic diagram of the structure of a chip self-testing device provided in an exemplary embodiment of this disclosure.

[0119] like Figure 9 As shown, in one embodiment, the chip self-test device 900 includes: The first write module 910 is used to write self-test information from non-volatile memory to tightly coupled memory.

[0120] The second write module 920 is used to write self-test information from the tightly coupled memory into the register of the self-test control unit.

[0121] The first sending module 930 is used to update the register of the self-test control unit to self-test information, and the self-test control unit sends a first test instruction to the first processor to be self-tested, so as to trigger the first processor to enter the self-test mode based on the first test instruction.

[0122] The chip self-test device provided in the above embodiments of this disclosure writes self-test information from non-volatile memory to tightly coupled memory, then writes the self-test information from tightly coupled memory to the register of the self-test control unit. Based on the self-test information updated in the register of the self-test control unit, the self-test control unit sends a first test command to the first processor to be self-tested, thereby triggering the first processor to enter self-test mode. In this way, the electronic device dynamically loads self-test information based on the tightly coupled memory in the chip, thereby improving the chip self-test speed and ensuring rapid startup of the electronic device.

[0123] In one implementation, the integrated circuit further includes a second processor, and the first write module 910 is also configured to control the second processor to write self-test information from non-volatile memory to tightly coupled memory in response to the second processor being started.

[0124] In one implementation, the non-volatile memory includes flash memory, and the first write module 910 is further configured to, in response to the startup of the second processor, control the second processor to write self-test information from flash memory to tightly coupled memory based on a direct memory access controller.

[0125] In one possible implementation, the apparatus further includes: The first acquisition module is used to control the self-test control unit to acquire the self-test results of the first processor.

[0126] The polling module is used to control the second processor to poll the self-test results from the self-test control unit.

[0127] The first determining module is used to control the second processor to determine, based on the self-test results, that the first processor has completed its self-test and then causes the first processor to enter the working mode from the self-test mode.

[0128] The first clearing module is used to control the second processor to clear the self-test information in the random access memory.

[0129] In one possible implementation, the first determining module is further configured to control the second processor to send a reset signal to the first processor after determining that the first processor has completed its self-test based on the self-test result. The reset signal is used to control the first processor to exit the self-test mode.

[0130] In one possible implementation, the device further includes a first mode switching module for controlling the first processor to exit the self-test mode and enter the working mode in response to a reset signal.

[0131] In one possible implementation, the apparatus further includes: The second sending module is used to control the second processor to send a reset signal to the first processor. The reset signal is used to control the first processor to enter sleep mode.

[0132] The second mode switching module is used to control the first processor to enter sleep mode in response to the reset signal.

[0133] The second clearing module is used to control the second processor to clear resources in the random access memory.

[0134] The loading module is used to control the second processor to preload self-test information into random access memory.

[0135] In one possible implementation, the apparatus further includes: The parsing module is used to control the second processor to receive wake-up source information, parse the wake-up source information, and obtain the parsing result corresponding to the wake-up source information. The wake-up source information includes at least one of the following: an interrupt signal sent by the first processor, a sensor signal sent by the sensor, a security message sent by the first processor, a remote security command sent by the server, and a self-test signal sent by the timer.

[0136] The third writing module is used to control the second processor to write self-test information from random access memory to the register of the self-test control unit when the second processor determines that the first processor needs to be woken up based on the parsing results.

[0137] The third sending module is used to control the self-test control unit to send a first test instruction to the first processor in response to the update of the register value, so as to trigger the first processor to perform a self-test based on the first test instruction.

[0138] The beneficial technical effects corresponding to the exemplary embodiments of this device can be found in the corresponding beneficial technical effects of the exemplary method section above, and will not be repeated here.

[0139] Exemplary electronic devices Figure 10 This is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure.

[0140] like Figure 10 As shown, the electronic device 1000 includes at least one processor 1010 and a memory 1020.

[0141] The processor 1010 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1000 to perform desired functions.

[0142] The memory 1020 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1010 may execute one or more computer program instructions to implement the chip self-test method and / or other desired functions of the various embodiments of this disclosure described above.

[0143] In one example, the electronic device 1000 may also include an input device 1030 and an output device 1040, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0144] The input device 1030 may include, for example, a keyboard, a mouse, etc.

[0145] The output device 1040 can output various information to the outside, including, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0146] Of course, for the sake of simplicity, Figure 10 Only some of the components of the electronic device 1000 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 1000 may include any other suitable components depending on the specific application.

[0147] Exemplary computer program products and computer-readable storage media In addition to the methods and apparatus described above, embodiments of this disclosure may also provide a computer program product, including computer program instructions, which, when executed by a processor, cause the processor to perform the steps of the chip self-test methods of various embodiments of this disclosure described in the "Exemplary Methods" section above.

[0148] Computer program products can be written in any combination of one or more programming languages ​​to perform the operations of embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0149] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the chip self-test methods of various embodiments of this disclosure described in the "Exemplary Methods" section above.

[0150] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, but is not limited to, systems, apparatuses, or devices that are electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0151] The basic principles of this disclosure have been described above with reference to specific embodiments. However, the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0152] Various modifications and variations can be made to this disclosure without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, this disclosure is also intended to include such modifications and variations.

Claims

1. A chip self-test method for an integrated circuit, the integrated circuit including a first processor, the method comprising: Write the self-test information from non-volatile memory to tightly coupled memory; The self-test information is written from the tightly coupled memory into the register of the self-test control unit; Based on the self-test information updated in the register of the self-test control unit, the self-test control unit sends a first test instruction to the first processor to be self-tested, so as to trigger the first processor to enter the self-test mode based on the first test instruction.

2. The method according to claim 1, wherein, The integrated circuit further includes a second processor, wherein writing the self-test information from non-volatile memory to tightly coupled memory includes: In response to the startup of the second processor, the second processor writes the self-test information from the non-volatile memory to the tightly coupled memory.

3. The method according to claim 2, wherein, The non-volatile memory includes flash memory. In response to the second processor starting up, the second processor writes the self-test information from the non-volatile memory to the tightly coupled memory, including: In response to the startup of the second processor, the second processor writes the self-test information from the flash memory to the tightly coupled memory based on the direct memory access controller.

4. The method according to claim 2, wherein, After the register of the self-test control unit is updated to the self-test information, and the self-test control unit sends a first test command to the first processor to be self-tested, thereby triggering the first processor to enter self-test mode based on the first test command, the process further includes: The self-test control unit acquires the self-test result of the first processor; The second processor polls the self-test result to the self-test control unit; After the second processor determines that the first processor has completed its self-test based on the self-test results, it causes the first processor to enter the working mode from the self-test mode. The second processor clears the self-test information from the tightly coupled memory.

5. The method according to claim 4, wherein, After the second processor determines, based on the self-test result, that the first processor has completed its self-test, it causes the first processor to enter the working mode from the self-test mode, including: After the second processor determines that the first processor has completed its self-test based on the self-test result, the second processor sends a reset signal to the first processor. The reset signal is used to control the first processor to exit the self-test mode. In response to the reset signal, the first processor exits the self-test mode and enters the working mode.

6. The method according to claim 2, wherein, Also includes: The second processor sends a reset signal to the first processor, the reset signal being used to control the first processor to enter sleep mode; The first processor enters the sleep mode in response to the reset signal; The second processor clears the resources in the tightly coupled memory; The second processor preloads the self-test information into the tightly coupled memory.

7. The method according to claim 6, wherein, Also includes: The second processor receives the wake-up source information, parses the wake-up source information, and obtains the parsing result corresponding to the wake-up source information. The wake-up source information includes at least one of the following: an interrupt signal sent by the first processor, a sensor signal sent by the sensor, a security message sent by the first processor, a remote security command sent by the server, and a self-test signal sent by the timer. If the second processor determines that the first processor needs to be woken up based on the parsing result, the second processor writes the self-test information from the tightly coupled memory into the register of the self-test control unit; In response to the update of the register value, the self-test control unit sends a first test instruction to the first processor to trigger the first processor to enter the self-test mode based on the first test instruction.

8. A chip self-testing device for an integrated circuit, the integrated circuit including a first processor, the device comprising: The first write module is used to write self-test information from non-volatile memory to tightly coupled memory; The second writing module is used to write the self-test information from the tightly coupled memory into the register of the self-test control unit; The first sending module is used to update the self-test information based on the register of the self-test control unit, and the self-test control unit sends a first test instruction to the first processor to be self-tested, so as to trigger the first processor to enter the self-test mode based on the first test instruction.

9. A computer-readable storage medium storing a computer program for performing the chip self-test method according to any one of claims 1-7.

10. An electronic device, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the chip self-test method according to any one of claims 1-7.