WO2023019742A1 - Fpga having automatic error checking and correcting function for programmable logic module - Google Patents

Fpga having automatic error checking and correcting function for programmable logic module Download PDF

Info

Publication number
WO2023019742A1
WO2023019742A1 PCT/CN2021/128310 CN2021128310W WO2023019742A1 WO 2023019742 A1 WO2023019742 A1 WO 2023019742A1 CN 2021128310 W CN2021128310 W CN 2021128310W WO 2023019742 A1 WO2023019742 A1 WO 2023019742A1
Authority
WO
WIPO (PCT)
Prior art keywords
programmable logic
circuit
registers
fpga
verification
Prior art date
Application number
PCT/CN2021/128310
Other languages
French (fr)
Chinese (zh)
Inventor
单悦尔
徐彦峰
范继聪
井站
Original Assignee
无锡中微亿芯有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 无锡中微亿芯有限公司 filed Critical 无锡中微亿芯有限公司
Priority to US17/457,440 priority Critical patent/US11604692B2/en
Publication of WO2023019742A1 publication Critical patent/WO2023019742A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1044Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices with specific ECC/EDC distribution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/06Clock generators producing several clock signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7867Architectures of general purpose stored program computers comprising a single central processing unit with reconfigurable architecture
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the invention relates to the field of FPGA technology, in particular to an FPGA with automatic error detection and correction functions for programmable logic modules.
  • FPGA chip Field Programmable Gate Array, Field Programmable Gate Array
  • TMR Triple Module Redundant
  • CRAM Configuration Random Access Memory
  • DSR data shift registers
  • ASR address shift registers
  • the existing above-mentioned methods are usually only designed for reliability of the registers in the configuration memory, and the protection effect is relatively limited, and the TMR method needs to occupy a large circuit area, which is not conducive to the integration of the FPGA chip.
  • the inventor proposes a kind of FPGA with automatic error detection and correction function to the programmable logic module for above-mentioned problem and technical demand, technical scheme of the present invention is as follows:
  • An FPGA with automatic error detection and correction functions for programmable logic modules includes a programmable logic module and a check error corrector, the programmable logic module includes several programmable logic registers, each programmable logic register according to The clock signal refreshes and writes the obtained input data;
  • the verification error corrector includes a verification code generation circuit, M verification code registers, a verification circuit, a decoding circuit and a trigger circuit:
  • the N input ends of the check code generating circuit are respectively connected to the input ends of the corresponding N programmable logic registers to obtain N input data, and the M output ends of the check code generating circuit are respectively connected to M check code registers, and the verification
  • the code generation circuit performs ECC encoding on the N input data to generate M check codes, and each check code register refreshes and writes the corresponding check code according to the clock signal of the programmable logic register corresponding to the check error corrector;
  • the output ends of the N programmable logic registers and the M check code registers are connected to the input end of the verification circuit, and the output end of the verification circuit is connected to the input end of the decoding circuit to provide a verification signal, and the verification signal is used to indicate N Faulty registers with data errors in the +M registers;
  • the trigger circuit is connected to the enabling end of the decoding circuit, and the decoding circuit generates N+M flip signals with a predetermined pulse width corresponding to the verification signal according to the trigger enabling pulse of the trigger circuit, and outputs them to N programmable logic registers and M
  • a check code register controls the fault register to directly flip the content asynchronously to correct errors.
  • the trigger circuit controls the decoding circuit to be in an invalid state for a predetermined duration.
  • the predetermined duration of the decoding circuit being in the invalid state is longer than the delay between the input end of the verification circuit acquiring data and the output end of the decoding circuit generating a signal.
  • the invalid duration is longer than the pulse width of the flip signal.
  • the verification error corrector further includes a timer, and the interval between the trigger enable pulses output by the trigger circuit is controlled by the timer.
  • N programmable logic registers corresponding to one check and error corrector are included in the same programmable logic module, or included in at least two different programmable logic modules.
  • N programmable logic registers corresponding to a check error corrector are controlled by the same clock signal
  • the N programmable logic registers corresponding to a parity error corrector are controlled by at least two different clock signals, then the parity error corrector works according to all clock signals.
  • N programmable logic registers corresponding to a check error corrector are all used to realize the user design, or part of the programmable logic registers are used to realize the user design, and are not used to realize the programmable logic registers of the user design.
  • the input data to the programming logic register is always at an inactive level.
  • the input data of the programmable logic register used to realize the user design comes from the inside and/or outside of the programmable logic module to which it belongs, and the input data from the inside of the programmable logic module is generated from the look-up table , at least one of a carry chain, a data selector and a flip-flop.
  • the ECC code adopted by the check code generation circuit is a Hamming code, and the values of M and N conform to the coding rule of the corresponding digit Hamming code.
  • This application discloses an FPGA with automatic error detection and correction functions for programmable logic modules.
  • the error correction device is used to detect and correct the programmable logic for the programmable logic registers in the programmable logic module, and the FPGA runs normally.
  • the programmable logic register is updated in real time according to the clock signal, and the verification and error corrector can verify and correct the error in real time to ensure that the contents of the programmable logic register are correct.
  • this method greatly reduces the circuit area compared with the triple-mode redundancy method, and is beneficial to improving the circuit integration degree.
  • FIG. 1 is a schematic diagram of the connection between the parity error corrector and the corresponding N programmable logic registers in the present application.
  • Fig. 2 is a schematic diagram of sources of input data of N programmable logic registers corresponding to an error checking and correcting device in an embodiment.
  • the present application discloses an FPGA with automatic error detection and correction function for programmable logic modules.
  • FPGA contains conventional programmable logic resources.
  • Programmable logic resources inside FPGA mainly include programmable resources and interconnect resources.
  • Programmable resources include programmable logic blocks (CLB), BRAM, IOB, DSP, and PC.
  • Interconnect resources include winding resources. Boxes and interconnecting wires, etc.
  • Each programmable logic module CLB includes a number of programmable logic registers, and in addition, usually includes a look-up table (LUT), a carry chain, a data selector, a flip-flop, and the like.
  • LUT look-up table
  • the FPGA of the present application has also designed a special check and error corrector corresponding to the programmable logic block (CLB), that is, additionally increased hardware resources, check and corrector
  • CLB programmable logic block
  • the fault device is a hardware resource based on the production and implementation of conventional circuit components, so it can be realized by using a conventional FPGA production process.
  • the check error corrector includes a check code generating circuit, M check code registers REG2 , a check circuit, a decoding circuit and a trigger circuit.
  • the output ends of the verification code register, the N programmable logic registers and the M verification code registers are all connected to the input end of the verification circuit, and the output end of the verification circuit is connected to the input end of the decoding circuit.
  • the trigger circuit is connected to the enabling terminal of the decoding circuit, and the output terminal of the decoding circuit is connected to N programmable logic registers and M check code registers.
  • the check error corrector corresponds to the N programmable logic registers, and also corresponds to the programmable logic module to which the N programmable logic registers belong.
  • the N programmable logic registers corresponding to one check and error corrector are included in the same programmable logic module, and then one check and error corrector corresponds to one programmable logic module.
  • the N programmable logic registers corresponding to a check error corrector are included in at least two different programmable logic modules, and then a check error corrector corresponds to a plurality of different programmable logic modules , That is to say, multiple programmable logic modules can share a verification error corrector, which reduces the circuit area and also reduces the extra cost of the error correction function.
  • the programmable logic register inside a programmable logic module corresponds to one parity error corrector, or corresponds to multiple parity error correctors.
  • the N programmable logic registers corresponding to the verification error corrector refresh and write data according to the normal working process of the internal programmable logic registers of the programmable logic module, that is, the N programmable logic registers corresponding to the verification error corrector
  • the programming logic register obtains the corresponding input signal from the input terminal, and then refreshes and writes the obtained input data according to the clock signal CLK.
  • the so-called refreshing and writing according to the clock signal CLK generally refers to the rising or falling edge of the clock signal according to the actual configuration.
  • the input data of the N programmable logic registers corresponding to the check error corrector will be sent to the check error corrector, specifically sent to the input terminal of the check code generation circuit, and the N input terminals of the check code generation circuit will obtain After receiving N input data, perform ECC encoding on the N input data to generate M check codes.
  • the values of M and N conform to the encoding rules of ECC encoding.
  • the ECC encoding adopted by the check code generation circuit is a Hamming code
  • Each check code register refreshes and writes the corresponding check code according to the clock signal of the programmable logic register corresponding to the check error corrector, and the meaning of refreshing and writing the check code in the check code register is similar to that of the programmable logic register. That is, it is refreshed and written on the rising or falling edge of the clock signal, so the input data and the check code will be synchronously divided into the programmable logic register and the check code register respectively.
  • the signals at the output terminals of N programmable logic registers and the signals at the output terminals of M verification code registers form a total of N+M bit codes and are transmitted to the verification circuit.
  • the verification circuit adopts a verification circuit that matches the ECC code.
  • the check circuit generally adopts a parity check circuit.
  • the verification circuit generates a verification signal (Syndrome) according to the acquired N+M bit code.
  • the verification signal is used to indicate a faulty register with data error in the N+M registers.
  • the faulty register may be a programmable logic register or a The check code register, so that the function of check and error detection can be realized.
  • Figure 1 only outputs the connection relationship between the circuits, but does not indicate the arrangement order of the N+M bit codes.
  • the actual order of the bit codes in the N+M bit codes is determined according to the coding rule.
  • the decoding circuit can decode the verification signal to obtain the decoding result of N+M bits.
  • Each bit of the decoding result corresponds to one of the N+M registers, and the decoding result of one bit corresponding to the fault register is an active level.
  • the decoding results are all invalid levels. Typically, the invalid level is 0 and the active level is 1, and the active level can be used to flip the fault register. Because it is used to flip the fault register, due to circuit considerations, the trigger circuit at the enable end is used to control the waveform of the decoded signal, and the N+M bit decoding result is processed into a pulse form.
  • the trigger circuit can use a common one-shot circuit, which defaults to 0 when it is not enabled.
  • the decoding circuit outputs an invalid level, that is, all registers are not flipped.
  • the trigger circuit outputs a predetermined
  • the trigger enable pulse of the pulse width enables the decoding circuit, so that the decoding circuit outputs N+M inversion signals with a predetermined pulse width corresponding to the verification signal, wherein one inversion signal corresponding to the fault register outputs an active level of a predetermined pulse width , and the rest of the flip signals continue to output invalid levels, so as to control the faulty registers in the N+M registers to directly flip the content asynchronously to correct errors, without waiting for the arrival of the clock signal, and realize the error correction of the faulty registers.
  • the content of the error correction update is different from the data written by the clock signal, and it is not directly rewritten and refreshed.
  • there is at least a predetermined waiting period between the trigger enable pulses output by the trigger circuit and the predetermined waiting period is longer than the time for which the check error corrector updates the flip signal according to the error-corrected data, so that the errors of the fault register can be corrected.
  • the data has time to be transmitted to the verification and error corrector for re-verification and error correction, avoiding the situation where continuous pulses lead to continuous errors.
  • a typical method can be controlled by a timer, and the error checking and correcting device further includes a timer, and the interval between the trigger enable pulses output by the trigger circuit is controlled by the timer.
  • the verification error corrector also needs to avoid conflicts with the input data normally written in the clock cycle, then when the programmable logic register corresponding to the verification error corrector refreshes and writes the acquired input data according to the clock signal , the trigger circuit controls the decoding circuit to be in an invalid state for a predetermined period of time, so as to avoid conflicts between the inversion signal and the data written by the clock.
  • the predetermined duration of the decoding circuit being in the invalid state is longer than the delay between the input terminal of the verification circuit acquiring data and the output terminal of the decoding circuit generating a signal, that is, it is necessary to wait until the output of the verification error corrector is stable,
  • the inactive time of the decoding circuit is longer than the pulse width of the toggle signal, so as to completely avoid conflicts.
  • the verification code register needs to refresh and write data according to the clock signal of the programmable logic register, and the trigger circuit also needs to control the decoding circuit to be invalid according to the clock signal to avoid conflicts, so the verification
  • the error corrector works according to the clock signals of its corresponding N programmable logic registers.
  • the N programmable logic registers corresponding to one check and error corrector are controlled by the same clock signal, and then the check and error corrector works according to one clock signal.
  • the N programmable logic registers corresponding to a check and error corrector are controlled by at least two different clock signals, and then the check and error corrector works according to all clock signals, such as N programmable logic registers N1 of the programming logic registers are controlled by CLK1 and N2 are controlled by CLK2, then the check code register and the N1 programmable logic registers are refreshed and written according to CLK1, and the check code register is also connected with the N2 programmable logic registers Refresh and write together according to CLK2.
  • the trigger circuit controls the decoding circuit to be in an invalid state when CLK1 writes data to N1 programmable logic registers, and also controls the decoding circuit when CLK2 writes data to N2 programmable logic registers. is in an invalid state.
  • the N programmable logic registers corresponding to a check error corrector are all used to realize the user design, or part of the programmable logic registers are used to realize the user design, and are not used to realize the user design.
  • the input data of the programmable logic register is always at an invalid level, that is, connected to 0, which does not affect the realization of the above error detection and correction process.
  • the input data of the programmable logic register used to realize the user design comes from the inside and/or outside of the programmable logic module to which it belongs, and the input data from the inside of the programmable logic module is generated from the look-up table, the carry chain, and the data selector And at least one of the flip-flops, the source of the input data of the N programmable logic registers can be the same or different, that is, the input data of some programmable logic registers can come from the outside of the programmable logic module where they are located, and some can be programmed
  • the input data of the logic register comes from an internal look-up table, some from another internal look-up table, some from the internal carry chain, and so on.
  • the input data of a programmable logic register comes from the outside of the programmable logic module or the look-up table, then the input end of the programmable logic register is connected to the module input port and the look-up table output of the programmable logic module, And through the configuration bits to select the actual selected input data.
  • the eight programmable logic registers are all located in the same programmable logic module, and there are eight six-input look-up tables LUT6-0 ⁇ LUT6-7 in the programmable logic module, and the inputs of each look-up table are respectively
  • the width of each group of signals is 6 bits, and the output of each lookup table is L0 ⁇ L7.
  • the input data of 8 programmable logic registers There are two sources of r0 ⁇ r7, one is the input X0 ⁇ X7 of the input port of the module, and the other is the output L0 ⁇ L7 of each look-up table.
  • the input of each programmable logic register can be independently selected through the configuration bits.
  • the check error corrector when the power-on process of the FPGA is not completed, or the configuration of the code stream is not completed, or the initialization is not completed, so that the FPGA does not enter the normal working mode, the check error corrector is in an invalid state.
  • the verification error corrector starts to work, and performs verification and error correction according to the method described above.
  • the check error corrector corresponds to 8 programmable logic registers.
  • the verification signals P8, P4, P2, P1 to the 4 to 12-bit decoder which generates ⁇ f0, f1, f2, f3, f4, f5, f6, f7, f8 under the action of the trigger enable pulse , f9, f10, f11 ⁇ , only one bit of the flip signal corresponding to the fault register is at high level, and the rest are all 0.
  • c6 corresponds to the fault register
  • the output flip signal has only the corresponding bit of f6 as 1, and the rest are 0, and the output flip signal is ⁇ 0,0,0,0,0,0,1 ,0,0,0,0,0 ⁇ .

Abstract

The present invention relates to the technical field of FPGAs, and disclosed is an FPGA having an automatic error checking and correcting function for a programmable logic module. The FPGA comprises a error checking and correcting device, a checking code generating circuit in the error checking and correcting device performs ECC encoding according to input data of a corresponding programmable logic register to generate a checking code, and the checking code is refreshed and written into a checking code register according to a clock signal. A checking circuit checks the output of the programmable logic register and the checking code register to generate a checking signal, so as to achieve verification, and a decoding circuit generates, according to the trigger enable pulse of a trigger circuit, a flipping signal corresponding to the checking signal to control a fault register to directly and asynchronously flipping content to achieve error correction. An error checking and correcting device may check and correct errors in real time of the programmable logic register in the normal operation process of the FPGA. Thus, reliability is higher, and compared to a triple module redundancy method, the described method greatly reduces the circuit area and is beneficial to improving circuit integration level.

Description

具有对可编程逻辑模块自动检纠错功能的FPGAFPGA with automatic error detection and correction function for programmable logic modules 技术领域technical field
本发明涉及FPGA技术领域,尤其是一种具有对可编程逻辑模块自动检纠错功能的FPGA。The invention relates to the field of FPGA technology, in particular to an FPGA with automatic error detection and correction functions for programmable logic modules.
背景技术Background technique
随着超大规模集成电路技术的发展,FPGA芯片(Field Programmable Gate Array,现场可编程门阵列)依靠其优越的接口性能、丰富的逻辑和IP资源以及灵活方便的现场可编程能力,在航空航天工程中得到越来越广泛的应用,已成为关键的核心器件。With the development of VLSI technology, FPGA chip (Field Programmable Gate Array, Field Programmable Gate Array) relies on its superior interface performance, rich logic and IP resources, and flexible and convenient field programmability. It has been more and more widely used and has become a key core device.
在航空航天工程中应用的FPGA芯片的可靠性要求通常较高,但空间辐射环境的空间高能粒子又容易导致单粒子翻转(SEU,Single Event Upset)问题而使电路功能出现故障,因此目前通常会采用三模冗余(Triple Module Redundant,TMR)结合片外刷新的方法来对FPGA芯片中的配置存储器(CRAM,Configuration Random Access Memory)实现纠错,以提高可靠性:采用TMR方法设计配置存储器中的所有数据移位寄存器(DSR)和地址移位寄存器(ASR),也即将一个寄存器复制成三份,采取三选二的表决方式,任意一路寄存器发生翻转出现错误而另外两路寄存器输出正常时仍能保证寄存器内容正确。当发生错误时,重新写入配置比特码流实现纠错。The reliability requirements of FPGA chips used in aerospace engineering are usually high, but space high-energy particles in the space radiation environment are likely to cause single-event upset (SEU, Single Event Upset) problems and cause circuit functions to malfunction. The method of Triple Module Redundant (TMR) combined with off-chip refresh is used to correct the configuration memory (CRAM, Configuration Random Access Memory) in the FPGA chip to improve reliability: use the TMR method to design the configuration memory All the data shift registers (DSR) and address shift registers (ASR), that is, one register is copied into three copies, and two out of three voting methods are adopted. When any register flips and an error occurs, and the other two registers output normally The register contents are still guaranteed to be correct. When an error occurs, rewrite the configuration bit stream to implement error correction.
但是现有的上述做法通常仅针对配置存储器中的寄存器进行可靠性设计,防护效果较为有限,而且TMR做法需要占用较大的电路面积,不利于FPGA芯片的集成度。However, the existing above-mentioned methods are usually only designed for reliability of the registers in the configuration memory, and the protection effect is relatively limited, and the TMR method needs to occupy a large circuit area, which is not conducive to the integration of the FPGA chip.
发明内容Contents of the invention
本发明人针对上述问题及技术需求,提出了一种具有对可编程逻辑模块自动检纠错功能的FPGA,本发明的技术方案如下:The inventor proposes a kind of FPGA with automatic error detection and correction function to the programmable logic module for above-mentioned problem and technical demand, technical scheme of the present invention is as follows:
一种具有对可编程逻辑模块自动检纠错功能的FPGA,该FPGA包括可编程逻辑模块以及校验纠错器,可编程逻辑模块内部包括若干个可编程逻辑寄存器,每个可编程逻辑寄存器根据时钟信号刷新写入获取到的输入数据;校验纠 错器包括校验码生成电路、M个校验码寄存器、校验电路、解码电路以及触发电路:An FPGA with automatic error detection and correction functions for programmable logic modules, the FPGA includes a programmable logic module and a check error corrector, the programmable logic module includes several programmable logic registers, each programmable logic register according to The clock signal refreshes and writes the obtained input data; the verification error corrector includes a verification code generation circuit, M verification code registers, a verification circuit, a decoding circuit and a trigger circuit:
校验码生成电路的N个输入端分别连接对应的N个可编程逻辑寄存器的输入端获取N个输入数据,校验码生成电路的M个输出端分别连接M个校验码寄存器,校验码生成电路对N个输入数据进行ECC编码生成M个校验码,每个校验码寄存器根据校验纠错器对应的可编程逻辑寄存器的时钟信号刷新写入对应的校验码;The N input ends of the check code generating circuit are respectively connected to the input ends of the corresponding N programmable logic registers to obtain N input data, and the M output ends of the check code generating circuit are respectively connected to M check code registers, and the verification The code generation circuit performs ECC encoding on the N input data to generate M check codes, and each check code register refreshes and writes the corresponding check code according to the clock signal of the programmable logic register corresponding to the check error corrector;
N个可编程逻辑寄存器以及M个校验码寄存器的输出端均连接到校验电路的输入端,校验电路的输出端连接解码电路的输入端提供校验信号,校验信号用于指示N+M个寄存器中存在数据错误的故障寄存器;The output ends of the N programmable logic registers and the M check code registers are connected to the input end of the verification circuit, and the output end of the verification circuit is connected to the input end of the decoding circuit to provide a verification signal, and the verification signal is used to indicate N Faulty registers with data errors in the +M registers;
触发电路连接解码电路的使能端,解码电路根据触发电路的触发使能脉冲生成校验信号对应的具有预定脉冲宽度的N+M个翻转信号,并分别输出给N个可编程逻辑寄存器以及M个校验码寄存器控制其中的故障寄存器直接异步翻转内容以纠正错误。The trigger circuit is connected to the enabling end of the decoding circuit, and the decoding circuit generates N+M flip signals with a predetermined pulse width corresponding to the verification signal according to the trigger enabling pulse of the trigger circuit, and outputs them to N programmable logic registers and M A check code register controls the fault register to directly flip the content asynchronously to correct errors.
其进一步的技术方案为,当校验纠错器对应的可编程逻辑寄存器根据时钟信号刷新写入获取到的输入数据时,触发电路控制解码电路处于无效状态达到预定时长。Its further technical solution is that when the programmable logic register corresponding to the check and error corrector refreshes and writes the acquired input data according to the clock signal, the trigger circuit controls the decoding circuit to be in an invalid state for a predetermined duration.
其进一步的技术方案为,解码电路处于无效状态的预定时长大于校验电路的输入端获取数据至解码电路的输出端产生信号之间的延时。Its further technical solution is that the predetermined duration of the decoding circuit being in the invalid state is longer than the delay between the input end of the verification circuit acquiring data and the output end of the decoding circuit generating a signal.
其进一步的技术方案为,无效时长大于翻转信号的脉冲宽度。Its further technical solution is that the invalid duration is longer than the pulse width of the flip signal.
其进一步的技术方案为,触发电路输出的触发使能脉冲之间至少间隔预定等待时长,预定等待时长大于校验纠错器根据纠错后的数据更新翻转信号的时长。Its further technical solution is that there is at least a predetermined waiting period between the trigger enable pulses output by the trigger circuit, and the predetermined waiting period is longer than the period for which the verification error corrector updates the flip signal according to the error-corrected data.
其进一步的技术方案为,校验纠错器还包括定时器,通过定时器控制触发电路输出的触发使能脉冲之间的间隔。Its further technical solution is that the verification error corrector further includes a timer, and the interval between the trigger enable pulses output by the trigger circuit is controlled by the timer.
其进一步的技术方案为,一个校验纠错器对应的N个可编程逻辑寄存器包含在同一个可编程逻辑模块内,或者,包含在至少两个不同的可编程逻辑模块内。Its further technical solution is that the N programmable logic registers corresponding to one check and error corrector are included in the same programmable logic module, or included in at least two different programmable logic modules.
其进一步的技术方案为,一个校验纠错器对应的N个可编程逻辑寄存器受控于同一个时钟信号;Its further technical solution is that the N programmable logic registers corresponding to a check error corrector are controlled by the same clock signal;
或者,一个校验纠错器对应的N个可编程逻辑寄存器受控于至少两个不同 的时钟信号,则校验纠错器根据所有的时钟信号进行工作。Or, the N programmable logic registers corresponding to a parity error corrector are controlled by at least two different clock signals, then the parity error corrector works according to all clock signals.
其进一步的技术方案为,一个校验纠错器对应的N个可编程逻辑寄存器都用于实现用户设计,或者,部分可编程逻辑寄存器用于实现用户设计,则未用于实现用户设计的可编程逻辑寄存器的输入数据恒为无效电平。Its further technical solution is that the N programmable logic registers corresponding to a check error corrector are all used to realize the user design, or part of the programmable logic registers are used to realize the user design, and are not used to realize the programmable logic registers of the user design. The input data to the programming logic register is always at an inactive level.
其进一步的技术方案为,用于实现用户设计的可编程逻辑寄存器的输入数据来自于所属的可编程逻辑模块的内部和/或外部,来自于可编程逻辑模块的内部的输入数据产生于查找表、进位链、数据选择器和触发器中的至少一种。Its further technical solution is that the input data of the programmable logic register used to realize the user design comes from the inside and/or outside of the programmable logic module to which it belongs, and the input data from the inside of the programmable logic module is generated from the look-up table , at least one of a carry chain, a data selector and a flip-flop.
其进一步的技术方案为,校验码生成电路采用的ECC编码为汉明码,且M和N的取值符合相应位数汉明码的编码规则。Its further technical solution is that the ECC code adopted by the check code generation circuit is a Hamming code, and the values of M and N conform to the coding rule of the corresponding digit Hamming code.
其进一步的技术方案为,在FPGA上电过程未完成、或者码流配置未完成、或者初始化未完成而使得FPGA未进入正常工作模式时,校验纠错器处于无效状态;当FPGA进入正常工作模式后,校验纠错器进行校验纠错。Its further technical solution is that when the FPGA does not enter the normal working mode because the power-on process of the FPGA is not completed, or the code stream configuration is not completed, or the initialization is not completed, the error correction device is in an invalid state; when the FPGA enters normal operation After the mode is checked, the error corrector performs verification and error correction.
本发明的有益技术效果是:The beneficial technical effect of the present invention is:
本申请公开了一种具有对可编程逻辑模块自动检纠错功能的FPGA,利用校验纠错器针对可编程逻辑模块内的可编程逻辑寄存器对可编程逻辑进行检纠错,在FPGA正常运行过程中,可编程逻辑寄存器根据时钟信号实时更新,校验纠错器可以实时检验纠错,保证可编程逻辑寄存器的内容正确,这种FPGA的检验纠错的功能更完善,可靠性更高,而且这种做法相比于三模冗余方法来说大大减少了电路面积,有利于提高电路集成度。This application discloses an FPGA with automatic error detection and correction functions for programmable logic modules. The error correction device is used to detect and correct the programmable logic for the programmable logic registers in the programmable logic module, and the FPGA runs normally. During the process, the programmable logic register is updated in real time according to the clock signal, and the verification and error corrector can verify and correct the error in real time to ensure that the contents of the programmable logic register are correct. Moreover, this method greatly reduces the circuit area compared with the triple-mode redundancy method, and is beneficial to improving the circuit integration degree.
附图说明Description of drawings
图1是本申请中校验纠错器与及对应的N个可编程逻辑寄存器的连接示意图。FIG. 1 is a schematic diagram of the connection between the parity error corrector and the corresponding N programmable logic registers in the present application.
图2是校验纠错器对应的N个可编程逻辑寄存器的输入数据在一个实施例中的来源示意图。Fig. 2 is a schematic diagram of sources of input data of N programmable logic registers corresponding to an error checking and correcting device in an embodiment.
具体实施方式Detailed ways
下面结合附图对本发明的具体实施方式做进一步说明。The specific embodiments of the present invention will be further described below in conjunction with the accompanying drawings.
本申请公开了一种具有对可编程逻辑模块自动检纠错功能的FPGA,该The present application discloses an FPGA with automatic error detection and correction function for programmable logic modules.
FPGA包含常规的可编程逻辑资源,FPGA内部的可编程逻辑资源主要包括可编程资源以及互联资源,可编程资源包括可编程逻辑模块(CLB)、BRAM、IOB、DSP和PC等,互联资源包括绕线盒和互联线等。每个可编程逻辑模块CLB内包括若干个可编程逻辑寄存器,除此之外,通常还包括查找表(LUT)、进位链、 数据选择器和触发器等等。FPGA contains conventional programmable logic resources. Programmable logic resources inside FPGA mainly include programmable resources and interconnect resources. Programmable resources include programmable logic blocks (CLB), BRAM, IOB, DSP, and PC. Interconnect resources include winding resources. Boxes and interconnecting wires, etc. Each programmable logic module CLB includes a number of programmable logic registers, and in addition, usually includes a look-up table (LUT), a carry chain, a data selector, a flip-flop, and the like.
本申请的FPGA除了包含常规的这些可编程逻辑资源之外,还设计了专门的与可编程逻辑模块(CLB)对应的校验纠错器,也即还包括额外增加的硬件资源,校验纠错器是基于常规电路组件制作实现的硬件资源,因此采用常规的FPGA制作工艺即可实现。In addition to these conventional programmable logic resources, the FPGA of the present application has also designed a special check and error corrector corresponding to the programmable logic block (CLB), that is, additionally increased hardware resources, check and corrector The fault device is a hardware resource based on the production and implementation of conventional circuit components, so it can be realized by using a conventional FPGA production process.
如图1所示,校验纠错器包括校验码生成电路、M个校验码寄存器REG2、校验电路、解码电路以及触发电路,图1以M=4为例。校验码生成电路的N个输入端分别连接对应的N个可编程逻辑寄存器REG1的输入端,如图1以N=8为例,校验码生成电路的M个输出端分别连接M个校验码寄存器,N个可编程逻辑寄存器以及M个校验码寄存器的输出端均连接到校验电路的输入端,校验电路的输出端连接解码电路的输入端。触发电路连接解码电路的使能端,解码电路的输出端连接至N个可编程逻辑寄存器以及M个校验码寄存器。As shown in FIG. 1 , the check error corrector includes a check code generating circuit, M check code registers REG2 , a check circuit, a decoding circuit and a trigger circuit. In FIG. 1 , M=4 is taken as an example. The N input terminals of the check code generation circuit are respectively connected to the input terminals of the corresponding N programmable logic registers REG1, as shown in Figure 1, taking N=8 as an example, the M output terminals of the check code generation circuit are respectively connected to M calibration registers. The output ends of the verification code register, the N programmable logic registers and the M verification code registers are all connected to the input end of the verification circuit, and the output end of the verification circuit is connected to the input end of the decoding circuit. The trigger circuit is connected to the enabling terminal of the decoding circuit, and the output terminal of the decoding circuit is connected to N programmable logic registers and M check code registers.
校验纠错器对应N个可编程逻辑寄存器,也对应这N个可编程逻辑寄存器所属的可编程逻辑模块。在一个实施例中,一个校验纠错器对应的N个可编程逻辑寄存器包含在同一个可编程逻辑模块内,则一个校验纠错器对应一个可编程逻辑模块。在另一个实施例中,一个校验纠错器对应的N个可编程逻辑寄存器包含在至少两个不同的可编程逻辑模块内,则一个校验纠错器对应多个不同的可编程逻辑模块,也即可以让多个可编程逻辑模块共用一个校验纠错器,减少电路面积,也减少纠错功能付出的额外代价。另一方面,一个可编程逻辑模块内部的可编程逻辑寄存器对应一个校验纠错器,或者对应多个校验纠错器。The check error corrector corresponds to the N programmable logic registers, and also corresponds to the programmable logic module to which the N programmable logic registers belong. In one embodiment, the N programmable logic registers corresponding to one check and error corrector are included in the same programmable logic module, and then one check and error corrector corresponds to one programmable logic module. In another embodiment, the N programmable logic registers corresponding to a check error corrector are included in at least two different programmable logic modules, and then a check error corrector corresponds to a plurality of different programmable logic modules , That is to say, multiple programmable logic modules can share a verification error corrector, which reduces the circuit area and also reduces the extra cost of the error correction function. On the other hand, the programmable logic register inside a programmable logic module corresponds to one parity error corrector, or corresponds to multiple parity error correctors.
在FPGA运行过程中,校验纠错器对应的N个可编程逻辑寄存器按照可编程逻辑模块内部可编程逻辑寄存器的常规工作过程刷新写入数据,也即校验纠错器对应的N个可编程逻辑寄存器分别从输入端获取对应的输入信号,然后根据时钟信号CLK刷新写入获取到的输入数据,所谓根据时钟信号CLK刷新写入根据实际配置一般是指在时钟信号的上升沿或下降沿时将输入数据写入到可编程逻辑寄存器内,并保持直到下个时钟周期时被新的输入数据覆盖。During the operation of the FPGA, the N programmable logic registers corresponding to the verification error corrector refresh and write data according to the normal working process of the internal programmable logic registers of the programmable logic module, that is, the N programmable logic registers corresponding to the verification error corrector The programming logic register obtains the corresponding input signal from the input terminal, and then refreshes and writes the obtained input data according to the clock signal CLK. The so-called refreshing and writing according to the clock signal CLK generally refers to the rising or falling edge of the clock signal according to the actual configuration. When the input data is written into the programmable logic register, it remains until the next clock cycle is overwritten by new input data.
校验纠错器对应的N个可编程逻辑寄存器的输入数据会送入到校验纠错器,具体的送到校验码生成电路的输入端,校验码生成电路的N个输入端获取到N个输入数据后,对N个输入数据进行ECC编码生成M个校验码。其中M和N的取值符合ECC编码的编码规则。在一个实施例中,校验码生成电路采用的ECC编码为汉明码,则M和N的取值符合相应位数汉明码的编码规则, 比如常见的N=8、M=4从而符合(8,4)汉明码的编码规则,再比如N=4、M=3符合(4,3)汉明码的编码规则,再比如N=16、M=5符合(16,5)汉明码的编码规则。由于可以多个CLB共用一个校验纠错器,因此实际的效果比如可以是一个CLB使用一个采用(8,4)编码的校验纠错器,两个CLB共用一个采用(8+8,5)编码的校验纠错器,四个CLB共用(8+8+8+8,6)编码的校验纠错器等等。The input data of the N programmable logic registers corresponding to the check error corrector will be sent to the check error corrector, specifically sent to the input terminal of the check code generation circuit, and the N input terminals of the check code generation circuit will obtain After receiving N input data, perform ECC encoding on the N input data to generate M check codes. The values of M and N conform to the encoding rules of ECC encoding. In one embodiment, the ECC encoding adopted by the check code generation circuit is a Hamming code, and the values of M and N conform to the coding rules of the corresponding digit Hamming code, such as common N=8, M=4 so as to meet (8 , 4) the encoding rule of Hamming code, for example again N=4, M=3 meet the encoding rule of (4,3) Hamming code, for example again N=16, M=5 meet the encoding rule of (16,5) Hamming code . Since multiple CLBs can share a check error corrector, the actual effect can be that one CLB uses a check error corrector encoded with (8,4), and two CLBs share a check error corrector that uses (8+8,5) ) coded check error corrector, four CLBs share (8+8+8+8, 6) coded check error corrector and so on.
每个校验码寄存器根据校验纠错器对应的可编程逻辑寄存器的时钟信号刷新写入对应的校验码,校验码寄存器刷新写入校验码的含义与可编程逻辑寄存器类似,也即在时钟信号的上升沿或下降沿时刷新写入,因此输入数据和校验码会分别同步分存到可编程逻辑寄存器和校验码寄存器。Each check code register refreshes and writes the corresponding check code according to the clock signal of the programmable logic register corresponding to the check error corrector, and the meaning of refreshing and writing the check code in the check code register is similar to that of the programmable logic register. That is, it is refreshed and written on the rising or falling edge of the clock signal, so the input data and the check code will be synchronously divided into the programmable logic register and the check code register respectively.
N个可编程逻辑寄存器输出端的信号和M个校验码寄存器输出端的信号总共形成N+M位码被传输到校验电路,校验电路采用与ECC编码匹配的校验电路,比如在采用汉明码的基础上,校验电路一般采用奇偶校验电路。校验电路根据获取到的N+M位码生成校验信号(Syndrome),校验信号用于指示N+M个寄存器中存在数据错误的故障寄存器,故障寄存器可能是可编程逻辑寄存器也可能是校验码寄存器,从而可以实现校验检错的功能。需要说明的是,图1只是输出了电路之间的连接关系,而并不表示N+M位码的排布顺序,实际N+M位码中各位码的顺序根据编码准则来确定。The signals at the output terminals of N programmable logic registers and the signals at the output terminals of M verification code registers form a total of N+M bit codes and are transmitted to the verification circuit. The verification circuit adopts a verification circuit that matches the ECC code. On the basis of plain code, the check circuit generally adopts a parity check circuit. The verification circuit generates a verification signal (Syndrome) according to the acquired N+M bit code. The verification signal is used to indicate a faulty register with data error in the N+M registers. The faulty register may be a programmable logic register or a The check code register, so that the function of check and error detection can be realized. It should be noted that Figure 1 only outputs the connection relationship between the circuits, but does not indicate the arrangement order of the N+M bit codes. The actual order of the bit codes in the N+M bit codes is determined according to the coding rule.
解码电路可以对校验信号进行解码得到N+M位解码结果,每一位解码结果对应N+M个寄存器中的一个寄存器,且故障寄存器对应的一位解码结果为有效电平,其余各位的解码结果均为无效电平,比较典型的,无效电平为0、有效电平为1,则可以利用有效电平翻转故障寄存器。由于要用于翻转故障寄存器,因电路考虑,故而利用使能端的触发电路控制解码后信号的波形,将N+M位解码结果处理为脉冲形式。触发电路可以采用常见的one-shot电路,其在不使能的时候默认为0,此时解码电路输出无效电平,也即所有寄存器都不翻转,当要使能时,触发电路输出一个预定脉冲宽度的触发使能脉冲使能解码电路,使得解码电路输出校验信号对应的具有预定脉冲宽度的N+M个翻转信号,其中与故障寄存器对应的一个翻转信号输出预定脉冲宽度的有效电平,其余翻转信号持续输出无效电平,从而控制N+M个寄存器中的故障寄存器直接异步翻转内容以纠正错误、不需要等待时钟信号到来,实现对故障寄存器的纠错。因此在本申请中,在对故障寄存器进行纠错时,纠错更新的内容与时钟信号写入的数据不同,并不是直接重新写入刷新。其中,触发电路输出的触发使能脉冲 之间至少间隔预定等待时长,该预定等待时长大于校验纠错器根据纠错后的数据更新翻转信号的时长,从而可以使得对故障寄存器纠错后的数据有时间传到校验纠错器重新进行校验纠错,避免出现连续脉冲导致连续就错的情况。比较典型的做法可以利用定时器来控制,则校验纠错器还包括定时器,通过定时器控制所述触发电路输出的触发使能脉冲之间的间隔。The decoding circuit can decode the verification signal to obtain the decoding result of N+M bits. Each bit of the decoding result corresponds to one of the N+M registers, and the decoding result of one bit corresponding to the fault register is an active level. The decoding results are all invalid levels. Typically, the invalid level is 0 and the active level is 1, and the active level can be used to flip the fault register. Because it is used to flip the fault register, due to circuit considerations, the trigger circuit at the enable end is used to control the waveform of the decoded signal, and the N+M bit decoding result is processed into a pulse form. The trigger circuit can use a common one-shot circuit, which defaults to 0 when it is not enabled. At this time, the decoding circuit outputs an invalid level, that is, all registers are not flipped. When it is enabled, the trigger circuit outputs a predetermined The trigger enable pulse of the pulse width enables the decoding circuit, so that the decoding circuit outputs N+M inversion signals with a predetermined pulse width corresponding to the verification signal, wherein one inversion signal corresponding to the fault register outputs an active level of a predetermined pulse width , and the rest of the flip signals continue to output invalid levels, so as to control the faulty registers in the N+M registers to directly flip the content asynchronously to correct errors, without waiting for the arrival of the clock signal, and realize the error correction of the faulty registers. Therefore, in this application, when error correction is performed on the fault register, the content of the error correction update is different from the data written by the clock signal, and it is not directly rewritten and refreshed. Wherein, there is at least a predetermined waiting period between the trigger enable pulses output by the trigger circuit, and the predetermined waiting period is longer than the time for which the check error corrector updates the flip signal according to the error-corrected data, so that the errors of the fault register can be corrected. The data has time to be transmitted to the verification and error corrector for re-verification and error correction, avoiding the situation where continuous pulses lead to continuous errors. A typical method can be controlled by a timer, and the error checking and correcting device further includes a timer, and the interval between the trigger enable pulses output by the trigger circuit is controlled by the timer.
在上述过程中,校验纠错器还需要避免与时钟周期正常写入的输入数据发生冲突,则当校验纠错器对应的可编程逻辑寄存器根据时钟信号刷新写入获取到的输入数据时,触发电路控制解码电路处于无效状态达到预定时长,从而避免翻转信号与时钟写入的数据发生冲突。在一个实施例中,解码电路处于无效状态的预定时长大于校验电路的输入端获取数据至解码电路的输出端产生信号之间的延时,也即需要等到校验纠错器的输出稳定,由于解码电路的输出不稳定时,解码结果是乱的不能用于控制寄存器,所以需要等到校验纠错器的输出也即解码电路的输出稳定。在另一个实施例中,解码电路处于无效时长大于翻转信号的脉冲宽度,以彻底避免冲突发生。In the above process, the verification error corrector also needs to avoid conflicts with the input data normally written in the clock cycle, then when the programmable logic register corresponding to the verification error corrector refreshes and writes the acquired input data according to the clock signal , the trigger circuit controls the decoding circuit to be in an invalid state for a predetermined period of time, so as to avoid conflicts between the inversion signal and the data written by the clock. In one embodiment, the predetermined duration of the decoding circuit being in the invalid state is longer than the delay between the input terminal of the verification circuit acquiring data and the output terminal of the decoding circuit generating a signal, that is, it is necessary to wait until the output of the verification error corrector is stable, When the output of the decoding circuit is unstable, the decoding result is messy and cannot be used to control the register, so it is necessary to wait until the output of the verification error corrector, that is, the output of the decoding circuit is stable. In another embodiment, the inactive time of the decoding circuit is longer than the pulse width of the toggle signal, so as to completely avoid conflicts.
如上所述,校验纠错器在工作过程中,校验码寄存器需要根据可编程逻辑寄存器的时钟信号刷新写入数据,触发电路还需要根据时钟信号控制解码电路无效以避免冲突,因此校验纠错器根据其对应的N个可编程逻辑寄存器的时钟信号进行工作。在一个实施例中,一个校验纠错器对应的N个可编程逻辑寄存器受控于同一个时钟信号,则校验纠错器根据一个时钟信号进行工作。在另一个实施例中,一个校验纠错器对应的N个可编程逻辑寄存器受控于至少两个不同的时钟信号,则校验纠错器根据所有的时钟信号进行工作,比如N个可编程逻辑寄存器中N1个受控于CLK1、N2个受控于CLK2,则校验码寄存器与N1个可编程逻辑寄存器一起根据CLK1进行刷新写入,校验码寄存器还与N2个可编程逻辑寄存器一起根据CLK2进行刷新写入,类似的,触发电路在CLK1对N1个可编程逻辑寄存器写入数据时控制解码电路处于无效状态,在CLK2对N2个可编程逻辑寄存器写入数据时也控制解码电路处于无效状态。As mentioned above, during the working process of the verification error corrector, the verification code register needs to refresh and write data according to the clock signal of the programmable logic register, and the trigger circuit also needs to control the decoding circuit to be invalid according to the clock signal to avoid conflicts, so the verification The error corrector works according to the clock signals of its corresponding N programmable logic registers. In one embodiment, the N programmable logic registers corresponding to one check and error corrector are controlled by the same clock signal, and then the check and error corrector works according to one clock signal. In another embodiment, the N programmable logic registers corresponding to a check and error corrector are controlled by at least two different clock signals, and then the check and error corrector works according to all clock signals, such as N programmable logic registers N1 of the programming logic registers are controlled by CLK1 and N2 are controlled by CLK2, then the check code register and the N1 programmable logic registers are refreshed and written according to CLK1, and the check code register is also connected with the N2 programmable logic registers Refresh and write together according to CLK2. Similarly, the trigger circuit controls the decoding circuit to be in an invalid state when CLK1 writes data to N1 programmable logic registers, and also controls the decoding circuit when CLK2 writes data to N2 programmable logic registers. is in an invalid state.
在上述方法的应用过程中,一个校验纠错器对应的N个可编程逻辑寄存器都用于实现用户设计,或者,部分可编程逻辑寄存器用于实现用户设计,则未用于实现用户设计的可编程逻辑寄存器的输入数据恒为无效电平也即接0,并不影响上述检纠错过程的实现。In the application process of the above method, the N programmable logic registers corresponding to a check error corrector are all used to realize the user design, or part of the programmable logic registers are used to realize the user design, and are not used to realize the user design. The input data of the programmable logic register is always at an invalid level, that is, connected to 0, which does not affect the realization of the above error detection and correction process.
用于实现用户设计的可编程逻辑寄存器的输入数据来自于所属的可编程逻 辑模块的内部和/或外部,来自于可编程逻辑模块的内部的输入数据产生于查找表、进位链、数据选择器和触发器中的至少一种,N个可编程逻辑寄存器的输入数据的来源可以相同也可以不同,也即可以有些可编程逻辑寄存器的输入数据来自于所在可编程逻辑模块的外部、有些可编程逻辑寄存器的输入数据来自于内部的一个查找表、有些来自于内部的另一个查找表、有些来自于内部的进位链等等。在一个实施例中,一个可编程逻辑寄存器的输入数据来自于的可编程逻辑模块的外部或查找表,则可编程逻辑寄存器的输入端连接到可编程逻辑模块的模块输入口和查找表输出,并经由配置位进行选择实际选用的一路输入数据。如图2所示,以8个可编程逻辑寄存器都位于同一个可编程逻辑模块内,该可编程逻辑模块内有8个六输入查找表LUT6-0~LUT6-7,各个查找表的输入分别为A、B、C、D、E、F、G、H共8组信号,每组信号的宽度为6位,各个查找表的输出分别为L0~L7。8个可编程逻辑寄存器的输入数据r0~r7有两个来源,一个是模块输入口的输入X0~X7,一个是各个查找表的输出L0~L7,各个可编程逻辑寄存器的输入可经由配置位分别独立选择。The input data of the programmable logic register used to realize the user design comes from the inside and/or outside of the programmable logic module to which it belongs, and the input data from the inside of the programmable logic module is generated from the look-up table, the carry chain, and the data selector And at least one of the flip-flops, the source of the input data of the N programmable logic registers can be the same or different, that is, the input data of some programmable logic registers can come from the outside of the programmable logic module where they are located, and some can be programmed The input data of the logic register comes from an internal look-up table, some from another internal look-up table, some from the internal carry chain, and so on. In one embodiment, the input data of a programmable logic register comes from the outside of the programmable logic module or the look-up table, then the input end of the programmable logic register is connected to the module input port and the look-up table output of the programmable logic module, And through the configuration bits to select the actual selected input data. As shown in Figure 2, the eight programmable logic registers are all located in the same programmable logic module, and there are eight six-input look-up tables LUT6-0~LUT6-7 in the programmable logic module, and the inputs of each look-up table are respectively There are 8 groups of signals A, B, C, D, E, F, G, and H. The width of each group of signals is 6 bits, and the output of each lookup table is L0~L7. The input data of 8 programmable logic registers There are two sources of r0~r7, one is the input X0~X7 of the input port of the module, and the other is the output L0~L7 of each look-up table. The input of each programmable logic register can be independently selected through the configuration bits.
在实际应用时,在FPGA上电过程未完成、或者码流配置未完成、或者初始化未完成而使得FPGA未进入正常工作模式时,校验纠错器处于无效状态。当FPGA进入正常工作模式后,校验纠错器开始工作、并按照如上记载的方法进行校验纠错。In actual application, when the power-on process of the FPGA is not completed, or the configuration of the code stream is not completed, or the initialization is not completed, so that the FPGA does not enter the normal working mode, the check error corrector is in an invalid state. When the FPGA enters the normal working mode, the verification error corrector starts to work, and performs verification and error correction according to the method described above.
在一个实例中,校验纠错器对应8个可编程逻辑寄存器,在采用(8.4)汉明码的基础上,校验码生成电路对8个可编程逻辑寄存器的输入数据r0,r1,r2,r3,r4,r5,r6,r7产生4个校验码p1,p2,p4,p8,8个输入数据和4个校验码形成12位编码记为{c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12},其组成方式为{p1,p2,r0,p4,r1,r2,r3,p8,r4,r5,r6,r7},亦即c1=p1、c2=p2、c3=r0、c4=p4、c5=r1、c6=r2、c7=r3、c8=p8、c9=r4、c10=r5、c11=r6、c12=r7。编码时,产生4个校验码的方法为:选取p1使得XOR(c1,c3,c5,c7,c9,c11)的结果为0(偶数)亦即,p1=c1=XOR(c3,c5,c7,c9,c11),选取p2使得XOR(c2,c3,c6,c7,c10,c11)的结果为0(偶数)亦即,p2=c2=XOR(c3,c6,c7,c10,c11),选取p4使得XOR(c4,c5,c6,c7,c12)的结果为0(偶数)亦即,p4=c4=XOR(c5,c6,c7,c12),选取p8使得XOR(c8,c9,c10,c11,c12)的结果为0(偶数)亦即,p8=c8=XOR(c9,c10,c11,c12)。这12位编码在时钟信号的控制下写入寄存器。In one example, the check error corrector corresponds to 8 programmable logic registers. On the basis of using (8.4) Hamming code, the check code generation circuit performs input data r0, r1, r2, r3, r4, r5, r6, r7 generate 4 check codes p1, p2, p4, p8, 8 input data and 4 check codes to form a 12-bit code as {c1, c2, c3, c4, c5, c6,c7,c8,c9,c10,c11,c12}, its composition is {p1,p2,r0,p4,r1,r2,r3,p8,r4,r5,r6,r7}, namely c1=p1 , c2=p2, c3=r0, c4=p4, c5=r1, c6=r2, c7=r3, c8=p8, c9=r4, c10=r5, c11=r6, c12=r7. During encoding, the method of generating 4 check codes is: select p1 so that the result of XOR(c1,c3,c5,c7,c9,c11) is 0 (even number), that is, p1=c1=XOR(c3,c5, c7, c9, c11), select p2 so that the result of XOR (c2, c3, c6, c7, c10, c11) is 0 (even number), that is, p2 = c2 = XOR (c3, c6, c7, c10, c11) , choose p4 so that the result of XOR(c4,c5,c6,c7,c12) is 0 (even number), that is, p4=c4=XOR(c5,c6,c7,c12), choose p8 so that XOR(c8,c9, The result of c10, c11, c12) is 0 (even number), that is, p8=c8=XOR(c9, c10, c11, c12). This 12-bit code is written into the register under the control of the clock signal.
在校验纠错时,检查被写入的12位编码{c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12}, 可编程逻辑寄存器的输出Q0,Q1,Q2,Q3,Q4,Q5,Q6,Q7与校验寄存器的输出P1,P2,P4,P8,其组成方式为{P1,P2,Q0,P4,Q1,Q2,Q3,P8,Q4,Q5,Q6,Q7},亦即c1=P1、c2=P2、c3=Q0、c4=P4、c5=Q1、c6=Q2、c7=Q3、c8=P8、c9=Q4、c10=Q5、c11=Q6、c12=Q7。此时P8,P4,P2,P1可看作校验信号(Syndrome),若此4位都为0,则表示所有内容正确无错,否则这4位信号指示存在数据错误的故障寄存器,比如P8,P4,P2,P1=0110则表示c6对应的寄存器出错为故障寄存器。When verifying and correcting, check the written 12-bit code {c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12}, the output of the programmable logic register Q0, Q1 ,Q2,Q3,Q4,Q5,Q6,Q7 and the output P1,P2,P4,P8 of the check register, the composition of which is {P1,P2,Q0,P4,Q1,Q2,Q3,P8,Q4,Q5 , Q6, Q7}, namely c1=P1, c2=P2, c3=Q0, c4=P4, c5=Q1, c6=Q2, c7=Q3, c8=P8, c9=Q4, c10=Q5, c11= Q6, c12=Q7. At this time, P8, P4, P2, and P1 can be regarded as the verification signal (Syndrome). If these 4 bits are all 0, it means that all the contents are correct and error-free, otherwise the 4-bit signal indicates that there is a faulty register with data error, such as P8 , P4, P2, P1 = 0110 means that the register corresponding to c6 is wrong and is the fault register.
将校验信号P8,P4,P2,P1输入到4到12位的解码器,该解码器在触发使能脉冲作用下生成{f0,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11}的翻转信号,只有对应故障寄存器的一位翻转信号为高电平、其余均为0。比如在上述举例中,c6对应故障寄存器,则输出的翻转信号只有对应的f6这一位为1,其余都为0,输出的翻转信号为{0,0,0,0,0,0,1,0,0,0,0,0}。Input the verification signals P8, P4, P2, P1 to the 4 to 12-bit decoder, which generates {f0, f1, f2, f3, f4, f5, f6, f7, f8 under the action of the trigger enable pulse , f9, f10, f11}, only one bit of the flip signal corresponding to the fault register is at high level, and the rest are all 0. For example, in the above example, c6 corresponds to the fault register, and the output flip signal has only the corresponding bit of f6 as 1, and the rest are 0, and the output flip signal is {0,0,0,0,0,0,1 ,0,0,0,0,0}.

