A variable pipeline error correction and detection addition operation system and method

By introducing an operation detection unit and a multiplexed error correction unit into the addition operation system, and using Burg codes and error correction codes to correct the addition results, the problems of silent errors and poor error traceability in massive addition operations are solved, and the system is improved. reliability and reliability of logical operations.

CN118426735BActive Publication Date: 2024-09-27NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410885683.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-09-27
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

The existing addition operation system is prone to silent errors in massive operations or has poor traceability after errors, resulting in insufficient logic reliability.

Method used

Design a variable pipeline error-checking addition operation system, including an adder unit, an operation detection unit and a multiplexing error correction unit. The addition result is detected by Burg code through the operation detection unit, and error correction is performed using the multiplexing error correction unit. The code corrects errors in the adder unit to achieve fast error correction and prioritizes them through an error correction arbiter and error handling circuit.

Benefits of technology

It achieves rapid error correction of addition operations, improves the reliability of the logic operation unit, enhances traceability, and does not require the introduction of additional overhead. It simplifies the error detection logic and does not affect the critical path timing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426735B
    Figure CN118426735B
Patent Text Reader

Abstract

The invention discloses a variable pipeline error correction and detection addition operation system and method, belonging to the technical field of addition operation system. By performing addition operation on addition operands from a bus and outputting addition results and carry, each adder unit is connected to an operation detection unit; the operation detection unit is used to detect the addition results of the adder units connected thereto, so that the adder units with addition errors can be accurately obtained, and the multiplexing error correction unit is used to correct the addition results detected as errors in the area responsible for it, and the corrected results are output to the adder units with incorrect addition results, so as to realize fast error correction. The application can realize error correction of addition operation by using the operation detection unit, does not need to introduce additional overhead, improves the reliability of the logic operation unit, and provides a preferred solution for practical application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of addition operation systems, and in particular relates to a variable pipeline error correction and detection addition operation system and method. Background Art

[0002] With the advancement of artificial intelligence technology, the complexity of its algorithm models and the amount of data have increased dramatically, which has put forward higher requirements for hardware performance. The types of hardware currently supporting these massive operations mainly include graphics processing units (GPUs), field programmable gate arrays (FPGAs), and application-specific integrated circuits (ASICs). Among them, GPUs and ASICs, which are high-performance applications, integrate a large number of adders. The huge amount of addition logic will significantly increase the error rate, and due to the lack of corresponding processing methods, silent errors will occur or the traceability after the error is poor, making it difficult to recover quickly. Summary of the invention

[0003] The purpose of the present invention is to provide a variable pipeline error correction and detection addition operation system and method to overcome the problems of the prior art that silent errors or poor traceability after errors and poor reliability of massive addition operation logic are easily caused.

[0004] To achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0005] A variable pipeline error correction and detection addition operation system includes an adder unit, an operation detection unit and a multiplexing error correction unit;

[0006] The adder unit is used to perform addition operation on the addition operands from the bus and output the addition result and the carry, and each adder unit is connected to an operation detection unit;

[0007] The operation detection unit is used to detect the addition result and carry of the adder unit connected thereto. If the addition result of the adder unit is wrong, the operation detection unit outputs an error flag signal to the multiplexing error correction unit;

[0008] The multiplexing error correction unit corrects the addition result detected as an error in its responsible area according to the error flag signal, and outputs the error-corrected result to the adder unit with the erroneous addition result.

[0009] Preferably, the addition operand of the adder unit includes at least two-bit operands.

[0010] Preferably, the operation detection unit and the adder unit connected thereto work in parallel, and simultaneously obtain two identical operands from at least two operands.

[0011] Preferably, the operation detection unit uses Burger code for detection and verification, and the multiplexing error correction unit uses error correction code to correct errors in addition operations in the adder unit.

[0012] Preferably, a plurality of adder units and a plurality of operation detection units share a multiplexing error correction unit.

[0013] Preferably, the multiplexing error correction unit includes an error correction arbiter, a data register and an error processing circuit;

[0014] The data register is used to obtain and store all addition operands and addition results when errors occur in the area it is responsible for;

[0015] The error correction arbiter is used to confirm the priority of all addition operands and addition results when errors occur, and to sort the priorities;

[0016] The error processing circuit corrects the addition operations of the adder units with incorrect addition results in order of priority, and other adder units that have not been corrected are in a waiting state.

[0017] A variable pipeline error correction and detection addition operation method comprises the following steps:

[0018] The addition result and carry of the addition operation are detected. If the addition result of the addition operation is wrong, the addition result detected to be wrong is corrected, and the corrected addition result is output to the adder unit.

[0019] Preferably, an adder unit is used to perform addition operation on the addition operands from the bus, and output the addition result and the carry, and each adder unit is correspondingly connected to an operation detection unit;

[0020] The operation detection unit is used to detect the addition result and carry of the adder unit connected thereto. If the addition result of the adder unit is wrong, the operation detection unit outputs an error flag signal to the multiplexing error correction unit;

[0021] The multiplexed error correction unit is used to correct the addition result detected as erroneous in the area it is responsible for, and the corrected result is output to the adder unit with the erroneous addition result.

[0022] Preferably, the operation detection unit uses Burger code for detection and verification, and the multiplexing error correction unit uses error correction code to correct errors in addition operations in the adder unit.

[0023] Preferably, the specific process of using the multiplexed error correction unit to correct the addition results detected in the area it is responsible for is: a priority sorting signal for all addition operands when errors occur and the addition results obtained from the addition operands when errors occur;

[0024] The addition operations of the adder units with incorrect addition results are corrected in sequence according to the priority, and other adder units that have not been corrected are in a waiting state.

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

[0026] The present invention provides a variable pipeline error correction and detection addition operation system, which performs addition operation on addition operands from a bus and outputs addition results and carries, and each adder unit is connected to an operation detection unit; the operation detection unit is used to detect the addition results and carries of the adder units connected to it, so that the adder units with addition errors can be accurately obtained, and the multiplexing error correction unit is used to correct the addition results with errors detected in the area responsible for it, and the corrected results are output to the adder units with incorrect addition results, so as to realize fast error correction. The present application can realize error correction of addition operation by using the operation detection unit, does not need to introduce additional overhead, improves the reliability of the logic operation unit, and provides a preferred solution for practical application.

[0027] Preferably, the operation detection unit and the adder unit connected thereto work in parallel, obtain two operands at the same time, and directly correct the link where the error occurs. The traceability is strong, and the error detection logic is simpler than the addition operation logic and does not affect the critical path timing. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Schematic diagram of the structure of a variable pipeline error correction and detection addition operation system in an embodiment of the present invention.

[0029] Figure 2 Schematic diagram of the application of the PE array in the variable pipeline error correction and detection addition operation system according to an embodiment of the present invention.

[0030] Figure 3 1 is a circuit schematic diagram of an operation detection unit in an embodiment of the present invention.

[0031] Figure 4 It is a block diagram of the structural principle of the multiplexing error correction unit in an embodiment of the present invention.

[0032] Figure 5 FIG. 4 is a circuit diagram for error handling in an embodiment of the present invention.

[0033] Figure 6It is a schematic diagram of the error correction process in which only one PE unit in the area responsible for the multiplexing error correction unit is detected to have an incorrect addition result in an embodiment of the present invention.

[0034] Figure 7 It is a schematic diagram of the error correction process when multiple PE units in the area where the multiplexing error correction unit is responsible are detected to have incorrect addition results in an embodiment of the present invention.

[0035] Figure 8 The figure is a flow chart of a variable pipeline error correction and detection addition operation method in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] like Figure 1 As shown, the present invention provides a variable pipeline error correction and detection addition operation system, including an adder unit, an operation detection unit and a multiplexing error correction unit;

[0039] The adder unit is arranged in the processor unit, and is used for performing addition operation on the addition operands from the bus, and outputting the addition result and the carry, and each adder unit is connected to an operation detection unit;

[0040] The operation detection unit is used to detect the addition result and carry of the adder unit connected thereto. If the addition result of the adder unit is wrong, the operation detection unit outputs an error flag signal to the multiplexing error correction unit;

[0041] The multiplexing error correction unit corrects the addition result detected as an error in its responsible area according to the error flag signal, and outputs the error-corrected result to the adder unit with the wrong addition result. The present application uses an operation detection unit to detect the addition operation of the adder unit, and at the same time uses the multiplexing error correction unit to correct the addition operation with the wrong addition result. The present application uses the operation detection unit to realize the error correction of the addition operation, and can realize the traceability after the addition operation is wrong, without introducing additional overhead, thereby improving the reliability of the logic operation unit, and providing a preferred solution for practical application.

[0042] In a specific embodiment of the present application, the adder unit is universal, including but not limited to a ripple carry adder, a square root carry select adder, and a carry lookahead adder.

[0043] In a specific implementation of the present application, the addition operands of the adder unit include at least a first operand A and a second operand B.

[0044] The operation detection unit and the adder unit connected thereto can work in parallel to obtain the first operand A and the second operand B at the same time.

[0045] In a specific embodiment of the present application, the operation detection unit adopts an operation detection structure circuit, and the detection method adopts Burger code for detection.

[0046] The operation detection unit proposed in the present application is independent of the implementation micro-architecture of the adder unit and has a wide range of applications.

[0047] The error correction operation of the multiplexed error correction unit belongs to a semi-hidden pipeline stage in the addition operation pipeline. Only when the error flag signal of the operation detection unit is valid, the error correction pipeline stage is activated and the multiplexed error correction unit performs error correction.

[0048] The operation detection unit uses Berger code for detection, and the multiplexing error correction unit uses error correction code to correct the error of the addition operation in the adder unit.

[0049] The error correction code of the multiplexing error correction unit specifically adopts Hamming code.

[0050] The operations of the operation detection unit and the adder unit can be executed in parallel, and the error detection is simpler than the addition operation logic and does not affect the critical path timing.

[0051] In the present application, multiple adder units and multiple operation detection units share a multiplexed error correction unit, minimizing the hardware resource overhead of error correction. When no error occurs in the adder unit, the error correction enable is not turned on and the error correction pipeline stage is not inserted. This semi-hidden error correction pipeline stage design can significantly reduce the additional overhead introduced by the error correction design.

[0052] In the specific implementation of the present application, the adder unit in the ALU (arithmetic logic unit) operation unit is taken as an example for explanation. Figure 2 As shown, the present application is combined with a PE (processor unit) unit array to explain an example in the present application and exemplarily illustrate a variable pipeline error correction and detection addition operation system.

[0053] For each PE, the adder unit in its ALU is connected in parallel to an operation detection unit; the error probability of the PE-based addition operation is relatively small, and the adder units connected to each column of PEs share a multiplexing error correction unit. When the operation detection unit in one of the PEs detects an addition operation error of the adder unit connected to the operation detection unit, an error flag signal is generated and sent to the multiplexing error correction unit in its corresponding area, that is, the operation detection unit outputs an error flag signal to the multiplexing error correction unit, and the multiplexing error correction unit completes the error correction processing operation and returns the correct result to the adder unit with the addition operation error. Under normal conditions, the addition of the adder unit is completed through instruction fetch, decoding, execution, memory access and write-back operations. When an addition result error is detected, a first-level error correction pipeline is inserted; at this time, the addition operation is completed through instruction fetch, decoding, execution, error correction, memory access, and write-back operations; the present application directly corrects the link where the error occurs, has strong traceability, and the error detection logic is simpler than the addition operation logic, and does not affect the critical path timing.

[0054] In a specific implementation of the present application, the operation detection unit specifically uses Berger code for verification, and the specific detection circuit is as follows: Figure 3 As shown in FIG. 1 , the inputs of the operation detection unit are respectively the first operand A and the second operand B from the bus, the addition result S from the adder unit, the output SE from the multiplexing error correction unit, and the intermediate carry C of the addition operation; the multi-operand adder is used to perform the operation, and the Berger code prediction formula of the addition operation result is: S ’ b = A b +B b +C n -C b -C0, where C0 corresponds to the carry input of the addition operation, C n Corresponding to the carry output of the addition operation, A b Indicates the B0 code of A, B b Indicates B0 code of B, C b Indicates the B0 code of C.

[0055] The error detection principle of the operation detection unit is to compare the prediction code S ’ b and the actual code S bWhether they are consistent, this example provides a combinational logic comparison method to predict the code S ’ b and the actual code S b The error flag signal EN is obtained by bitwise XOR operation: if the prediction code S ’ b and the actual code S b The two-choice selector selects the addition result and outputs S normally. out On the contrary, if the prediction code S ’ b and the actual code S b If they are inconsistent, it means that the addition operation of the adder is incorrect, an error flag signal is generated, and the multiplexing error correction unit is activated; the error flag signal EN includes an n-bit error indication signal of PE, and n represents the number of PEs in the area responsible for the multiplexing error correction unit.

[0056] like Figure 4 As shown, the multiplexed error correction unit includes an error correction arbiter, a data register and an error handling circuit; the data register is used to obtain and store all addition operands and addition results S when errors occur in its responsible area; the error correction arbiter is used to confirm the priority of all addition operands and addition results S when errors occur, and perform priority sorting; the error handling circuit corrects the addition operations of the adder units with incorrect addition results in turn according to the priority sorting, and other uncorrected adder units are in a waiting state.

[0057] In the specific embodiments of the present application, Figure 6 As shown, if only one PE in the area responsible for the multiplexed error correction unit is detected to have an incorrect addition result, the error correction arbiter directly activates the error handling circuit, inserts an error correction pipeline stage, and the error handling circuit obtains the operand being processed by the PE in the data register for error correction; Figure 7 As shown, when multiple addition results are erroneous at the same time in the area that the multiplexing error correction unit is responsible for, the error processing circuit corrects the addition operations of the adder units with erroneous addition results in sequence according to the priority.

[0058] like Figure 5 As shown, the error handling circuit diagram in the multiplexing error correction unit of the present application includes an encoder, an error correction decoder, an error corrector, and an enable control structure. The enable control structure is used to receive and store the priority sorting signal result from the error correction arbiter, which is the result of the error correction arbiter confirming the priority of all addition operands and addition results when errors occur, and performing priority sorting; the encoder obtains the check bit P of the Hamming code in the addition result according to the addition operand when an error occurs. s , the error correction decoder uses the check bit P sCompare the addition result S obtained by the addition operand when an error occurs to obtain the check result E S , the error corrector checks the result E S The error position is corrected and the correction result is output.

[0059] This application uses Hamming code to correct 4-bit data as an example. The (7,4) Hamming code has 4 information bits and 3 check bits. The 4 information bits are denoted as S0, S1, S2, and S3 respectively, and the 3 check bits are denoted as P S0 ,P S1 ,P S2 .

[0060] Let vector X = [A0,A1,A2,A3,B0,B1,B2,B3,C0,C1,C2,C3] T , P S =[P S0 ,P S1 ,P S2 ] T , where A0, A1, A2, A3 in vector X represent the information bits of the first operand A respectively, B0, B1, B2, B3 in vector X represent the information bits of the second operand B respectively, and C0, C1, C2, C3 represent the carry in the addition operation of the adder unit respectively. The encoder encoding formula is as follows:

[0061]

[0062] The input of the error correction decoder is the addition result S obtained by the addition operand when an error occurs and the check bit P of the Hamming code in the addition result. s , let vector Y=[S0,S1,S2,S3,P S0 ,P S1 ,P S2 ] T , then the error correction decoder outputs the check result E S for:

[0063]

[0064] The error corrector obtains the verification result E after decoding the error correction decoder s Decoded by the decoder into a 7-bit error correction signal (only the lower 7-bit signal output by the decoder is valid) S E , error correction signal S E The bit line output corresponding to the error-free bit is 0, and the bit line output corresponding to the error bit is 1; the information bits S0, S1, S2, S3 in the addition result S obtained by the addition operand when an error occurs are compared with the error correction signal S E The corrected result data S can be obtained by performing bitwise XOR on the lower 4 bits R ,Right now:

[0065]

[0066] In another embodiment of the present invention, a variable pipeline error correction and detection addition operation method is provided, which specifically includes the following steps:

[0067] The addition result of the addition operation is detected for the addition operands. If the addition result of the addition operation is wrong, the wrong addition result is corrected and the corrected addition result is output.

[0068] like Figure 8 As shown, in the above method, an adder unit is used to perform addition operation on the addition operands from the bus and output the addition result, and each adder unit is connected to a corresponding operation detection unit;

[0069] The operation detection unit is used to detect the addition result of the adder unit connected thereto. If the addition result of the adder unit is wrong, the operation detection unit outputs an error flag signal to the multiplexing error correction unit;

[0070] The multiplexed error correction unit is used to correct the addition result detected as erroneous in the area it is responsible for, and the corrected result is output to the adder unit with the erroneous addition result.

[0071] The present application utilizes an operation detection unit to implement error correction of addition operations without introducing additional overhead, thereby improving the reliability of the logic operation unit.

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

Claims

1. A variable pipeline error correction and detection addition operation system, characterized in that: It includes an adder unit, an operation detection unit and a multiplexing error correction unit; The adder unit is used to perform addition operation on the addition operands from the bus and output the addition result, and each adder unit is connected to an operation detection unit; The operation detection unit is used to detect the addition result of the adder unit connected thereto. If the addition result of the adder unit is wrong, the operation detection unit outputs an error flag signal to the multiplexing error correction unit. The operation detection unit and the adder unit connected thereto work in parallel and simultaneously obtain two identical operands from at least two operands. The multiplexing error correction unit corrects the addition result detected as an error in its responsible area according to the error flag signal, and outputs the error-corrected result to the adder unit with the erroneous addition result.

2. A variable pipeline error correction and detection addition operation system according to claim 1, characterized in that: The addition operand of the adder unit includes at least two bits of operand.

3. The variable pipeline error correction and detection addition operation system according to claim 1, characterized in that: The operation detection unit uses Burger code for detection, and the multiplexing error correction unit uses error correction code to correct the error of the addition operation in the adder unit.

4. The variable pipeline error correction and detection addition operation system according to claim 1, characterized in that: A plurality of adder units and a plurality of operation detection units share a multiplexing error correction unit.

5. The variable pipeline error correction and detection addition operation system according to claim 1, characterized in that: The multiplexing error correction unit includes an error correction arbiter, a data register and an error processing circuit; The data register is used to obtain and store all addition operands and addition results when errors occur in the area it is responsible for; The error correction arbiter is used to confirm the priority of all addition operands and addition results when errors occur, and to sort the priorities; The error processing circuit corrects the addition operations of the adder units with incorrect addition results in order of priority, and other adder units that have not been corrected are in a waiting state.

6. A variable pipeline error correction and detection addition operation method, characterized in that: The following steps are involved: The addition result of the addition operation is detected for the addition operands. If the addition result of the addition operation is wrong, the wrong addition result is corrected and the corrected addition result is output: Specifically: an adder unit is used to perform addition operation on the addition operands from the bus and output the addition result, and each adder unit is connected to a corresponding operation detection unit; The operation detection unit is used to detect the addition result of the adder unit connected thereto. If the addition result of the adder unit is wrong, the operation detection unit outputs an error flag signal to the multiplexing error correction unit. The operation detection unit and the adder unit connected thereto work in parallel and simultaneously obtain two identical operands from at least two operands. The multiplexed error correction unit is used to correct the addition result detected as erroneous in the area it is responsible for, and the corrected result is output to the adder unit with the erroneous addition result.

7. A variable pipeline error correction and detection addition operation method according to claim 6, characterized in that: The operation detection unit uses Burger code for detection, and the multiplexing error correction unit uses error correction code to correct the error of the addition operation in the adder unit.

8. The variable pipeline error correction and detection addition operation method according to claim 6, characterized in that: The multiplexed error correction unit is used to correct the addition results detected in the area it is responsible for. The specific process is: all the addition operands when errors occur and the addition results obtained by the addition operands when errors occur are prioritized; The addition operations of the adder units with incorrect addition results are corrected in sequence according to the priority, and other adder units that have not been corrected are in a waiting state.