Self-checking method for bad kernel, multi-core chip, self-checking system and robot

Through multiple restarts and memory load tests, bad cores in multi-core chips are detected and eliminated, solving the problem of poor CPU stability and improving the robustness and reliability of the system.

CN118779166APending Publication Date: 2024-10-15AMICRO SEMICONDUCTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410834217.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing technology cannot effectively detect and eliminate bad cores in multi-core chips, resulting in poor CPU stability and probabilistic memory access errors, affecting system robustness and stability.

Method used

Through multiple restarts, a matching number of processing cores in the multi-core chip are tested for memory load during each restart. Based on the test results, it is determined whether there are bad cores, and bad cores are gradually eliminated to improve the reliability of the chip.

Benefits of technology

Through multiple restarts and memory load tests, it is possible to evaluate the performance of multi-core chips in long-term unstable environments, detect and disable bad cores, improve system robustness and stability, and improve chip detection reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779166A_ABST
    Figure CN118779166A_ABST
Patent Text Reader

Abstract

The invention discloses a self-checking method for a bad kernel, a multi-core chip, a self-checking system and a robot, and the self-checking method comprises the steps: restarting the multi-core chip for multiple times, and carrying out the memory load testing of the processing kernels with the matched number in the multi-core chip during each restarting, so as to judge whether the processing kernels are bad kernels or not based on the memory load testing. And after the multi-core chip is restarted for multiple times, judging all bad cores in the multi-core chip so as to complete the detection of all bad cores in the multi-core chip. The self-checking system comprises the multi-core chip, so that the self-checking system is used for realizing the self-checking method. The robot is provided with the self-checking system, so that the robot can detect the bad cores in the multi-core chip by executing the self-checking method after being started.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of chip testing, and in particular relates to a self-test method for a bad core, a multi-core chip, a self-test system and a robot. Background Art

[0002] After the main control chip wafer is packaged, the chip must be tested to screen out defective chips. Considering the chip testing cost, chip companies generally do not test each chip for a long time during the chip testing process, which eventually leads to a small proportion of chips with poor CPU stability entering the market. The specific manifestation of a chip with poor CPU stability is that after a CPU core in a multi-core CPU runs at full load for a period of time (for example, 1 minute), a CPU core memory access (or other) error will occur probabilistically. As the test time or test repetition increases, the probability of occurrence will increase.

[0003] The Chinese invention patent application with patent application number CN202311173752.3 discloses a chip startup code repair method and repair system. After the chip is powered on and the startup code is run, it is detected whether the chip is abnormally started. Moreover, a repair mark is made at the corresponding position of the repair code stored in the non-volatile memory based on the abnormal position of the startup code once, but it cannot be traced back to the core inside the chip that caused the system abnormality. Summary of the invention

[0004] This application discloses a self-checking method for a bad core, a multi-core chip, a self-checking system and a robot. The specific technical solutions are as follows: A self-checking method for bad cores, the self-checking method comprising: restarting a multi-core chip multiple times, and performing a memory load test on a matching number of processing cores in the multi-core chip each time the chip is restarted, so as to determine whether the core is a bad core based on the memory load test. After multiple restarts, all processing cores in the multi-core chip are judged, so as to detect all bad cores in the chip, thereby overcoming the problem that a certain processing core in the multi-core chip may have a master memory access error.

[0005] Furthermore, at each restart, each processing core that performs a memory load test determines whether it is a bad core based on the result of the memory load test; after multiple restarts, all bad cores inside the multi-core chip are determined to complete the detection of all bad cores inside the multi-core chip.

[0006] In summary, the present application performs memory load testing by performing multiple restarts and controlling a matching number of processing cores in different restarts until all processing cores in the multi-core chip are judged to identify the bad cores in the multi-core chip. This can evaluate the performance of the multi-core chip in a long-term unstable read-write environment to detect the robustness and stability of the system device in which the multi-core chip is located; moreover, for multi-core chip stability failures, each processing core is tested one by one to facilitate the subsequent disabling of related bad cores and improve the reliability of multi-core chip detection.

[0007] Furthermore, in the case of the current restart, if there is a processing core in the multi-core chip that fails the memory load test, the failed processing core is marked as a bad core to prohibit the failed processing core from being restarted, and then the next restart is performed by reset; in the case of the current restart, if all the processing cores in the multi-core chip that have undergone the memory load test have passed the test, the next restart is performed by reset. This restart is repeated multiple times until the memory load test of all processing cores in the multi-core chip is completed, and all bad cores are determined from all processing cores in the multi-core chip.

[0008] Furthermore, the multi-core chip is restarted multiple times, and the method for performing a memory load test on a matching number of processing cores inside the multi-core chip at each restart includes: at the i-th restart, at most i processing cores inside the multi-core chip perform a memory load test; wherein i is a positive integer, and i is less than or equal to a preset test number; when i is greater than 1, the at most i processing cores inside the multi-core chip include at least one processing core that has not been previously memory load tested and at most i-1 processing cores of the multi-core chip that successfully performed a memory load test at the i-1th restart; wherein, when a preset number of processing cores for testing is set inside the multi-core chip, the number of restarts of the multi-core chip is equal to the preset test number; wherein the at most i processing cores inside the multi-core chip are the matching number of processing cores inside the multi-core chip. Therefore, each time the multi-core chip is restarted, the matching number of processing cores are all subjected to a memory load test, wherein among the processing cores subjected to the memory load test, there is at least one processing core that has not been subjected to a memory load test before, and there may also be multiple other processing cores that have been subjected to a memory load test and have been successfully tested. Then, during the multiple restarts, a new processing core is started one by one to perform a memory load test, so that when the number of restarts of the multi-core chip is equal to the preset test number, all the processing cores in the multi-core chip are subjected to a memory load test and based on the memory load test, each processing core is determined to be a bad core.

[0009] Furthermore, the method for determining whether it is a bad core based on the result of a memory load test includes: controlling the processing core to write test data to a specific address in the built-in memory, and then controlling the processing core to read corresponding data from the specific address in the built-in memory, and then determining whether the corresponding data read by the processing core is the same as the test data, if so, determining that the processing core reads and writes the memory successfully, otherwise determining that the processing core is a bad core; thereby simulating a memory test comparison operation in a scenario where a processing core reads and writes data.

[0010] and / or controlling the processing core to read instructions from the outside, and then determining whether the instructions read by the processing core are the same as the pre-stored target instructions, if yes, determining that the processing core fetches instructions correctly, otherwise determining that the processing core is a bad core; wherein the multi-core chip includes a built-in memory. Thus, the phenomenon of the system where the multi-core chip is located running out of order is identified.

[0011] Furthermore, during the i-th restart, the process of performing memory load test on at most i processing cores in the multi-core chip is the i-th round of stability test on the multi-core chip; in the i-th round of stability test, if each processing core in the multi-core chip that performs memory load test reads and writes the memory successfully and fetches instructions correctly, it is determined that all processing cores in the multi-core chip that perform memory load test have been tested successfully, and then it is determined that the i-th round of stability test on the processing core is successful. Thus, in the self-check mode, a specific number of processing cores are turned on by restarting once and a round of stability test is completed, and the test is determined to be successful only when all processing cores that perform memory load test read and write the memory successfully and fetch instructions correctly. It reduces interference between different processing cores; it also overcomes the problem of probabilistic errors in the same processing core in different restarts or memory load tests. In addition, multiple rounds of stability tests are required to check different bad cores in the multi-core chip one by one.

[0012] Further, when i is less than the preset test number, in the i-th round of stability testing, if a processing core is determined to be a bad core, it is determined that the i-th round of stability testing on the processing core has failed, and the multi-core chip is reset to trigger the next restart, and the bad core determined in the i-th round of stability testing is not allowed to perform the i+1-th round of stability testing; when i is equal to the preset test number, in the i-th round of stability testing, if a processing core is determined to be a bad core, it is determined that the i-th round of stability testing on the processing core has failed, all bad cores inside the multi-core chip are determined, and the multi-core chip is reset; when i is equal to the preset test number, in the i-th round of stability testing, if each processing core inside the multi-core chip that performs memory load testing reads and writes memory successfully and fetches instructions correctly, all bad cores inside the multi-core chip have been determined.

[0013] The multi-core chip executes the self-checking method to detect bad cores. For the poor stability failure of the multi-core chip, the cores are checked one by one, which is convenient for disabling the related bad cores in the future and improving the reliability of the detection of the multi-core chip.

[0014] A self-checking system includes the multi-core chip, so that the self-checking system is used to implement the self-checking method according to any one of claims 1 to 7, and to trace back to the processing core inside the multi-core chip that causes the system abnormality.

[0015] A robot is equipped with the self-checking system, so that after the robot is started, the robot can detect bad cores in the multi-core chip by executing the self-checking method. The multi-core chip can be configured as the main control chip of the robot, and the robot can detect all bad cores in the main control during operation to prohibit the bad cores from being used to execute algorithm operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of a self-checking method for a bad core disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0018] The Chinese invention patent application with patent application number CN202311173752.3 discloses a chip startup code repair method and repair system. Specifically, when a chip startup abnormality is detected, based on the abnormal position of the startup code, the startup code and / or the repair code stored in the non-volatile memory are copied to the random access memory to repair the abnormal part of the startup code. It is limited to the repair of the abnormal position of the startup code, and does not detect the processing core that causes the abnormal shutdown state of the multi-core chip system or the system crash. As a result, each time the multi-core chip is started by the startup code, the core fault that affects the stable operation of the chip cannot be detected.

[0019] In order to trace the bad processor core that causes system abnormality inside the chip, the present application discloses a self-checking method for the bad core, the self-checking method comprising: The multi-core chip enters the self-check mode to restart multiple times, which can be understood as entering the self-check mode. In the self-check mode, the multi-core chip uses multiple restarts to simulate the repeated execution process of abnormal power-off and shutdown, startup, abnormal power-off and shutdown, and startup of the system device where the multi-core chip is located.

[0020] The self-check mode is a chip working mode in which a matched number of processing cores in a multi-core chip are all subjected to a memory load test and judged based on the memory load test whether they are bad cores, so as to determine the bad cores that need to be disabled subsequently.

[0021] Each time the multi-core chip is restarted, a matching number of processing cores in the multi-core chip are subjected to a memory load test to determine whether they are bad cores based on the memory load test. Specifically corresponding to the self-check mode, each time the multi-core chip is restarted, a matching number of processing cores in the multi-core chip are controlled to perform a memory load test, each processing core is determined based on the memory load test to determine whether it is a bad core, and the bad cores are excluded from the processing cores allowed to be started by the multi-core chip, until all processing cores in the multi-core chip are judged after multiple restarts, so as to detect all bad cores in the chip, thereby overcoming the problem of a master control memory access error occurring at a certain processing core in the multi-core chip.

[0022] In some embodiments, the multi-core chip can first detect an abnormal shutdown mark in the startup code to identify whether an abnormal shutdown phenomenon occurred last time; when the abnormal shutdown mark is detected, it is determined that a system freeze or abnormal power failure occurred last time, and the multi-core chip enters a self-test mode to detect bad cores in multiple resets (restarts).

[0023] In the self-check mode, the matching quantity may change with the number of restarts, and may increase with the number of restarts to cover more processing cores in the multi-core chip.

[0024] As an example, combining Figure 1 It can be seen that the self-check method includes: each time the processor core performs a memory load test, it is determined whether it is a bad core based on the result of the memory load test; wherein, each processor core performs a judgment based on the result of the memory load test, which essentially controls each processor core to perform a read-write comparison on the relevant memory data to determine whether the processor core is a bad core, thereby detecting and marking the processor core that causes poor chip stability failures such as system freeze or system runaway, and the cause of the poor chip stability failure may be that the processor core reads the relevant memory instruction data incorrectly, causing the system to runaway, for example, the system ranaway before the memory read-write comparison fails, and the data 0x1 should have been read, but the data 0x2 was actually read. Therefore, whenever the processor core is determined to be a bad core, the bad core is disabled; and each time the processor core is restarted, it is prohibited to start the bad core marked last time.

[0025] After multiple restarts, all bad cores in the multi-core chip are determined to complete the detection of all bad cores in the multi-core chip. The number of restarts is related to the number of bad cores / processing cores that can be determined. The more bad cores / processing cores that can be determined, the greater the number of restarts required to be configured for the multi-core chip, so as to complete the detection of all bad cores in the multi-core chip based on the chip stability failure information reflected by the result of the memory load test.

[0026] In summary, the present application performs memory load testing by performing multiple restarts and controlling a matching number of processing cores in different restarts until all processing cores in the multi-core chip are judged to identify the bad cores in the multi-core chip. This can evaluate the performance of the multi-core chip in a long-term unstable read-write environment to detect the robustness and stability of the system device in which the multi-core chip is located; moreover, for multi-core chip stability failures, each processing core is tested one by one to facilitate the subsequent disabling of related bad cores and improve the reliability of multi-core chip detection.

[0027] As an embodiment, when the multi-core chip is currently restarted, if there is a processing core inside the multi-core chip that fails the memory load test, the processing core that failed the test is marked as a bad core to prohibit the processing core that failed the test from being restarted, and then the next restart is performed by resetting. It is worth noting that the processing core that failed the test is not started when the multi-core chip is restarted next time. The reset method here can be triggered by the exception handling interrupt function set in the processing core that failed the test. The software can mark the code and then operate the register to directly reset and enter the next restart. Restart multiple times until the memory load test of all processing cores in the multi-core chip is completed, and all bad cores are judged from all processing cores in the multi-core chip.

[0028] In addition, in the case of the current restart, if all processing cores in the multi-core chip that undergo memory load testing have been tested successfully, the next restart is performed by resetting, and it can be determined that the multi-core chip has been tested successfully after the current restart; combined with the aforementioned test failure judgment method, multiple restarts are performed until the memory load test of all processing cores in the multi-core chip is completed, and all bad cores are judged from all processing cores in the multi-core chip.

[0029] As an embodiment, the multi-core chip is restarted multiple times, and a method in which a matching number of processing cores inside the multi-core chip perform a memory load test at each restart includes: at the i-th restart, at most i processing cores inside the multi-core chip perform a memory load test, wherein some processing cores may be judged as bad cores in the corresponding memory load test after the i-1th restart (i is greater than 1), and they are prohibited from performing the memory load test after the i-th restart.

[0030] When i is greater than 1, the multi-core chip has at most i processing cores, including at least one processing core that has not been previously tested for memory load and / or at most i-1 processing cores that have successfully completed the memory load test when the multi-core chip is restarted for the i-1th time; wherein i is a positive integer, i is less than or equal to the preset test quantity. The at most i processing cores in the multi-core chip are the matching number of processing cores in the multi-core chip, that is, after the i-th restart, the matching number is at most i.

[0031] When a preset number of testing processing cores are set inside a multi-core chip, the number of restarts of the multi-core chip is set to be equal to the preset testing number, so that even if only one processing core that has not undergone memory load testing is judged at each restart, the judgment of all processing cores in the multi-core chip can be completed after the preset number of restarts.

[0032] Therefore, each time the multi-core chip is restarted, the matching number of processing cores are all subjected to a memory load test, wherein among the processing cores subjected to the memory load test, there is at least one processing core that has not been subjected to a memory load test before, and there may also be multiple other processing cores that have been subjected to a memory load test and have been successfully tested. Then, during the multiple restarts, a new processing core is started one by one to perform a memory load test, so that when the number of restarts of the multi-core chip is equal to the preset test number, all the processing cores in the multi-core chip are subjected to a memory load test and based on the memory load test, each processing core is determined to be a bad core.

[0033] If the number of processing cores that have been subjected to memory load testing increases with the number of restarts, the same processing core can be judged multiple times after a restart to overcome the problem of probabilistic test success. It should be noted that if it is judged that a single processing core reads and writes memory successfully and fetches instructions correctly, the memory load test of the single processing core is determined to be successful, otherwise the memory load test of the single processing core is determined to have failed.

[0034] As i increases, more processing cores inside the multi-core chip that have not undergone memory load testing will be judged, and after each restart, the order of judging the processing cores for memory load testing, except for the first restart, is from the processing cores that succeeded the last memory load test to the processing cores that have not undergone memory load testing, or from the processing cores that have not undergone memory load testing to the processing cores that succeeded the last memory load test.

[0035] Schematically, the multi-core chip is a chip with four processing cores, and the four processing cores are CPU0, CPU1, CPU2 and CPU3. The multi-core chip enters the self-check mode, and the multi-core chip only starts to judge the processing core CPU0 when it is restarted for the first time. The multi-core chip judges the processing core CPU0 and the processing core CPU1 in sequence through the second restart. The multi-core chip judges the processing core CPU0, the processing core CPU1 and the processing core CPU2 in sequence through the third restart. The multi-core chip judges the processing core CPU0, the processing core CPU1, the processing core CPU2 and the processing core CPU3 in sequence through the fourth restart. It is worth noting that if it is judged that the processing core CPU1 test fails in the third restart, that is, it is determined that the processing core CPU1 causes the system to freeze or the stability test fails, then the processing core CPU1 is marked as a bad core, and then the processing core CPU0, the processing core CPU2 and the processing core CPU3 are judged in sequence during the fourth restart.

[0036] As an embodiment, the method for the processing core to determine whether it is a bad core based on a memory load test includes: controlling the processing core to write test data to a specific address in the built-in memory, and then controlling the processing core to read corresponding data from the specific address in the built-in memory, and then determining whether the corresponding data read by the processing core is the same as the test data, if so, determining that the processing core reads and writes the memory successfully, otherwise determining that the processing core is a bad core to prohibit subsequent startup; thereby simulating a memory test comparison operation in a scenario where a processing core reads and writes data.

[0037] Or control the processing core to read instructions from the target address, and then determine whether the instructions read by the processing core are the same as the pre-stored target instructions. If yes, determine that the processing core fetches instructions correctly, otherwise determine that the processing core is a bad core to prohibit subsequent startup; in some embodiments, the bad core does not actually run at the expected operating frequency, then the instructions read by the processing core are not the same as the pre-stored target instructions, causing the system where the multi-core chip is located to run away. After the system runs away, the operating system runs into the exception handling process (the exception handling interrupt function executes the software reset), and automatically resets the multi-core chip; it can also be automatically reset by a watchdog; it can also be automatically reset when the system where the multi-core chip is located crashes.

[0038] It should be noted that the multi-core chip includes a built-in memory, and the built-in memory is set with a specific address and / or a target address. The instruction read by the processing core from the target address is the data read out from the target address of the memory associated with the processing core, which may be the data used for the operation of the built-in memory, or may be the instruction transmitted by the bus (the instruction is essentially also data).

[0039] Since there is a probabilistic error in determining whether the processing core reads and writes the memory successfully (some processing cores may have a probability of correct or incorrect memory data comparison), in combination with the aforementioned embodiment, it is necessary to enter the next memory load test through software reset when all processing cores performing memory load tests inside the multi-core chip have passed the test or there is a processing core inside the multi-core chip that fails the memory load test. That is, multiple restarts (i.e., multiple rounds of stability tests) are required in the self-test mode to determine all bad cores inside the multi-core chip.

[0040] As an embodiment, during the i-th restart, the process of performing memory load tests on at most i processing cores inside the multi-core chip is the i-th round of stability testing for the multi-core chip, so that the memory load tests performed on multiple processing cores during one restart constitute one round of stability testing. In the i-th round of stability testing, if each processing core inside the multi-core chip that performs memory load testing reads and writes memory successfully and fetches instructions correctly (the instructions read meet the expected requirements), it is determined that all processing cores inside the multi-core chip that perform memory load testing have been tested successfully, and then it is determined that the i-th round of stability testing on the processing cores is successful. Therefore, in the self-check mode, a specific number of processing cores are turned on by restarting once and a round of stability testing is completed, and the test is determined to be successful only when all processing cores that perform memory load testing read and write memory successfully and fetch instructions correctly.

[0041] It should be noted that if it is determined that a single processing core reads and writes memory successfully and fetches instructions correctly, then it is determined that the test of the single processing core is successful. However, each processing core may cause an instruction fetch error when reading instructions because the reading frequency is lower than the actual operating frequency and is marked as a bad core. If one of the bad cores modifies the system sensitive data, other processing cores that have undergone memory load testing and have not been marked as bad cores will have read data errors due to the modification of the system sensitive data; therefore, it is necessary to determine in a round of stability testing that each processing core in the multi-core chip that performs memory load testing reads and writes memory successfully and fetches instructions correctly before determining that the test is successful, thereby reducing interference between different processing cores; and also overcoming the problem of probabilistic errors in the same processing core in different restarts or memory load tests. In addition, multiple rounds of stability testing are required to check different bad cores in the multi-core chip one by one.

[0042] In the self-check mode, during multiple rounds of stability testing, there are: When i is less than the preset test quantity, in the i-th round of stability test, if it is determined that a processing core that performs a memory load test is a bad core, it is determined that the i-th round of stability test on the processing core has failed, and the multi-core chip is reset to perform the i+1-th round of stability test, and the bad core determined in the i-th round of stability test is configured not to be allowed to perform the i+1-th round of stability test, that is, the bad core marked in the i-th round of stability test and the bad core marked in an earlier round of stability test are not started in the i+1-th round of stability test, and the i+1-th round of stability test is started by the processing core that has not yet performed the memory load test.

[0043] Further, when i is equal to a preset number of tests, in the i-th round of stability testing, if a processing core is determined to be a bad core, then it is determined that the i-th round of stability testing on the processing core has failed. At this time, none of the processing cores that have undergone memory load testing in advance are marked as bad cores, and the remaining processing core that has not undergone memory load testing in advance is marked as a bad core, then all bad cores inside the multi-core chip are determined, and the multi-core chip is reset. At this time, the test is completed to configure the multi-core chip not to start the bad core during subsequent normal startup, and then enter the i+1th restart. In the i+1th restart, all processing cores inside the multi-core chip that are not marked as bad cores can operate normally.

[0044] When i is equal to the preset test number, in the i-th round of stability testing, if each processing core inside the multi-core chip that performs memory load testing reads and writes the memory successfully and fetches instructions correctly, then all bad cores inside the multi-core chip have been determined, at least it is determined that all bad cores inside the multi-core chip have been determined in the i-1-th round of stability testing; then the multi-core chip is reset, and the test is completed at this time to configure the multi-core chip not to start the bad cores during subsequent normal startup, and then enter the i+1th restart, in the i+1th restart, all processing cores inside the multi-core chip that are not marked as bad cores can operate normally.

[0045] As an embodiment, whenever the system device where the multi-core chip is located is started, the multi-core chip runs the startup code after power-on and detects whether there is an abnormal shutdown mark in the startup code. If so, it enters the self-check mode to identify the processing core that causes the abnormal phenomenon related to the abnormal shutdown mark. Otherwise, it continues to run the startup code to enable the multi-core chip to start normally.

[0046] If an abnormal shutdown mark is detected in the startup code, it is determined that there was an abnormal shutdown before the current startup of the system device where the multi-core chip is located, including the last system crash or abnormal power failure; the multi-core chip enters the self-check mode to screen the bad cores in multiple restarts, so as to disable the bad cores through the self-check mode and improve the reliability of the system device where the multi-core chip is located.

[0047] Specifically, before the system device where the multi-core chip is located is started, if the system device where the multi-core chip is located is abnormally powered off or crashes, the system device where the multi-core chip is located is abnormally shut down, and an abnormal shutdown mark is made in the startup code, specifically by adding a flag in the startup code to make an abnormal shutdown mark, or assigning a logical value of 1 to the relevant flag bit in the startup code, so that the multi-core chip enters the self-check mode based on the abnormal shutdown mark after powering on. Among them, when there is a processing core inside the multi-core chip that is a bad core, it causes the system device where the multi-core chip is located to be abnormally powered off or crashed. After detecting the abnormal shutdown mark, this embodiment enters the self-check mode. In the self-check mode, multiple restarts are used to simulate the repeated execution process of abnormal power-off, shutdown, startup, abnormal power-off, shutdown, and startup of the system device where the multi-core chip is located. Based on the test results corresponding to the memory load test disclosed in the aforementioned embodiment, the performance of the multi-core chip in a long-term unstable read-write environment can be evaluated, thereby detecting the robustness and stability of the system device where the multi-core chip is located.

[0048] Preferably, the abnormal shutdown mark is used to identify whether a system crash or abnormal power failure occurred last time. The abnormal shutdown mark can be stored in a non-volatile memory outside the multi-core chip or in a built-in memory of the multi-core chip. The built-in memory can be a register of a specific power domain inside the multi-core chip. It is only necessary to ensure that the abnormal shutdown mark is not lost after the system device where the multi-core chip is located is reset.

[0049] In addition, before the system device where the multi-core chip is located is shut down normally, the abnormal shutdown mark in the startup code is cleared. Specifically, the relevant flag bit in the startup code is assigned a logical value of 0 to clear the guiding effect of the abnormal shutdown mark on the working mode of the multi-core chip, so as to prevent the multi-core chip from entering the self-test mode after powering on again.

[0050] If there is no bad core in the multi-core chip that causes the system abnormality, the abnormal shutdown mark is cleared, and the system device where the multi-core chip is located can be shut down normally.

[0051] It should be noted that the startup code will enable the multi-core chip to work normally after the system device where the multi-core chip is located is abnormally shut down and restarted or the multi-core chip is reset and restarted. The startup code will enable the multi-core chip to work normally after the system device where the multi-core chip is located is powered on or the multi-core chip is powered on.

[0052] The present application discloses a multi-core chip, which uses the self-checking method disclosed in the above embodiment to detect bad cores. For the poor stability failure of the multi-core chip, the detection is performed core by core, which facilitates the subsequent disabling of the related bad cores and improves the reliability of the detection of the multi-core chip.

[0053] In the present application, each processing core set in the multi-core chip extracts the minimum resource set for system startup, and a processing core is a physical core; in addition to running built-in tasks, each processing core will also enter privileged mode to participate in the management of the operating system; each processing core will handle its own interrupt program to facilitate memory load testing in a corresponding round of stability testing; if a data error occurs during the memory load test of one of the processing cores, causing the entire operating system to run away, then one of the processing cores will be marked as a bad core, which is transparent to the user process and facilitates the screening of bad cores.

[0054] The present application also discloses a self-checking system, which includes the aforementioned multi-core chip, so that the self-checking system is used to implement the self-checking method disclosed in the aforementioned embodiment, and to trace back to the processing core inside the multi-core chip that causes the system abnormality.

[0055] In some embodiments, the self-checking system includes a non-volatile memory and the multi-core chip, so that the self-checking system is used to implement the self-checking method; the multi-core chip is internally provided with a built-in memory, and the self-checking system also has a peripheral circuit, and the peripheral circuit includes a system bus and a non-volatile memory. Among them, the multi-core chip and the non-volatile memory are connected and interacted through the system bus. The abnormal shutdown mark is stored in the non-volatile memory or the built-in memory of the multi-core chip; the multi-core chip is used to execute the aforementioned self-checking method when the abnormal shutdown mark is read from the relevant memory, and the memory load test is performed by performing multiple restarts and controlling the matching number of processing cores in different restarts until all processing cores in the multi-core chip are judged to judge the bad cores in the multi-core chip, so as to evaluate the performance of the multi-core chip in a long-term unstable read-write environment, so as to detect the robustness and stability of the self-checking system.

[0056] The present application also discloses a robot, which is equipped with the self-check system so that after the robot is started, it can detect bad cores in the multi-core chip by executing the self-check method. The multi-core chip can be configured as the main control chip of the robot. Then, during operation, the robot can detect all bad cores inside the main control to prohibit the bad cores from being used to execute algorithm operations.

[0057] The multi-core chip reset may be equivalent to the self-check system shutting down and then restarting, which is also equivalent to the robot starting.