Claims (12)

  1. 一种具有对可编程逻辑模块自动检纠错功能的FPGA,其特征在于,所述FPGA包括可编程逻辑模块以及校验纠错器,所述可编程逻辑模块内部包括若干个可编程逻辑寄存器,每个所述可编程逻辑寄存器根据时钟信号刷新写入获取到的输入数据;所述校验纠错器包括校验码生成电路、M个校验码寄存器、校验电路、解码电路以及触发电路:An FPGA with automatic error detection and correction functions for programmable logic modules is characterized in that the FPGA includes a programmable logic module and a check error corrector, and the programmable logic module includes several programmable logic registers inside, Each of the programmable logic registers refreshes and writes the acquired input data according to the clock signal; the verification error corrector includes a verification code generating circuit, M verification code registers, a verification circuit, a decoding circuit and a trigger circuit :
    所述校验码生成电路的N个输入端分别连接对应的N个可编程逻辑寄存器的输入端获取N个输入数据,所述校验码生成电路的M个输出端分别连接所述M个校验码寄存器,所述校验码生成电路对N个输入数据进行ECC编码生成M个校验码,每个所述校验码寄存器根据所述校验纠错器对应的可编程逻辑寄存器的时钟信号刷新写入对应的校验码;The N input ends of the check code generation circuit are respectively connected to the input ends of the corresponding N programmable logic registers to obtain N input data, and the M output ends of the check code generation circuit are respectively connected to the M calibration registers. A check code register, the check code generation circuit performs ECC encoding on N input data to generate M check codes, each of the check code registers is based on the clock of the programmable logic register corresponding to the check error corrector The signal refreshes and writes the corresponding check code;
    所述N个可编程逻辑寄存器以及所述M个校验码寄存器的输出端均连接到所述校验电路的输入端,所述校验电路的输出端连接所述解码电路的输入端提供校验信号,所述校验信号用于指示N+M个寄存器中存在数据错误的故障寄存器;The output terminals of the N programmable logic registers and the M check code registers are connected to the input terminals of the verification circuit, and the output terminals of the verification circuit are connected to the input terminals of the decoding circuit to provide calibration. A check signal, the check signal is used to indicate that there is a faulty register with data error in the N+M registers;
    所述触发电路连接所述解码电路的使能端,所述解码电路根据所述触发电路的触发使能脉冲生成所述校验信号对应的具有预定脉冲宽度的N+M个翻转信号,并分别输出给所述N个可编程逻辑寄存器以及所述M个校验码寄存器控制其中的故障寄存器直接异步翻转内容以纠正错误。The trigger circuit is connected to the enabling terminal of the decoding circuit, and the decoding circuit generates N+M inversion signals with a predetermined pulse width corresponding to the verification signal according to the trigger enabling pulse of the trigger circuit, and respectively Output to the N programmable logic registers and the M check code registers to control the fault registers to directly reverse the content asynchronously to correct errors.
  2. 根据权利要求1所述的FPGA,其特征在于,FPGA according to claim 1, is characterized in that,
    当所述校验纠错器对应的可编程逻辑寄存器根据时钟信号刷新写入获取到的输入数据时,所述触发电路控制所述解码电路处于无效状态达到预定时长。When the programmable logic register corresponding to the verification error corrector refreshes and writes the acquired input data according to the clock signal, the trigger circuit controls the decoding circuit to be in an invalid state for a predetermined duration.
  3. 根据权利要求2所述的FPGA,其特征在于,FPGA according to claim 2, is characterized in that,
    所述解码电路处于无效状态的预定时长大于所述校验电路的输入端获取数据至所述解码电路的输出端产生信号之间的延时。The predetermined time period during which the decoding circuit is in the invalid state is longer than the delay between when the input end of the verification circuit acquires data and when the output end of the decoding circuit generates a signal.
  4. 根据权利要求2所述的FPGA,其特征在于,FPGA according to claim 2, is characterized in that,
    所述无效时长大于所述翻转信号的脉冲宽度。The invalid duration is longer than the pulse width of the toggle signal.
  5. 根据权利要求1所述的FPGA,其特征在于,FPGA according to claim 1, is characterized in that,
    所述触发电路输出的触发使能脉冲之间至少间隔预定等待时长,所述预定 等待时长大于所述校验纠错器根据纠错后的数据更新翻转信号的时长。The trigger enable pulses output by the trigger circuit are at least separated by a predetermined waiting period, and the predetermined waiting period is longer than the period for which the verification error corrector updates the flip signal according to the error-corrected data.
  6. 根据权利要求5所述的FPGA,其特征在于,FPGA according to claim 5, is characterized in that,
    所述校验纠错器还包括定时器,通过所述定时器控制所述触发电路输出的触发使能脉冲之间的间隔。The verification error corrector further includes a timer, and the interval between the trigger enable pulses output by the trigger circuit is controlled by the timer.
  7. 根据权利要求1所述的FPGA,其特征在于,FPGA according to claim 1, is characterized in that,
    一个校验纠错器对应的N个可编程逻辑寄存器包含在同一个可编程逻辑模块内,或者,包含在至少两个不同的可编程逻辑模块内。The N programmable logic registers corresponding to a parity and error corrector are contained in the same programmable logic module, or contained in at least two different programmable logic modules.
  8. 根据权利要求1所述的FPGA,其特征在于,FPGA according to claim 1, is characterized in that,
    一个校验纠错器对应的N个可编程逻辑寄存器受控于同一个时钟信号;The N programmable logic registers corresponding to a parity error corrector are controlled by the same clock signal;
    或者,一个校验纠错器对应的N个可编程逻辑寄存器受控于至少两个不同的时钟信号,则所述校验纠错器根据所有的时钟信号进行工作。Alternatively, the N programmable logic registers corresponding to a check and error corrector are controlled by at least two different clock signals, and the check and error corrector works according to all clock signals.
  9. 根据权利要求1-8任一所述的FPGA,其特征在于,According to the arbitrary described FPGA of claim 1-8, it is characterized in that,
    一个校验纠错器对应的N个可编程逻辑寄存器都用于实现用户设计,或者,部分可编程逻辑寄存器用于实现用户设计,则未用于实现用户设计的可编程逻辑寄存器的输入数据恒为无效电平。The N programmable logic registers corresponding to a check error corrector are all used to realize the user design, or part of the programmable logic registers are used to realize the user design, and the input data of the programmable logic registers that are not used to realize the user design are constant is an invalid level.
  10. 根据权利要求1-8所述的FPGA,其特征在于,According to the described FPGA of claim 1-8, it is characterized in that,
    用于实现用户设计的可编程逻辑寄存器的输入数据来自于所属的可编程逻辑模块的内部和/或外部,来自于可编程逻辑模块的内部的输入数据产生于查找表、进位链、数据选择器和触发器中的至少一种。The input data of the programmable logic register used to realize the user design comes from the inside and/or outside of the programmable logic module to which it belongs, and the input data from the inside of the programmable logic module is generated from the look-up table, the carry chain, and the data selector and at least one of triggers.
  11. 根据权利要求1-8任一所述的FPGA,其特征在于,According to the arbitrary described FPGA of claim 1-8, it is characterized in that,
    所述校验码生成电路采用的ECC编码为汉明码,且M和N的取值符合相应位数汉明码的编码规则。The ECC code adopted by the verification code generation circuit is a Hamming code, and the values of M and N conform to the coding rule of the corresponding digit Hamming code.
  12. 根据权利要求1-8任一所述的FPGA,其特征在于,According to the arbitrary described FPGA of claim 1-8, it is characterized in that,
    在所述FPGA上电过程未完成、或者码流配置未完成、或者初始化未完成而使得所述FPGA未进入正常工作模式时,所述校验纠错器处于无效状态;当所述FPGA进入正常工作模式后,所述校验纠错器进行校验纠错。When the power-on process of the FPGA is not completed, or the code stream configuration is not completed, or the initialization is not completed so that the FPGA does not enter the normal operating mode, the verification error corrector is in an invalid state; when the FPGA enters the normal After the working mode, the verification and error corrector performs verification and error correction.
PCT/CN2021/128310 2021-08-19 2021-11-03 Fpga having automatic error checking and correcting function for programmable logic module WO2023019742A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/457,440 US11604692B2 (en) 2021-08-19 2021-12-03 Field programmable gate array (FPGA) with automatic error detection and correction function for programmable logic modules

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110953116.7 2021-08-19
CN202110953116.7A CN113608918B (en) 2021-08-19 2021-08-19 FPGA with automatic error checking and correcting function for programmable logic module

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/457,440 Continuation US11604692B2 (en) 2021-08-19 2021-12-03 Field programmable gate array (FPGA) with automatic error detection and correction function for programmable logic modules

Publications (1)

Publication Number Publication Date
WO2023019742A1 true WO2023019742A1 (en) 2023-02-23

Family

ID=78341248

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/128310 WO2023019742A1 (en) 2021-08-19 2021-11-03 Fpga having automatic error checking and correcting function for programmable logic module

Country Status (2)

Country Link
CN (1) CN113608918B (en)
WO (1) WO2023019742A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117435426A (en) * 2023-10-18 2024-01-23 成都观岩科技有限公司 Method for checking overflow of serial data in chip

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114996050B (en) * 2022-08-01 2022-10-25 中科亿海微电子科技(苏州)有限公司 Parameter-configurable automatic error detection and correction circuit and error detection and correction method
CN116974813B (en) * 2023-09-25 2024-04-19 南方电网数字电网研究院有限公司 Register data management method and device, register module and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097628A1 (en) * 2001-10-11 2003-05-22 Ngo Ninh D. Error detection on programmable logic resources
CN105760250A (en) * 2016-02-04 2016-07-13 北京时代民芯科技有限公司 Single-event reinforced FPGA configuration circuit with code stream error detection and error correction function
CN110727543A (en) * 2019-09-19 2020-01-24 中国船舶重工集团公司第七0七研究所 Commercial asymmetric cryptographic algorithm hardware module
CN111143107A (en) * 2019-11-13 2020-05-12 广东高云半导体科技股份有限公司 FPGA single event reversal verification circuit and method
CN111176884A (en) * 2019-12-30 2020-05-19 西安智多晶微电子有限公司 SEC (Security and Security) verification method and device for FPGA (field programmable Gate array) configuration memory
CN111597073A (en) * 2020-06-24 2020-08-28 上海安路信息科技有限公司 FPGA single event upset error correction method and circuit

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107710325A (en) * 2015-12-31 2018-02-16 京微雅格(北京)科技有限公司 A kind of FPGA circuitry and its configuration file processing method
CN106301334B (en) * 2016-08-25 2023-05-30 广东高云半导体科技股份有限公司 SRAM type FPGA device single-particle inversion detection and error correction circuit

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097628A1 (en) * 2001-10-11 2003-05-22 Ngo Ninh D. Error detection on programmable logic resources
CN105760250A (en) * 2016-02-04 2016-07-13 北京时代民芯科技有限公司 Single-event reinforced FPGA configuration circuit with code stream error detection and error correction function
CN110727543A (en) * 2019-09-19 2020-01-24 中国船舶重工集团公司第七0七研究所 Commercial asymmetric cryptographic algorithm hardware module
CN111143107A (en) * 2019-11-13 2020-05-12 广东高云半导体科技股份有限公司 FPGA single event reversal verification circuit and method
CN111176884A (en) * 2019-12-30 2020-05-19 西安智多晶微电子有限公司 SEC (Security and Security) verification method and device for FPGA (field programmable Gate array) configuration memory
CN111597073A (en) * 2020-06-24 2020-08-28 上海安路信息科技有限公司 FPGA single event upset error correction method and circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117435426A (en) * 2023-10-18 2024-01-23 成都观岩科技有限公司 Method for checking overflow of serial data in chip
CN117435426B (en) * 2023-10-18 2024-05-07 成都观岩科技有限公司 Method for checking overflow of serial data in chip

Also Published As

Publication number Publication date
CN113608918B (en) 2023-04-28
CN113608918A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
WO2023019742A1 (en) Fpga having automatic error checking and correcting function for programmable logic module
US7310759B1 (en) Techniques for mitigating, detecting, and correcting single event upset effects in systems using SRAM-based field programmable gate arrays
US8332722B1 (en) Method and architecture for performing scrubbing of an FPGA's configuration memory
TW201727662A (en) Memory architecture with ECC and method for operating memory with ECC
US9811429B2 (en) Microcontroller utilizing redundant address decoders and electronic control device using the same
US10725841B1 (en) Method and apparatus for error detection and correction
CN111143107B (en) FPGA single event reversal verification circuit and method
JP2019008781A (en) High data integrity processing system
Dutta et al. Reliable network-on-chip using a low cost unequal error protection code
Gao et al. Design and implementation of configuration memory SEU-tolerant viterbi decoders in SRAM-based FPGAs
Gul et al. Joint crosstalk aware burst error fault tolerance mechanism for reliable on-chip communication
Suma et al. Simulation and synthesis of efficient majority logic fault detector using EG-LDPC codes to reduce access time for memory applications
Ebrahim et al. On enhancing the reliability of internal configuration controllers in FPGAs
Dang et al. Parity-based ECC and mechanism for detecting and correcting soft errors in on-chip communication
US10318376B2 (en) Integrated circuit and programmable device
US11604692B2 (en) Field programmable gate array (FPGA) with automatic error detection and correction function for programmable logic modules
JP2003316599A (en) Integrated circuit
Dang et al. An adaptive and high coding rate soft error correction method in Network-on-Chips
JP3895118B2 (en) Single event upset compensation circuit
US6711712B2 (en) Method and apparatus for error detection/correction
Aydos et al. Empirical results on parity-based soft error detection with software-based retry
JP2016009893A (en) Improper data detection device and improper data detection method
US11971780B2 (en) Data error correction circuit and data transmission circuit
Gao et al. HCER: A High Cost-Effectiveness Multi-Bit Fault-Tolerant NoC Router
Taube et al. Fault tolerant implementation of a SpaceWire interface

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21953978

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE