[go: up one dir, main page]

CN118672822A - FPGA soft error resistance method and device - Google Patents

FPGA soft error resistance method and device Download PDF

Info

Publication number
CN118672822A
CN118672822A CN202310261658.7A CN202310261658A CN118672822A CN 118672822 A CN118672822 A CN 118672822A CN 202310261658 A CN202310261658 A CN 202310261658A CN 118672822 A CN118672822 A CN 118672822A
Authority
CN
China
Prior art keywords
fpga
error correction
error
verification
mode
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310261658.7A
Other languages
Chinese (zh)
Inventor
何小初
俞剑
潘青彪
陈宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Fudan Microelectronics Group Co Ltd
Original Assignee
Shanghai Fudan Microelectronics Group Co Ltd
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 Shanghai Fudan Microelectronics Group Co Ltd filed Critical Shanghai Fudan Microelectronics Group Co Ltd
Priority to CN202310261658.7A priority Critical patent/CN118672822A/en
Publication of CN118672822A publication Critical patent/CN118672822A/en
Pending legal-status Critical Current

Links

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
    • 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/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/34Circuit design for reconfigurable circuits, e.g. field programmable gate arrays [FPGA] or programmable logic devices [PLD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Computer Security & Cryptography (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

A method and a device for resisting soft errors of an FPGA, the method comprises the following steps: after the FPGA is loaded, reading back loading data of the FPGA; performing readback verification on the loading data, wherein the readback verification comprises ECC verification and CRC verification; during the read-back verification, error correction is performed by triggering a reload event for the detected multi-bit error. By utilizing the scheme of the invention, the detection and the error correction of the FPGA soft errors can be effectively realized.

Description

FPGA抗软错误的方法及装置FPGA soft error resistance method and device

技术领域Technical Field

本发明涉及FPGA(Field Programmable Gate Array,现场可编程门阵列)检测技术领域,具体地涉及一种FPGA抗软错误的方法及装置。The present invention relates to the field of FPGA (Field Programmable Gate Array) detection technology, and in particular to a method and device for FPGA soft error resistance.

背景技术Background Art

FPGA是专用集成电路中的一种半定制电路,FPGA由逻辑单元、RAM(Random AccessMemory,随机存取存储器)、乘法器等硬件资源组成,通过将这些硬件资源合理组织,可实现乘法器、寄存器、地址发生器等硬件电路。由于FPGA具有布线资源丰富,可重复编程和集成度高,投资较低的特点,在数字电路设计领域得到了广泛的应用。FPGA is a semi-customized circuit in application-specific integrated circuits. FPGA consists of logic units, RAM (Random Access Memory), multipliers and other hardware resources. By organizing these hardware resources reasonably, hardware circuits such as multipliers, registers, and address generators can be realized. FPGA has been widely used in the field of digital circuit design because of its rich wiring resources, repeatable programming, high integration, and low investment.

FPGA的设计流程包括算法设计、代码仿真以及设计、板机调试。位流生成是FPGA设计流程中的步骤,该步骤会生成能下载到FPGA芯片中的位流,这样FPGA芯片中即能形成相应的电路结构以实现预期的电路功能。FPGA在下载位流后,由于应用环境中的辐射、FPGA受到特定干扰、封装材料等诱因,可能会发生软错误,即位流中某些比特位翻转,从而会导致FPGA功能发生错误。因此,准确发现位流中的软错误并对其进行纠正是保证FPGA功能的关键。The design process of FPGA includes algorithm design, code simulation, design, and board debugging. Bitstream generation is a step in the FPGA design process, which generates a bitstream that can be downloaded to the FPGA chip, so that the corresponding circuit structure can be formed in the FPGA chip to achieve the expected circuit function. After the FPGA downloads the bitstream, soft errors may occur due to radiation in the application environment, specific interference to the FPGA, packaging materials and other inducements, that is, some bits in the bitstream are flipped, which will cause errors in the FPGA function. Therefore, accurately discovering soft errors in the bitstream and correcting them is the key to ensuring the function of the FPGA.

发明内容Summary of the invention

本发明实施例提供一种FPGA抗软错误的方法及装置,可以有效地实现对FPGA软错误的检测和纠错。The embodiment of the present invention provides a method and device for FPGA soft error resistance, which can effectively realize the detection and correction of FPGA soft errors.

为此,本发明实施例提供如下技术方案:To this end, the embodiment of the present invention provides the following technical solutions:

一方面,本发明实施例提供一种FPGA抗软错误的方法,所述方法包括:In one aspect, an embodiment of the present invention provides a method for FPGA soft error resistance, the method comprising:

在FPGA加载完成后,回读FPGA的加载数据;After the FPGA is loaded, read back the loaded data of the FPGA;

对所述加载数据进行回读校验,所述回读校验包括ECC校验和CRC校验;Performing a read-back check on the loaded data, the read-back check comprising an ECC check and a CRC check;

在回读校验过程中,对于检测到的多比特错误,通过触发重新加载事件进行纠错。During the readback verification process, for detected multi-bit errors, error correction is performed by triggering a reload event.

可选地,所述对于检测到的多比特错误,通过触发重新加载事件进行纠错包括:Optionally, the correcting the detected multi-bit error by triggering a reload event includes:

在每次检测到多比特错误时,累计出现多比特错误的次数,得到累计值;Each time a multi-bit error is detected, the number of times the multi-bit error occurs is accumulated to obtain an accumulated value;

在所述累计值达到设定阈值时,触发重新加载事件。When the accumulated value reaches a set threshold, a reload event is triggered.

可选地,所述方法还包括:预先设置上电模式,所述上电模式包括:上电禁止操作模式、上电允许操作模式;Optionally, the method further comprises: presetting a power-on mode, the power-on mode comprising: a power-on prohibition operation mode and a power-on permission operation mode;

所述在FPGA加载完成后,回读FPGA的加载数据包括:After the FPGA is loaded, reading back the loaded data of the FPGA includes:

在上电禁止操作模式,在FPGA加载完成后,等待用户指令,并在接收到用户的校验指令后回读FPGA的加载数据;In the power-on disabled operation mode, after the FPGA is loaded, it waits for user instructions and reads back the loaded data of the FPGA after receiving the user's verification instruction;

在上电允许操作模式,在FPGA加载完成后,立即回读FPGA的加载数据。In the power-on enabled operation mode, after the FPGA is loaded, the loaded data of the FPGA is read back immediately.

可选地,所述方法还包括:配置纠错模式;Optionally, the method further comprises: configuring an error correction mode;

在回读校验过程中,根据当前纠错模式进行纠错操作。During the readback verification process, error correction operations are performed according to the current error correction mode.

可选地,所述配置纠错模式包括:将用于指示所述纠错模式的数据写入控制寄存器;Optionally, configuring the error correction mode includes: writing data indicating the error correction mode into a control register;

所述方法还包括:通过读取所述控制寄存器确定当前纠错模式。The method further includes determining a current error correction mode by reading the control register.

可选地,所述纠错模式包括以下任意一种或多种:停止、继续、纠错并停止、纠错并继续;Optionally, the error correction mode includes any one or more of the following: stop, continue, error correction and stop, error correction and continue;

所述根据当前纠错模式进行纠错操作包括:The error correction operation performed according to the current error correction mode includes:

如果当前纠错模式为停止模式,则在检测到当前帧数据错误时,停止回读校验进入等待状态直至触发复位事件;If the current error correction mode is the stop mode, when an error is detected in the current frame data, the readback check is stopped and the waiting state is entered until a reset event is triggered;

如果当前纠错模式为继续模式,则在检测到当前帧数据错误为1比特错误时,继续进行回读校验,直至触发复位事件或者重新加载事件;If the current error correction mode is the continue mode, when it is detected that the current frame data error is a 1-bit error, the readback check continues until a reset event or a reload event is triggered;

如果当前纠错模式为纠错并停止,则在检测到当前帧数据错误为1比特错误时,进行纠错回写,并在当前纠错回写完成后进入等待状态直至触发复位事件;在检测到当前帧数据错误为多比特错误时,进入等待状态直至触发复位事件;If the current error correction mode is error correction and stop, then when it is detected that the current frame data error is a 1-bit error, error correction write-back is performed, and after the current error correction write-back is completed, the system enters a waiting state until a reset event is triggered; when it is detected that the current frame data error is a multi-bit error, the system enters a waiting state until a reset event is triggered;

如果当前纠错模式为纠错并继续,则在检测到当前帧数据错误为1比特错误时,进行纠错回写,并在当前纠错回写完成后继续进行回读校验,直至触发复位事件或者重新加载事件。If the current error correction mode is error correction and continue, when it is detected that the current frame data error is a 1-bit error, error correction write-back is performed, and after the current error correction write-back is completed, read-back verification is continued until a reset event or a reload event is triggered.

可选地,所述方法还包括:在检测到当前帧位流错误时,进行错误提示。Optionally, the method further comprises: providing an error prompt when an error in the current frame bit stream is detected.

可选地,在FPGA加载完成后,回读FPGA的加载数据包括:在FPGA加载并完成用户配置后,回读FPGA的加载数据。Optionally, after the FPGA is loaded, reading back the loaded data of the FPGA includes: after the FPGA is loaded and the user configuration is completed, reading back the loaded data of the FPGA.

可选地,所述方法还包括:在完成用户配置后,定时触发刷新事件。Optionally, the method further includes: after completing the user configuration, periodically triggering a refresh event.

可选地,触发重新加载事件后,重新进行FPGA加载;触发复位事件后,新开始回读FPGA的加载数据;触发刷新事件后,刷新FPGA的加载数据。Optionally, after a reload event is triggered, the FPGA is reloaded; after a reset event is triggered, the loaded data of the FPGA is read back anew; after a refresh event is triggered, the loaded data of the FPGA is refreshed.

可选地,所述方法还包括:接收到用户的重启指令后,触发重新加载事件。Optionally, the method further includes: triggering a reload event after receiving a restart instruction from the user.

另一方面,本发明实施例还提供一种FPGA抗软错误的装置,所述装置包括:On the other hand, an embodiment of the present invention further provides a device for FPGA to resist soft errors, the device comprising:

内存模块,用于存储FPGA的加载数据;Memory module, used to store the loading data of FPGA;

回读模块,用于在FPGA加载完成后,从所述内存模块中回读FPGA的加载数据;A read-back module, used to read back the loaded data of the FPGA from the memory module after the FPGA loading is completed;

校验模块,用于对所述加载数据进行回读校验,所述回读校验包括ECC校验和CRC校验;在回读校验过程中,对于检测到的多比特错误,通过触发重新加载事件进行纠错;A check module, used for performing a readback check on the loaded data, wherein the readback check includes an ECC check and a CRC check; during the readback check process, for a detected multi-bit error, error correction is performed by triggering a reload event;

加载模块,用于在所述校验模块触发重新加载事件后,重新进行FPGA加载。The loading module is used to reload the FPGA after the verification module triggers a reloading event.

可选地,所述校验模块在每次检测到多比特错误时,累计出现多比特错误的次数,得到累计值,在所述累计值达到设定阈值时,触发重新加载事件。Optionally, each time the verification module detects a multi-bit error, it accumulates the number of times the multi-bit error occurs to obtain a cumulative value, and triggers a reload event when the cumulative value reaches a set threshold.

可选地,所述装置还包括:寄存器,用于存储配置信息,所述配置信息包括:上电模式、和/或纠错模式;Optionally, the device further comprises: a register, configured to store configuration information, wherein the configuration information comprises: a power-on mode, and/or an error correction mode;

所述回读模块,用于在FPGA加载完成并完成用户配置后,读取所述寄存器,确定当前上电模式,并根据当前上电模式进行回读操作;The readback module is used to read the register after the FPGA is loaded and the user configuration is completed, determine the current power-on mode, and perform a readback operation according to the current power-on mode;

所述校验模块,用于在FPGA加载完成并完成用户配置后,读取所述寄存器,确定当前纠错模式,并根据当前纠错模式进行纠错操作。The verification module is used to read the register after the FPGA is loaded and the user configuration is completed, determine the current error correction mode, and perform error correction operations according to the current error correction mode.

可选地,所述装置还包括:刷新模块,用于定时刷新所述内存模块中FPGA的加载数据。Optionally, the device further comprises: a refresh module, used for periodically refreshing the loaded data of the FPGA in the memory module.

另一方面,本发明实施例还提供一种FPGA芯片,所述芯片在加载完成后,执行前面所述的FPGA抗软错误的方法。On the other hand, an embodiment of the present invention further provides an FPGA chip, which executes the above-mentioned FPGA soft error resistance method after loading.

本发明实施例提供的FPGA抗软错误的方法及装置,在FPGA加载完成后,通过回读FPGA的加载数据,对加载数据进行ECC校验和CRC校验,实现任意错误的检测和1比特错误的纠错。在回读校验过程中,对于检测到的1比特错误,可以直接在内存中纠正,而对于检测到的多比特错误,通过触发重新加载事件实现对多比特错误的纠正,从而有效提升了FPGA抗软错误的能力,保证了FPGA功能的有效性和准确性,为FPGA在各种干扰环境中的应用提供强有力的技术支持。The method and device for FPGA soft error resistance provided by the embodiment of the present invention, after the FPGA is loaded, reads back the loaded data of the FPGA, performs ECC check and CRC check on the loaded data, and realizes the detection of any error and the correction of 1-bit error. In the read-back verification process, the detected 1-bit error can be directly corrected in the memory, and the detected multi-bit error can be corrected by triggering a reload event, thereby effectively improving the FPGA's ability to resist soft errors, ensuring the effectiveness and accuracy of the FPGA function, and providing strong technical support for the application of FPGA in various interference environments.

进一步地,对于回读校验中检测到的多比特错误,可以在累计出现多比特错误的次数达到设定阈值时,再触发重新加载事件,可以进一步提高效率。Furthermore, for multi-bit errors detected in the readback check, a reload event may be triggered when the cumulative number of multi-bit errors reaches a set threshold, which may further improve efficiency.

进一步地,通过设置不同的纠错模式、上电模式,可以使用户根据需要,灵活方便地应用各种不同功能,增强了方案的灵活性。Furthermore, by setting different error correction modes and power-on modes, users can flexibly and conveniently apply various functions according to their needs, thereby enhancing the flexibility of the solution.

进一步地,通过定时刷新功能,可以实现多种不同层次的回读校验和纠错,更好地保证了FPGA功能的有效性和准确性。Furthermore, through the timed refresh function, multiple levels of readback verification and error correction can be achieved, better ensuring the effectiveness and accuracy of FPGA functions.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明实施例FPGA抗软错误的方法的一种流程图;FIG1 is a flow chart of a method for FPGA soft error resistance according to an embodiment of the present invention;

图2是本发明实施例FPGA抗软错误的方法的另一种流程图;FIG2 is another flow chart of a method for FPGA soft error resistance according to an embodiment of the present invention;

图3是本发明实施例FPGA抗软错误的装置的一种结构示意图;FIG3 is a schematic diagram of a structure of a device for FPGA soft error resistance according to an embodiment of the present invention;

图4是本发明实施例FPGA抗软错误的装置的另一种结构示意图;FIG4 is another schematic diagram of the structure of the device for FPGA anti-soft error according to an embodiment of the present invention;

图5是本发明实施例FPGA抗软错误的装置的另一种结构示意图。FIG. 5 is another schematic diagram of the structure of the FPGA soft error resistance device according to an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面将参考附图中示出的示例性实施方式来描述本发明的原理和精神。应当理解,描述这些实施方式仅仅是为了使本领域技术人员能够更好地理解进而实现本发明,而并非以任何方式限制本发明的范围。The principle and spirit of the present invention will be described below with reference to the exemplary embodiments shown in the accompanying drawings. It should be understood that these embodiments are described only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way.

在对FPGA位流错误检测中,最常用的就是CRC(Cyclic Redundancy Check,循环冗余检验)和ECC(Error Correction Code,错误校正码)组合检测。通常,FPGA位流中会自带一个CRC值,当位流下载到FPGA后,开启CRC校验功能,FPGA会开始回读位流计算CRC,计算完成后和位流中自带的CRC值进行对比,以此检测是否有错误。另外,在FPGA位流中,每一帧位流会带有一个ECC,ECC通常基于Hamming(汉明)码算法,用于检测并纠正单位内存错误。在现有技术中,考虑到硬件实现的复杂性和芯片成本,ECC校验通常只能实现纠一检二,即可以检测到每一帧位流中的1比特及2比特的错误,但是只能纠正1比特的错误。In the error detection of FPGA bit stream, the most commonly used is the combination of CRC (Cyclic Redundancy Check) and ECC (Error Correction Code). Usually, the FPGA bit stream will have a CRC value. When the bit stream is downloaded to the FPGA, the CRC check function is turned on. The FPGA will start to read back the bit stream to calculate the CRC. After the calculation is completed, it will be compared with the CRC value in the bit stream to detect whether there is an error. In addition, in the FPGA bit stream, each frame of the bit stream will have an ECC. ECC is usually based on the Hamming code algorithm and is used to detect and correct single-bit memory errors. In the prior art, considering the complexity of hardware implementation and chip cost, ECC checking can usually only achieve one correction and two detection, that is, it can detect 1-bit and 2-bit errors in each frame of the bit stream, but can only correct 1-bit errors.

基于上述ECC检测纠错能力的局限性,本发明实施例提供一种FPGA抗软错误的方法及装置,通过CRC算法实现FPGA位流中任意错误的检测,并且通过对每帧数据的ECC校验,实现1比特错误的检测与纠正和多比特错误的检测。在此基础上,通过对FPGA位流进行重新加载和/或定时刷新的操作,有效提升了FPGA抗软错误的能力,保证了加载位流后的FPGA功能的有效性和准确性。Based on the limitations of the ECC error detection and correction capabilities, the embodiments of the present invention provide a method and device for FPGA soft error resistance, which detects any error in the FPGA bit stream through the CRC algorithm, and detects and corrects 1-bit errors and detects multiple-bit errors through ECC verification of each frame of data. On this basis, by reloading and/or regularly refreshing the FPGA bit stream, the FPGA's soft error resistance capability is effectively improved, ensuring the effectiveness and accuracy of the FPGA function after loading the bit stream.

如图1所示,是本发明实施例FPGA抗软错误的方法的一种流程图,包括以下步骤:As shown in FIG. 1 , it is a flow chart of a method for FPGA soft error resistance according to an embodiment of the present invention, comprising the following steps:

步骤101,在FPGA加载完成后,回读FPGA的加载数据。Step 101, after the FPGA loading is completed, read back the loaded data of the FPGA.

FPGA加载是指将相应的位流写入FPGA的过程,FPGA加载方式及过程与现有技术相同,在此不再赘述。FPGA loading refers to the process of writing the corresponding bit stream into the FPGA. The FPGA loading method and process are the same as those in the prior art and will not be described in detail here.

步骤102,对所述加载数据进行回读校验,所述回读校验包括ECC校验和CRC校验。Step 102: performing a read-back check on the loaded data, wherein the read-back check includes an ECC check and a CRC check.

需要说明的是,在本发明实施例中,ECC校验和CRC校验是同时进行的,虽然CRC校验值是针对整个FPGA位流的,但对于回读的每帧位流,需要进行CRC计算。也就是说,对于回读的每帧位流,需要同时进行CRC计算和ECC校验。It should be noted that, in the embodiment of the present invention, the ECC check and the CRC check are performed simultaneously. Although the CRC check value is for the entire FPGA bit stream, the CRC calculation needs to be performed for each frame of the read-back bit stream. In other words, for each frame of the read-back bit stream, the CRC calculation and the ECC check need to be performed simultaneously.

步骤103,在回读校验过程中,对于检测到的多比特错误,通过触发重新加载事件进行纠错。Step 103 : During the readback verification process, for the detected multi-bit errors, error correction is performed by triggering a reload event.

需要说明的是,对于回读校验中检测到的1比特错误,可以直接在FPGA内存中进行纠错。对于回读校验中检测到的多比特错误,在一种非限制性实施例中,可以是在每次出现多比特错误时即触发重新加载事件进行纠错;在另一种非限制性实施例中,可以是在出现多比特错误时累计出现多比特错误的次数,得到累计值;在所述累计值达到设定阈值(比如阈值为3)时,触发重新加载事件,对此本发明实施例不做限定。It should be noted that for a 1-bit error detected in the readback check, error correction can be performed directly in the FPGA memory. For a multi-bit error detected in the readback check, in a non-limiting embodiment, a reload event may be triggered for error correction each time a multi-bit error occurs; in another non-limiting embodiment, the number of multi-bit errors occurring may be accumulated when a multi-bit error occurs to obtain a cumulative value; when the cumulative value reaches a set threshold (for example, the threshold is 3), a reload event is triggered, and this embodiment of the present invention does not limit this.

另外,本发明实施例中所述的多比特错误包括以下几种情况:In addition, the multi-bit errors described in the embodiments of the present invention include the following situations:

(1)在当前帧位流数据校验中,由ECC校验检出的2比特错误,当然,也不排除一些通过对ECC校验的优化改进而能够检出的多于2比特的错误;(1) In the current frame bit stream data check, 2-bit errors are detected by ECC check. Of course, some errors of more than 2 bits can be detected by optimizing and improving ECC check.

(2)在所有帧位流数据回读完成后,由CRC校验检出的多比特错误。(2) After all frame bit stream data is read back, multiple bit errors are detected by CRC check.

为了避免上述第二种方式即根据多比特错误出现的次数触发重新加载事件,在FPGA所有数据中检测出的所有多比特错误的累计次数小于所述设定阈值的情况下,无法通过触发重新加载事件来进行纠错的问题,在本发明另一实施例中,还可以定时触发刷新事件,即刷新FPGA中的加载数据,具体地,FPGA从外部存储空间读取FPGA位流数据,对FPGA内部的SRAM(Static Random-Access Memory,静态随机存取存储器)进行刷新。In order to avoid the problem that in the second method mentioned above, i.e., triggering a reloading event according to the number of occurrences of multi-bit errors, when the cumulative number of all multi-bit errors detected in all data of the FPGA is less than the set threshold, it is impossible to correct errors by triggering a reloading event, in another embodiment of the present invention, a refresh event can be triggered periodically, i.e., refreshing the loaded data in the FPGA. Specifically, the FPGA reads the FPGA bit stream data from the external storage space and refreshes the SRAM (Static Random-Access Memory) inside the FPGA.

需要说明的是,所述设定阈值可以根据应用需要和定时刷新的间隔来设定,比如,如果定时刷新的间隔较小,则所述设定阈值可以设置得大一些;反之,如果定时刷新的间隔较大,则所述设定阈值可以设置得小一些。It should be noted that the set threshold can be set according to application needs and the interval of regular refresh. For example, if the interval of regular refresh is small, the set threshold can be set larger; conversely, if the interval of regular refresh is large, the set threshold can be set smaller.

本发明实施例提供的FPGA抗软错误的方法,对FPGA的加载数据进行回读校验,在回读校验过程中,同时进行ECC校验和CRC校验。由于ECC校验中,对于多比特错误无法直接在FPGA内存中纠正,为此,在本发明实施例借助于重新加载的方式来纠错。由于所述软错误并非是写入FPGA的位流自身的错误,而是由于应用环境中的辐射、FPGA受到特定干扰、封装材料等诱因,使写入FPGA的数据发生了翻转导致的,因此通过重新加载,将在FPGA外部存储器中保存的位流重新加载至FPGA内存中,对出现的多比特错误进行纠正,保证FPGA功能的正确性。The FPGA anti-soft error method provided by the embodiment of the present invention performs a readback check on the loaded data of the FPGA, and during the readback check process, ECC check and CRC check are performed simultaneously. Since multi-bit errors cannot be directly corrected in the FPGA memory in the ECC check, for this reason, the embodiment of the present invention uses a reloading method to correct errors. Since the soft error is not an error in the bit stream itself written into the FPGA, but is caused by the radiation in the application environment, the FPGA being subjected to specific interference, the packaging material and other inducements, causing the data written into the FPGA to be flipped, the bit stream stored in the FPGA external memory is reloaded into the FPGA memory by reloading, and the multi-bit errors that occur are corrected to ensure the correctness of the FPGA function.

当然,在重新加载过程中,也有可以会产生新的软错误,但通过对重新加载后的位流进行回读校验,最终可以达到消除软错误的目的。Of course, new soft errors may be generated during the reloading process, but by reading back and verifying the bit stream after reloading, the soft errors can be eliminated.

在实际应用中,为了满足不同用户在多种不同环境下的应用,在一种非限制性实施例中,还可以预先配置不同的纠错模式。相应地,在进行回读校验时,根据当前纠错模式进行相应操作。In actual applications, in order to meet the needs of different users in various environments, in a non-limiting embodiment, different error correction modes may be pre-configured. Accordingly, when performing a readback check, corresponding operations are performed according to the current error correction mode.

比如,在具体应用中,所述纠错模式可以包括但不限于以下任意一种或多种:停止(halt)、继续(continue)、纠错并停止(correct&halt)、纠错并继续(correct&continue)。与其中各种纠错模式对应的纠错操作如下:For example, in a specific application, the error correction mode may include but is not limited to any one or more of the following: halt, continue, correct and halt, correct and continue. The error correction operations corresponding to the various error correction modes are as follows:

如果当前纠错模式为停止模式,则在检测到当前帧数据错误时,停止回读校验进入等待状态直至触发复位事件。此处的数据错误不仅包括1比特错误,还包括多比特错误,也就是说,在停止模式下,无论是检测到1比特错误还是多比持错误,均停止回读校验进入等待状态直至触发复位事件。If the current error correction mode is the stop mode, when a data error is detected in the current frame, the readback check is stopped and the state enters the waiting state until a reset event is triggered. The data error here includes not only a 1-bit error, but also a multi-bit error. That is to say, in the stop mode, whether a 1-bit error or a multi-bit error is detected, the readback check is stopped and the state enters the waiting state until a reset event is triggered.

如果当前纠错模式为继续模式,则在检测到当前帧数据错误为1比特错误时,不对其进行纠正,而是继续进行回读校验,在检测到当前帧错误为多比特错误时,累计多比特错误出现的次数;直至触发复位事件或者重新加载事件。If the current error correction mode is the continue mode, when it is detected that the current frame data error is a 1-bit error, it is not corrected, but the readback check is continued. When it is detected that the current frame error is a multi-bit error, the number of multi-bit errors is accumulated; until a reset event or a reload event is triggered.

如果当前纠错模式为纠错并停止,则在检测到当前帧数据错误为1比特错误时,进行纠错回写,并在当前纠错回写完成后进入等待状态直至触发复位事件;在检测到当前帧数据错误为多比特错误时,进入等待状态直至触发复位事件;If the current error correction mode is error correction and stop, then when it is detected that the current frame data error is a 1-bit error, error correction write-back is performed, and after the current error correction write-back is completed, the system enters a waiting state until a reset event is triggered; when it is detected that the current frame data error is a multi-bit error, the system enters a waiting state until a reset event is triggered;

如果当前纠错模式为纠错并继续,则在检测到当前帧数据错误为1比特错误时,进行纠错回写,并在当前纠错回写完成后继续进行回读校验;在检测到当前帧数据错误为多比特错误时,累计多比特错误出现次数,直至触发复位事件或者重新加载事件。If the current error correction mode is error correction and continue, when it is detected that the current frame data error is a 1-bit error, error correction write-back is performed, and read-back verification continues after the current error correction write-back is completed; when it is detected that the current frame data error is a multi-bit error, the number of multi-bit errors is accumulated until a reset event or a reload event is triggered.

需要说明的是,在上述各种纠错模式下,对于检出的多比特错误只需累计出现多比特错误的次数,而且,只要不进入等待状态,多比特错误的检测也是一直进行的,直至触发复位事件或者重新加载事件。It should be noted that in the above-mentioned various error correction modes, for the detected multi-bit errors, it is only necessary to accumulate the number of occurrences of the multi-bit errors, and as long as the waiting state is not entered, the detection of multi-bit errors is carried out all the time until a reset event or a reload event is triggered.

当然,上述几种纠错模式只是一种举例,在实际应用中,还可以根据应用需要设置其它纠错模式,对此本发明实施例不做限定。Of course, the above-mentioned error correction modes are only examples. In practical applications, other error correction modes may be set according to application requirements, which is not limited in the embodiments of the present invention.

为了便于不同用户的使用需求,在实际应用中,上述重新加载事件可以是人工触发和/或满足一定条件自动触发,对此本发明实施例不做限定。在触发重新加载事件后,重新开始FPGA加载,加载完成后,继续回读FPGA的加载数据进行回读校验。In order to facilitate the use requirements of different users, in actual applications, the above reloading event can be manually triggered and/or automatically triggered when certain conditions are met, which is not limited in the embodiment of the present invention. After the reloading event is triggered, the FPGA loading is restarted, and after the loading is completed, the loading data of the FPGA is read back for readback verification.

需要说明的是,为了方便用户对不同纠错模式的配置,可以利用FPGA外部寄存器,将用于指示所述纠错模式的数据写入控制寄存器,另外,还可以提供配置界面,用户在该配置界面对相应的控制寄存器完成写操作。It should be noted that in order to facilitate the user's configuration of different error correction modes, the FPGA external register can be used to write the data used to indicate the error correction mode into the control register. In addition, a configuration interface can be provided, and the user can complete the write operation on the corresponding control register in the configuration interface.

相应地,在回读校验过程中,可以通过读取所述控制寄存器确定用户选择的当前纠错模式,然后按照上述描述的纠错方式进行纠错操作。Accordingly, during the read-back verification process, the current error correction mode selected by the user can be determined by reading the control register, and then the error correction operation is performed according to the error correction method described above.

相应地,在进行回读校验前,还需要完成用户配置,具体可以参照图2所示。Accordingly, before performing the read-back verification, user configuration needs to be completed, as shown in FIG. 2 .

如图2所示,是本发明实施例FPGA抗软错误的方法的另一种流程图,包括以下步骤:As shown in FIG. 2 , another flow chart of the method for FPGA soft error resistance according to an embodiment of the present invention includes the following steps:

步骤201,加载FPGA。Step 201, loading FPGA.

步骤202,进行用户配置。Step 202: Perform user configuration.

步骤203,在用户配置完成后,根据用户配置确定纠错模式,回读FPGA的加载数据。Step 203: After the user configuration is completed, the error correction mode is determined according to the user configuration, and the loaded data of the FPGA is read back.

步骤204,对所述加载数据进行回读校验,所述回读校验包括ECC校验和CRC校验。Step 204: perform a read-back check on the loaded data, wherein the read-back check includes an ECC check and a CRC check.

步骤205,在回读校验过程中,在检测到1比特错误和/或多比特错误时,根据纠错模式进行纠错操作。Step 205 : During the readback verification process, when a 1-bit error and/or a multi-bit error is detected, an error correction operation is performed according to an error correction mode.

各种纠错模式下的纠错操作在前面已有详细说明,在此不再赘述。The error correction operations under various error correction modes have been described in detail above and will not be repeated here.

需要说明的是,在上述各实施例中,在检测到1比特错误时,还可以进行错误提示,比如通过提示信息或者指示灯等方式进行报错。当然,在检测到多比特错误时,也同样可以进行相应地报错,另外,还可以显示累计的多比特错误次数。It should be noted that in the above embodiments, when a 1-bit error is detected, an error prompt may be given, such as by a prompt message or an indicator light. Of course, when multiple-bit errors are detected, corresponding errors may also be given, and the accumulated number of multiple-bit errors may also be displayed.

利用本发明方案,可以在加载FPGA后自动完成对FPGA加载数据的回读校验及纠错,也可以根据用户的配置信息执行具体的纠错操作,可以满足不同用户不同应用场景的多种需求。By utilizing the solution of the present invention, the readback verification and error correction of the FPGA loaded data can be automatically completed after the FPGA is loaded, and specific error correction operations can also be performed according to the user's configuration information, thereby meeting the various needs of different users in different application scenarios.

需要说明的是,在上述图1和图2所示实施例中,多比特错误出现次数累计值达到设定阈值后,触发重新加载事件。在另一种非限制性实施例中,还可以由用户控制触发重新加载事件。比如,可以设置相应的重启开关,用户通过该重启开关发送重启指令。相应地,应用程序接收到用户的重启指令后,触发重新加载事件。It should be noted that, in the embodiments shown in FIG. 1 and FIG. 2 above, a reload event is triggered after the cumulative value of the number of occurrences of multi-bit errors reaches a set threshold. In another non-limiting embodiment, the reload event can also be triggered by user control. For example, a corresponding restart switch can be set, and the user sends a restart instruction through the restart switch. Accordingly, after the application receives the user's restart instruction, a reload event is triggered.

进一步地,为了方便用户对FPGA的控制,还可以设置多种不同的上电模式,比如在一种非限制性实施例中,所述上电模式可以包括:上电禁止操作模式和上电允许操作模式。这两种上电模式的具体操作方式如下:Furthermore, in order to facilitate the user's control of the FPGA, a variety of different power-on modes can be set. For example, in a non-limiting embodiment, the power-on mode can include: a power-on disabled operation mode and a power-on enabled operation mode. The specific operation methods of these two power-on modes are as follows:

在上电禁止操作模式,在FPGA加载完成后,等待用户指令,并在接收到用户的校验指令后回读FPGA的加载数据;In the power-on disabled operation mode, after the FPGA is loaded, it waits for user instructions and reads back the loaded data of the FPGA after receiving the user's verification instruction;

在上电允许操作模式,在FPGA加载完成后,立即回读FPGA的加载数据。In the power-on enabled operation mode, after the FPGA is loaded, the loaded data of the FPGA is read back immediately.

上述不同上电模式可以通过设置相应的开关或者使能信号等方式来实现,对此本发明实施例不做限定。The above-mentioned different power-on modes can be realized by setting corresponding switches or enabling signals, etc., which is not limited in the embodiment of the present invention.

在上电禁止操作模式下,可以由人工决定是否对FPGA加载的数据进行回读校验,在上电允许操作模式下,在FPGA加载完成后,可以自动对FPGA加载的数据进行回读校验。因此大大方便了在不同应用环境及场景下的需求,提高了方案的灵活性。In the power-on disabled operation mode, you can manually decide whether to read back and verify the data loaded on the FPGA. In the power-on enabled operation mode, after the FPGA is loaded, the data loaded on the FPGA can be automatically read back and verified. This greatly facilitates the needs in different application environments and scenarios and improves the flexibility of the solution.

需要说明的是,如果需要对纠错模式进行配置,则上述无论是上电禁止操作模式,还是上电允许操作模式,都需要在用户配置完成后,再进行回读校验。It should be noted that if the error correction mode needs to be configured, then no matter it is the power-on disabled operation mode or the power-on enabled operation mode, a read-back check needs to be performed after the user configuration is completed.

为了进一步保障FPGA的功能正确,在另一种非限制性实施例中,还可以同时通过定时刷新的方式实现对FPGA的回读校验,进而避免在FPGA加载或者应用过程中产生软错误。In order to further ensure the correct function of the FPGA, in another non-limiting embodiment, the FPGA can also be read back and checked by means of a timed refresh, thereby avoiding soft errors during the loading or application of the FPGA.

需要说明的是,如果不需要用户配置,则可以在FPGA加载完成后,定时触发刷新事件;如果需要用户配置,则应在用户配置完成后,定时触发刷新事件。It should be noted that if user configuration is not required, a refresh event can be triggered periodically after the FPGA is loaded; if user configuration is required, a refresh event should be triggered periodically after the user configuration is completed.

在触发刷新事件后,FPGA从外部存储空间读取FPGA位流数据,对FPGA内部的SRAM进行刷新。After the refresh event is triggered, the FPGA reads the FPGA bit stream data from the external storage space and refreshes the SRAM inside the FPGA.

为了进一步说明各种不同事件的区别,下面对前面提到的重新加载事件、复位事件、刷新事件进一步说明如下:To further illustrate the differences between various events, the reload event, reset event, and refresh event mentioned above are further explained as follows:

触发重新加载事件后,重新进行FPGA加载;After the reload event is triggered, reload the FPGA;

触发复位事件后,重新开始回读FPGA中的加载数据;After the reset event is triggered, the loaded data in the FPGA is read back again;

触发刷新事件后,刷新FPGA中的加载数据。After the refresh event is triggered, the loaded data in the FPGA is refreshed.

需要说明的是,上述重新加载事件和刷新事件虽然是两种不同的事件,但两种事件的处理结果相同,即对FPGA的SRAM进行重写。也就是说,两种事件性质不同,但触发事件后的处理操作相同。It should be noted that although the above reload event and refresh event are two different events, the processing results of the two events are the same, that is, rewriting the SRAM of the FPGA. In other words, the two events are different in nature, but the processing operations after the triggering event are the same.

本发明实施例提供的FPGA抗软错误的方法,在FPGA加载完成后,通过回读FPGA的加载数据,对加载数据进行ECC校验和CRC校验,实现任意错误的检测和1比特错误的纠错。在回读校验过程中,对于检测到的1比特错误,可以直接在内存中纠正,而对于检测到的多比特错误,通过触发重新加载事件实现对多比特错误的纠正,从而有效提升了FPGA抗软错误的能力,保证了FPGA功能的有效性和准确性,为FPGA在各种干扰环境中的应用提供强有力的技术支持。The FPGA soft error resistance method provided by the embodiment of the present invention performs ECC and CRC checks on the loaded data by reading back the loaded data of the FPGA after the FPGA is loaded, thereby realizing the detection of any error and the correction of 1-bit error. During the readback verification process, the detected 1-bit error can be directly corrected in the memory, and the detected multi-bit error can be corrected by triggering a reload event, thereby effectively improving the FPGA's ability to resist soft errors, ensuring the effectiveness and accuracy of the FPGA function, and providing strong technical support for the application of FPGA in various interference environments.

进一步地,通过设置不同的纠错模式、上电模式,可以使用户根据需要,灵活方便地应用各种不同功能,增强了方案的灵活性。Furthermore, by setting different error correction modes and power-on modes, users can flexibly and conveniently apply various functions according to their needs, thereby enhancing the flexibility of the solution.

进一步地,通过定时刷新功能,可以实现多种不同层次的回读校验和纠错,更好地保证了FPGA功能的正确性。Furthermore, through the timed refresh function, multiple levels of readback verification and error correction can be achieved, better ensuring the correctness of the FPGA function.

需要说明的是,上述本发明实施例提供的FPGA抗软错误的方法,在实际应用中可以采用软件、或者软件加硬件相结合的方式来实现,实现方式灵活,可以应用于多种不同需求的场景。It should be noted that the FPGA soft error resistance method provided in the above embodiment of the present invention can be implemented in actual applications by software, or a combination of software and hardware. The implementation method is flexible and can be applied to a variety of scenarios with different requirements.

相应地,本发明实施例还提供一种FPGA抗软错误的装置,如图3所示,是该装置的一种结构示意图。Correspondingly, an embodiment of the present invention further provides a device for FPGA soft error resistance, as shown in FIG3 , which is a structural schematic diagram of the device.

该实施例中,所述FPGA抗软错误的装置300包括:In this embodiment, the FPGA soft error resistance device 300 includes:

内存模块30,用于存储FPGA的加载数据;A memory module 30, used to store the loading data of the FPGA;

回读模块301,用于在FPGA加载完成后,从内存模块30中回读FPGA的加载数据;The read-back module 301 is used to read back the loaded data of the FPGA from the memory module 30 after the loading of the FPGA is completed;

校验模块302,用于对所述加载数据进行回读校验,所述回读校验包括ECC校验和CRC校验;在回读校验过程中,对于检测到的多比特错误,通过触发重新加载事件进行纠错;A check module 302 is used to perform a readback check on the loaded data, wherein the readback check includes an ECC check and a CRC check; during the readback check process, for a detected multi-bit error, error correction is performed by triggering a reload event;

加载模块303,用于在校验模块302触发重新加载事件后,重新进行FPGA加载,即将保存在外部存储器中的位流数据写入FPGA的内存模块30中。The loading module 303 is used to reload the FPGA after the verification module 302 triggers a reloading event, that is, to write the bit stream data stored in the external memory into the memory module 30 of the FPGA.

需要说明的是,校验模块302对ECC校验和CRC校验是同时进行的,由于CRC校验值是针对整个FPGA位流的,而ECC校验值是针对一段数据即一帧位流的,因此,在校验过程,校验模块302对于回读模块301回读的每一帧位流数据,需要进行CRC计算和ECC校验。It should be noted that the check module 302 performs ECC check and CRC check simultaneously. Since the CRC check value is for the entire FPGA bit stream, and the ECC check value is for a segment of data, i.e., a frame of bit stream, during the check process, the check module 302 needs to perform CRC calculation and ECC check for each frame of bit stream data read back by the read-back module 301.

对于ECC校验检测到的1比特错误,可以直接在FPGA内存中进行纠错。对于ECC校验检测到的多比特错误,由于无法直接在FPGA内存中进行纠错,因此,在一种非限制性实施例中,所述校验模块302可以在每次检测到多比特错误时,累计出现多比特错误的次数,得到累计值,在所述累计值达到设定阈值时,触发重新加载事件。For a 1-bit error detected by the ECC check, error correction can be performed directly in the FPGA memory. For a multi-bit error detected by the ECC check, since error correction cannot be performed directly in the FPGA memory, in a non-limiting embodiment, the check module 302 can accumulate the number of multi-bit errors each time a multi-bit error is detected to obtain a cumulative value, and trigger a reload event when the cumulative value reaches a set threshold.

进一步地,为了方便不同用户的应用需求,如图4所示,在本发明FPGA抗软错误的装置的另一种非限制性实施例中,还可包括寄存器401,用于存储配置信息,所述配置信息包括:上电模式、和/或纠错模式。Furthermore, in order to facilitate the application requirements of different users, as shown in FIG4 , in another non-limiting embodiment of the FPGA soft error resistance device of the present invention, a register 401 may also be included for storing configuration information, wherein the configuration information includes: a power-on mode, and/or an error correction mode.

相应地,回读模块301可以在FPGA加载完成并完成用户配置后,读取寄存器401,确定当前上电模式,并根据当前上电模式进行回读操作。同样地,校验模块302可以在FPGA加载完成并完成用户配置后,读取寄存器401,确定当前纠错模式,并根据当前纠错模式进行纠错操作。Accordingly, after the FPGA is loaded and the user configuration is completed, the readback module 301 can read the register 401 to determine the current power-on mode, and perform a readback operation according to the current power-on mode. Similarly, after the FPGA is loaded and the user configuration is completed, the check module 302 can read the register 401 to determine the current error correction mode, and perform an error correction operation according to the current error correction mode.

如图5所示,是本发明实施例FPGA抗软错误的装置的另一种结构示意图。As shown in FIG. 5 , it is another schematic diagram of the structure of the FPGA soft error resistance device according to an embodiment of the present invention.

与图3所示实施例不同的是,该实施例中,所述FPGA抗软错误的装置300还包括:Different from the embodiment shown in FIG. 3 , in this embodiment, the FPGA soft error resistance device 300 further includes:

刷新模块304,用于定时刷新所述内存模块30中FPGA的加载数据。The refresh module 304 is used to refresh the loaded data of the FPGA in the memory module 30 at regular intervals.

通过定时刷新FPGA的加载数据,可以实现多种不同层次的回读校验和纠错,更好地保证了FPGA功能的有效性和准确性。By regularly refreshing the FPGA's loaded data, multiple levels of readback verification and error correction can be achieved, better ensuring the effectiveness and accuracy of the FPGA function.

关于FPGA抗软错误的装置300的其他相关功能及实现方式可以参照前面本发明方法实施例中的相关描述,此处不再赘述。For other related functions and implementation methods of the FPGA soft error resistance device 300, reference may be made to the related descriptions in the above method embodiments of the present invention, which will not be described in detail here.

相应地,本发明实施例还提供一种FPGA芯片,所述芯片在加载完成后,可以执行本发明方法实施例中的全部或部分步骤。Correspondingly, an embodiment of the present invention further provides an FPGA chip, which can execute all or part of the steps in the embodiment of the method of the present invention after loading is completed.

在具体实施中,关于上述实施例中描述的各个装置、产品包含的各个模块/单元,其可以是软件模块/单元,也可以是硬件模块/单元,或者也可以部分是软件模块/单元,部分是硬件模块/单元。In a specific implementation, each module/unit included in each device or product described in the above embodiments may be a software module/unit or a hardware module/unit, or may be partly a software module/unit and partly a hardware module/unit.

例如,对于应用于或集成于芯片的各个装置、产品,其包含的各个模块/单元可以都采用电路等硬件的方式实现,或者,至少部分模块/单元可以采用软件程序的方式实现,该软件程序运行于芯片内部集成的处理器,剩余的(如果有)部分模块/单元可以采用电路等硬件方式实现;对于应用于或集成于芯片模组的各个装置、产品,其包含的各个模块/单元可以都采用电路等硬件的方式实现,不同的模块/单元可以位于芯片模组的同一组件(例如芯片、电路模块等)或者不同组件中,或者,至少部分模块/单元可以采用软件程序的方式实现,该软件程序运行于芯片模组内部集成的处理器,剩余的(如果有)部分模块/单元可以采用电路等硬件方式实现;对于应用于或集成于终端的各个装置、产品,其包含的各个模块/单元可以都采用电路等硬件的方式实现,不同的模块/单元可以位于终端内同一组件(例如,芯片、电路模块等)或者不同组件中,或者,至少部分模块/单元可以采用软件程序的方式实现,该软件程序运行于终端内部集成的处理器,剩余的(如果有)部分模块/单元可以采用电路等硬件方式实现。For example, for each device or product applied to or integrated in a chip, each module/unit contained therein may be implemented in the form of hardware such as circuits, or at least some of the modules/units may be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules/units may be implemented in the form of hardware such as circuits; for each device or product applied to or integrated in a chip module, each module/unit contained therein may be implemented in the form of hardware such as circuits, and different modules/units may be located in the same component (such as a chip, circuit module, etc.) or different components of the chip module, or at least some of the modules/units may be implemented in the form of software programs. The element can be implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules/units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in the terminal, the various modules/units contained therein can be implemented in the form of hardware such as circuits, and different modules/units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or, at least some modules/units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal, and the remaining (if any) modules/units can be implemented in the form of hardware such as circuits.

虽然本发明披露如上,但本发明并非限定于此。任何本领域技术人员,在不脱离本发明的精神和范围内,均可作各种更动与修改,因此本发明的保护范围应当以权利要求所限定的范围为准。Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims (16)

1. A method for resisting soft errors in an FPGA, the method comprising:
After the FPGA is loaded, reading back loading data of the FPGA;
Performing readback verification on the loading data, wherein the readback verification comprises ECC verification and CRC verification;
during the read-back verification, error correction is performed by triggering a reload event for the detected multi-bit error.
2. The method of claim 1, wherein correcting errors for the detected multi-bit errors by triggering a reload event comprises:
When multi-bit errors are detected each time, the number of times of multi-bit errors is accumulated to obtain an accumulated value;
and triggering a reload event when the accumulated value reaches a set threshold.
3. The method according to claim 1, wherein the method further comprises: presetting a power-on mode, wherein the power-on mode comprises the following steps: a power-on prohibition operation mode and a power-on permission operation mode;
After the loading of the FPGA is completed, reading back the loading data of the FPGA comprises the following steps:
In the power-on prohibition operation mode, after the loading of the FPGA is completed, waiting for a user instruction, and after receiving a verification instruction of a user, reading back loading data of the FPGA;
In the power-on permission operation mode, after the loading of the FPGA is completed, the loading data of the FPGA is immediately read back.
4. The method according to claim 2, wherein the method further comprises: configuring an error correction mode;
And in the read-back verification process, performing error correction operation according to the current error correction mode.
5. The method of claim 4, wherein configuring the error correction mode comprises:
writing data indicating the error correction mode into a control register;
the method further comprises the steps of:
the current error correction mode is determined by reading the control register.
6. The method of claim 4, wherein the error correction mode comprises any one or more of: stopping, continuing, correcting and stopping, correcting and continuing;
The error correction operation according to the current error correction mode comprises the following steps:
if the current error correction mode is a stop mode, stopping the readback check to enter a waiting state until a reset event is triggered when the current frame data error is detected;
If the current error correction mode is a continuous mode, when detecting that the current frame data error is a 1-bit error, continuing to carry out read-back verification until a reset event or a reload event is triggered;
If the current error correction mode is error correction and stopping, performing error correction write-back when detecting that the current frame data error is 1 bit error, and entering a waiting state after the current error correction write-back is completed until a reset event is triggered; when detecting that the current frame data error is a multi-bit error, entering a waiting state until a reset event is triggered;
if the current error correction mode is error correction and continues, performing error correction write-back when detecting that the current frame data error is a 1-bit error, and continuing read-back verification after the current error correction write-back is completed until a reset event or a reload event is triggered.
7. The method of claim 6, wherein the method further comprises: and when the bit stream error of the current frame is detected, performing error prompt.
8. The method of claim 1, wherein reading back the loading data of the FPGA after the FPGA is loaded comprises:
and after the FPGA is loaded and the user configuration is completed, reading back the loaded data of the FPGA.
9. The method of claim 8, wherein the method further comprises:
After the user configuration is completed, a refresh event is triggered at regular time.
10. The method of claim 9, wherein the step of determining the position of the substrate comprises,
After triggering a reloading event, reloading the FPGA;
After triggering a reset event, restarting reading back the loaded data of the FPGA;
After the refresh event is triggered, the loading data of the FPGA is refreshed.
11. The method according to any one of claims 1 to 10, further comprising:
And triggering a reloading event after receiving a restarting instruction of the user.
12. An apparatus for soft error resistance of an FPGA, the apparatus comprising:
the memory module is used for storing loading data of the FPGA;
the read-back module is used for reading back the loading data of the FPGA from the memory module after the loading of the FPGA is completed;
The verification module is used for performing read-back verification on the loading data, wherein the read-back verification comprises ECC verification and CRC verification; in the read-back verification process, correcting errors of the detected multi-bit errors by triggering a reload event;
and the loading module is used for reloading the FPGA after the verification module triggers a reloading event.
13. The apparatus of claim 12, wherein the device comprises a plurality of sensors,
The check module accumulates the times of occurrence of multi-bit errors each time the multi-bit errors are detected, and obtaining an accumulated value, and triggering a reloading event when the accumulated value reaches a set threshold value.
14. The apparatus of claim 12, wherein the apparatus further comprises:
A register for storing configuration information, the configuration information comprising: a power-up mode, and/or an error correction mode;
the read-back module is used for reading the register after the FPGA is loaded and the user configuration is completed, determining the current power-on mode and performing read-back operation according to the current power-on mode;
And the verification module is used for reading the register after the FPGA is loaded and the user configuration is completed, determining the current error correction mode and carrying out error correction operation according to the current error correction mode.
15. The apparatus according to any one of claims 12 to 14, further comprising:
And the refreshing module is used for regularly refreshing the loading data of the FPGA in the memory module.
16. An FPGA chip, characterized in that the chip performs the method of preventing soft errors of an FPGA according to any of claims 1 to 11 after loading is completed.
CN202310261658.7A 2023-03-17 2023-03-17 FPGA soft error resistance method and device Pending CN118672822A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310261658.7A CN118672822A (en) 2023-03-17 2023-03-17 FPGA soft error resistance method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310261658.7A CN118672822A (en) 2023-03-17 2023-03-17 FPGA soft error resistance method and device

Publications (1)

Publication Number Publication Date
CN118672822A true CN118672822A (en) 2024-09-20

Family

ID=92719885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310261658.7A Pending CN118672822A (en) 2023-03-17 2023-03-17 FPGA soft error resistance method and device

Country Status (1)

Country Link
CN (1) CN118672822A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119166584A (en) * 2024-10-08 2024-12-20 上海矢元电子股份有限公司 Online Reconfiguration Method of Serial Bus Communication Based on FPGA

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119166584A (en) * 2024-10-08 2024-12-20 上海矢元电子股份有限公司 Online Reconfiguration Method of Serial Bus Communication Based on FPGA

Similar Documents

Publication Publication Date Title
US6216251B1 (en) On-chip error detection and correction system for an embedded non-volatile memory array and method of operation
EP2770507B1 (en) Memory circuits, method for accessing a memory and method for repairing a memory
US8125243B1 (en) Integrity checking of configurable data of programmable device
US9891917B2 (en) System and method to increase lockstep core availability
US20090077423A1 (en) Memory device and system with bootloading operation
US8341491B2 (en) System and method for providing data integrity in a non-volatile memory system
US10062451B2 (en) Background memory test apparatus and methods
JP4834721B2 (en) Memory control device and memory control method
US20120079346A1 (en) Simulated error causing apparatus
US20080016415A1 (en) Evaluation system and method
CN103226499B (en) A kind of method of the abnormal data recovered in internal storage and device
US7568130B2 (en) Automated hardware parity and parity error generation technique for high availability integrated circuits
KR101852919B1 (en) Circuitry and method for testing an error-correction capability
CN118672822A (en) FPGA soft error resistance method and device
US6971051B2 (en) System and method of recovering from soft memory errors
CN102981925A (en) Register inspection and checking control method applied to communication equipment
JP7379932B2 (en) Control device, user program execution control method, and system program
CN103280242B (en) Be applicable to configurable backstage method for refreshing sheet storing EDAC
Dopson SoftECC: A system for software memory integrity checking
JP2004302792A (en) Information processor and method for checking memory
CN118626307A (en) Data structure, error correction method, module, system and device for storing data
CN117931493A (en) Hardware error processing method and computing device
CN120086062A (en) Firmware-based reset method, system on chip, electronic device and storage medium
JP2025040207A (en) Information processing device
CN113626246A (en) Single-bit flip quick repair method, apparatus, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination