A testing method for configurable interconnect nodes in FPGA
By building a directed graph with interconnect lines and nodes of FPGAs as vertices and directed edges, a graph theory method is used to generate test cases, which solves the problems of low testing efficiency and insufficient coverage in the existing technology, and achieves efficient and general FPGA can be configured for interconnect node testing.
Patent Information
- Application Number
- CN202310830706.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2043-07-07
AI Technical Summary
The configurable interconnect node testing method of existing FPGA chips relies on a specific chip architecture, has low test efficiency and versatility, and is difficult to reach a high level of coverage for PIP failures.
Abstract the interconnection lines in the FPGA as vertices, and the interconnection nodes as directed edges. Build a directed graph, search for test paths through graph theory methods, generate test cases with high coverage, and realize the full range of configurable interconnection nodes. Coverage test.
The test method that does not depend on a specific chip architecture is implemented, which significantly improves test coverage and efficiency, and can achieve coverage of more than 95% through fewer test cases, simplifying the operation process.
Smart Images

Figure CN116859224B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of FPGA technology, and in particular to a method for testing configurable interconnect nodes in FPGA. Background Art
[0002] Programmable logic devices (FPGA, Field Programmable Gate Array) have the advantages of short development cycle, low cost, low risk, high integration, high flexibility and easy maintenance and upgrading of electronic systems. Therefore, they have become the mainstream of digital chips and are widely used in communications, control, video, information processing, consumer electronics, Internet, automobiles, aerospace, big data, artificial intelligence and many other fields.
[0003] Except for some dedicated carry logic or function expansion related channels, different functional modules (such as CLB, IO, DSP, BRAM, etc.) inside FPGA are mainly connected through interconnection resources. Interconnection resources include switch matrix (SWB) and interconnection lines. Interconnection lines are used to realize the connection between functional modules and the input and output terminals of the corresponding switch matrix, and to realize the connection between the input and output terminals of different switch matrices. The bottom layer of the switch matrix actually includes a large number of PIPs (Programmable Interconnect Points), which are used to open up the interconnection between the interconnection lines passing through them through configuration. Please participate Figure 1 The interconnection diagram of a single switch matrix is shown in FIG. 1 , where the lines 1 to 16 outside the switch matrix represent 16 interconnection lines connected to the switch matrix, and each dotted line inside the switch matrix represents an optional path, which is a PIP. The actual circuit is usually implemented in that a selection end is controlled by a multiplexer configured with an SRAM to realize the function of multiple PIPs with the same destination. Figure 1 This is just an example. In actual application, FPGA contains a large number of switch matrices, each of which can connect a large number of interconnect lines. The switch matrix also includes a large number of PIPs. The interconnection resources occupy most of the circuit area of the entire FPGA (about 50% to 90%) and are the part with the highest probability of failure in FPGA resources. Among them, the failure of PIP is the part with the highest probability. Therefore, the reliability of PIP directly affects the operating reliability of the entire FPGA.
[0004] Therefore, in the current design and development process of FPGA, it is often necessary to test the configurable interconnect nodes. The traditional testing method mainly uses the programmable logic blocks in the FPGA to implement built-in self-test paths, or classifies and post-processes the configurable interconnect nodes, etc. However, these existing traditional testing methods are highly dependent on the chip architecture of the FPGA, and test cases need to be designed for specific chip architectures, resulting in low testing efficiency and versatility. Summary of the invention
[0005] In view of the above problems and technical requirements, the applicant proposes a test method for configurable interconnect nodes in FPGA. The technical solution of the application is as follows:
[0006] A method for testing a configurable interconnect node in an FPGA, the method comprising:
[0007] Abstracting each interconnection line in the FPGA as each vertex, and abstracting the configurable interconnection node between each two interconnection lines in the FPGA as a directed edge between the corresponding two vertices, to construct a directed graph for characterizing the connection relationship between the interconnection lines in the FPGA and the configurable interconnection nodes;
[0008] Initialize a number of input vertices and a number of output vertices, the input vertices are vertices corresponding to the interconnection lines having a stimulus applying function, and the output vertices are vertices corresponding to the interconnection lines having a signal collecting function;
[0009] Searching for a test path based on a directed graph, wherein the test path has one of the input vertices as a signal input end, one of the output vertices as a signal output end, and includes vertices and directed edges from the signal input end to the signal output end;
[0010] Repeat the steps of searching for test paths based on a directed graph until the test coverage reaches a predetermined threshold, and obtain a test case including several test paths. Apply an excitation signal at the signal input end of each test path in the test case, and collect a response signal at the corresponding signal output end, so as to complete the test of the configurable interconnection nodes in the FPGA.
[0011] A further technical solution is to search for a test path based on a directed graph, including:
[0012] Randomly select any input vertex and initialize it as the current vertex;
[0013] Based on the directed graph, search for a directed edge connected to the current vertex as a candidate directed edge;
[0014] When another vertex connected to the candidate directed edge is not an output vertex, the other vertex connected to the candidate directed edge is used as the updated current vertex and the step of searching for a directed edge connected to the current vertex in the directed graph as a candidate directed edge is re-executed;
[0015] When another vertex connected by the candidate directed edge is an output vertex, the search is completed and a test path is obtained. The test path includes the initialized input vertex, the determined output vertex, and several candidate directed edges passing through in sequence.
[0016] A further technical solution is that, for any current vertex, the candidate directed edge connected to the current vertex is used the least number of times among all directed edges connected to the current vertex, and another vertex connected to the candidate directed edge has not been used in the test case.
[0017] A further technical solution is that the usage counts of all directed edges in the directed graph are initialized to 0, and a directed edge connected to the current vertex is searched based on the directed graph as a candidate directed edge, including for any current vertex:
[0018] Based on the directed graph, traverse the directed edges connected to the current vertex in order of usage from small to large. For any directed edge traversed:
[0019] When it is determined that another vertex connected by the traversed directed edge has not been used in the test case, the traversed directed edge is used as a candidate directed edge of the current vertex, and the number of times the candidate directed edge is used is increased by one;
[0020] When it is determined that another vertex connected by the traversed directed edge has been used in the test case, it is determined that the traversed directed edge is unavailable, and the step of traversing each directed edge connected to the current vertex in ascending order of the number of times used based on the directed graph is executed again.
[0021] A further technical solution is that the test coverage is the ratio between the number of directed edges with non-zero usage times and the number of all directed edges in a directed graph.
[0022] A further technical solution is that constructing a directed graph further includes:
[0023] Each data path formed inside the functional module connected to the interconnection line in the FPGA is abstracted as a directed edge between the corresponding two vertices.
[0024] A further technical solution is that the test method further includes: when a data path inside a functional module in the FPGA is abstracted as a directed edge, a logic device is inserted on the directed edge, and the logic device is a register or a latch;
[0025] When an excitation signal is applied to a signal input end of any test path and a response signal is collected at a corresponding signal output end to determine that at least one configurable interconnect node in the test path fails, the failed configurable interconnect node is determined according to the density of logic devices in the test path.
[0026] A further technical solution is that determining a faulty configurable interconnect node according to the state of a logic device in a test path includes: reading the values of each logic device in the test path and determining a first logic device and a second logic device that are adjacent to each other along a data transmission direction on the test path, the second logic device being located upstream of the first logic device in the data transmission direction, the read value of the second logic device being normal, and the read value of the first logic device being abnormal; and detecting configurable interconnect nodes on the interconnect path between the second logic device and the first logic device to determine a faulty configurable interconnect node.
[0027] A further technical solution is that the initialized input vertices are vertices corresponding to some interconnections in the FPGA that have an excitation applying function, and the number of the initialized input vertices accounts for the number of vertices corresponding to all interconnections in the FPGA that have an excitation applying function that reaches a first threshold;
[0028] The initialized output vertices are vertices corresponding to some interconnection lines with signal acquisition function in the FPGA, and the number of the initialized output vertices accounts for the number of vertices corresponding to all interconnection lines with signal acquisition function in the FPGA reaching a second threshold.
[0029] The beneficial technical effects of this application are:
[0030] The present application discloses a testing method for configurable interconnection nodes in an FPGA. The testing method models all the configurable interconnection nodes to be tested in the whole chip and the corresponding auxiliary paths into a complete directed graph including vertices and directed edges. A coverage-driven method based on graph theory traverses and searches the test paths to obtain test cases with coverage that meets the standard. The method establishes test cases based on a directed graph constructed by the mutual structure of interconnection resources in the FPGA, and is not based on a specific chip architecture. Therefore, the method is a universal method that does not rely on the chip architecture. The obtained test paths are simply from a signal input end through a number of interconnection lines and PIPs to a signal output end. The test vector is to apply a stimulus at the starting point of these test paths and obtain a corresponding response at the end point. The testing method has a wide range of applications, strong versatility, easy operation, and high testing efficiency.
[0031] In order to achieve a better test coverage, traditional testing methods often need to use thousands of test cases. It is difficult to achieve both test coverage and rate, and the test coverage can often only reach more than 30%. The test method of the present application is based on the traversal search of graph theory, and has been consciously looking for directed edges that have not been covered. Therefore, a higher test coverage can be achieved with a smaller number of test cases. After actual verification, more than 95% of the test coverage can be achieved with more than 300 test cases. Therefore, the method of the present application can not only have better performance in both test coverage and test rate, but also can greatly improve the test coverage and optimize the test efficiency.
[0032] The method of the present application can also be extended to test circuit structures similar to PIP functions in FPGAs, such as lookup tables and registers. By incorporating circuit structures to be tested, such as lookup tables and registers, into a directed graph through the same modeling method, the same high-efficiency testing can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a connection diagram of the configurable interconnection nodes inside the switch matrix and the external interconnection lines.
[0034] Figure 2 The present invention is a flowchart of a method for testing a configurable interconnected node according to an embodiment of the present invention.
[0035] Figure 3 It is a schematic diagram of the local structure of a directed graph obtained by abstracting the connection relationship between configurable interconnection nodes of local interconnection lines in an example of the present application.
[0036] Figure 4 It is a method flow chart of a method for testing configurable interconnected nodes according to another embodiment of the present application. DETAILED DESCRIPTION
[0037] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.
[0038] The present application discloses a method for testing configurable interconnect nodes in an FPGA. The method comprises the following steps. Figure 2 The flowchart shown:
[0039] Step 1: abstract each interconnection line in the FPGA as each vertex, and abstract the configurable interconnection node between each two interconnection lines in the FPGA as a directed edge between the corresponding two vertices, so as to construct a directed graph for characterizing the connection relationship between the interconnection lines and the configurable interconnection nodes in the FPGA.
[0040] According to the basic principles of testing, if a circuit structure has only input but no output, or only output but no input, then this circuit structure cannot be analyzed and tested through a fault model. Therefore, in addition to abstracting the interconnection lines and configurable interconnection nodes within the FPGA, each data path formed inside the functional module connected to the interconnection lines in the FPGA is abstracted as a directed edge between the corresponding two vertices, and is also modeled into a directed graph, thereby modeling all connected interconnection lines in the FPGA and the configurable interconnection nodes in the switch matrix into a directed graph.
[0041] In one example, the configurable interconnect nodes in two switch matrices in the FPGA and the interconnect lines connected thereto and the directed graph obtained by corresponding modeling are as follows: Figure 3 As shown, the vertices in the modeled directed graph correspond one-to-one to the interconnection lines, the directed edges in the modeled directed graph correspond one-to-one to the configurable interconnection nodes in the switch matrix, and the connection relationship between the vertices and the directed edges in the directed graph is consistent with the connection relationship between the corresponding interconnection lines and the configurable interconnection nodes.
[0042] Step 2: Initialize several input vertices and several output vertices.
[0043] Among them, the input vertex is the vertex corresponding to the interconnection line with the function of applying excitation, that is, it is necessary to ensure that the excitation signal is easy to apply at the input vertex. Commonly, the vertices corresponding to the interconnection lines connected to the IO ports in the FPGA, the register data ports on the BSCAN chain, and the data ports of other registers can be used as input vertices. The output vertex is the vertex corresponding to the interconnection line with the signal collection function, that is, it is necessary to ensure that the response signal is easy to collect at the output vertex.
[0044] In order to improve the success rate of searching the test path, the number of initialized input vertices and output vertices cannot be too small, but too many numbers will increase the search complexity. The present application does not require that all vertices corresponding to interconnects with excitation application functions be found as input vertices, nor does it require that all vertices corresponding to interconnects with signal acquisition functions be found as output vertices. The method of the present application can ensure that even if all vertices corresponding to interconnects with excitation application functions and all vertices corresponding to interconnects with excitation application functions are not found, the test coverage can still be guaranteed.
[0045] Therefore, in one embodiment, the initialized input vertices are vertices corresponding to some interconnects in the FPGA that have the excitation application function, and the number of the initialized input vertices accounts for a first threshold in the number of vertices corresponding to all interconnects in the FPGA that have the excitation application function. The initialized output vertices are vertices corresponding to some interconnects in the FPGA that have the signal acquisition function, and the number of the initialized output vertices accounts for a second threshold in the number of vertices corresponding to all interconnects in the FPGA that have the signal acquisition function. The first threshold and the second threshold are user-defined values, so that the search complexity can be reduced on the basis of ensuring the success rate of searching for the test path.
[0046] Step 3: Search for a test path based on the directed graph.
[0047] Each test path searched has one of its input vertices as a signal input end and one of its output vertices as a signal output end, and includes vertices and directed edges from the signal input end to the signal output end. Each test path includes one or more directed edges between the signal input end and the signal output end.
[0048] Methods for searching test paths based on directed graphs include: Figure 4 The flowchart shown:
[0049] (1) Randomly select any input vertex and initialize it as the current vertex.
[0050] (2) Based on the directed graph, search for a directed edge connected to the current vertex as a candidate directed edge.
[0051] In this step, for any current vertex, the candidate directed edge connected to the current vertex is searched for and has the least number of uses among all directed edges connected to the current vertex, and the other vertex connected to the candidate directed edge has not been used in the test case. After loading the directed graph, this method will first initialize the number of uses of all directed edges in the directed graph to 0.
[0052] Then for any current node, firstly, based on the directed graph, traverse the directed edges connected to the current vertex in ascending order of usage count. For any directed edge traversed: when it is determined that the other vertex connected to the traversed directed edge has not been used in the test case, it means that the other vertex connected to the directed edge has not been used in any test path in the current test case, and the traversed directed edge is used as the candidate directed edge of the current vertex, and the usage count of the candidate directed edge is increased by one. When it is determined that the other vertex connected to the traversed directed edge has been used in the test case, it is determined that the traversed directed edge is unavailable, and the step of traversing the directed edges connected to the current vertex in ascending order of usage count based on the directed graph is executed again.
[0053] (3) When the other vertex connected to the candidate directed edge is not an output vertex, the other vertex connected to the candidate directed edge is used as the updated current vertex and the step of searching for a directed edge connected to the current vertex in the directed graph as a candidate directed edge is re-executed, and the above step (2) is repeated to continue the search.
[0054] (4) When the other vertex connected by the candidate directed edge is an output vertex, the search is completed and a test path is obtained, which includes the initialized input vertex and the determined output vertex and several candidate directed edges passing through in sequence. Since the connection resources in the FPGA are abundant and the number of initialized input vertices and output vertices in this application is not too small, in theory, there will be no situation where a test path that meets the requirements cannot be found.
[0055] Step 4, repeat the steps of searching for test paths based on the directed graph until the test coverage reaches a predetermined threshold, and obtain a test case including several test paths. In the present application, the test coverage is the ratio between the number of directed edges with a non-zero usage count and the number of all directed edges in the directed graph. The predetermined threshold is a preset value. In the present application, the test coverage can reach more than 95% or even approach 100%, and the predetermined threshold can be set according to actual needs.
[0056] Step 5, applying an excitation signal at the signal input end of each test path in the test case, and collecting a response signal at the corresponding signal output end, to complete the test of the configurable interconnection node in the FPGA. Including: when an excitation signal of 1 is applied at the signal input end of a test path, and a response signal of 0 is collected at the corresponding signal output end, it is determined that there is at least one configurable interconnection node corresponding to a directed edge in the test path and a stuck-at 0 fault (SA0 fault for short) occurs. Alternatively, when an excitation signal of 0 is applied at the signal input end of a test path, and a response signal of 1 is collected at the corresponding signal output end, it is determined that there is at least one configurable interconnection node corresponding to a directed edge in the test path and a stuck-at 1 fault (SA1 fault for short) occurs. Both the SA0 fault and the SA1 fault of the configurable interconnection node are caused by the fact that the programming information of the SRAM cannot change the conduction state of the configurable interconnection node.
[0057] In one embodiment, when a directed graph is constructed in step 1 to abstract the data path inside the functional module in the FPGA into a directed edge, a logic device is also inserted on the abstracted directed edge, and the logic device is a register or a latch. Then, when it is determined that there is a configurable interconnect node in the test path with SA0 fault or SA1 fault, the configurable interconnect node with fault can be quickly determined according to the density of the logic devices in the test path, and the configurable interconnect node with fault can be quickly located. The principle of locating the fault point is: when the value of a certain logic device is abnormal, it means that there is a configurable interconnect node with SA0 fault or SA1 fault in the interconnect path located before the logic device along the data transmission direction on the test path; when the value of a certain logic device is normal, it means that all configurable interconnect nodes in the interconnect path located before the logic device along the data transmission direction on the test path do not have SA0 fault and SA1 fault. Therefore, when determining that an SA0 fault or SA1 fault occurs in the interconnection path before any first logic device on the test path, continue to determine the value of the second logic device on the test path, the second logic device is the previous logic device located before the first logic device along the data transmission direction on the test path, and there is no other logic device between the second logic device and the first logic device. When reading the value of the second logic device to determine that an SA0 fault or SA1 fault occurs in the interconnection path located before the second logic device along the data transmission direction on the test path, repeat the above process to continue reading the value of the previous logic device located before the second logic device along the data transmission direction to repeat the above process. When reading the value of the second logic device to determine that an SA0 fault or SA1 fault does not occur in the interconnection path located before the second logic device along the data transmission direction on the test path, it is determined that an SA0 fault or SA1 fault occurs in a configurable interconnection node on the interconnection path between the second logic device and the first logic device, thereby quickly locating the configurable interconnection node that has a fault. Therefore, the higher the density of logic devices in the test path, the more conducive it is to quickly complete fault location.
[0058] Based on the above principle of locating the fault point, the method for determining the configurable interconnection node with fault according to the state of the logic device in the test path includes: reading the value of each logic device in the test path, determining the first logic device and the second logic device adjacent to each other along the data transmission direction on the test path, the second logic device is located upstream of the first logic device in the data transmission direction, the read value of the second logic device is normal, and the read value of the first logic device is abnormal, and detecting the configurable interconnection node on the interconnection path between the second logic device and the first logic device to achieve fault location. In actual operation, due to the SA0 fault or SA1 fault of the configurable interconnection node on the interconnection path between the second logic device and the first logic device, the read value of the first logic device is abnormal, which generally causes the read values of each logic device located downstream of the first logic device along the data transmission direction to be abnormal, then after locating and repairing the fault of the configurable interconnection node on the interconnection path between the second logic device and the first logic device, the test path can be retested according to the above process to quickly locate the fault of other configurable interconnection nodes, or the configurable interconnection node on the interconnection path downstream of the first logic device can be directly fault located.
[0059] The above is only a preferred embodiment of the present application, and the present application is not limited to the above embodiments. It is understood that other improvements and changes directly derived or associated by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the protection scope of the present application.
Claims
1. A method for testing configurable interconnect nodes in an FPGA, characterized in that: The test method includes: Abstracting each interconnection line in the FPGA as each vertex, and abstracting the configurable interconnection node between every two interconnection lines in the FPGA as a directed edge between the corresponding two vertices, to construct a directed graph for characterizing the connection relationship between the interconnection lines and the configurable interconnection nodes in the FPGA; Initialize a number of input vertices and a number of output vertices, the input vertices are vertices corresponding to the interconnection lines having a stimulus applying function, and the output vertices are vertices corresponding to the interconnection lines having a signal collecting function; Searching for a test path based on the directed graph, wherein the test path has one of the input vertices as a signal input end, one of the output vertices as a signal output end, and includes vertices and directed edges from the signal input end to the signal output end; Repeat the step of searching for a test path based on the directed graph until the test coverage reaches a predetermined threshold, thereby obtaining a test case including a plurality of test paths, applying an excitation signal at a signal input end of each test path in the test case, and collecting a response signal at a corresponding signal output end, thereby completing the test of the configurable interconnection node in the FPGA; The step of searching for a test path based on the directed graph includes: randomly selecting any input vertex to be initialized as a current vertex, searching for a directed edge connected to the current vertex as a candidate directed edge based on the directed graph; when another vertex connected to the candidate directed edge is not an output vertex, using the other vertex connected to the candidate directed edge as an updated current vertex and re-executing the step of searching for a directed edge connected to the current vertex as a candidate directed edge in the directed graph; when the other vertex connected to the candidate directed edge is an output vertex, completing the search and obtaining a test path, the test path including the initialized input vertex, the determined output vertex, and a number of candidate directed edges passing through in sequence.
2. The testing method according to claim 1, characterized in that: For any current vertex, the candidate directed edge connected to the current vertex is used the least number of times among all directed edges connected to the current vertex, and another vertex connected to the candidate directed edge has not been used in the test case.
3. The testing method according to claim 2, characterized in that: The usage counts of all directed edges in the directed graph are initialized to 0, and searching for a directed edge connected to the current vertex as a candidate directed edge based on the directed graph includes, for any current vertex: Based on the directed graph, traverse the directed edges connected to the current vertex in ascending order of usage times, and for any directed edge traversed: When it is determined that another vertex connected to the traversed directed edge has not been used in the test case, the traversed directed edge is used as a candidate directed edge of the current vertex, and the number of times the candidate directed edge is used is increased by one; When it is determined that another vertex connected to the traversed directed edge has been used in the test case, it is determined that the traversed directed edge is unavailable, and the step of traversing each directed edge connected to the current vertex in ascending order of the number of times used based on the directed graph is executed again.
4. The testing method according to claim 3, characterized in that: The test coverage is the ratio between the number of directed edges with non-zero usage times and the number of all directed edges in the directed graph.
5. The testing method according to claim 1, characterized in that: Constructing a directed graph also includes: Each data path formed inside the functional module connected to the interconnection line in the FPGA is abstracted as a directed edge between two corresponding vertices.
6. The testing method according to claim 5, characterized in that: The testing method further includes: when abstracting the data path inside the functional module in the FPGA into a directed edge, inserting a logic device on the directed edge, the logic device being a register or a latch; When an excitation signal is applied to a signal input terminal of any test path and a response signal is collected at a corresponding signal output terminal to determine that at least one configurable interconnect node in the test path fails, the failed configurable interconnect node is determined according to the state of the logic device in the test path.
7. The testing method according to claim 6, characterized in that: The determining of a failed configurable interconnect node according to the state of the logic device in the test path comprises: Read the values of each logic device in the test path and determine a first logic device and a second logic device that are adjacent to each other along a data transmission direction on the test path, wherein the second logic device is located upstream of the first logic device in the data transmission direction, the read value of the second logic device is normal, and the read value of the first logic device is abnormal; detect configurable interconnect nodes on the interconnection path from the second logic device to the first logic device to determine a faulty configurable interconnect node.
8. The testing method according to claim 1, characterized in that: The initialized input vertices are vertices corresponding to some interconnections in the FPGA that have an excitation applying function, and the number of the initialized input vertices accounts for a first threshold in the number of vertices corresponding to all interconnections in the FPGA that have an excitation applying function. The initialized output vertices are vertices corresponding to some interconnection lines with signal acquisition function in the FPGA, and the number of the initialized output vertices accounts for the number of vertices corresponding to all interconnection lines with signal acquisition function in the FPGA reaching a second threshold.
