CN113886158A - Automatic FPGA fault injection test system and method - Google Patents
Automatic FPGA fault injection test system and method Download PDFInfo
- Publication number
- CN113886158A CN113886158A CN202111145489.8A CN202111145489A CN113886158A CN 113886158 A CN113886158 A CN 113886158A CN 202111145489 A CN202111145489 A CN 202111145489A CN 113886158 A CN113886158 A CN 113886158A
- Authority
- CN
- China
- Prior art keywords
- circuit
- fault injection
- control circuit
- fault
- tested
- 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.)
- Granted
Links
- 238000002347 injection Methods 0.000 title claims abstract description 187
- 239000007924 injection Substances 0.000 title claims abstract description 187
- 238000012360 testing method Methods 0.000 title claims abstract description 76
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000013461 design Methods 0.000 claims abstract description 76
- 230000008569 process Effects 0.000 claims abstract description 26
- 230000005284 excitation Effects 0.000 claims description 42
- 238000004886 process control Methods 0.000 claims description 28
- 238000004891 communication Methods 0.000 claims description 23
- 238000010276 construction Methods 0.000 claims description 8
- 230000002194 synthesizing effect Effects 0.000 claims description 6
- 238000010998 test method Methods 0.000 claims description 4
- 238000011161 development Methods 0.000 abstract description 4
- 238000011156 evaluation Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000007306 turnover Effects 0.000 description 4
- 230000035945 sensitivity Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000003708 edge detection Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000002245 particle Substances 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- JJWKPURADFRFRB-UHFFFAOYSA-N carbonyl sulfide Chemical compound O=C=S JJWKPURADFRFRB-UHFFFAOYSA-N 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000012854 evaluation process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000191 radiation effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000000243 solution Substances 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
- G06F11/263—Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention relates to an automatic FPGA fault injection test system and method, the method includes reading the circuit file to be tested through the upper computer software; extracting input and output signals and other user design related information; automatically generating a user design control circuit according to the extracted information, and automatically generating a complete fault injection system file by interconnection and combination with a predefined fault injection control circuit; automatically executing the comprehensive implementation process of the lower computer hardware through the Tcl script; therefore, automatic generation of the fault injection system is realized. The invention reduces the development difficulty and the use threshold of the fault injection system, saves the complexity of manually building the fault injection system, ensures that designers can conveniently develop and build the fault injection system without deeply researching a complex FPGA design method and having a circuit design basis, improves the use range of the fault injection system, and can quickly and conveniently evaluate the reliability of the FPGA circuit.
Description
Technical Field
The invention belongs to the field of integrated circuits, and particularly relates to an automatic FPGA fault injection method.
Background
The SRAM type FPGA has the characteristics of repeated programming, high flexibility and the like, so that the SRAM type FPGA is more and more widely applied to aerospace electronic equipment. The SRAM memory cell used by the SRAM type FPGA provides great flexibility, and has the defect of being easily influenced by radiation effect, and the operation of the SRAM memory cell in a space radiation environment is easily interfered by single event upset effect, namely, cosmic high-energy particles are shot into a sensitive area of the SRAM cell, so that the logic of the memory cell in the FPGA can be overturned, thereby generating soft errors, and even damaging a hardware circuit in serious cases. Particularly, as the size of the FPGA transistor is continuously reduced, the influence of the radiation particles on the SRAM type FPGA is more and more increased. Therefore, evaluation of SEU sensitivity for SRAM type FPGA based systems is highly desirable. Therefore, the sensitivity of the circuit to the SEU can be mastered in the design stage, and the aims of guiding the design and judging the reliability of the designed circuit are fulfilled. In addition, as more and more fault-tolerant methods for relieving the SEU effect are proposed and applied to aerospace electronic equipment, such as error correction codes, triple modular redundancy and the like, it is inevitable to test and evaluate the SEU relief effect of the fault-tolerant designs.
However, not only the organization structure and configuration of the FPGA need to be mastered to build a complete set of fault injection system, but also the problem of low universality exists in the fault injection system designed and built for a certain user. Therefore, in order to make the reliability evaluation faster and more convenient, and to adapt to various designs, it is necessary to automate the fault injection evaluation process.
Disclosure of Invention
The technical problem solved by the invention is as follows: the defects of the prior art are overcome, an automatic FPGA fault injection testing system and method are provided, the development difficulty of a fault injection system is reduced, designers are assisted to quickly build the fault injection system, and the efficiency of evaluating the reliability of a circuit is improved.
The technical scheme for solving the technical problem is as follows: an automatic FPGA fault injection test system comprises an upper computer and a lower computer fault injection hardware system, wherein the lower computer fault injection hardware system comprises a user designed control circuit and a fault injection control circuit; wherein:
the user design control circuit comprises a circuit to be tested, a reference circuit, an excitation generating circuit and a result comparing circuit;
the reference circuit is a copy of the circuit to be tested and comprises m-bit input buses and n-bit output buses, the m-bit input buses are simultaneously connected to the excitation generating circuit, the n-bit output ports are simultaneously connected to the result comparing circuit, and m and n are both more than or equal to 1;
a stimulus generation circuit for receiving a stimulus start signal and then initializing, and after initialization, randomly generating m-bit data in each clock cycle, as a test stimulus, and simultaneously transmitting the m-bit data to the reference circuit and the circuit to be tested, 2mOne clock cycle traversing 2 of m-bit input busmA piece of data;
the result comparison circuit is used for comparing whether the data on the output bus after the reference circuit and the circuit to be tested are excited and driven are the same or not, if the data are different, the injection fault counting value is accumulated, otherwise, the injection fault counting value is kept unchanged, and then the injection fault counting value is sent to the serial port communication circuit; in an initial state or after receiving a fault injection test starting signal, resetting an injection fault count;
the fault injection control circuit comprises a process control circuit, a reconfiguration interface control circuit and a serial port communication circuit;
the process control circuit receives the fault injection command message through the serial port communication circuit, analyzes the fault injection command message to obtain a first address and a last address of a fault injection test, sends a fault injection test starting signal to the user design control circuit, traverses the test addresses from the first address, reads back frame data of a corresponding address through the reconfiguration interface control circuit for each test address, turns over the read back frame data according to bits to obtain reconfiguration frame data, writes the reconfiguration frame data into the corresponding address through the reconfiguration interface control circuit, turns over one data bit once for the frame data of each address, traverses all the data bits, writes the reconfiguration frame data once, and sends an excitation starting signal once to the user design control circuit.
Preferably, the lower computer fault injection hardware system is automatically realized by the following method:
s1, reading and analyzing a source code file of the circuit to be tested, and extracting the name and interface design information of a top module, wherein the interface design information comprises the name, type and bit width information of a user IO interface used by the top module;
s2, automatically constructing a user design control circuit according to the name and interface design information of the top module of the circuit to be tested;
s3, the automatically generated user design control circuit and the preset general fault injection control circuit are connected and combined to generate a hardware description file of the fault injection system, the process of synthesizing, laying out and wiring of the fault injection system is automatically completed through the Tcl script to obtain an executable file of the fault injection system, and the executable file of the fault injection system is loaded into the FPGA used by the circuit to be tested to complete the automatic construction of the lower computer fault injection hardware system.
Preferably, the step S2 of automatically constructing the user designed control circuit includes the specific steps of:
automatically instantiating a circuit to be tested and a reference circuit according to the name of the top module of the circuit to be tested;
analyzing an input port and an output port according to the name, type and bit width information of a user IO interface in the interface design information of the circuit to be tested;
generating an excitation generating circuit matched with the input port;
a result comparison circuit is generated that matches the output port.
Preferably, the automatic building process of the lower computer fault injection hardware system is realized in the upper computer.
Preferably, the excitation generating circuit generates pseudo random numbers as test excitations by means of a linear feedback shift register.
The other technical scheme of the invention is as follows: an automatic FPGA fault injection test method comprises the following steps:
s1, reading and analyzing a source code file of the circuit to be tested, and extracting the name and interface design information of a top module, wherein the interface design information comprises the name, type and bit width information of a user IO interface used by the top module;
s2, automatically constructing a user design control circuit according to the name and interface design information of the top module of the circuit to be tested;
s3, the automatically generated user design control circuit and the preset general fault injection control circuit are connected and combined to generate a hardware description file of the fault injection system, the process of synthesizing, laying out and wiring of the fault injection system is automatically completed through the Tcl script to obtain an executable file of the fault injection system, and the executable file of the fault injection system is loaded into the FPGA used by the circuit to be tested to complete the automatic construction of the lower computer fault injection hardware system.
S4, executing fault injection test: sending a fault injection command message to a lower computer fault injection hardware system by an upper computer, turning data frames in a preset address range of a circuit to be tested bit by bit, detecting output results of the circuit to be tested and a reference circuit under the same test excitation, judging whether the circuit to be tested has a fault, and counting the frequency of the fault;
and S5, after the preset addresses of the waiting circuit are all tested, uploading the counted failure times to an upper computer, and ending the process.
Preferably, the fault injection test procedure of the method is as follows: :
s4.1, the serial port communication circuit sends the fault injection command message received from the upper computer to the process control circuit;
s4.2, the process control circuit analyzes the fault injection command message, obtains the first address and the last address of the fault injection test from the fault injection command message, then sends a fault injection test starting signal to a user design control circuit, and the step S3 is entered;
s4.3, after the user design control circuit receives the fault injection test starting signal, the control result comparison circuit clears the injection fault count value;
s4.4, the process control circuit calculates the current test address and sends the read-back command and the test address to the reconfiguration interface control circuit;
s4.5, reconfiguring the interface control circuit, reading back frame data according to the test address after receiving the read-back command, and returning the frame data to the process control circuit;
s4.6, the process control circuit receives the read-back frame data fed back by the reconfiguration interface control circuit and then enters the step S7;
s4.7, performing bit flipping on the frame data, sending the frame data and the test address after the bit flipping to a reconfiguration interface control circuit through a reconfiguration command, and then sending an excitation starting signal to a user design control circuit;
s4.8, reconfiguring the interface control circuit, and reconfiguring the frame data after bit reversal into the circuit to be tested according to the test address after receiving the reconfiguration command;
s4.9, an excitation generating circuit receives an excitation starting signal and then initializes the excitation starting signal, and after initialization, m-bit data are randomly generated in each clock period and used as test excitation and sent to the parameterLighting circuit and circuit under test, 2mOne clock cycle traversing 2 of m-bit input busmData, wait for traversal 2mAfter the data, sending a data traversal end mark to a process control circuit;
s4.10, a result comparison circuit compares whether the data on the output bus after the reference circuit and the circuit to be tested are excited and driven are the same or not, if the data are different, the injected fault count is accumulated, otherwise, the injected fault count is kept unchanged, and then the injected fault count value is sent to the serial port communication circuit;
s4.11, the process control circuit enters the step S4.12 after receiving the data traversal end mark fed back by the excitation generating circuit;
s4.12, repeating the steps S4.7-S4.12 until all the bits of the same address frame data are turned over, re-executing the steps S4.4-S4.12 until the address traversal is finished, and sending a fault injection finishing identifier to the serial communication circuit;
and S4.13, the serial port communication circuit sends the fault count value to the upper computer.
Compared with the prior art, the invention has the beneficial effects that:
(1) according to the invention, through the analysis and research of the circuit to be tested, the information related to user design is extracted and used for constructing the user design control circuit, and the user design control circuit and the fault injection control circuit are interconnected to automatically generate a complete fault injection system, so that the complexity of manually constructing the fault injection system is saved, a large amount of time and energy of designers are saved, the application range of the fault injection system is enlarged, and the designers can quickly and conveniently evaluate the reliability of the FPGA circuit.
(2) The method and the device can adaptively and automatically build the fault injection system for various user circuits, simplify the process of building the fault injection system for each circuit and accelerate the large-scale circuit reliability evaluation when the reliability evaluation is carried out on a huge circuit set.
Drawings
FIG. 1 is a system architecture of an automated FPGA fault injection method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the implementation of an automated fault injection method according to an embodiment of the present invention;
fig. 3 is an execution flow of the fault injection system implemented by the embodiment of the present invention.
Detailed Description
The invention is further illustrated by the following examples.
The invention provides an automatic FPGA fault injection test system and a fault injection method.
An upper computer: reading and analyzing a circuit to be tested, extracting information, and automatically generating a lower computer hardware system; in the fault injection process, sending a command and an address to a lower computer;
the lower computer fault is injected into the hardware system: the method comprises the steps of designing a control circuit and a fault injection control circuit by a user, and controlling the readback, the turnover, the reconfiguration, the excitation generation and the result comparison of the fault injection.
The user design control circuit comprises a circuit to be tested, a reference circuit, an excitation generating circuit and a result comparing circuit;
the reference circuit is a copy of the circuit to be tested and comprises m-bit input buses and n-bit output buses, the m-bit input buses are simultaneously connected to the excitation generating circuit, the n-bit output ports are simultaneously connected to the result comparing circuit, and m and n are both more than or equal to 1;
a stimulus generation circuit for receiving a stimulus start signal and then initializing, and after initialization, randomly generating m-bit data in each clock cycle, as a test stimulus, and simultaneously transmitting the m-bit data to the reference circuit and the circuit to be tested, 2mOne clock cycle traversing 2 of m-bit input busmA piece of data; the excitation generating circuit generates pseudo random numbers as test excitation by adopting a linear feedback shift register mode.
The result comparison circuit is used for comparing whether the data on the output bus after the reference circuit and the circuit to be tested are excited and driven are the same or not, if the data are different, the injection fault counting value is accumulated, otherwise, the injection fault counting value is kept unchanged, and then the injection fault counting value is sent to the serial port communication circuit; in an initial state or after receiving a fault injection test starting signal, resetting an injection fault count;
the fault injection control circuit comprises a process control circuit, a reconfiguration interface control circuit and a serial port communication circuit;
the process control circuit receives the fault injection command message through the serial port communication circuit, analyzes the fault injection command message to obtain a first address and a last address of a fault injection test, sends a fault injection test starting signal to the user design control circuit, traverses the test addresses from the first address, reads back frame data of a corresponding address through the reconfiguration interface control circuit for each test address, turns over the read back frame data according to bits to obtain reconfiguration frame data, writes the reconfiguration frame data into the corresponding address through the reconfiguration interface control circuit, turns over one data bit once for the frame data of each address, traverses all the data bits, writes the reconfiguration frame data once, and sends an excitation starting signal once to the user design control circuit.
In addition to the fault injection command message, the upper computer can also send a read-back command and a reconfiguration command to the lower computer fault injection hardware system, wherein the read-back command is used for reading back data in the specified frame address; the reconfiguration command reconfigures the data into the specified frame address. The address refers to an address of a configuration frame in the FPGA, and is composed of 26 bits and used for positioning a row position and a column position configured in the FPGA.
In order to realize automatic testing, the lower computer fault injection hardware system is automatically realized by the following method:
s1, reading and analyzing a source code file of the circuit to be tested, and extracting information related to user design in the source code file, wherein the information related to user design comprises the name of a top-level module and interface design information, and the interface design information comprises the name, type and bit width information of a user IO interface used by the top-level module;
s2, automatically constructing a user design control circuit according to the name and interface design information of the top module of the circuit to be tested;
the specific steps of automatically constructing the user designed control circuit include:
automatically instantiating a circuit to be tested and a reference circuit according to the name of the top module of the circuit to be tested;
analyzing an input port and an output port according to the name, type and bit width information of a user IO interface in the interface design information of the circuit to be tested;
generating an excitation generating circuit matched with the input port;
a result comparison circuit is generated that matches the output port.
S3, the automatically generated user design control circuit and the preset general fault injection control circuit are connected and combined to generate a hardware description file of the fault injection system, the process of synthesizing, laying out and wiring of the fault injection system is automatically completed through the Tcl script to obtain an executable file of the fault injection system, and the executable file of the fault injection system is loaded into the FPGA used by the circuit to be tested to complete the automatic construction of the lower computer fault injection hardware system.
Further, in step S1, the circuit to be tested is a circuit designed by a user and implemented on an FPGA. The information related to user design refers to name and position information of a top module in the circuit and name and bit width information of input and output signals.
And the automatic building process of the lower computer fault injection hardware system is realized in the upper computer.
Based on the fault injection test system, the invention also provides an automatic FPGA fault injection method, which comprises the following steps:
s1, reading and analyzing a source code file of the circuit to be tested, and extracting the name and interface design information of a top module, wherein the interface design information comprises the name, type and bit width information of a user IO interface used by the top module;
s2, automatically constructing a user design control circuit according to the name and interface design information of the top module of the circuit to be tested;
s3, the automatically generated user design control circuit and the preset general fault injection control circuit are connected and combined to generate a hardware description file of the fault injection system, the process of synthesizing, laying out and wiring of the fault injection system is automatically completed through the Tcl script to obtain an executable file of the fault injection system, and the executable file of the fault injection system is loaded into the FPGA used by the circuit to be tested to complete the automatic construction of the lower computer fault injection hardware system.
S4, executing fault injection test: sending a fault injection command message to a lower computer fault injection hardware system by an upper computer, turning data frames in a preset address range of a circuit to be tested bit by bit, detecting output results of the circuit to be tested and a reference circuit under the same test excitation, judging whether the circuit to be tested has a fault, and counting the frequency of the fault;
and S5, after the preset addresses of the waiting circuit are all tested, uploading the counted failure times to an upper computer, and ending the process.
The fault injection test process is as follows: :
s4.1, the serial port communication circuit sends the fault injection command message received from the upper computer to the process control circuit;
s4.2, the process control circuit analyzes the fault injection command message, obtains the first address and the last address of the fault injection test from the fault injection command message, then sends a fault injection test starting signal to a user design control circuit, and the step S3 is entered;
s4.3, after the user design control circuit receives the fault injection test starting signal, the control result comparison circuit clears the injection fault count value;
s4.4, the process control circuit calculates the current test address and sends the read-back command and the test address to the reconfiguration interface control circuit;
s4.5, reconfiguring the interface control circuit, reading back frame data according to the test address after receiving the read-back command, and returning the frame data to the process control circuit;
s4.6, the process control circuit receives the read-back frame data fed back by the reconfiguration interface control circuit and then enters the step S7;
s4.7, performing bit flipping on the frame data, sending the frame data and the test address after the bit flipping to a reconfiguration interface control circuit through a reconfiguration command, and then sending an excitation starting signal to a user design control circuit;
s4.8, reconfiguring the interface control circuit, and reconfiguring the frame data after bit reversal into the circuit to be tested according to the test address after receiving the reconfiguration command;
s4.9, an excitation generating circuit receives an excitation starting signal and then initializes the excitation starting signal, after initialization, m-bit data are randomly generated in each clock period and serve as test excitation to be sent to a reference circuit and a circuit to be tested at the same time, 2mOne clock cycle traversing 2 of m-bit input busmData, wait for traversal 2mAfter the data, sending a data traversal end mark to a process control circuit;
s4.10, a result comparison circuit compares whether the data on the output bus after the reference circuit and the circuit to be tested are excited and driven are the same or not, if the data are different, the injected fault count is accumulated, otherwise, the injected fault count is kept unchanged, and then the injected fault count value is sent to the serial port communication circuit;
s4.11, the process control circuit enters the step S4.12 after receiving the data traversal end mark fed back by the excitation generating circuit;
s4.12, repeating the steps S4.7-S4.12 until all the bits of the same address frame data are turned over, re-executing the steps S4.4-S4.12 until the address traversal is finished, and sending a fault injection finishing identifier to the serial communication circuit;
and S4.13, the serial port communication circuit sends the fault count value to the upper computer.
The user design control circuit refers to a circuit related to user design, and cannot be reused along with the change of a circuit to be tested.
The fault injection control circuit is a circuit which is not influenced by user design and can be repeatedly used and is used for controlling the read-back, turnover and reconfiguration processes of fault injection and the interaction with an upper computer.
Example (b):
the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The FPGA development board used by the invention is Nexyz 4 of Xilinx company, and the FPGA model is Artix-7xc7a100tcsg 324.
The first embodiment is as follows:
the structure of the automatic FPGA fault injection system is shown in FIG. 1: the method comprises the steps that upper computer control software and a lower computer fault injection hardware system are included;
the upper computer controls software to be realized at a PC end, and in the process of establishing a fault injection system, a circuit to be tested is read and analyzed, information is extracted, and a lower computer hardware system is automatically generated; in the fault injection process, sending a control command and an address of fault injection to a lower computer;
the lower computer hardware system is realized on an FPGA and comprises a user designed control circuit and a fault injection control circuit, and controls the read-back, the turnover, the reconfiguration, the excitation generation and the result comparison of the fault injection;
fig. 2 shows a complete execution flow of the automatic FPGA fault injection method of this embodiment, which is specifically explained as follows:
step S1, reading and analyzing Verilog file of the circuit to be tested, extracting information related to user design, including name and position information of top module in the circuit and name and bit width information of input and output signals;
and step S2, automatically generating a user design control circuit according to the extracted information, and generating a complete hardware description file of the fault injection system by interconnecting and combining the user design control circuit and the fault injection control circuit. The user design control circuit is a circuit related to user design, can not be multiplexed along with the change of a circuit to be tested, and mainly comprises a circuit to be tested, a reference circuit, an excitation generating circuit and a result comparing circuit, wherein the circuit to be tested is used for generating a test excitation and driving circuit and comparing circuit results; the excitation generating circuit generates pseudo-random number excitation in a linear feedback shift register mode; the fault injection control circuit is a circuit which is not influenced by user design and can be repeatedly used, and mainly comprises a process control circuit, a reconfiguration interface control circuit and a serial port communication circuit, and is used for controlling the read-back, turnover and reconfiguration processes of fault injection and the interaction with an upper computer;
step S3, automatically completing the comprehensive implementation process of fault injection hardware through the Tcl script, and completing the automatic construction of a fault injection system; the Tcl script defines the automation processes of engineering creation, synthesis, layout and wiring and the like, and downloads the fault injection system to the FPGA to complete the automatic construction of the fault injection system;
step S4, fault injection is executed, the configuration bits are turned over bit by bit, the output states of the circuit to be tested and the reference circuit are detected, and whether an error occurs is judged; the specific process is shown in fig. 3: after receiving the command and the address, the lower computer reconfigures the single-frame data containing a bit-flipping configuration bit to the circuit to be tested; the same test excitation is used for driving the circuit to be tested and the reference circuit, the operation results of the circuit to be tested and the reference circuit are compared, and whether the circuit to be tested has a fault or not is judged; if the results are the same, the circuit to be tested does not have a fault; if the results are different, the circuit to be tested has a fault, and the address and fault information of the configuration bit are transmitted back to the upper computer; and repairing the configuration bit, turning over the next configuration bit, repeating the process until the address is at the end, and finishing the fault injection process.
And step S5, counting results after fault injection of all the configuration bits is finished, and ending the process.
Example two:
this example tests the following circuits: the Fin filter circuit and the three-mode redundant circuit Fin-TMR circuit thereof, the Sobel edge detection circuit and the three-mode redundant circuit Sobel-TMR circuit thereof, the Qsort quick sorting circuit and the three-mode redundant circuit Qsort-TMR thereof. The Fir filter is a finite-length single-bit impulse response filter and has wide application in the fields of communication, image processing, pattern recognition and the like. Sobel edge detection is used to compute an approximation of the gray scale of the image function. Triple Modular Redundancy (TMR) is the most common fault tolerant design technique, where three modules perform the same operation at the same time, with the most identical output as the correct output for the voting system.
The test results are shown in tables 1 and 2.
Table 1 fault injection system generated results
Table 2 fault injection test results
As can be seen from the data in table 1: the method of the invention is that the fault injection system with complete functions is successfully and automatically generated for 6 circuits in the embodiment; the average time for building the fault injection system by using the method is also far shorter than the average time for manually building the fault injection system.
As can be seen from the data in table 2: the sensitivity of the triple-modular redundancy circuit is greatly reduced compared with that of a common circuit, and the fault evaluation effect of the method is good.
In summary, the invention adaptively designs and generates the whole set of fault injection system for the user by analyzing the input circuit file to be tested, reduces the development difficulty of the fault injection system, assists the designer to quickly set up the fault injection system, and improves the efficiency of evaluating the reliability of the circuit.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to limit the present invention, and those skilled in the art can make variations and modifications of the present invention without departing from the spirit and scope of the present invention by using the methods and technical contents disclosed above.
Claims (7)
1. An automatic FPGA fault injection test system is characterized by comprising an upper computer and a lower computer fault injection hardware system, wherein the lower computer fault injection hardware system comprises a user designed control circuit and a fault injection control circuit; wherein:
the user design control circuit comprises a circuit to be tested, a reference circuit, an excitation generating circuit and a result comparing circuit;
the reference circuit is a copy of the circuit to be tested and comprises m-bit input buses and n-bit output buses, the m-bit input buses are simultaneously connected to the excitation generating circuit, the n-bit output ports are simultaneously connected to the result comparing circuit, and m and n are both more than or equal to 1;
a stimulus generation circuit for receiving a stimulus start signal and then initializing, and after initialization, randomly generating m-bit data in each clock cycle, as a test stimulus, and simultaneously transmitting the m-bit data to the reference circuit and the circuit to be tested, 2mOne clock cycle traversing 2 of m-bit input busmA piece of data;
the result comparison circuit is used for comparing whether the data on the output bus after the reference circuit and the circuit to be tested are excited and driven are the same or not, if the data are different, the injection fault counting value is accumulated, otherwise, the injection fault counting value is kept unchanged, and then the injection fault counting value is sent to the serial port communication circuit; in an initial state or after receiving a fault injection test starting signal, resetting an injection fault count;
the fault injection control circuit comprises a process control circuit, a reconfiguration interface control circuit and a serial port communication circuit;
the process control circuit receives the fault injection command message through the serial port communication circuit, analyzes the fault injection command message to obtain a first address and a last address of a fault injection test, sends a fault injection test starting signal to the user design control circuit, traverses the test addresses from the first address, reads back frame data of a corresponding address through the reconfiguration interface control circuit for each test address, turns over the read back frame data according to bits to obtain reconfiguration frame data, writes the reconfiguration frame data into the corresponding address through the reconfiguration interface control circuit, turns over one data bit once for the frame data of each address, traverses all the data bits, writes the reconfiguration frame data once, and sends an excitation starting signal once to the user design control circuit.
2. The automated FPGA fault injection test system of claim 1, wherein the lower computer fault injection hardware system is automatically implemented by:
s1, reading and analyzing a source code file of the circuit to be tested, and extracting the name and interface design information of a top module, wherein the interface design information comprises the name, type and bit width information of a user IO interface used by the top module;
s2, automatically constructing a user design control circuit according to the name and interface design information of the top module of the circuit to be tested;
s3, the automatically generated user design control circuit and the preset general fault injection control circuit are connected and combined to generate a hardware description file of the fault injection system, the process of synthesizing, laying out and wiring of the fault injection system is automatically completed through the Tcl script to obtain an executable file of the fault injection system, and the executable file of the fault injection system is loaded into the FPGA used by the circuit to be tested to complete the automatic construction of the lower computer fault injection hardware system.
3. The automated FPGA fault injection testing system of claim 2, wherein the specific step of automatically constructing the user designed control circuit in step S2 comprises:
automatically instantiating a circuit to be tested and a reference circuit according to the name of the top module of the circuit to be tested;
analyzing an input port and an output port according to the name, type and bit width information of a user IO interface in the interface design information of the circuit to be tested;
generating an excitation generating circuit matched with the input port;
a result comparison circuit is generated that matches the output port.
4. The automated FPGA fault injection testing system of claim 1, wherein the automatic set-up process of the lower computer fault injection hardware system is implemented in the upper computer.
5. The automated FPGA fault injection test system of claim 1, wherein said stimulus generation circuit employs a linear feedback shift register to generate pseudo-random numbers as test stimuli.
6. An automated FPGA fault injection test method based on the system of claim 1, characterized by comprising the steps of:
s1, reading and analyzing a source code file of the circuit to be tested, and extracting the name and interface design information of a top module, wherein the interface design information comprises the name, type and bit width information of a user IO interface used by the top module;
s2, automatically constructing a user design control circuit according to the name and interface design information of the top module of the circuit to be tested;
s3, the automatically generated user design control circuit and the preset general fault injection control circuit are connected and combined to generate a hardware description file of the fault injection system, the process of synthesizing, laying out and wiring of the fault injection system is automatically completed through the Tcl script to obtain an executable file of the fault injection system, and the executable file of the fault injection system is loaded into the FPGA used by the circuit to be tested to complete the automatic construction of the lower computer fault injection hardware system.
S4, executing fault injection test: sending a fault injection command message to a lower computer fault injection hardware system by an upper computer, turning data frames in a preset address range of a circuit to be tested bit by bit, detecting output results of the circuit to be tested and a reference circuit under the same test excitation, judging whether the circuit to be tested has a fault, and counting the frequency of the fault;
and S5, after the preset addresses of the waiting circuit are all tested, uploading the counted failure times to an upper computer, and ending the process.
7. The automated FPGA fault injection method of claim 6, wherein the fault injection test procedure is as follows: :
s4.1, the serial port communication circuit sends the fault injection command message received from the upper computer to the process control circuit;
s4.2, the process control circuit analyzes the fault injection command message, obtains the first address and the last address of the fault injection test from the fault injection command message, then sends a fault injection test starting signal to a user design control circuit, and the step S3 is entered;
s4.3, after the user design control circuit receives the fault injection test starting signal, the control result comparison circuit clears the injection fault count value;
s4.4, the process control circuit calculates the current test address and sends the read-back command and the test address to the reconfiguration interface control circuit;
s4.5, reconfiguring the interface control circuit, reading back frame data according to the test address after receiving the read-back command, and returning the frame data to the process control circuit;
s4.6, the process control circuit receives the read-back frame data fed back by the reconfiguration interface control circuit and then enters the step S7;
s4.7, performing bit flipping on the frame data, sending the frame data and the test address after the bit flipping to a reconfiguration interface control circuit through a reconfiguration command, and then sending an excitation starting signal to a user design control circuit;
s4.8, reconfiguring the interface control circuit, and reconfiguring the frame data after bit reversal into the circuit to be tested according to the test address after receiving the reconfiguration command;
s4.9, excitation generating circuit, which receives excitation starting signal and then carries outInitialization, after which m-bit data are randomly generated every clock cycle, as test stimuli, and sent to the reference circuit and the circuit under test simultaneously, 2mOne clock cycle traversing 2 of m-bit input busmData, wait for traversal 2mAfter the data, sending a data traversal end mark to a process control circuit;
s4.10, a result comparison circuit compares whether the data on the output bus after the reference circuit and the circuit to be tested are excited and driven are the same or not, if the data are different, the injected fault count is accumulated, otherwise, the injected fault count is kept unchanged, and then the injected fault count value is sent to the serial port communication circuit;
s4.11, the process control circuit enters the step S4.12 after receiving the data traversal end mark fed back by the excitation generating circuit;
s4.12, repeating the steps S4.7-S4.12 until all the bits of the same address frame data are turned over, re-executing the steps S4.4-S4.12 until the address traversal is finished, and sending a fault injection finishing identifier to the serial communication circuit;
and S4.13, the serial port communication circuit sends the fault count value to the upper computer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111145489.8A CN113886158B (en) | 2021-09-28 | 2021-09-28 | Automatic FPGA fault injection test system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111145489.8A CN113886158B (en) | 2021-09-28 | 2021-09-28 | Automatic FPGA fault injection test system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113886158A true CN113886158A (en) | 2022-01-04 |
CN113886158B CN113886158B (en) | 2024-04-02 |
Family
ID=79007471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111145489.8A Active CN113886158B (en) | 2021-09-28 | 2021-09-28 | Automatic FPGA fault injection test system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113886158B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115529257A (en) * | 2022-09-26 | 2022-12-27 | 成都玖锦科技有限公司 | FPGA-based big data real-time data detection system and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106802645A (en) * | 2016-12-21 | 2017-06-06 | 北京时代民芯科技有限公司 | A kind of FPGA single particle overturns fault simulation system and method |
CN108737187A (en) * | 2018-05-23 | 2018-11-02 | 哈尔滨工业大学 | A kind of CAN bus fault simulation system and failure simulation method |
CN109858195A (en) * | 2019-03-22 | 2019-06-07 | 中国科学院光电技术研究所 | The on-line simulation system of necessary position single-particle inversion failure on a kind of SRAM type FPGA |
WO2021185107A1 (en) * | 2020-03-17 | 2021-09-23 | 中国第一汽车股份有限公司 | Hardware circuit fault injection test method, apparatus, and device, medium and system |
-
2021
- 2021-09-28 CN CN202111145489.8A patent/CN113886158B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106802645A (en) * | 2016-12-21 | 2017-06-06 | 北京时代民芯科技有限公司 | A kind of FPGA single particle overturns fault simulation system and method |
CN108737187A (en) * | 2018-05-23 | 2018-11-02 | 哈尔滨工业大学 | A kind of CAN bus fault simulation system and failure simulation method |
CN109858195A (en) * | 2019-03-22 | 2019-06-07 | 中国科学院光电技术研究所 | The on-line simulation system of necessary position single-particle inversion failure on a kind of SRAM type FPGA |
WO2021185107A1 (en) * | 2020-03-17 | 2021-09-23 | 中国第一汽车股份有限公司 | Hardware circuit fault injection test method, apparatus, and device, medium and system |
Non-Patent Citations (1)
Title |
---|
于婷婷;陈雷;李学武;王硕;周婧;: "基于码流的软件控制FPGA故障注入系统", 微电子学, no. 04, 20 August 2017 (2017-08-20) * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115529257A (en) * | 2022-09-26 | 2022-12-27 | 成都玖锦科技有限公司 | FPGA-based big data real-time data detection system and method |
Also Published As
Publication number | Publication date |
---|---|
CN113886158B (en) | 2024-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4601034A (en) | Method and apparatus for testing very large scale integrated memory circuits | |
US6074426A (en) | Method for automatically generating behavioral environment for model checking | |
US8407638B2 (en) | Methods and apparatus for boolean equivalency checking in the presence of voting logic | |
USRE42264E1 (en) | Field programmable device | |
US9575862B1 (en) | Integrated circuits with error handling capabilities | |
US6480019B2 (en) | Multiple voted logic cell testable by a scan chain and system and method of testing the same | |
CN113886158A (en) | Automatic FPGA fault injection test system and method | |
US10768227B2 (en) | Systems and methods for analyzing failure rates due to soft/hard errors in the design of a digital electronic device | |
JPH0432348B2 (en) | ||
US7685485B2 (en) | Functional failure analysis techniques for programmable integrated circuits | |
Wang et al. | On automatic-verification pattern generation for SoC with port-order fault model | |
CN112464613B (en) | Digital circuit robustness verification method and system | |
Cheng et al. | Radiation-hardened test design for aerospace SoC | |
EP3642637B1 (en) | System and method for formal fault propagation analysis | |
Kruthika et al. | SRAM memory built in self-test using MARCH algorithm | |
US7587649B2 (en) | Testing of reconfigurable logic and interconnect sources | |
CN109212408B (en) | Scanning unit, and output control method and device of redundant trigger | |
JPH0259935A (en) | Fault diagnosis dictionary forming system for logical device | |
Gericota et al. | Robust configurable system design with built-in self-healing | |
US20040107393A1 (en) | Method and device for testing the mapping/implementation of a model of a logic circuit onto/in a hardware emulator | |
JPH0915301A (en) | Test circuit for semiconductor integrated circuit and its test method | |
JP2000259441A (en) | Debugging circuit | |
JP2990813B2 (en) | Failure simulation method | |
US20070136699A1 (en) | Dependency matrices and methods of using the same for testing or analyzing an integrated circuit | |
CN115563930A (en) | Automatic verification method and device based on storage model, terminal 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |