Soft error resisting method and device for FPGA (Field Programmable Gate Array)
By performing ECC and CRC checks after the FPGA is loaded, and triggering a reload event when a multi-bit error is detected, the problem of FPGA soft error detection and correction is solved, and the effectiveness and accuracy of the FPGA function is achieved, which is suitable for Various interference environments.
Patent Information
- Application Number
- CN202310261658.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2024-09-20
AI Technical Summary
After downloading the bit stream, soft errors may occur in FPGA due to factors such as radiation and interference, resulting in functional failure. It is difficult for existing technology to effectively detect and correct multi-bit errors.
After the FPGA is loaded, errors are detected through ECC and CRC checks, and a reload event is triggered for error correction when multi-bit errors are detected. When the cumulative number of errors reaches the set threshold, a reload event is triggered again, combining different error correction methods. mode and power-on mode to flexibly respond to different error types.
It effectively improves the FPGA's ability to resist soft errors, ensures the accuracy and effectiveness of FPGA functions, is suitable for various interference environments, and enhances the flexibility and efficiency of the solution.
Smart Images

Figure CN118672822A
Abstract
Description
Technical Field
[0001] 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
[0002] FPGA is a semi-customized circuit in application-specific integrated circuits. FPGA consists of hardware resources such as logic units, RAM (Random Access Memory), and multipliers. 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.
[0003] 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
[0004] 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.
[0005] To this end, the embodiment of the present invention provides the following technical solutions:
[0006] In one aspect, an embodiment of the present invention provides a method for FPGA soft error resistance, the method comprising:
[0007] After the FPGA is loaded, read back the loaded data of the FPGA;
[0008] Performing a read-back check on the loaded data, wherein the read-back check includes an ECC check and a CRC check;
[0009] During the readback verification process, for detected multi-bit errors, error correction is performed by triggering a reload event.
[0010] Optionally, the correcting the detected multi-bit error by triggering a reload event includes:
[0011] Each time a multi-bit error is detected, the number of times the multi-bit error occurs is accumulated to obtain an accumulated value;
[0012] When the accumulated value reaches a set threshold, a reload event is triggered.
[0013] 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;
[0014] After the FPGA is loaded, reading back the loaded data of the FPGA includes:
[0015] 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;
[0016] In the power-on enabled operation mode, after the FPGA is loaded, the loaded data of the FPGA is read back immediately.
[0017] Optionally, the method further comprises: configuring an error correction mode;
[0018] During the readback verification process, error correction operations are performed according to the current error correction mode.
[0019] Optionally, configuring the error correction mode includes: writing data indicating the error correction mode into a control register;
[0020] The method further includes determining a current error correction mode by reading the control register.
[0021] Optionally, the error correction mode includes any one or more of the following: stop, continue, error correction and stop, error correction and continue;
[0022] The error correction operation performed according to the current error correction mode includes:
[0023] 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;
[0024] 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;
[0025] 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;
[0026] 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 continues until a reset event or a reload event is triggered.
[0027] Optionally, the method further comprises: providing an error prompt when an error in the current frame bit stream is detected.
[0028] 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.
[0029] Optionally, the method further includes: after completing the user configuration, periodically triggering a refresh event.
[0030] 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.
[0031] Optionally, the method further includes: triggering a reload event after receiving a restart instruction from the user.
[0032] On the other hand, an embodiment of the present invention further provides a device for FPGA to resist soft errors, the device comprising:
[0033] Memory module, used to store the loading data of FPGA;
[0034] A read-back module, used to read back the loaded data of the FPGA from the memory module after the FPGA loading is completed;
[0035] 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;
[0036] The loading module is used to reload the FPGA after the verification module triggers a reloading event.
[0037] Optionally, each time the checking 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.
[0038] 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;
[0039] 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;
[0040] 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.
[0041] Optionally, the device further comprises: a refresh module, used for periodically refreshing the loaded data of the FPGA in the memory module.
[0042] 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.
[0043] The method and device for FPGA soft error resistance provided by the embodiment of the present invention, after the FPGA is loaded, performs ECC check and CRC check on the loaded data by reading back the loaded data of the FPGA, thereby realizing the detection of any error and the correction of 1-bit error. During 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.
[0044] 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.
[0045] 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.
[0046] 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
[0047] Figure 1 It is a flow chart of a method for FPGA to resist soft errors according to an embodiment of the present invention;
[0048] Figure 2 is another flow chart of the method for FPGA soft error resistance according to an embodiment of the present invention;
[0049] Figure 3 This is a structural schematic diagram of a device for FPGA anti-soft error according to an embodiment of the present invention;
[0050] Figure 4 This is another structural schematic diagram of the FPGA soft error resistance device according to an embodiment of the present invention;
[0051] Figure 5 This is another structural schematic diagram of the FPGA soft error resistance device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] 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.
[0053] 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.
[0054] 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.
[0055] like Figure 1 FIG. 1 is a flow chart of a method for preventing soft errors in an FPGA according to an embodiment of the present invention, comprising the following steps:
[0056] Step 101, after the FPGA loading is completed, read back the loaded data of the FPGA.
[0057] 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.
[0058] Step 102: performing a read-back check on the loaded data, wherein the read-back check includes an ECC check and a CRC check.
[0059] 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.
[0060] Step 103 : During the readback verification process, for the detected multi-bit errors, error correction is performed by triggering a reload event.
[0061] 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.
[0062] In addition, the multi-bit errors described in the embodiments of the present invention include the following situations:
[0063] (1) In the current frame bit stream data check, a 2-bit error is detected by the ECC check. Of course, some errors of more than 2 bits that can be detected by optimizing and improving the ECC check are not excluded;
[0064] (2) After all frame bit stream data is read back, multiple bit errors are detected by CRC check.
[0065] In order to avoid the problem that the second method mentioned above, i.e., triggering a reloading event according to the number of occurrences of multi-bit errors, cannot correct errors by triggering a reloading event when the cumulative number of all multi-bit errors detected in all data of the FPGA is less than the set threshold, 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.
[0066] 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.
[0067] The FPGA anti-soft error method provided in 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, in the embodiment of the present invention, the error is corrected by reloading. 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, the data written into the FPGA is flipped. Therefore, by reloading, the bit stream stored in the FPGA external memory is reloaded into the FPGA memory, and the multi-bit errors that occur are corrected to ensure the correctness of the FPGA function.
[0068] 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.
[0069] 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.
[0070] 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:
[0071] 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 is entered into a 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 is entered into a waiting state until a reset event is triggered.
[0072] 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.
[0073] 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;
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] Accordingly, before performing the readback check, user configuration needs to be completed. For details, please refer to Figure 2 shown.
[0081] like Figure 2 FIG. 1 is another flow chart of a method for preventing soft errors in an FPGA according to an embodiment of the present invention, comprising the following steps:
[0082] Step 201, loading FPGA.
[0083] Step 202: Perform user configuration.
[0084] 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.
[0085] Step 204: perform a read-back check on the loaded data, wherein the read-back check includes an ECC check and a CRC check.
[0086] 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.
[0087] The error correction operations under various error correction modes have been described in detail above and will not be repeated here.
[0088] 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.
[0089] 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.
[0090] It should be noted that in the above Figure 1 and Figure 2 In the illustrated embodiment, 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.
[0091] 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:
[0092] 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;
[0093] In the power-on enabled operation mode, after the FPGA is loaded, the loaded data of the FPGA is read back immediately.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] It should be noted that if user configuration is not required, the refresh event can be triggered regularly after the FPGA is loaded; if user configuration is required, the refresh event should be triggered regularly after the user configuration is completed.
[0099] 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.
[0100] To further illustrate the differences between various events, the reload event, reset event, and refresh event mentioned above are further explained as follows:
[0101] After the reload event is triggered, reload the FPGA;
[0102] After the reset event is triggered, the loaded data in the FPGA is read back again;
[0103] After the refresh event is triggered, the loaded data in the FPGA is refreshed.
[0104] 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.
[0105] 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 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.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] Accordingly, an embodiment of the present invention further provides a device for FPGA to resist soft errors, such as Figure 3 Shown is a structural schematic diagram of the device.
[0110] In this embodiment, the FPGA soft error resistance device 300 includes:
[0111] A memory module 30, used to store the loading data of the FPGA;
[0112] The read-back module 301 is used to read back the loaded data of the FPGA from the memory module 30 after the FPGA loading is completed;
[0113] 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;
[0114] 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.
[0115] 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.
[0116] 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.
[0117] Furthermore, in order to facilitate the application needs of different users, such as Figure 4 As shown, 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.
[0118] 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.
[0119] like Figure 5 FIG. 1 is another schematic diagram of the structure of the FPGA soft error resistance device according to an embodiment of the present invention.
[0120] and Figure 3 The embodiment shown is different in that, in this embodiment, the FPGA soft error resistance device 300 further includes:
[0121] The refresh module 304 is used to refresh the loaded data of the FPGA in the memory module 30 at regular intervals.
[0122] 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.
[0123] 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.
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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
1. A method for FPGA to resist soft errors, characterized in that: The method comprises: After the FPGA is loaded, read back the loaded data of the FPGA; Performing a read-back check on the loaded data, wherein the read-back check includes 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.
2. The method according to claim 1, characterized in that: The step of 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.
3. The method according to claim 1, characterized in that The method further comprises: presetting a power-on mode, wherein the power-on mode comprises: a power-on prohibition operation mode and a power-on permission operation mode; After the FPGA is loaded, reading back the loaded data of the FPGA includes: 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; In the power-on enabled operation mode, after the FPGA is loaded, the loaded data of the FPGA is read back immediately.
4. The method according to claim 2, characterized in that: 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.
5. The method according to claim 4, characterized in that The configuration error correction mode includes: Writing data indicating the error correction mode into a control register; The method further comprises: The current error correction mode is determined by reading the control register.
6. The method according to claim 4, characterized in that 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; 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; 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; 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 continues until a reset event or a reload event is triggered.
7. The method according to claim 6, characterized in that The method further comprises: when an error is detected in the bit stream of the current frame, providing an error prompt.
8. The method according to claim 1, characterized in that: After the FPGA is loaded, the loaded data read back from the FPGA includes: After the FPGA is loaded and the user configuration is completed, read back the loaded data of the FPGA.
9. The method according to claim 8, characterized in that The method further comprises: After completing the user configuration, the refresh event is triggered periodically.
10. The method according to claim 9, characterized in that After the reload event is triggered, reload the FPGA; After the reset event is triggered, the FPGA load data is read back again; After the refresh event is triggered, the loaded data of the FPGA is refreshed.
11. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: After receiving the restart instruction from the user, a reload event is triggered.
12. A device for FPGA to resist soft errors, characterized in that: The device comprises: Memory module, used to store the loading data of 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; 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; The loading module is used to reload the FPGA after the verification module triggers a reloading event.
13. The device according to claim 12, characterized in that 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.
14. The device according to claim 12, characterized in that The device also includes: A register, used to store configuration information, the configuration information including: a power-on mode, and / or an error correction mode; 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; 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.
15. The device according to any one of claims 12 to 14, characterized in that The device also includes: The refresh module is used to regularly refresh the loaded data of the FPGA in the memory module.
16. An FPGA chip, characterized in that: After the loading is completed, the chip executes the FPGA soft error resistance method according to any one of claims 1 to 11.
Citation Information
Cited By
Serial bus communication online reconstruction method based on FPGA
CN119166584A
Method, apparatus, and program for preventing FPGA intellectual property theft
KR102843066B1
