Dual-core lockstep processor system with fault detection and recovery

By using the hardware status reading and recovery component of the dual-core lockstep processor system, the problem that the lockstep processor cannot fully recover the status of the internal storage components is solved, realizing fast and reliable fault recovery of the processor and reducing system costs.

CN117421144BActive Publication Date: 2026-11-20BEIJING INST OF CONTROL ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311583814.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2026-11-20
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

Existing lockstep processors cannot fully recover the state information of internally invisible registers and internal RAM, and cannot recover the processor state when encountering suspended faults, resulting in low reliability of fault recovery functions.

Method used

A dual-core lockstep processor system is adopted, with the master processor and slave processor respectively configured with hardware status reading and recovery components. The status information of all storage components is read and recovered in hardware, and the processor is controlled to reset in case of failure. The fault detection and recovery module is used for comparison and status recovery.

Benefits of technology

It achieves complete recovery of the state of all storage components of the processor, improves the reliability of fault recovery function, especially in the case of suspended faults, and can also recover the state normally, reducing the system area and power consumption cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117421144B_ABST
    Figure CN117421144B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of processor reliability design, in particular to a dual-core lockstep processor system with a fault detection and recovery function. The system comprises a master processor, a slave processor, a fault detection and recovery module, an output cache and a state information cache; the master processor is provided with a first state reading component and a first recovery component, and the slave processor is provided with a second state reading component and a second recovery component; the state reading component is used for reading the state information of all storage components in the corresponding processor at each clock cycle and sending the state information to the fault detection and recovery module; the fault detection and recovery module is used for comparing the output information and the state information to determine whether a fault exists; and the recovery component is used for controlling the reset of the corresponding processor when a fault occurs and restoring the target state information sent by the fault detection and recovery module to the corresponding processor. The scheme can realize the complete recovery of the state of all components of the processor and can improve the reliability of the fault recovery function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of processor reliability design technology, and in particular to a dual-core lockstep processor system with fault detection and recovery functions. Background Technology

[0002] In current lockstep processor designs, fault recovery is often handled by software, requiring the periodic saving of the processor's correct state information to reliable storage components. These states are called "checkpoints," which restore the processor to its previous correct state when a fault occurs. However, many internal registers and internal RAM of the processor are invisible and cannot be accessed by software. Therefore, the fault recovery function of existing lockstep processors can only restore the processor state visible to software. The state information of internally invisible registers and internal RAM cannot be saved by software, thus existing lockstep processors cannot achieve complete processor state recovery. On the other hand, when the processor encounters a suspending fault, it is in a frozen state, and no software can run normally. In this case, existing lockstep processors cannot recover the state, resulting in low reliability of their fault recovery function.

[0003] Therefore, there is an urgent need for a new dual-core lockstep processor system with fault detection and recovery functions. Summary of the Invention

[0004] To address the issues that existing lockstep processors cannot fully restore all internal storage components and cannot restore the state when encountering suspended faults, this invention provides a dual-core lockstep processor system with fault detection and recovery functions.

[0005] In a first aspect, embodiments of the present invention provide a dual-core lockstep processor system with fault detection and recovery functions, comprising: a main processor, a slave processor, a fault detection and recovery module, an output cache, and a status information cache; wherein, the main processor is provided with a first status reading component and a first recovery component, and the slave processor is provided with a second status reading component and a second recovery component;

[0006] The first status reading component and the first recovery component are electrically connected to each storage component in the main processor. The first status reading component is used to read the status information of all storage components in the main processor in each clock cycle and send it to the fault detection and recovery module. The first recovery component is used to control the main processor to reset in the event of a fault and restore the target status information sent by the fault detection and recovery module to the main processor.

[0007] The second status reading component and the second recovery component are electrically connected to each storage component in the slave processor. The second status reading component is used to read the status information of all storage components in the slave processor in each clock cycle and send it to the fault detection and recovery module. The second recovery component is used to control the slave processor to reset in the event of a fault and restore the target status information sent by the fault detection and recovery module to the slave processor.

[0008] The fault detection and recovery module is electrically connected to the main processor, the slave processor, the output buffer, and the status information buffer, respectively. The fault detection and recovery module is used to compare the output information of the main processor with the output information of the slave processor in each clock cycle, and to compare the status information of the main processor with the status information of the slave processor in each clock cycle. When the two comparison results are consistent, it is determined that there is no fault, the output information is sent to the output buffer, and the status information is used as the new target status information to replace the historical target status information in the status information buffer. When at least one comparison result is inconsistent, the target status information in the status information buffer is retrieved and sent to the first recovery component and the second recovery component.

[0009] Secondly, embodiments of the present invention also provide a fault detection and recovery method based on the system described in any embodiment of this specification, including:

[0010] For each clock cycle, execute:

[0011] After the main processor and the slave processor receive the same input, the main processor and the slave processor send output information to the fault detection and recovery module;

[0012] The first and second status reading components are used respectively to send the status information of all storage components in the main processor and the status information of all storage components in the slave processor to the fault detection and recovery module.

[0013] The fault detection and recovery module compares the output information and status information of the main processor with the output information and status information of the slave processor respectively.

[0014] When the comparison results of the output information and the comparison results of the status information are consistent, the status information is used as the new target status information to replace the historical target status information in the status information cache.

[0015] When at least one of the comparison results of the output information and the comparison results of the status information is inconsistent, the target status information is retrieved from the status information cache and sent to the first recovery component and the second recovery component, so as to use the first recovery component and the second recovery component to control the main processor and the slave processor to reset respectively, and restore the target status information to the main processor and the slave processor.

[0016] This invention provides a dual-core lockstep processor system with fault detection and recovery capabilities. By configuring a first and a second hardware state reading unit in the master and slave processors respectively, the system can read and save the state information of all storage components within the processor in hardware. These storage components include internal registers and internal RAM, which are invisible to software. Therefore, the hardware state reading unit ensures rapid and complete recovery of the state of all processor components in the event of a processor failure. Furthermore, by setting up the first and second hardware recovery units in the master and slave processors respectively, the functionality of the hardware recovery units is not limited by the processor's software execution status. Even if the processor experiences a suspending fault and no software within the processor can run normally, the first and second recovery units can still perform state recovery for both the master and slave processors, greatly improving the reliability of the fault recovery function. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of the composition of a dual-core lockstep processor system with fault detection and recovery functions provided in an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of an output buffer structure provided in an embodiment of the present invention;

[0020] Figure 3 This is a flowchart of a fault detection and recovery method for a dual-core lockstep processor provided in an embodiment of the present invention;

[0021] Reference numerals: 1. First state reading component; 2. First recovery component; 3. Second state reading component; 4. Second recovery component. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0023] The specific implementation of the above concept is described below.

[0024] Please refer to Figure 1 This invention provides a dual-core lockstep processor system with fault detection and recovery functions. The system includes: a main processor, a slave processor, a fault detection and recovery module, an output cache, and a status information cache. The main processor is provided with a first status reading component 1 and a first recovery component 2, and the slave processor is provided with a second status reading component 3 and a second recovery component 4.

[0025] The first state reading unit 1 and the first recovery unit 2 are electrically connected to each storage unit in the main processor. The first state reading unit 1 is used to read the state information of all storage units in the main processor in each clock cycle and send it to the fault detection and recovery module. The first recovery unit 2 is used to control the main processor to reset in case of a fault and restore the target state information sent by the fault detection and recovery module to the main processor.

[0026] The second state reading unit 3 and the second recovery unit 4 are electrically connected to each storage unit in the slave processor, respectively. The second state reading unit 3 is used to read the state information of all storage units in the slave processor in each clock cycle and send it to the fault detection and recovery module. The second recovery unit 4 is used to control the slave processor to reset in case of a fault and restore the target state information sent by the fault detection and recovery module to the slave processor.

[0027] The fault detection and recovery module is electrically connected to the main processor, the slave processor, the output buffer, and the status information buffer, respectively. The fault detection and recovery module compares the output information of the main processor with the output information of the slave processor in each clock cycle, and compares the status information of the main processor with the status information of the slave processor in each clock cycle. When the two comparison results are consistent, it is determined that there is no fault, the output information is sent to the output buffer, and the status information is used as the new target status information to replace the historical target status information in the status information buffer. When at least one comparison result is inconsistent, the target status information in the status information buffer is retrieved and sent to the first recovery component 2 and the second recovery component 4.

[0028] In this embodiment of the invention, by configuring a first state reading unit and a second state reading unit in hardware on the master processor and slave processor respectively, the state information of all storage components within the processor is read and saved in hardware. All storage components include internal registers and internal RAM, which are invisible to software. Therefore, the hardware state reading unit ensures that the state of all processor components can be quickly and completely restored in the event of a processor failure. Furthermore, by setting up a first recovery unit and a second recovery unit in hardware on the master processor and slave processor respectively, the function execution of the hardware recovery unit is not limited by the processor's software execution status. Even if the processor experiences a hang-up fault and no software within the processor can run normally, the first and second recovery units can still perform state restoration of the master and slave processors, greatly improving the reliability of the fault recovery function.

[0029] It is understandable that in each clock cycle, the master processor and slave processor receive the same input using a synchronous clock, and use the comparison results of the output information and status information of the master processor and slave processor to detect whether there is a fault.

[0030] In addition, even if the output information of the main processor and the output information of the slave processor are the same, there may still be internal faults, but they are not reflected in the output information. Therefore, both the output information and the status information need to be compared, and only when they are consistent can it be determined that there is no fault.

[0031] In this embodiment of the invention, the storage component includes at least: a general-purpose register, a program pointer, a control register, and internal RAM.

[0032] In this embodiment, the status reading unit is used to read the status information of all storage components in the corresponding processor, including software-visible general-purpose registers, program pointers, control registers, and other storage components, as well as software-invisible internal registers, internal RAM, and other storage components. The status reading unit in this embodiment can add data input channels and control signals to the internal registers and internal RAM storage areas to directly read the status information of all storage components. Since the status reading unit is hardware, even suspended faults do not affect its status information reading function, greatly improving the reliability of fault detection and recovery. In contrast, common architecture-level redundancy designs and traditional triple-mode redundancy designs are relatively redundant in both software and hardware. Compared to the performance loss caused by architecture-level redundancy designs, the dual-core lockstep processor system of this embodiment can not only detect processor faults in real time but also improve reliability without reducing processor performance. Compared to traditional triple-mode redundancy, the dual-core lockstep processor system of this embodiment can reduce area and power consumption costs.

[0033] Continue to refer to Figure 1In some implementations, the dual-core lockstep processor system may further include: a master device and a debug adapter;

[0034] The master device connects to the master processor and slave processor via a debugging adapter. The master device parses the ground remote control commands and sends debugging commands to the debugging adapter. The debugging adapter then performs protocol conversion on the debugging commands and sends them to the master processor and slave processor via the JTAG protocol for on-orbit fault diagnosis and debugging of the master processor and slave processor.

[0035] In this embodiment, to achieve on-orbit fault analysis and debugging of the processor, a master device with debugging capabilities is introduced. When a fault occurs, the fault detection and recovery module sends a mismatch signal (i.e., the fault signal is valid) to the master device in the form of an interrupt. After receiving the interrupt signal, the master device can perform online diagnosis and analysis of lockstep processor faults. Specifically, during on-orbit operation, the master device can receive ground remote control commands and send debugging commands to the debugging adapter via serial port, network port, etc. The debugging adapter sends the debugging commands to the processor's debugging port according to the JTAG protocol. It can receive ground remote control and telemetry commands, and realize debugging functions such as run and stop, register read and write, single-step execution, and breakpoint setting, thereby achieving on-orbit fault diagnosis and location. In addition, the processor's status information can also be read through the debugging adapter, thereby realizing on-orbit fault diagnosis and analysis of the processor, which helps the ground's macro-control and experience accumulation.

[0036] In some implementations, the master device is also used to send remote control commands from the ground to reset and restore the master processor and slave processor to their respective states when the first recovery component 2 and the second recovery component 4 fail.

[0037] In this embodiment, the configuration of the master device provides another layer of protection for the fault detection and recovery function of the dual-core lockstep processor system. During on-orbit operation, the processor system needs to process the data collected by other components such as cameras and star sensors, and then send the output to the execution devices such as flywheels and thrusters. The normal operation of the processor is related to the on-orbit safety and mission execution of the spacecraft. Therefore, when the first recovery component 2 and the second recovery component 4 fail, the master processor and the slave processor cannot be reset and restored to their state. The master device can be used to remotely reset and restore the state of the master processor and the slave processor, which can greatly improve the reliability of the fault recovery function of the dual-core lockstep processor.

[0038] In some implementations, when the fault detection and recovery module determines that there is no fault in the current clock cycle, the fault signal sent by the fault detection and recovery module to the interrupt handling module and output buffer of the master device is invalid; when the fault detection and recovery module determines that there is a fault in the current clock cycle, the fault signal sent by the fault detection and recovery module to the interrupt handling module and output buffer of the master device is valid.

[0039] In this embodiment of the invention, the fault signal is an asynchronous signal, and the output buffer contains a synchronization module. The synchronization module performs synchronization processing on the fault signal. When the fault signal is invalid, the output buffer outputs normally; when the fault signal is valid, the output buffer stops outputting.

[0040] You can refer to this. Figure 2 The output buffer is controlled by a fault signal. It will only output normally to the external execution device when the fault signal is invalid. When the fault signal is valid, the output is prohibited, so as to ensure that the system does not output error information.

[0041] In some implementations, the output information of the main processor and the status information of the storage components are connected to the fault detection and recovery module using signal grouping.

[0042] In this embodiment, since the output information of the main processor and the slave processor and the status information of the storage components are not transmitted through software, but through hardware (status reading component), in order to reduce the number of signal lines and the transmission speed of output information and status information, this embodiment introduces signals such as general-purpose registers, control registers, cache, internal RAM, and output information into the fault detection and recovery module in hardware groups, and compares them every clock cycle.

[0043] like Figure 3 As shown, this embodiment also provides a fault detection and recovery method based on the system described in any embodiment of this specification, the method including:

[0044] Step 300: For each clock cycle, the following is performed: After the main processor and the slave processor receive the same input, the main processor and the slave processor send output information to the fault detection and recovery module.

[0045] Step 302: The first state reading component 1 and the second state reading component 3 are used to send the status information of all storage components in the main processor and the status information of all storage components in the slave processor to the fault detection and recovery module, respectively.

[0046] Step 304: Use the fault detection and recovery module to compare the output information and status information of the main processor with the output information and status information of the slave processor respectively;

[0047] Step 306: When the comparison results of the output information and the comparison results of the status information are consistent, replace the historical target status information in the status information cache with the new target status information.

[0048] Step 308: When at least one of the comparison results of the output information and the comparison results of the status information is inconsistent, the target status information in the status information cache is retrieved and sent to the first recovery component 2 and the second recovery component 4, so as to use the first recovery component 2 and the second recovery component 4 to control the main processor and the slave processor to reset respectively, and restore the target status information to the main processor and the slave processor.

[0049] Since the above method is based on the same concept as the system embodiment of the present invention, the specific details can be found in the description of the system embodiment of the present invention, and will not be repeated here.

[0050] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0051] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.

[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A dual-core lockstep processor system with fault detection and recovery functions, characterized in that, include: The system includes a main processor, a slave processor, a fault detection and recovery module, an output cache, and a status information cache; wherein the main processor is provided with a first status reading component (1) and a first recovery component (2), and the slave processor is provided with a second status reading component (3) and a second recovery component (4); The first status reading component (1) and the first recovery component (2) are electrically connected to each storage component in the main processor. The first status reading component (1) is used to read the status information of all storage components in the main processor in each clock cycle and send it to the fault detection and recovery module. The first recovery component (2) is used to control the main processor to reset in case of a fault and restore the target status information sent by the fault detection and recovery module to the main processor. The second status reading component (3) and the second recovery component (4) are electrically connected to each storage component in the slave processor. The second status reading component (3) is used to read the status information of all storage components in the slave processor in each clock cycle and send it to the fault detection and recovery module. The second recovery component (4) is used to control the slave processor to reset in case of a fault and restore the target status information sent by the fault detection and recovery module to the slave processor. The fault detection and recovery module is electrically connected to the main processor, the slave processor, the output buffer, and the status information buffer, respectively. The fault detection and recovery module is used to compare the output information of the main processor with the output information of the slave processor in each clock cycle, and to compare the status information of the main processor with the status information of the slave processor in each clock cycle. When the two comparison results are consistent, it is determined that there is no fault, the output information is sent to the output buffer, and the status information is used as the new target status information to replace the historical target status information in the status information buffer. When at least one comparison result is inconsistent, the target status information in the status information buffer is retrieved and sent to the first recovery component (2) and the second recovery component (4).

2. The system according to claim 1, characterized in that, The storage components include at least: general-purpose registers, program pointer, control registers, and internal RAM.

3. The system according to claim 1, characterized in that, Also includes: Main equipment and debug adapter; The master device is connected to the master processor and the slave processor through the debugging adapter. The master device is used to parse the ground remote control commands and send debugging commands to the debugging adapter. The debugging adapter converts the debugging commands into protocols and sends the debugging commands to the master processor and the slave processor in JTAG protocol for on-orbit fault diagnosis and debugging of the master processor and the slave processor.

4. The system according to claim 3, characterized in that, The main device is also used to send remote control commands from the ground to reset and restore the main processor and the slave processor when the first recovery component (2) and the second recovery component (4) fail.

5. The system according to claim 3, characterized in that, When the fault detection and recovery module determines that there is no fault in the current clock cycle, the fault signal sent by the fault detection and recovery module to the interrupt handling module of the master device and the output buffer is invalid; when the fault detection and recovery module determines that there is a fault in the current clock cycle, the fault signal sent by the fault detection and recovery module to the interrupt handling module of the master device and the output buffer is valid.

6. The system according to claim 5, characterized in that, The fault signal is an asynchronous signal. The output buffer contains a synchronization module. The synchronization module performs synchronization processing on the fault signal. When the fault signal is invalid, the output buffer outputs normally. When the fault signal is valid, the output buffer stops outputting.

7. The system according to any one of claims 1-6, characterized in that, The output information of the main processor and the status information of the storage component are connected to the fault detection and recovery module using signal grouping.

8. A fault detection and recovery method based on the system according to any one of claims 1-7, characterized in that, include: For each clock cycle, execute: After the main processor and the slave processor receive the same input, the main processor and the slave processor send output information to the fault detection and recovery module; The first state reading component (1) and the second state reading component (3) are used to send the status information of all storage components in the main processor and the status information of all storage components in the slave processor to the fault detection and recovery module, respectively. The fault detection and recovery module compares the output information and status information of the main processor with the output information and status information of the slave processor respectively. When the comparison results of the output information and the comparison results of the status information are consistent, the status information is used as the new target status information to replace the historical target status information in the status information cache. When at least one of the comparison results of the output information and the comparison results of the status information is inconsistent, the target status information is retrieved from the status information cache and sent to the first recovery component (2) and the second recovery component (4) so ​​that the first recovery component (2) and the second recovery component (4) can control the main processor and the slave processor to reset respectively, and restore the target status information to the main processor and the slave processor.

Citation Information

Patent Citations

  • Full-hardware dual-core lock step processor fault tolerance system

    CN111581003A

  • Dual-core lock step error recovery system and method

    CN112596916A