A lockstep core debugging and fault-tolerance performance verification system in a multi-core processor

The target core selection and fault injection are realized in the multi-core structure processor through the register mapping and fault injection module, and the consistency judgment module is used to verify the multi-core execution results, which solves the shortcomings of multi-core structure processor debugging and fault tolerance verification in the existing technology, and improves the efficiency Processor reliability and verification efficiency.

CN118427112BActive Publication Date: 2024-09-06NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410897659.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-09-06
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The debugging of existing multi-core structure processors mainly focuses on the main core and lacks verification of the functional correctness of the fault-tolerant structure, resulting in insufficient reliability of the fault-tolerant structure and insufficient debuggability of the lock-step core.

Method used

The target processor core is selected through register mapping, the fault injection module is used to actively generate faults, and the consistency judgment module is used to compare multi-core execution results, determine the error type, and output interrupt signals to verify the fault tolerance of the redundant structure.

Benefits of technology

It achieves flexible debugging and fault-tolerant performance verification of multi-core lock-step structures without increasing hardware resources, and improves the verification efficiency and accuracy of multi-core lock-step processors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427112B
    Figure CN118427112B
Patent Text Reader

Abstract

The present invention provides a lockstep core debugging and fault-tolerant performance verification system in a multi-core structure processor, which relates to the field of processor debugging. The system includes: a multi-core lockstep processor group, which includes a main core and at least two lockstep backup cores; a fault injection module, which is used to find the corresponding fault sequence according to the fault vector sequence number in the fault injection request, and then select the target core for output; a consistency judgment module, which is used to compare the execution results of the multi-core lockstep processor group and output the comparison result; a state cache and control module, which is used to control the state and subsequent operations caused by the comparison result; an interrupt signal judgment module, which is used to compare the comparison result and the type flag of the corresponding fault sequence, if it is an unrecoverable fault, a global reset is performed; if it is a recoverable fault, a system interrupt is requested. The verification system proposed by the present invention has the characteristics of simple configuration, high detection accuracy and simple hardware implementation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of debugging of multi-core processors, and in particular to a lock-step core debugging and fault-tolerance performance verification system in a multi-core processor. Background Art

[0002] As microprocessor chips gradually adopt nano-scale manufacturing processes, while the performance of microprocessors has been greatly improved, due to the reduction of integrated circuit feature size and the increase of frequency, the processors have become extremely sensitive to various noise interferences such as crosstalk, voltage disturbances, electromagnetic interference and radiation, and may cause erroneous operations, resulting in a continuous increase in the failure rate of microprocessors and a continuous decrease in the reliability of microprocessors. Improved processes often use lower power supply voltages, which leads to a worsening of the noise impact of switching currents. The above factors affect the reliability of system components and further affect the reliability of the system.

[0003] In order to improve reliability, one of the main solutions is to use a multi-core lock-step structure. The main idea is to add multiple processor cores with the same architecture and structure as the main core as a backup core on the basis of a single main core structure, and execute the same program as the main core to form a multi-core redundant lock-step structure. Through periodic comparison of execution results, the internal voter will take the party with more identical results as the correct output, thereby ensuring the normal operation of the processor. However, the debugging of multi-core processors is mainly aimed at the main core. There are also some debugging studies on dual-core lock-step processors, but they all achieve the selection of the debugging target core by adding additional debugging hardware circuits (target core selector and debugging control circuits for each core), and there is also a lack of verification of the functional correctness of the fault-tolerant structure. Only when the processor encounters a fault can we know whether the function of the fault-tolerant structure is correct. Therefore, the reliability of the fault-tolerant structure and the debuggability of the lock-step core have certain deficiencies. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the present invention provides a lock-step core debugging and fault-tolerant performance verification system in a multi-core structure processor. Through register mapping, the user configures the corresponding register to realize the selection of the target processor core, and realizes the active generation of faults through a fault injection module. At the last level of the system, the comparison status of the multi-core execution results can be output. If an error occurs, the interrupt signal judgment module can quickly judge the error type and return the signal to the processor core to achieve fault-tolerance verification of the redundant structure.

[0005] The present invention is specifically implemented through the following technical solutions:

[0006] Provided is a lock-step core debugging and fault-tolerance performance verification system in a multi-core processor, comprising:

[0007] A multi-core lock-step processor group, comprising a main core and at least two lock-step backup cores, wherein the multi-core lock-step processor group is used to execute the same user program and output the execution result;

[0008] A fault injection module, which is used to find out the corresponding fault sequence according to the fault vector sequence number in the fault injection request, then select the target core, and output the fault sequence to the target core; wherein the fault information is written by code and the sequence number is performed, and then the sequence is standardized to obtain a fault sequence lookup table, and the fault sequence lookup table is loaded into the memory specified address of the fault injection module for searching the fault sequence;

[0009] A consistency judgment module, which is used to cache the execution result of the multi-core lock-step processor group, and compare the execution result of the previous cycle of the multi-core lock-step processor group in the next clock cycle and output the comparison result;

[0010] The state cache and control module is used to receive and save the comparison result output by the consistency judgment module, and then control the state caused by the comparison result and subsequent operations.

[0011] As a further explanation of the present invention, the types of the fault sequences are divided into recoverable fault sequences and unrecoverable fault sequences.

[0012] As a further illustration of the present invention, the verification system further includes:

[0013] The interrupt signal judgment module is used to make further comparisons based on the comparison results received by the status cache and control module and the type flag of the corresponding fault sequence. If it is an unrecoverable fault, a global reset is selected; if it is a recoverable fault, an interrupt request signal is sent to the corresponding target core to request a system interrupt.

[0014] As a further illustration of the present invention, the fault injection module includes:

[0015] an injected fault vector decoding module, which is used to translate the fault vector sequence number in the fault injection request into sequence number information that can be recognized by the fault generating unit, and transmit the sequence number information to the fault generating unit;

[0016] A fault generating unit, which is used to perform a table lookup operation on a fault sequence lookup table stored internally according to the received serial number information, and if a hit is found, directly retrieve the fault sequence of the corresponding address in the memory, and output the fault sequence to the target core selected by the fault injection target selector;

[0017] The fault injection target selector is used to select the target core into which the fault needs to be injected.

[0018] As a further illustration of the present invention, default fault sequence information is written into the fault sequence lookup table.

[0019] As a further explanation of the present invention, when the fault generating unit performs a table lookup operation, if there is no hit, it is further determined whether to enable the default fault sequence for output. If the default fault sequence is enabled, the default fault sequence is output to the target core selected by the fault injection target selector; if the default fault sequence is not enabled, the fault selection fails and fault injection is not enabled.

[0020] As a further illustration of the present invention, the fault injection target selector is mapped to a peripheral address area in the memory through register-memory address mapping, and a user can access the address area through a pointer and perform configuration modification.

[0021] As a further explanation of the present invention, the fault information is written by code and serialized, and then the sequence is standardized to obtain a fault sequence lookup table, and the fault sequence lookup table is loaded into the memory specified address of the fault injection module, specifically including:

[0022] The fault information is written by code and a serial number is assigned to obtain a fault sequence;

[0023] In the link file, a memory area is designated as a dedicated area for storing fault information, the attribute of the memory area is set to read-only, and a default fault sequence is stored in the area at the first few addresses of the area, and then a sequence-standardized fault sequence is stored at the next continuous address, the default fault sequence and the standardized fault sequence constitute a fault sequence lookup table, and finally a link file with a fault sequence lookup table is obtained;

[0024] The link file with the fault sequence lookup table is loaded into the memory area to which the fault vector buffer group in the fault generating unit is mapped through the debugging interface.

[0025] As a further illustration of the present invention, the consistency judgment module includes:

[0026] a cache group unit, which is used to cache the execution result of the multi-core lock-step processor group and output the execution result to the result comparator unit;

[0027] A result comparator unit is used to compare the execution result of the previous cycle of the multi-core lock-step processor group in the next clock cycle, and output the comparison result to the state cache and control module.

[0028] As a further illustration of the present invention, the state cache and control module includes:

[0029] A comparison result cache unit, which is used to receive the comparison result output by the consistency judgment module and save the comparison result;

[0030] A control unit is used to control the state caused by the comparison result and subsequent operations.

[0031] Compared with the prior art, the present invention has the following beneficial technical effects:

[0032] 1. The free switching of multi-core lock-step structure debugging links is realized without increasing hardware design resources, and the selection of debugging target cores allows users to flexibly select through register configuration.

