A CPU diagnostic system, method, device and medium

By using the interface connection between multiple CPUs and the XOR comparison method of storing operation data in the SIS, the problem of high difficulty and high cost of diagnosing the CPU in the existing technology is solved, and efficient CPU diagnosis is achieved to meet the needs of Diagnostic coverage and cost requirements for safety standards.

CN113886148BActive Publication Date: 2024-09-03HANGZHOU HOLLYSYS AUTOMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111264412.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2024-09-03
Estimated Expiration
2041-10-28

AI Technical Summary

Technical Problem

The existing SIS diagnosis CPU technology is difficult and costly, and it is difficult to meet the safety integrity level 3 requirements of IEC61508-2 or GB/T 20438.2 functional safety standards, especially in the 1oo2D architecture, the hardware fault margin is 1 and the diagnosis Coverage needs to be over 90%.

Method used

Multiple CPUs are connected to each other through interfaces, and each is connected to a memory to store the operation data of itself and other CPUs, and the consistency of the operation data is judged through XOR comparison. If they are consistent, it is judged that the CPU is working normally, if not, it is judged that the CPU is not working properly. work, avoiding the need for multiple CPU operations to be synchronized and additional hardware comparators.

Benefits of technology

It simplifies the CPU diagnostic process, reduces the difficulty and cost of diagnosis, improves diagnostic coverage, can reach more than 99% diagnostic accuracy, and meets the requirements of safety standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886148B
    Figure CN113886148B
Patent Text Reader

Abstract

The present application discloses a CPU diagnostic system, method, device and medium, which are applied to the electronic field. The system includes multiple CPUs, which are interconnected through interfaces to facilitate the transmission of operation data. Each CPU is connected to a memory for storing its own operation data and the operation data of other CPUs, wherein the operation data is obtained by each CPU performing the same operation task; the CPU can obtain the operation data and can also determine whether the operation data of different CPUs are consistent. If so, it is determined that the CPU can work normally; if not, it is determined that the CPU cannot work normally. The CPU diagnostic system provided by the present application stores the operation results of multiple CPUs in the memory for comparison, does not require the operation synchronization of multiple CPUs, and the implementation technology is relatively simple, which reduces the difficulty of CPU diagnosis; at the same time, the CPU diagnostic system of the present application does not require additional hardware comparators, which reduces costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronics, and in particular to a CPU diagnostic system, method, device and medium. Background Art

[0002] In the safety instrumentation system (SIS), in order to meet the requirements of safety integrity level 3 (SIL3) of IEC61508-2 or GB / T 20438.2 functional safety standards, the system usually adopts a redundant architecture design. In the 1oo2D architecture SIS, the hardware fault margin is 1. According to the requirements of the safety standard for the system, the system's diagnostic coverage needs to reach more than 90%.

[0003] At present, conventional SIS diagnosis CPU generally adopts the method of hardware comparator. Figure 1 is a schematic diagram of the system architecture of the hardware comparator; Figure 1 As shown, the diagnostic method of the hardware comparator is to perform the same operation through two completely synchronized CPUs 10. The two CPUs 10 have their own corresponding memories 11. At the same time, there is a hardware comparator 12 connected to the two memories 11 respectively. The hardware comparator 12 compares the operation data of the two CPUs 10 in the two memories 11 in real time. If it is determined that the results obtained by the two CPUs 10 are different, an abnormal alarm is generated and the system enters a safe state. However, when using a hardware comparator to compare the operation data, the two CPU operations need to be performed synchronously, which is technically difficult to implement; and an additional hardware comparator needs to be added, which is costly.

[0004] It can be seen that how to reduce the difficulty of diagnosing CPU technology and reduce the diagnosis cost are problems that need to be solved urgently by technical personnel in this field. Summary of the invention

[0005] The purpose of this application is to provide a CPU diagnosis system, method, device and medium to reduce the difficulty of diagnosing CPU technology and reduce the diagnosis cost.

[0006] To solve the above technical problems, the present application provides a CPU diagnostic system, comprising: a plurality of CPUs and a plurality of memories, wherein the CPUs are interconnected via interfaces so as to facilitate transmission of operation data between the CPUs;

[0007] Each of the CPUs is connected to a memory, and the memory is used to store the operation data of the CPU connected to it and the operation data of the other CPUs, wherein the operation data is obtained by each of the CPUs performing the same operation task;

[0008] The CPU is used to obtain the operation data and determine whether the operation data of different CPUs are consistent. If so, it is determined that the CPU can work normally; if not, it is determined that the CPU cannot work normally.

[0009] In order to solve the above technical problems, the present application also provides a CPU diagnosis method, which is applied to the CPU diagnosis system, and the method includes:

[0010] Get its own computing data;

[0011] receiving the computing data of the remaining CPUs through an interface, wherein the computing data is obtained by each of the CPUs performing the same computing task;

[0012] storing the computing data of the CPU itself and the computing data of the other CPUs in a memory;

[0013] Determining whether the operation data of different CPUs in the memory are consistent;

[0014] If yes, it is determined that the CPU can work normally;

[0015] If not, it is determined that the CPU cannot operate normally.

[0016] Preferably, the receiving the operation data of other CPUs through the interface comprises:

[0017] The operation data obtained by inverting the remaining CPUs is received through the interface.

[0018] Preferably, the memory includes a plurality of storage areas, different computing tasks in the CPU correspond to different storage areas, and storing the computing data of the CPU itself and the computing data of other CPUs in the memory includes:

[0019] The computing data of the CPU itself and the computing data of the other CPUs when executing different computing tasks are stored in the corresponding storage area.

[0020] Preferably, it also includes:

[0021] Storing a plurality of test data in the memory, wherein designated bits of the plurality of test data are inconsistent;

[0022] Comparing the plurality of test data in the memory and obtaining a comparison result;

[0023] If the comparison result indicates that the bits specified by the plurality of test data are inconsistent, it is determined that the diagnostic function of the CPU is normal;

[0024] If the comparison result indicates that the plurality of test data are consistent or other bits of the plurality of test data are inconsistent, it is determined that the diagnosis function of the CPU is abnormal.

[0025] Preferably, the CPU has a plurality of computing tasks, and the computing tasks have different priorities, and the determining whether the computing data of different CPUs in the memory are consistent includes:

[0026] When there is a computing task with a higher priority than the current computing task, saving the comparison state of the current computing task;

[0027] It is determined whether the operation data to be compared of different CPUs in the memory are consistent, wherein the operation data to be compared is obtained by executing the operation task with a higher priority.

[0028] Preferably, the determining whether the operation data of different CPUs in the memory are consistent comprises:

[0029] The operation data of the CPU corresponding to the memory is compared with the inverted operation data of the other CPUs in the memory by using an exclusive-OR comparison method to determine whether the original operation data are consistent.

[0030] In order to solve the above technical problems, the present application also provides a CPU diagnostic device, comprising:

[0031] The acquisition module is used to obtain its own operation data;

[0032] A receiving module, used for receiving the operation data of other CPUs through an interface, wherein the operation data is obtained by each CPU performing the same operation task;

[0033] A control module, used for storing the computing data of the control module and the computing data of the other CPUs into a memory;

[0034] A judging module, used for judging whether the operation data of different CPUs in the memory are consistent;

[0035] If yes, it is determined that the CPU can work normally;

[0036] If not, it is determined that the CPU cannot operate normally.

[0037] In order to solve the above technical problems, the present application also provides a CPU diagnostic device, comprising: a memory for storing a computer program;

[0038] A processor is used to implement the steps of the above-mentioned CPU diagnosis method when executing a computer program.

[0039] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above CPU diagnostic method are implemented.

[0040] The CPU diagnostic system provided by the present application includes multiple CPUs, which are interconnected through interfaces to facilitate the transmission of computing data. Each CPU is connected to a memory for storing its own computing data and computing data of other CPUs, wherein the computing data is obtained by each CPU performing the same computing task; the CPU can obtain computing data, and can also determine whether the computing data of different CPUs are consistent. If so, it is determined that the CPU can work normally; if not, it is determined that the CPU cannot work normally. The CPU diagnostic system provided by the present application stores the computing results of multiple CPUs in the memory for comparison, does not require the computing synchronization of multiple CPUs, and the implementation technology is relatively simple, which reduces the difficulty of CPU diagnosis; at the same time, the CPU diagnostic system of the present application does not require additional hardware comparators, which reduces costs.

[0041] The present application also provides a CPU diagnosis method, device and medium, which correspond to the above-mentioned CPU diagnosis system and thus have the same beneficial effects as the above-mentioned CPU diagnosis system. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 It is a schematic diagram of the system architecture of the hardware comparator;

[0044] Figure 2 A schematic diagram of the structure of a CPU diagnostic system provided in an embodiment of the present application;

[0045] Figure 3 A flowchart of a CPU diagnostic method provided in an embodiment of the present application;

[0046] Figure 4 A schematic diagram of the connection structure between the CPU and the memory provided in the embodiment of the present application;

[0047] Figure 5 A structural diagram of a CPU diagnostic device provided in an embodiment of the present application;

[0048] Figure 6 A structural diagram of a CPU diagnostic device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] The core of this application is to provide a CPU diagnosis system, method, device and medium.

[0051] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0052] In SIS, in order to meet the requirements of SIL3 of IEC61508-2 or GB / T 20438.2 functional safety standards, the system usually adopts a redundant architecture design. For example, in a 1oo2D architecture SIS, the hardware fault margin is 1. According to the requirements of the safety standard for the system, the system's diagnostic coverage needs to reach more than 90%. This embodiment provides a CPU diagnostic system, the system includes multiple CPUs and multiple memories, each CPU is connected to a memory, the memory has multiple storage areas, and is used to store the operation data of the CPU connected to itself and the operation data of the remaining CPUs, wherein the operation data is obtained by each CPU performing the same operation task. It should be noted that there is no restriction on the type of memory here, and it can be a DDR memory. The CPUs are connected to each other through an interface to facilitate the transmission of operation data between CPUs, wherein the interface used for connection can be a PCIE interface. The CPU is used to obtain operation data and determine whether the operation data of different CPUs are consistent. If so, it is determined that the CPU can work normally; if not, it is determined that the CPU cannot work normally. When comparing the operation data, what is actually being compared are the operation data stored in different areas of the memory. Because the CPU diagnostic system has multiple memories, there is no restriction on which memory's operation data is compared during diagnosis. The operation data in all memories may be compared, or only the operation data in part of the memories may be compared.

[0053] The purpose of the CPU diagnostic system is to diagnose the CPU and determine whether the CPU can correctly complete the operation. There is no limit on the number of CPUs in the CPU diagnostic system provided in this embodiment. Multiple CPUs can be used, but usually only two CPUs are needed for diagnosis. Take two CPUs as an example. Figure 2 A schematic diagram of the structure of a CPU diagnostic system provided in an embodiment of the present application, such as Figure 2As shown, there are two CPUs 10 in the CPU diagnostic system. The CPU 10 can be dual-core or multi-core, wherein there are a computing core and a comparison core. The computing core is used to perform computing tasks to obtain computing data, and the comparison core can compare the computing data of different CPUs 10. There are two corresponding memories 11 in the CPU diagnostic system. Each CPU 10 is connected to a corresponding memory 11 so as to store computing data in the corresponding memory 11. The two CPUs 10 are connected through an interface 13, and the two CPUs 10 can exchange computing data through the interface 13. If one of the CPUs 10 needs to store computing data in the memory 11 corresponding to the other CPU 10, it is necessary to first transmit the computing data to the CPU 10 corresponding to the memory 11 through the interface 13, and the CPU 10 then stores the data in the memory 11. It is worth mentioning that the data transmitted between the CPUs 10 can be the original computing data or the inverted computing data. The specific diagnostic process is as follows: the computing cores of the two CPUs 10 perform the same computing task and obtain two computing data. The two CPUs 10 receive the computing data of the other CPU 10 through the interface 13, and store their own computing data and the computing data of the other CPU 10 in their corresponding memory 11. The computing data of the two CPUs 10 and the computing data of the other CPU 10 are stored in two designated locations in the memory 11. After the computing data is transmitted and prepared, the computing core notifies the comparison core through inter-core communication that the computing data of the corresponding computing task has been prepared and the computing data can be compared. The comparison core of the CPU 10 compares the data of the two designated locations to obtain a comparison result. According to the comparison result, it can be determined whether the computing data of the two CPUs 10 are consistent. If both CPUs 10 can work normally, the two computing data obtained should be consistent. Correspondingly, when the comparison core of the CPU 10 compares the two computing data and finds that they are inconsistent, it can be considered that at least one of the two CPUs 10 cannot work normally, and the system computing core is notified through inter-core communication that the computing data of the corresponding computing task is inconsistent, and the operation related to the computing task enters a safe state. The two CPUs can also be interconnected with the coprocessor 14 via 1 Gbps Ethernet to achieve data exchange with the outside world. The coprocessor 14 can also complete the system's external communication function.

[0054] Figure 2Only the case of two CPUs is described in the above. In practical applications, the CPU diagnosis system may include more than two CPUs, and each corresponding CPU is connected to a memory. The CPU may be dual-core or multi-core, one of which is used as the CPU's computing core to perform computing tasks, and each computing task has its own operation cycle and operation data; another core is used as a comparison core to compare the data in the memory. The computing cores of multiple CPUs perform the same computing tasks and obtain multiple computing data. For one of the CPUs, it receives the computing data of other CPUs through the interface, and stores its own computing data and the computing data of other CPUs in its own memory. After the computing data is transmitted and prepared, the computing core notifies the comparison core through inter-core communication that the computing data of the corresponding computing task has been prepared and the computing data can be compared. Then the comparison core compares the computing data in the memory. If the comparison result is correct, wait for the next computing task or the next comparison cycle. If the comparison result is wrong, indicating that at least one of the multiple CPUs cannot work normally, the system computing core is notified through inter-core communication that the computing data of the corresponding computing task is inconsistent, and the operation related to the computing task enters a safe state. Multiple CPUs can also be interconnected with coprocessors via 1Gbps Ethernet to exchange data with the outside world, and the coprocessors can also complete the system's external communication functions.

[0055] The CPU diagnostic system provided by the embodiment of the present application includes multiple CPUs, which are interconnected through interfaces to facilitate the transmission of operation data. Each CPU is connected to a memory for storing its own operation data and the operation data of other CPUs, wherein the operation data is obtained by each CPU performing the same operation task; the CPU can obtain the operation data, and can also determine whether the operation data of different CPUs are consistent. If so, it is determined that the CPU can work normally; if not, it is determined that the CPU cannot work normally. The CPU diagnostic system provided by the present application stores the operation results of multiple CPUs in the memory for comparison, does not require the operation synchronization of multiple CPUs, and the implementation technology is relatively simple, which reduces the difficulty of CPU diagnosis; at the same time, the CPU diagnostic system of the present application does not require additional hardware comparators, which reduces costs.

[0056] This embodiment also provides a CPU diagnosis method, which is applied to the CPU diagnosis system. Figure 3 A flowchart of a CPU diagnostic method provided in an embodiment of the present application, such as Figure 3 As shown, the above method includes:

[0057] S10: Obtaining its own computing data;

[0058] S11: receiving computing data of other CPUs through an interface, wherein the computing data is obtained by each CPU executing the same computing task;

[0059] S12: storing the computing data of the CPU and the computing data of other CPUs into the memory;

[0060] S13: Determine whether the operation data of different CPUs in the memory are consistent;

[0061] If yes, it is determined that the CPU can work normally;

[0062] If not, it is determined that the CPU cannot work normally.

[0063] The CPU diagnosis method provided in this embodiment corresponds to the CPU diagnosis system described above, and therefore has the same beneficial effects as the above method, which will not be described in detail here.

[0064] According to the requirements of the safety standard for the system, the diagnostic coverage of the system needs to reach more than 90%. In order to increase the diagnostic coverage of the system, receiving the operation data of the remaining CPUs through the interface specifically means receiving the inverted operation data of the remaining CPUs through the interface.

[0065] Because the un-inverted operation data and the inverted operation data cannot be directly compared for consistency, the inverted operation data can be inverted again before comparison, but it takes a lot of time. Therefore, the determination of whether the operation data of different CPUs in the memory are consistent is to use an exclusive OR comparison method to compare the operation data of the CPU corresponding to itself in the memory with the inverted operation data of other CPUs and determine whether the original operation data are consistent.

[0066] In the CPU diagnostic system provided by this embodiment, the operation data exists in the form of 0 and 1. The operation core of each CPU executes the operation task of the system. Each operation task has its own operation cycle and operation data. After each operation task is completed, the operation data of each CPU is bit-inverted, that is, all 0s in the operation data are changed to 1s, and 1s are changed to 0s, and the inverted operation data is mirrored to a storage area in its own memory, and each 0 or 1 occupies a bit. After the operation data is mirrored, the CPU interface is configured, and the mirrored operation data is transmitted to other CPUs. Here, the CPU diagnostic system includes two CPUs as an example, one of which transmits the mirrored operation data to the other CPU, and the other CPU receives the inverted operation data through the interface. At this time, both CPUs have their own operation data and the operation data of the other CPU, and these data are stored in their corresponding memory. After the operation data is exchanged and prepared, the operation core notifies the comparison core through inter-core communication that the operation data of the corresponding operation task has been prepared, and the operation data can be compared. At this time, the comparison core performs an XOR comparison between the operation data of its own CPU and the inverted operation data of the other CPU. If there are multiple CPUs in the CPU diagnosis system, the calculation data of all CPUs that execute the same calculation task can be compared.

[0067] In the CPU diagnosis system provided by this embodiment, the CPU inverts the obtained operation data and then sends it to other CPUs through the interface, thereby increasing the coverage of the diagnosis. The CPU may not change the data of some bits when executing the operation task, and the abnormal CPU cannot be diagnosed by direct comparison. Take a bit of the operation data compared by two CPUs as an example. If the bit is defaulted to 0, the bit does not change after the CPU executes the operation task. If one of the two CPUs is abnormal and cannot perform the operation, but the data of the bit of the abnormal CPU is still 0 after the operation task is performed, the diagnosis result indicates that the operation data of the two CPUs are the same and there is no abnormality. However, if the abnormal CPU sends the inverted operation data to the other CPU, the correct bit data that the other CPU should receive should be 1, but because of the abnormality, the bit in the operation data received by the other CPU is still 0, and the other CPU can detect the abnormality when performing XOR comparison. This method can greatly improve the coverage of diagnosis, and the diagnosis rate can reach more than 99% in practical applications. When comparing operation data, the CPU may perform an inversion operation on the inverted operation data of other CPUs again, and the two operation data can be directly compared. However, it is more convenient to directly perform an XOR comparison on its own operation data and the inverted operation data of other CPUs.

[0068] In practical applications, the CPU usually needs to complete multiple computing tasks. If it needs to compare the data of multiple computing tasks more conveniently, the memory should include multiple storage areas. Different computing tasks in the CPU correspond to different storage areas. Storing its own computing data and the computing data of other CPUs in the memory includes: storing its own computing data and the computing data of other CPUs when executing different computing tasks in corresponding storage areas.

[0069] The memory of the CPU diagnostic system provided in this embodiment has multiple storage areas. Figure 4 An implementation of this embodiment is described by taking an example. Figure 4 A schematic diagram of the connection structure between the CPU and the memory provided in the embodiment of the present application, Figure 4 There are detailed descriptions of the storage areas in the above memory, such as Figure 4 As shown, the CPU diagnostic system includes two CPUs, which are connected via a PCIE interface and both include a computing core and a comparison core. Both CPUs are connected to a memory, and there are multiple storage areas in the memory. Each data in the figure has a designated storage area, and the CPU directly stores the data in the corresponding storage area. As can be seen from the figure, the CPU has n computing tasks, and each computing task has its own corresponding storage area. After the computing core of the CPU executes a computing task, it stores the computing data in the storage area corresponding to the computing task, and then inverts its own computing data and stores it in another storage area, that is, the mirror data in the figure. The mirror data is convenient for data exchange with other CPUs. The CPU will also accept the computing data of the other CPU after inverting, that is, the exchange data in the figure.

[0070] It should be noted that Figure 4 This is only one solution provided by this embodiment, and does not include all situations provided by the embodiment. There may be more than two CPUs in the CPU diagnostic system, so a storage area needs to be reserved for each CPU in the memory. There is no limit on the number of CPU computing tasks, which is subject to the actual situation. When the computing data of the two CPUs are not negated and directly compared, the data stored in the memory should be the original computing data, and its own mirror data is not required.

[0071] In the solution provided in this embodiment, each computing task corresponds to its own storage area, and its own computing data and the computing data of other CPUs are also stored in different storage areas, which can realize data comparison of multiple computing tasks.

[0072] In a specific implementation, the diagnostic function of the CPU's diagnostic system may fail, and it is impossible to accurately diagnose whether the CPU can work normally. Therefore, it is necessary to perform self-checks on the system regularly. Therefore, the above method also includes: storing multiple test data in a memory, wherein the specified bits of the multiple test data are inconsistent; comparing the multiple test data in the memory and obtaining a comparison result; if the comparison result indicates that the specified bits of the multiple test data are inconsistent, it is determined that the CPU's diagnostic function is normal; if the comparison result indicates that the multiple test data are consistent or other bits of the multiple test data are inconsistent, it is determined that the CPU's diagnostic function is abnormal.

[0073] The solution provided in this embodiment requires the preparation of multiple test data. If the system can accurately diagnose that the test data is inconsistent with the specified bit position, it indicates that the system diagnosis function is normal. Figure 4 For example, three test data are stored in the memory 11, including its own test data, its own inverted test data, and the inverted test data of the other party CPU10; what needs to be compared is its own test data and the inverted test data of the other party CPU10, and the specified bits in these two data are set to an error state in advance. Taking a bit as an example, if its own bit is 0, the inverted bit of the other party CPU10 should be 1 in the correct state, but in order to realize self-checking, the inverted bit of the other party CPU10 is set to 0, and wait for CPU10 to compare. If the comparison result indicates that the data of the two CPUs 10 at this bit is inconsistent, it means that the diagnostic function of the CPU diagnostic system is normal; but if the comparison result indicates that the two test data are consistent or the wrong bit data is detected to be inconsistent, it means that the diagnostic function of the CPU diagnostic system is abnormal. Tables 1 to 4 are the test data and inverted test data of the above two CPUs 10.

[0074] Table 1 Test data of one of the CPUs

[0075] 0x00000001 0x00000002 0x00000004 0x00000008 0x00000010 0x00000020 0x00000040 0x00000080 0x00000100 0x00000200 0x00000400 0x00000800 0x00001000 0x00002000 0x00004000 0x00008000 0x00010000 0x00020000 0x00040000 0x00080000 0x00100000 0x00200000 0x00400000 0x00800000 0x01000000 0x02000000 0x04000000 0x08000000 0x10000000 0x20000000 0x40000000 0x80000000 0xFFFFFFFE 0xFFFFFFFD 0xFFFFFFFB 0xFFFFFFF7 0xFFFFFFEF 0xFFFFFFDF 0xFFFFFFBF 0xFFFFFF7F 0xFFFFFEFF 0xFFFFFDFF 0xFFFFFBFF 0xFFFFF7FF 0xFFFFEFFF 0xFFFFDFFF 0xFFFFFFFF 0xFFFF7FFF 0xFFFEFFFF 0xFFFFFFFF 0xFFFFBFFFF 0xFFF7FFFF 0xFFEFFFFF 0xFFDFFFFF 0xFFBFFFFF 0xFF7FFFFF 0xFEFFFFFF 0xFDFFFFFF 0xFBFFFFFF 0xF7FFFFFF 0xEFFFFFFF 0xDFFFFFFF 0xBFFFFFFF 0x7FFFFFFF

[0076] Table 2 Test data after one of the CPUs is inverted

[0077]

[0078]

[0079] Table 3 Test data of the other party's CPU

[0080] 0x00000001 0x00000002 0x00000004 0x00000008 0x00000010 0x00000020 0x00000040 0x00000080 0x00000100 0x00000200 0x00000400 0x00000800 0x00001000 0x00002000 0x00004000 0x00008000 0x00010000 0x00020000 0x00040000 0x00080000 0x00100000 0x00200000 0x00400000 0x00800000 0x01000000 0x02000000 0x04000000 0x08000000 0x10000000 0x20000000 0x40000000 0x80000000 0xFFFFFFFE 0xFFFFFFFD 0xFFFFFFFB 0xFFFFFFF7 0xFFFFFFEF 0xFFFFFFDF 0xFFFFFFBF 0xFFFFFF7F 0xFFFFFEFF 0xFFFFFDFF 0xFFFFFBFF 0xFFFFF7FF 0xFFFFEFFF 0xFFFFDFFF 0xFFFFFFFF 0xFFFF7FFF 0xFFFEFFFF 0xFFFFFFFF 0xFFFFBFFFF 0xFFF7FFFF 0xFFEFFFFF 0xFFDFFFFF 0xFFBFFFFF 0xFF7FFFFF 0xFEFFFFFF 0xFDFFFFFF 0xFBFFFFFF 0xF7FFFFFF 0xEFFFFFFF 0xDFFFFFFF 0xBFFFFFFF 0x7FFFFFFF

[0081] Table 4 Test data after the other party's CPU is inverted

[0082] 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

[0083] The two CPUs 10 perform XOR comparison on their own test data and the inverted test data of the other CPU 10 in groups of 32 bits. First, the test data of one CPU and the bit specified by the inverted test data are modified, and then the system is self-checked. It should be noted that the above example is for Figure 4 The implementation scheme is described, and this embodiment includes but is not limited to this scheme. The test data can be multiple and may not be negated.

[0084] The self-checking method provided in this embodiment enables the system to diagnose any bit fault. If the comparison result indicates that the bits specified by multiple data are inconsistent, it means that the diagnostic function of the CPU diagnostic system is normal; but if the comparison result indicates that the multiple test data are consistent or the detected wrong bit data is inconsistent, it means that the diagnostic function of the CPU diagnostic system is abnormal. The above method performs self-checking on the system, avoiding the inability to accurately detect CPU abnormalities due to the failure of the system's self-checking function.

[0085] Normally, a CPU has multiple computing tasks. When the CPU executes these computing tasks, it is difficult to complete multiple computing tasks at the same time, and it is also difficult to compare the computing data of multiple computing tasks at the same time. Therefore, the computing tasks are divided into different priorities. Judging whether the computing data of different CPUs in the memory are consistent includes: when there is a computing task with a higher priority than the current computing task, saving the comparison status of the current computing task; judging whether the computing data to be compared of different CPUs in the memory are consistent, where the computing data to be compared is obtained by executing the computing task with a higher priority.

[0086] Generally, when there is a higher priority computing task to be executed, the low priority computing task will be suspended to complete the high priority computing task first. Similarly, when the system is diagnosing, the CPU may be comparing low priority computing data. If there is a high priority computing task to be executed, it will save the comparison status of the current computing task, suspend the comparison of the current computing data, and start comparing the computing data corresponding to the high priority computing task.

[0087] This embodiment divides the computing tasks into different priorities, and can first compare the computing data corresponding to the computing tasks with higher priorities, and complete the data comparison of the more urgent computing tasks.

[0088] In the above embodiments, the CPU diagnostic method is described in detail, and the present application also provides an embodiment corresponding to the CPU diagnostic device. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.

[0089] Based on the perspective of functional modules, this embodiment provides a CPU diagnostic device. Figure 5 A structural diagram of a CPU diagnostic device provided in an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0090] An acquisition module 20, used to acquire its own operation data;

[0091] A receiving module 21, used for receiving computing data of other CPUs through an interface, wherein the computing data is obtained by each CPU performing the same computing task;

[0092] The control module 22 is used to store its own computing data and computing data of other CPUs in the memory;

[0093] A judging module 23 is used to judge whether the operation data of different CPUs in the memory are consistent;

[0094] If yes, it is determined that the CPU can work normally;

[0095] If not, it is determined that the CPU cannot work normally.

[0096] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0097] The CPU diagnostic device provided in this embodiment corresponds to the above method and thus has the same beneficial effects as the above method.

[0098] From the perspective of hardware, this embodiment provides another CPU diagnostic device. Figure 6 A structural diagram of a CPU diagnostic device provided in another embodiment of the present application, such as Figure 6 As shown, the CPU diagnostic device includes: a memory 30 for storing a computer program;

[0099] The processor 31 is used to implement the steps of the CPU diagnosis method mentioned in the above embodiment when executing the computer program.

[0100] The CPU diagnostic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0101] Among them, the processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 31 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 31 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 31 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 31 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0102] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used to store the following computer program 301, wherein, after the computer program is loaded and executed by the processor 31, it can implement the relevant steps of the CPU diagnostic method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 30 may also include an operating system 302 and data 303, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 302 may include Windows, Unix, Linux, etc. Data 303 may include but is not limited to data related to the CPU diagnostic method, etc.

[0103] In some embodiments, the CPU diagnostic device may further include a display screen 32 , an input / output interface 33 , a communication interface 34 , a power supply 35 , and a communication bus 36 .

[0104] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the CPU diagnostic device, and may include more or fewer components than those shown in the figure.

[0105] The CPU diagnostic device provided in the embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: CPU diagnostic method.

[0106] The CPU diagnostic device provided in this embodiment corresponds to the above method and thus has the same beneficial effects as the above method.

[0107] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0108] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0109] The computer-readable storage medium provided in this embodiment corresponds to the above method and thus has the same beneficial effects as the above method.

[0110] The CPU diagnostic system, method, device and medium provided by the present application are introduced in detail above. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0111] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method, article or device including the above elements.

Claims

1. A CPU diagnostic system, characterized in that: include: A plurality of CPUs and a plurality of memories, wherein the CPUs are connected to each other via interfaces so as to facilitate transmission of operation data between the CPUs; Each of the CPUs is connected to a memory, and the memory is used to store the operation data of the CPU connected to it and the operation data of the other CPUs, wherein the operation data is obtained by each of the CPUs performing the same operation task; The CPU is used to obtain the operation data and determine whether the operation data of different CPUs are consistent. If yes, it is determined that the CPU can work normally; if not, it is determined that the CPU cannot work normally; The CPU diagnostic system further includes a coprocessor; the coprocessor is interconnected with the multiple CPUs via Ethernet to achieve data exchange between the multiple CPUs and the outside world; Furthermore, the CPU is used to process data in the awake state; The coprocessor is used for processing data in a standby state.

2. A CPU diagnostic method, characterized in that: The method applied to the CPU diagnostic system of claim 1 comprises: Get its own computing data; receiving the computing data of the remaining CPUs through an interface, wherein the computing data is obtained by each of the CPUs performing the same computing task; storing the computing data of the CPU itself and the computing data of the other CPUs in a memory; Determining whether the operation data of different CPUs in the memory are consistent; If yes, it is determined that the CPU can work normally; If not, it is determined that the CPU cannot work normally; The CPU is interconnected with the coprocessor via Ethernet to achieve data exchange with the outside world; Furthermore, the CPU is used to process data in the awake state; and the coprocessor is used to process data in the standby state.

3. The CPU diagnosis method according to claim 2, characterized in that: The receiving the operation data of other CPUs through the interface comprises: The operation data obtained by inverting the remaining CPUs is received through the interface.

4. The CPU diagnosis method according to claim 2, characterized in that: The memory includes a plurality of storage areas, different computing tasks in the CPU correspond to different storage areas, and storing the computing data of the CPU itself and the computing data of other CPUs in the memory includes: The computing data of the CPU itself and the computing data of the other CPUs when executing different computing tasks are stored in the corresponding storage area.

5. The CPU diagnosis method according to any one of claims 2 to 4, characterized in that: Also includes: Storing a plurality of test data in the memory, wherein designated bits of the plurality of test data are inconsistent; Comparing the plurality of test data in the memory and obtaining a comparison result; If the comparison result indicates that the bits specified by the plurality of test data are inconsistent, it is determined that the diagnostic function of the CPU is normal; If the comparison result indicates that the plurality of test data are consistent or other bits of the plurality of test data are inconsistent, it is determined that the diagnosis function of the CPU is abnormal.

6. The CPU diagnosis method according to claim 2, characterized in that: The CPU has a plurality of computing tasks, and the computing tasks have different priorities. The determining whether the computing data of different CPUs in the memory are consistent includes: When there is a computing task with a higher priority than the current computing task, saving the comparison state of the current computing task; It is determined whether the operation data to be compared of different CPUs in the memory are consistent, wherein the operation data to be compared is obtained by executing the operation task with a higher priority.

7. The CPU diagnosis method according to claim 3, characterized in that: The determining whether the operation data of different CPUs in the memory are consistent comprises: The operation data of the CPU corresponding to the memory is compared with the inverted operation data of the other CPUs in the memory by using an exclusive-OR comparison method to determine whether the original operation data are consistent.

8. A CPU diagnostic device, characterized in that: A diagnostic system for a CPU according to claim 1, wherein the device comprises: The acquisition module is used to obtain its own operation data; A receiving module, used for receiving the operation data of other CPUs through an interface, wherein the operation data is obtained by each CPU performing the same operation task; A control module, used for storing the computing data of the control module and the computing data of the other CPUs into a memory; A judging module, used for judging whether the operation data of different CPUs in the memory are consistent; If yes, it is determined that the CPU can work normally; If not, it is determined that the CPU cannot work normally; The CPU is interconnected with the coprocessor via Ethernet to achieve data exchange with the outside world; Furthermore, the CPU is used to process data in the awake state; and the coprocessor is used to process data in the standby state.

9. A CPU diagnostic device, characterized in that: comprising a memory for storing a computer program; A processor, configured to implement the steps of the CPU diagnosis method as claimed in any one of claims 2 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the CPU diagnosis method according to any one of claims 2 to 7 are implemented.