[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.

Claims

1. A self-check method for a bad kernel, characterized in that: The self-test method comprises: The multi-core chip is restarted multiple times, and each time a matching number of processing cores in the multi-core chip are subjected to a memory load test to determine whether they are bad cores based on the memory load test.

2. The self-test method according to claim 1, characterized in that: At each restart, each processing core that performs a memory load test determines whether it is a bad core based on the result of the memory load test; after multiple restarts, all bad cores inside the multi-core chip are determined to complete the detection of all bad cores inside the multi-core chip.

3. The self-test method according to claim 2, characterized in that: In the case of the current restart, if there is a processing core in the multi-core chip that fails the memory load test, the processing core that fails the test is marked as a bad core to prohibit the processing core that fails the test from being restarted, and then the next restart is performed by resetting; In the case of the current restart, if all the processing cores in the multi-core chip that are performing the memory load test are tested successfully, the next restart is performed by resetting.

4. The self-test method according to claim 3, characterized in that: The method of restarting the multi-core chip multiple times and performing a memory load test on a matching number of processing cores in the multi-core chip at each restart includes: At the i-th restart, at most i processing cores in the multi-core chip all perform a memory load test; wherein i is a positive integer, i is less than or equal to a preset test quantity; when i is greater than 1, at most i processing cores in the multi-core chip include at least one processing core that has not previously performed a memory load test and at most i-1 processing cores that have successfully performed a memory load test at the i-1th restart of the multi-core chip; Wherein, when a preset number of test processing cores are set inside the multi-core chip, the number of restarts of the multi-core chip is equal to the preset number of tests; The at most i processing cores in the multi-core chip are a matching number of processing cores in the multi-core chip.

5. The self-test method according to claim 4, characterized in that: The method for judging whether it is a bad kernel based on the result of the memory load test includes: Control the processing core to write test data to a specific address in the built-in memory, then control the processing core to read corresponding data from the specific address in the built-in memory, and then determine whether the corresponding data read by the processing core is the same as the test data, if yes, determine that the processing core reads and writes the memory successfully, otherwise determine that the processing core is a bad core; and / or controlling the processing core to read instructions from the outside, and then determining whether the instructions read by the processing core are the same as the pre-stored target instructions, if yes, determining that the processing core fetches the instructions correctly, otherwise determining that the processing core is a bad core; Wherein, the multi-core chip includes built-in memory.

6. The self-test method according to claim 4, characterized in that: During the i-th restart, the process of performing memory load test on at most i processing cores in the multi-core chip is the i-th round of stability test on the multi-core chip; In the i-th round of stability testing, if each processing core performing memory load testing inside the multi-core chip reads and writes memory successfully and fetches instructions correctly, it is determined that all processing cores performing memory load testing inside the multi-core chip have been tested successfully, and then it is determined that the i-th round of stability testing on the processing cores is successful.

7. The self-test method according to claim 6, characterized in that: When i is less than the preset test quantity, in the i-th round of stability test, if a processing core is determined to be a bad core, it is determined that the i-th round of stability test on the processing core fails, and the multi-core chip is reset to restart next time, and the bad core determined in the i-th round of stability test is configured not to be allowed to perform the i+1-th round of stability test; When i is equal to the preset test number, in the i-th round of stability test, if a processing core is determined to be a bad core, it is determined that the i-th round of stability test on the processing core has failed, all bad cores in the multi-core chip are determined, and the multi-core chip is reset; When i is equal to the preset test number, in the i-th round of stability testing, if each processing core in the multi-core chip that performs memory load testing reads and writes memory successfully and fetches instructions correctly, all bad cores in the multi-core chip have been determined.

8. A multi-core chip, characterized in that: The multi-core chip is used to execute the self-checking method described in any one of claims 1 to 7 to detect bad cores.

9. A self-checking system, characterized in that: The self-checking system comprises the multi-core chip described in claim 9, so that the self-checking system is used to implement the self-checking method described in any one of claims 1 to 7.

10. A robot, characterized in that: The robot is equipped with the self-checking system described in claim 9, so that after the robot is started, it can detect bad cores in the multi-core chip by executing the self-checking method described in any one of claims 1 to 7.