[0033] 2. Active regulation of fault injection is achieved. By optimizing and adjusting the traditional fault injection system, the hardware and software can be coordinated to flexibly configure fault injection. The software layer is responsible for the implementation and modification of the fault injection sequence, and the hardware layer is responsible for the search and rapid injection of the fault sequence. In addition, by adding a lookup table, the fault sequence type is located more quickly and accurately, avoiding the idle waiting time of the lock-step structure processor when encountering a fault, and improving the verification efficiency of the multi-core lock-step processor.

[0034] Other features and advantages of the technical solution will be described in the subsequent description, and partly become apparent from the description, or understood by implementing the technical solution. The purpose and other advantages of the technical solution can be achieved and obtained through the structures specifically pointed out in the written description and the drawings.

[0035] The technical solution of the present technical solution is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings are used to provide a further understanding of the technical solution and constitute a part of the specification. Together with the embodiments of the technical solution, they are used to explain the technical solution and do not constitute a limitation of the technical solution. In the accompanying drawings:

[0037] Figure 1 A block diagram of a lockstep core debugging and fault-tolerance performance verification system in a multi-core processor provided by the present invention.

[0038] Figure 2 This is a flow chart of the fault sequence search process in the present invention. DETAILED DESCRIPTION

[0039] The preferred embodiments of the present technical solution are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present technical solution, and are not used to limit the present technical solution.

[0040] like Figure 1 As shown, the present invention provides a lock-step core debugging and fault-tolerant performance verification system in a multi-core structure processor, and the verification system includes: a fault injection module, a multi-core lock-step processor group, a consistency judgment module, and a state cache and control module.

[0041] The multi-core lock-step processor group includes a main core and at least two lock-step backup cores, and the multi-core lock-step processor group is used to execute the same user program and output the execution result. Figure 1 As shown in , one of the multi-core lock-step processors is used as the main core, and the other two are lock-step backup cores ( Figure 1 In the example, Delay means delay).

[0042] The fault injection module is used to find the corresponding fault sequence according to the fault vector sequence number in the fault injection request, then select the target core, and output the fault sequence to the target core; wherein, the fault information is written by code and the sequence number is performed, and then the sequence is standardized to obtain a fault sequence lookup table, and the fault sequence lookup table is loaded into the specified memory address of the fault injection module for fault sequence search.

[0043] Specifically, the fault injection module includes: an injected fault vector decoding module, a fault generating unit and a fault injection target selector.

[0044] The above-mentioned fault information is written by code and serialized, and then the sequence is standardized to obtain a fault sequence lookup table, and the fault sequence lookup table is loaded into the specified memory address of the fault injection module, which specifically includes: writing fault information by code and assigning serial numbers to obtain a fault sequence; specifying a memory area in the link file as a dedicated area for storing fault information, setting the attribute of the memory area to a read-only attribute, and storing the default fault sequence in the area at the first few addresses of the area. The specific size of the memory area can be configured through the link file. The purpose of this is to further increase the randomness and accuracy of the verification. Then, the sequence-standardized fault sequence is stored at the next continuous address. The format after sequence standardization is shown in Table 1. The default fault sequence and the standardized fault sequence constitute a fault sequence lookup table, and finally a link file with a fault sequence lookup table is obtained; the link file with the fault sequence lookup table is loaded into the memory area mapped to the fault vector buffer group in the fault generating unit through the debug interface, and the writing of the fault sequence has been basically completed.

[0045] Table 1 Fault sequence lookup table format

[0046]

[0047] In summary, each time the processor is restarted, the fault sequence needs to be written into the memory area mapped to the fault vector buffer in the fault generating unit through the debug interface. The size of the fault vector buffer area can be freely configured by the user through external software, and the fault vector must follow certain standards. The user can actively generate a test fault sequence for a specific target processor core through the fault injection module. The fault type can be divided into a recoverable fault sequence and an unrecoverable fault sequence. When the system encounters these two types of faults, it generates an interrupt signal and a global reset signal respectively.

[0048] Figure 2 This is a flow chart of the fault sequence search process in the present invention, such as Figure 2 As shown, the debugging host can send a fault injection request and a specific fault vector serial number to the injected fault vector decoding module through the debugging interface. The injected fault vector decoding module translates the fault vector serial number in the fault injection request into serial number information that can be recognized by the fault generating unit, and transmits the serial number information to the fault generating unit.

[0049] The fault generating unit performs a table lookup operation on the fault sequence lookup table stored internally according to the received serial number information. If a hit is found, the fault sequence of the corresponding address in the memory is directly retrieved, and the fault sequence is output to the target core selected by the fault injection target selector. If a hit is not found, it further determines whether to enable the default fault sequence for output. If the default fault sequence is enabled, the default fault sequence is output to the target core selected by the fault injection target selector. If the default fault sequence is not enabled, the fault selection fails (the operation failure flag is returned), the fault injection is not enabled, and the next fault injection request signal is waited for.

[0050] The fault injection target selector is used to select the target core into which the fault needs to be injected.

[0051] The consistency judgment module is used to cache the execution results of the multi-core lock-step processor group, and compare the execution results of the previous cycle of the multi-core lock-step processor group in the next clock cycle and output the comparison result.

[0052] Specifically, the consistency judgment module includes: a cache group unit and a result comparator unit. The cache group unit is used to cache the execution result of the multi-core lock-step processor group and output the execution result to the result comparator unit; the result comparator unit is used to compare the execution result of the previous cycle of the multi-core lock-step processor group in the next clock cycle, and output the comparison result to the state cache and control module.

[0053] The state cache and control module is used to receive and save the comparison result output by the consistency judgment module, and then control the state and subsequent operations caused by the comparison result.

[0054] Specifically, the state cache and control module includes: a comparison result cache unit and a control unit, wherein the comparison result cache unit is used to receive the comparison result output by the consistency judgment module and save the comparison result to facilitate the subsequent reading of the comparison state; the control unit is used to control the state caused by the comparison result and subsequent operations. For example, the execution results of the main core and the two lock-step backup cores will be output to the state cache and control module after being judged by the consistency judgment module to determine whether the results are equal. If they are equal, it outputs the correct state information; if they are not equal, it needs to determine whether to generate a global interrupt and exception information to the processor core.

[0055] In an achievable manner, the verification system further includes: an interrupt signal judgment module, whose main function is to determine the next action that the system needs to take based on the output of the status cache and control module to the previous level comparison state. Specifically, the interrupt signal judgment module is used to further compare the comparison result received by the status cache and control module with the type flag of the corresponding fault sequence. If it is an unrecoverable fault, a global reset is selected; if it is a recoverable fault, an interrupt request signal is sent to the corresponding target core to request a system interrupt.

[0056] In one achievable manner, the verification system also includes: a debugging control module and a target core selector, which are key components that connect an external debugging host and a debugging target processor core. The debugging control module mainly pre-processes the debugging signal sent by the off-chip debugging host and transmits it to the subsequent debugging target processor core, and the target core selector is mainly composed of a multiplexer, which provides the user with corresponding registers for configuration to determine the target processor core that needs to be debugged. This module can achieve flexible debugging of multi-core structures by adding a very small hardware overhead, providing a flexible debugging solution for lock-step cores.

[0057] The verification system provided by the present invention has two main advantages. The first is the flexible debugging target core selection feature. The specific implementation is to insert a fault injection target selector, which has a configurable feature. After the register-memory address mapping at the hardware design level, the selector will be mapped to a peripheral address area in the memory. The user can directly access the address through the pointer at the software level and modify the configuration, and an 8-bit register is reserved for future flexible expansion, that is, it can support up to 256 processor core structures. The modification of the debugging target core can be realized by configuring the register, which simplifies the hardware overhead and does not require too much code overhead in the software configuration. The second is to add a fault-tolerant performance verification system, the main function of which is to verify whether the multi-core lock-step structure can detect errors normally when the system fails, and the faults are divided into recoverable faults and irrecoverable faults. The fault sequence is generated in advance at the software level and downloaded to the specified dedicated memory address, and then the desired fault sequence is accessed through specific fault sequence access information.

[0058] Obviously, those skilled in the art can make various changes and modifications to the technical solution without departing from the spirit and scope of the technical solution. Thus, if these modifications and variations of the technical solution fall within the scope of the claims of the technical solution and their equivalents, the technical solution is also intended to include these modifications and variations.

Claims

1. A lockstep core debugging and fault tolerance performance verification system in a multi-core processor, characterized in that: include: A multi-core lock-step processor group, comprising a main core and at least two lock-step backup cores, wherein the multi-core lock-step processor group is used to execute the same user program and output the execution result; A fault injection module, which is used to find out the corresponding fault sequence according to the fault vector sequence number in the fault injection request, then select the target core, and output the fault sequence to the target core; wherein the fault information is written by code and the sequence number is performed, and then the sequence is standardized to obtain a fault sequence lookup table, and the fault sequence lookup table is loaded into the memory specified address of the fault injection module for searching the fault sequence; The method of writing fault information by code and performing serial numbering, and then performing sequence standardization to obtain a fault sequence lookup table, and loading the fault sequence lookup table into a specified address of the memory of the fault injection module, specifically includes: The fault information is written by code and a serial number is assigned to obtain a fault sequence; In the link file, a memory area is designated as a dedicated area for storing fault information, the attribute of the memory area is set to read-only, and a default fault sequence is stored in the area at the first few addresses of the area, and then a sequence-standardized fault sequence is stored at the next continuous address, the default fault sequence and the standardized fault sequence constitute a fault sequence lookup table, and finally a link file with a fault sequence lookup table is obtained; The link file with the fault sequence lookup table is loaded into the memory area to which the fault vector buffer group in the fault generating unit is mapped through the debugging interface; A consistency judgment module, which is used to cache the execution result of the multi-core lock-step processor group, and compare the execution result of the previous cycle of the multi-core lock-step processor group in the next clock cycle and output the comparison result; The state cache and control module is used to receive and save the comparison result output by the consistency judgment module, and then control the state caused by the comparison result and subsequent operations.

2. The lockstep core debugging and fault tolerance performance verification system in a multi-core processor according to claim 1, characterized in that: The types of the fault sequences are divided into recoverable fault sequences and unrecoverable fault sequences.

3. The lockstep core debugging and fault tolerance performance verification system in a multi-core processor according to claim 2, characterized in that: The verification system further comprises: The interrupt signal judgment module is used to make further comparisons based on the comparison results received by the status cache and control module and the type flag of the corresponding fault sequence. If it is an unrecoverable fault, a global reset is selected; if it is a recoverable fault, an interrupt request signal is sent to the corresponding target core to request a system interrupt.

4. The lockstep core debugging and fault tolerance performance verification system in a multi-core processor according to claim 1, characterized in that: The fault injection module comprises: an injected fault vector decoding module, which is used to translate the fault vector sequence number in the fault injection request into sequence number information that can be recognized by the fault generating unit, and transmit the sequence number information to the fault generating unit; A fault generating unit, which is used to perform a table lookup operation on a fault sequence lookup table stored internally according to the received serial number information, and if a hit is found, directly retrieve the fault sequence of the corresponding address in the memory, and output the fault sequence to the target core selected by the fault injection target selector; The fault injection target selector is used to select the target core into which the fault needs to be injected.

5. The lockstep core debugging and fault tolerance performance verification system in a multi-core processor according to claim 4, characterized in that: Default fault sequence information is written into the fault sequence lookup table.

6. The lockstep core debugging and fault tolerance performance verification system in a multi-core processor according to claim 5, characterized in that: When the fault generating unit performs a table lookup operation, if there is no hit, it is further determined whether to enable a default fault sequence for output, and if the default fault sequence is enabled, the default fault sequence is output to the target core selected by the fault injection target selector; If the default fault sequence is not enabled, this fault selection fails and fault injection is not enabled.

7. The lockstep core debugging and fault tolerance performance verification system in a multi-core processor according to claim 4, characterized in that: The fault injection target selector is mapped to a peripheral address area in the memory through register-memory address mapping, and a user can access the address area through a pointer and perform configuration modification.

8. The lockstep core debugging and fault tolerance performance verification system in a multi-core processor according to claim 1, characterized in that: The consistency judgment module includes: a cache group unit, which is used to cache the execution result of the multi-core lock-step processor group and output the execution result to the result comparator unit; A result comparator unit is used to compare the execution result of the previous cycle of the multi-core lock-step processor group in the next clock cycle, and output the comparison result to the state cache and control module.

9. The lockstep core debugging and fault tolerance performance verification system in a multi-core processor according to claim 1, characterized in that: The state cache and control module includes: A comparison result cache unit, which is used to receive the comparison result output by the consistency judgment module and save the comparison result; A control unit is used to control the state caused by the comparison result and subsequent operations.