CN113886158A - An automated FPGA fault injection test system and method - Google Patents

An automated FPGA fault injection test system and method Download PDF

Info

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
test
fault
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
Application number
CN202111145489.8A
Other languages
Chinese (zh)
Other versions
CN113886158B (en
Inventor
张瑶伟
陈雷
王硕
周婧
田春生
帅鉴峰
周冲
庞永江
马筱婧
冯涵旭
杜忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Microelectronic Technology Institute
Mxtronics Corp
Original Assignee
Beijing Microelectronic Technology Institute
Mxtronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Microelectronic Technology Institute, Mxtronics Corp filed Critical Beijing Microelectronic Technology Institute
Priority to CN202111145489.8A priority Critical patent/CN113886158B/en
Publication of CN113886158A publication Critical patent/CN113886158A/en
Application granted granted Critical
Publication of CN113886158B publication Critical patent/CN113886158B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation 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

Automatic FPGA fault injection test system and method
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
Figure BDA0003285417210000121
Table 2 fault injection test results
Figure BDA0003285417210000122
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.一种自动化的FPGA故障注入测试系统,其特征在于包括上位机和下位机故障注入硬件系统,下位机故障注入硬件系统包括用户设计控制电路与故障注入控制电路;其中:1. an automated FPGA fault injection test system is characterized in that comprising a host computer and a lower computer fault injection hardware system, and the lower computer fault injection hardware system comprises a user design control circuit and a fault injection control circuit; Wherein: 用户设计控制电路包括待测电路、参照电路、激励产生电路、结果比较电路;The user-designed control circuit includes the circuit to be tested, the reference circuit, the excitation generation circuit, and the result comparison circuit; 参照电路为待测电路的复制,均包括m位输入总线和n位输出总线,m位输入总线同时连接至激励产生电路,n位输出端口同时连接至结果比较电路,m,n均大于等于1;The reference circuit is a copy of the circuit to be tested, including an m-bit input bus and an n-bit output bus. The m-bit input bus is connected to the excitation generation circuit at the same time, and the n-bit output port is connected to the result comparison circuit at the same time. Both m and n are greater than or equal to 1 ; 激励产生电路,接收激励启动信号后进行初始化,初始化之后每个时钟周期随机生成m位数据,作为测试激励,同时发送给参照电路和待测电路,2m个时钟周期遍历m位输入总线的2m个数据;The excitation generation circuit is initialized after receiving the excitation start signal. After initialization, m-bit data is randomly generated in each clock cycle as a test excitation, and sent to the reference circuit and the circuit to be tested at the same time. 2 m clock cycles traverse 2 of the m-bit input bus. m data; 结果比较电路,用于比较参照电路和待测电路受到激励驱动之后输出总线上的数据是否相同,如果不同,则累加注入故障计数值,否则,保持注入故障计数值不变,之后将注入故障计数值发送给串口通信电路;初始状态下或者收到故障注入测试启动信号之后,将注入故障计数清零;The result comparison circuit is used to compare whether the data on the output bus is the same after the reference circuit and the circuit under test are driven by excitation. If they are different, the injected fault count value will be accumulated. Otherwise, the injected fault count value will remain unchanged, and then the injected fault count will be injected. The value is sent to the serial communication circuit; in the initial state or after receiving the fault injection test start signal, the injection fault count is cleared; 故障注入控制电路包括过程控制电路、重配接口控制电路与串口通信电路;The fault injection control circuit includes 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 communication circuit, parses the fault injection command message, obtains the first address and the last address of the fault injection test, and sends the fault injection test start signal to the user-designed control circuit, starting from the first address and traversing the test Address, for each test address, read back the frame data of the corresponding address through the reconfiguration interface control circuit, flip the read back frame data bit by bit to obtain the reconfiguration frame data, and then write the reconfiguration frame data through the reconfiguration interface control circuit Enter the corresponding address, flip one data bit at a time for the frame data of each address, traverse all the data bits, and send an excitation start signal to the user-designed control circuit every time the reconfigured frame data is written. 2.根据权利要求1所述的一种自动化的FPGA故障注入测试系统,其特征在于所述下位机故障注入硬件系统通过如下方法自动实现:2. a kind of automatic FPGA fault injection test system according to claim 1 is characterized in that described lower computer fault injection hardware system is automatically realized by the following method: S1、读取并分析待测电路的源代码文件,提取其中的顶层模块的名称和接口设计信息,所述接口设计信息包括顶层模块使用过的用户IO接口名称、类型和位宽信息;S1, read and analyze the source code file of the circuit to be tested, extract the name and interface design information of the top-level module therein, and the interface design information includes the user IO interface name, type and bit width information used by the top-level module; S2、根据待测电路顶层模块的名称和接口设计信息,自动构建用户设计控制电路;S2. According to the name and interface design information of the top-level module of the circuit to be tested, the user-designed control circuit is automatically constructed; S3、将自动生成的用户设计控制电路与预设的通用故障注入控制电路互连结合,生成故障注入系统的硬件描述文件,通过Tcl脚本自动完成故障注入系统的综合、布局布线过程,得到故障注入系统的可执行文件,将故障注入系统的可执行文件加载至被测电路所使用的FPGA中,完成下位机故障注入硬件系统的自动搭建。S3. Interconnect the automatically generated user-designed control circuit with the preset general fault injection control circuit, generate a hardware description file of the fault injection system, and automatically complete the synthesis, layout and wiring process of the fault injection system through Tcl scripts, and obtain the fault injection system. The executable file of the system, load the executable file of the fault injection system into the FPGA used by the circuit under test, and complete the automatic construction of the fault injection hardware system of the lower computer. 3.根据权利要求2所述的一种自动化的FPGA故障注入测试系统,其特征在于所述步骤S2中自动构建用户设计控制电路的具体步骤包括:3. a kind of automated FPGA fault injection test system according to claim 2, is characterized in that the concrete steps of automatically constructing user design control circuit in described step S2 comprise: 根据待测电路顶层模块的名称,自动例化出待测电路与参照电路;According to the name of the top-level module of the circuit to be tested, the circuit to be tested and the reference circuit are automatically instantiated; 根据待测电路的接口设计信息中用户IO接口名称、类型和位宽信息分析出输入端口和输出端口;Analyze the input port and output port according to the user IO interface name, type and bit width information in the interface design information of the circuit to be tested; 生成与输入端口匹配的激励产生电路;Generate an excitation generating circuit matching the input port; 生成与输出端口匹配的结果比较电路。Generate a result compare circuit that matches the output port. 4.根据权利要求1所述的一种自动化的FPGA故障注入测试系统,其特征在于所述下位机故障注入硬件系统的自动搭建过程在上位机中实现。4. An automated FPGA fault injection test system according to claim 1, wherein the automatic building process of the fault injection hardware system of the lower computer is realized in the upper computer. 5.根据权利要求1所述的一种自动化的FPGA故障注入测试系统,其特征在于所述的激励产生电路采用线性反馈移位寄存器的方式来生成伪随机数,作为测试激励。5 . The automated FPGA fault injection test system according to claim 1 , wherein the excitation generating circuit adopts a linear feedback shift register to generate pseudo-random numbers as a test excitation. 6 . 6.基于权利要求1所述系统的一种自动化的FPGA故障注入测试方法,其特征在于包括如下步骤:6. a kind of automated FPGA fault injection test method based on the described system of claim 1, is characterized in that comprising the steps: S1、读取并分析待测电路的源代码文件,提取其中的顶层模块的名称和接口设计信息,所述接口设计信息包括顶层模块使用过的用户IO接口名称、类型和位宽信息;S1, read and analyze the source code file of the circuit to be tested, extract the name and interface design information of the top-level module therein, and the interface design information includes the user IO interface name, type and bit width information used by the top-level module; S2、根据待测电路顶层模块的名称和接口设计信息,自动构建用户设计控制电路;S2. According to the name and interface design information of the top-level module of the circuit to be tested, the user-designed control circuit is automatically constructed; S3、将自动生成的用户设计控制电路与预设的通用故障注入控制电路互连结合,生成故障注入系统的硬件描述文件,通过Tcl脚本自动完成故障注入系统的综合、布局布线过程,得到故障注入系统的可执行文件,将故障注入系统的可执行文件加载至被测电路所使用的FPGA中,完成下位机故障注入硬件系统的自动搭建。S3. Interconnect the automatically generated user-designed control circuit with the preset general fault injection control circuit, generate a hardware description file of the fault injection system, and automatically complete the synthesis, layout and wiring process of the fault injection system through Tcl scripts, and obtain the fault injection system. The executable file of the system, load the executable file of the fault injection system into the FPGA used by the circuit under test, and complete the automatic construction of the fault injection hardware system of the lower computer. S4、执行故障注入测试:由上位机向下位机故障注入硬件系统发送故障注入命令消息,对待测电路预设地址范围内的数据帧进行逐位翻转,并检测待测电路和参照电路在相同的测试激励下的输出结果,判断待测电路是否出现故障,并统计出现故障的次数;S4. Execute the fault injection test: the upper computer sends a fault injection command message to the fault injection hardware system of the lower computer, flips the data frames within the preset address range of the circuit under test bit by bit, and detects that the circuit under test and the reference circuit are in the same Test the output results under excitation, determine whether the circuit under test is faulty, and count the number of faults; S5、等待测电路预设地址全部测试完毕之后,将统计的出现故障次数上传至上位机,结束流程。S5. After all the preset addresses of the test circuit are tested, upload the counted number of faults to the upper computer, and end the process. 7.根据权利要求6所述的一种自动化的FPGA故障注入方法,其特征在于所述故障注入测试过程如下::7. a kind of automated FPGA fault injection method according to claim 6 is characterized in that described fault injection test process is as follows: S4.1、串口通信电路,将从上位机接收到的故障注入命令消息发送给过程控制电路;S4.1, serial communication circuit, send the fault injection command message received from the host computer to the process control circuit; S4.2、过程控制电路解析故障注入命令消息,从中得到故障注入测试的首地址、末地址,之后,发送故障注入测试启动信号给用户设计控制电路,进入步骤S3;S4.2, the process control circuit parses the fault injection command message, obtains the first address and the last address of the fault injection test from it, and then sends the fault injection test start signal to the user to design the control circuit, and goes to step S3; S4.3、用户设计控制电路收到故障注入测试启动信号志之后,控制结果比较电路将注入故障计数值清零;S4.3. After the user-designed control circuit receives the fault injection test start signal, the control result comparison circuit clears the injected fault count value; S4.4、过程控制电路计算当前测试地址,将回读命令和测试地址发送给重配接口控制电路;S4.4, the process control circuit calculates the current test address, and sends the readback command and the test address to the reconfiguration interface control circuit; S4.5、重配接口控制电路,收到回读命令后,根据测试地址回读出帧数据,并返回给过程控制电路;S4.5, reconfigure the interface control circuit, after receiving the readback command, read back the frame data according to the test address, and return it to the process control circuit; S4.6、过程控制电路,接收重配接口控制电路反馈的回读的帧数据之后,进入步骤S7;S4.6, the process control circuit, after receiving the read-back frame data fed back by the reconfiguration interface control circuit, enter step S7; S4.7、将帧数据进行位翻转,将位翻转之后的帧数据和测试地址通过重配命令发送给重配接口控制电路,然后发送激励启动信号至用户设计控制电路;S4.7, perform bit flipping of the frame data, send the frame data and test address after the bit flipping to the reconfiguration interface control circuit through the reconfiguration command, and then send the excitation start signal to the user design control circuit; S4.8、重配接口控制电路,收到重配命令后,根据测试地址将位翻转之后的帧数据重配至待测电路中;S4.8. The reconfiguration interface control circuit, after receiving the reconfiguration command, reconfigures the frame data after the bit flip to the circuit to be tested according to the test address; S4.9、激励产生电路,接收激励启动信号后进行初始化,初始化之后每个时钟周期随机生成m位数据,作为测试激励,同时发送给参照电路和待测电路,2m个时钟周期遍历m位输入总线的2m个数据,待遍历完2m个数据之后发送数据遍历结束标志给过程控制电路;S4.9. The excitation generation circuit, after receiving the excitation start signal, performs initialization. After initialization, m-bit data is randomly generated in each clock cycle as a test excitation, and sent to the reference circuit and the circuit to be tested at the same time, 2 m clock cycles traverse m bits Input the 2 m data of the bus, after traversing the 2 m data, send the data traversal end flag to the process control circuit; S4.10、结果比较电路,比较参照电路和待测电路受到激励驱动之后输出总线上的数据是否相同,如果不同,则累加注入故障计数,否则,保持注入故障计数不变,之后将注入故障计数值发送给串口通信电路;S4.10. The result comparison circuit compares whether the data on the output bus is the same after the reference circuit and the circuit to be tested are driven by excitation. If they are different, the injected fault count is accumulated. Otherwise, the injected fault count is kept unchanged, and then the injected fault count will be added. The value is sent to the serial communication circuit; S4.11、过程控制电路,待收到激励产生电路反馈的数据遍历结束标志后,进入步骤S4.12;S4.11, the process control circuit, after receiving the data traversal end flag fed back by the excitation generating circuit, go to step S4.12; S4.12、重复步骤S4.7~S4.12,直到对同一个地址帧数据的所有位执行完翻转动作之后,重新执行步骤S4.4~S4.12,直到待地址遍历结束之后,向串口通信电路发送故障注入结束标识;S4.12. Repeat steps S4.7 to S4.12 until all bits of the same address frame data are flipped, and then re-execute steps S4.4 to S4.12 until after the address traversal ends, send the serial port to the serial port. The communication circuit sends the fault injection end flag; S4.13、串口通信电路将故障计数值发送给上位机。S4.13, the serial communication circuit sends the fault count value to the upper computer.
CN202111145489.8A 2021-09-28 2021-09-28 Automatic FPGA fault injection test system and method Active CN113886158B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
于婷婷;陈雷;李学武;王硕;周婧;: "基于码流的软件控制FPGA故障注入系统", 微电子学, no. 04, 20 August 2017 (2017-08-20) *

Cited By (1)

* Cited by examiner, † Cited by third party
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
Patel et al. Evaluating circuit reliability under probabilistic gate-level fault models
Abraham et al. Fault and error models for VLSI
US6074426A (en) Method for automatically generating behavioral environment for model checking
US8914687B2 (en) Providing test coverage of integrated ECC logic en embedded memory
US6505323B1 (en) Methods, apparatus and computer program products that perform layout versus schematic comparison of integrated circuit memory devices using bit cell detection and depth first searching techniques
CN107741559B (en) Single event upset test system and method under space radiation environment
CN101561477A (en) Method and device for testing single event upset in in-field programmable logic gate array
De Paula et al. TAB-BackSpace: Unlimited-length trace buffers with zero additional on-chip overhead
USRE42264E1 (en) Field programmable device
Monson et al. A Fault Injection Analysis of Linux Operating on an FPGA‐Embedded Platform
CN107817439A (en) A kind of disabler time appraisal procedure based on SRAM type FPGA sensitive factors
US20020013928A1 (en) Multiple voted logic cell testable by a scan chain and system and method of testing the same
CN113886158A (en) An automated FPGA fault injection test system and method
Anjankar et al. FPGA based multiple fault tolerant and recoverable technique using triple modular redundancy (FRTMR)
JPH0432348B2 (en)
US7685485B2 (en) Functional failure analysis techniques for programmable integrated circuits
US6516449B2 (en) Methodology to create integrated circuit designs by replication maintaining isomorphic input output and fault behavior
Wang et al. On automatic-verification pattern generation for SoC with port-order fault model
US20220414306A1 (en) System and method for formal fault propagation analysis
Cheng et al. Radiation-hardened test design for aerospace SoC
CN112464613B (en) Digital circuit robustness verification method and system
Salewski et al. Fault handling in FPGAs and microcontrollers in safety-critical embedded applications: A comparative survey
Kruthika et al. SRAM memory built in self-test using MARCH algorithm
CN108631772B (en) A three-mode redundant circuit structure
Kiran et al. Development of an Efficient and Reliable Verification Technique for Complex SoC Package

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