Gate-level combinational logic circuit full path identification method and electronic device
By identifying the entire path of gate-level combinational logic circuits through structured parsing and recursive search, the problems of large storage overhead and path omission in existing technologies are solved, achieving efficient and accurate path identification and compatibility with subsequent analysis.
Patent Information
- Application Number
- CN202611190957.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies suffer from problems such as large storage overhead, path omission or duplicate identification, and incomplete search when identifying the entire path of gate-level combinational logic circuits, making it difficult to meet the needs of large-scale circuit analysis and subsequent matrix calculations.
By analyzing the structured circuit netlist, adjacency relationship data and port mapping are established, recursive search is performed and path verification is carried out to generate structured path identification results, including path signature deduplication and adjacency matrix output.
It achieves efficient and complete identification of the entire circuit path, reduces storage overhead, ensures path uniqueness and accuracy, adapts to large-scale circuit analysis, and supports subsequent reliability analysis without format conversion.
Smart Images

Figure CN123159221A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical digital data processing, and in particular to a method and electronic device for full-path identification of gate-level combinational logic circuits based on recursive expansion of structural adjacency matrix and port mapping. Background Technology
[0002] As the scale of integrated circuits and the complexity of gate-level netlists continue to increase, the number of signal propagation paths from the original input to the original output in a circuit is rapidly increasing. In applications such as integrated circuit reliability assessment, fault propagation analysis, path probability calculation, and critical gate hardening, it is first necessary to accurately obtain all candidate propagation paths from the original input to the original output in the gate-level combinational logic circuit. Furthermore, this set of paths should have a good degree of structure so that it can be directly used by subsequent matrix-based evaluation models.
[0003] Currently, full path identification mainly relies on methods such as layer-by-layer expansion, ordinary recursive search, or manual join table traversal. However, these methods have significant shortcomings, specifically:
[0004] When dealing with fan-out, re-converging, and multiple-input multiple-output structures, the layer-by-layer unfolding method tends to store a large number of intermediate node states during the unfolding process, resulting in excessive storage overhead and making it unsuitable for the analysis of large-scale circuits.
[0005] The manual connection table traversal method relies on manually establishing or maintaining the connection table and port correspondence between gate units. When the netlist is modified or the circuit size increases, it is difficult to continuously guarantee the consistency between the connection table and the actual topology. It is easy to cause path omission or duplicate identification due to omission, misrecording or duplicate registration of connection relationships. Moreover, it is not convenient for automated construction and matrix reuse.
[0006] Ordinary recursive search typically proceeds layer by layer based on the local connectivity of gate units. If a unified structural adjacency representation and port mapping relationship are not established in advance, and a complete branch state backoff and duplicate path verification mechanism is not set up, problems such as unclear search start and end boundaries, incorrect state recovery after branch backoff, and duplicate records of the same path may occur, making it difficult to guarantee the completeness, uniqueness, and consistency of the full path identification results and subsequent matrix-based calls.
[0007] Furthermore, in downstream applications such as critical path identification and fault propagation analysis, obtaining only the text-based gate sequence is insufficient to directly support matrix-based computation. It is also necessary to structure each path and its input ports, output ports, ordered sequence of gate units, unique identifiers, and the relationships between paths and gate units. Otherwise, secondary parsing and format conversion will be required in subsequent steps such as path scoring, critical path ranking, and reliability index calculation, impacting analysis efficiency and consistency in engineering implementation.
[0008] Therefore, there is an urgent need to provide a method for full-path identification of gate-level combinational logic circuits that can unify and integrate netlist parsing, structural adjacency representation, port mapping, path recursive expansion, and matrix output. Summary of the Invention
[0009] This invention solves the problems existing in the prior art and provides a method and electronic device for full-path identification of gate-level combinational logic circuits.
[0010] The technical solution adopted in this invention is a method for full-path identification of gate-level combinational logic circuits, wherein a computer processor executes the following steps:
[0011] S1 obtains the netlist of the gate-level combinational logic circuit, performs structured parsing on it, obtains each basic logic unit in the circuit and its connection relationship, input port, output port, and generates circuit description data to characterize the circuit topology.
[0012] S2 establishes adjacency relationship data to characterize the connection relationship between each basic logic unit based on the circuit description data; establishes the mapping relationship between the input port and the output port and the corresponding basic logic unit in the adjacency relationship data to form a path search task;
[0013] S3 For the path search task, a recursive search operation is performed based on the adjacency relationship data. During the search process, the current search path status is dynamically updated and branch backtracking information is recorded synchronously. The current search path is expanded level by level until the search termination condition is met.
[0014] S4 When the current search path meets the search termination condition, the validity of the current search path is verified, and the current search path that passes the verification is determined as a complete path and stored.
[0015] S5 outputs a set of complete paths.
[0016] Preferably, in S1, the circuit description data includes at least the type information, input port information, output port information, predecessor basic logic unit information, successor basic logic unit information, and identification information as to whether each basic logic unit is directly connected to an input port or an output port.
[0017] Preferably, in S2, the adjacency relationship data is in the form of a two-dimensional matrix with basic logical units as row and column indices, and its element values are used to identify whether there is a direct connection relationship between the basic logical units corresponding to the row index and the basic logical units corresponding to the column index.
[0018] Preferably, in S2, the basic logic units that are directly connected to each input port and each output port are determined and used as the search start point and search end point, respectively.
[0019] The path search task includes an input port, an output port, and their corresponding search start point and search end point.
[0020] Preferably, in S3, based on the end node of the current search path, candidate successor nodes that are directly connected to the end node and are not yet included in the current search path are determined according to the adjacency relationship data.
[0021] Select one of the candidate successor nodes to extend to the current search path, and record the current branch state;
[0022] When the candidate successor node is empty or all candidate successor nodes have been tried, the search returns to the previous search state and restores the branch information of the previous search state to continue trying other candidate branches.
[0023] Preferably, in S4, the search termination conditions include the end node of the current search path being the search endpoint corresponding to the path search task, or the current search path being unable to continue to expand.
[0024] Preferably, in S4, the validity verification includes:
[0025] Connectivity check is used to verify whether there are valid connections between adjacent nodes in the current search path in the adjacency data.
[0026] Uniqueness verification involves generating a path signature based on the input port, output port, and ordered number of each gate node in the current search path corresponding to the current search task. This signature is then compared with the path signature set of the stored complete path. If the path signature does not belong to the path signature set, the current search path is determined to be a non-duplicate path.
[0027] Preferably, the complete path is associated with at least an ordered sequence of basic logical units traversed by the path, the corresponding input ports, and the corresponding output ports.
[0028] Preferably, path association data is generated based on the set of complete paths to describe the relationship between each complete path and each basic logic unit; the path association data is output as input for reliability critical path identification or gate-level circuit fault propagation analysis.
[0029] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the gate-level combinational logic circuit full-path identification method.
[0030] This invention relates to a method and electronic device for full-path identification of gate-level combinational logic circuits. The method involves a computer processor acquiring the netlist of the gate-level combinational logic circuit, performing structured parsing to generate circuit description data characterizing the circuit topology, establishing mapping relationships between adjacency data, input ports, output ports, and corresponding basic logic units in the adjacency data, performing a recursive search operation on the resulting path search task, dynamically updating the current search path state and synchronously recording branch backtracking information during the search process, progressively expanding the current search path until the search termination condition is met, validating the current search path, determining the verified current search path as a complete path and storing it, and outputting a set of complete paths. This invention also provides an electronic device for implementing the above method.
[0031] The beneficial effects of this invention are as follows:
[0032] (1) By using the hierarchical design of the circuit integrity linked list and the structural adjacency matrix, the netlist text parsing and path search logic are decoupled. The parsing stage completes the extraction and structured storage of the inter-gate connection relationship, and the search stage directly performs adjacency query based on the matrix index, so that the inter-gate connection relationship can be indexed and reused in a unified manner, avoiding the performance loss caused by repeated parsing of the netlist.
[0033] (2) By explicitly describing the mapping relationship between port combinations, starting gates and ending gates through the input and output task sets, the boundary conditions of each path search task are clarified, avoiding invalid searches and path omissions caused by ambiguous boundaries, thus having a significant advantage in terms of full path coverage integrity;
[0034] (3) Construct a rollback state register mechanism to achieve precise control of the search process. During the search process, only the path state of the current active branch and the branch cursors of each level of parent node need to be maintained. There is no need to save the complete intermediate state of all concurrent branches at the same time, which effectively reduces the storage overhead caused by the expansion of the hierarchy and can adapt to the path recognition requirements of large-scale gate-level circuits.
[0035] (4) The path signature set is deduplicated, and the candidate paths to the terminal gate are screened by combining the adjacency joint method verification. The dual verification mechanism ensures that each path is a legal and unique valid propagation path, thereby eliminating the pollution of subsequent analysis results by duplicate and illegal paths from the source and improving the accuracy and credibility of path identification results.
[0036] (5) The path set is transformed into a path-gate association matrix through the path adjacency matrix, realizing the structured and matrix output of the path identification results. It is compatible with subsequent application scenarios such as reliability critical path ranking, path probability calculation and gate-level reliability analysis. No additional format conversion or data reconstruction is required, which significantly improves the efficiency of the whole link from path identification to reliability analysis and the stability of engineering implementation. Attached Figure Description
[0037] Figure 1 This is a flowchart of the method of the present invention;
[0038] Figure 2 This is a schematic diagram of the full path identification process of recursive expansion of structural adjacency matrix and port mapping in this invention;
[0039] Figure 3 This is a schematic diagram illustrating the implementation process of full-path identification for gate-level combinational logic circuits in an embodiment of the present invention;
[0040] Figure 4 This is a schematic diagram of the path recursion expansion variable relationships and intermediate result organization in an embodiment of the present invention;
[0041] Figure 5 This is a schematic diagram of the ISCAS-85 C17 reference combinational logic circuit in an application embodiment of the present invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] This invention relates to a method for full-path identification of gate-level combinational logic circuits, which divides the full-path identification process into five stages: circuit structure analysis, adjacency relationship data construction and search task formation, recursive expansion search, path verification and storage, and matrix output. The following detailed description of each stage is provided with reference to specific embodiments.
[0044] (1) Circuit structure analysis
[0045] The method is executed by a computer processor to obtain the netlist of gate-level combinational logic circuits, perform structured parsing on it, obtain each basic logic unit (hereinafter referred to as "gate") in the circuit and its connection relationship, input ports (original input port set PI), output ports (original output port set PO), and generate circuit description data to characterize the circuit topology.
[0046] Specifically, the processor reads the gate-level combinational logic circuit netlist from memory or input interface. During the processor's execution of netlist resolution, adjacency relationship construction, path state advancement and backtracking, path verification and matrix transformation operations, it stores the circuit integrity linked list Lc, structural adjacency matrix AM, input / output task set Set_IO, state stack Stack, all path set All_paths and path adjacency matrix PAM in memory, and outputs the complete path set and path association data through the output interface.
[0047] The circuit description data includes at least the type information, input port information, output port information, predecessor basic logic unit information, successor basic logic unit information, and identification information as to whether each basic logic unit is directly connected to an input port or an output port.
[0048] In this invention, the netlist file is in ISCAS format, BENCH format, or other standard gate-level circuit description format;
[0049] The connection relationships between basic logic units include the input port line number, output port line number, fan-in number, fan-out number, previous successor set, and next successor set for each gate.
[0050] In one specific embodiment, the circuit description data is stored and organized in the form of a circuit integrity linked list Lc, where the i-th entry of the circuit integrity linked list Lc is represented as follows:
[0051] Lc(i) = {id_i, type_i, In_i, Out_i, fanin_i, fanout_i, Pred_i, Succ_i, F_PI(i), F_PO(i)}
[0052] Where id_i is the unique number of the i-th gate, type_i is the gate type, including but not limited to AND, OR, NAND, NOR, NOT, XOR, etc., In_i and Out_i are the sets of input line numbers and output line numbers, respectively, fanin_i and fanout_i are the number of fan-in and fan-out, respectively, and Pred_i and Succ_i are the sets of predecessor gates and successor gates, respectively.
[0053] If the input of the i-th gate is directly connected to the original input port, then the F_PI(i) flag is set to 1; if the output of the i-th gate is directly connected to the original output port, then the F_PO(i) flag is set to 1.
[0054] Through the above parsing and storage, all the structural information in the circuit is converted into structured data that can be directly indexed and manipulated in subsequent steps.
[0055] (2) Construction of adjacency relationship data and formation of search task
[0056] (2-1) Circuit structure adjacency matrix
[0057] The processor establishes adjacency relationship data to characterize the connection relationships between the basic logic units based on the circuit description data;
[0058] The adjacency relationship data is in the form of a two-dimensional matrix with basic logical units as row and column indices. Its element values are used to identify whether there is a direct connection relationship between the basic logical units corresponding to the row index and the basic logical units corresponding to the column index.
[0059] Specifically, the adjacency relationship data adopts the form of a circuit structure adjacency matrix AM. The total number of basic gates NG in the circuit is determined according to the circuit integrity linked list Lc. A two-dimensional matrix AM of size NG×NG is constructed and all elements are initialized to 0.
[0060] Iterate through each basic gate gi in Lc, read the successor gate set Succ_i corresponding to gi, and for each successor gate gj in Succ_i, assign the element in row id(gi) and column id(gj) of AM to 1, indicating that the output of gate gi is directly connected to the input of gate gj; if there is no direct connection between them, the corresponding element remains 0, that is:
[0061] AM[p, q]=1 if and only if g_q∈Succ(g_p);
[0062] AM[p, q] = 0, when g_q Succ(g_p);
[0063] Where g_p is the preceding gate corresponding to the p-th row of AM, g_q is the following gate corresponding to the q-th column of AM, and Succ(g_p) is the set of successor gates of g_p.
[0064] The above assignment process is implemented through a double loop: the outer loop iterates through each gate gi as the predecessor node, and the inner loop iterates through each gate gj in the successor gate set Succ_i of gi, setting the corresponding matrix element to 1; after traversing all gates, AM is constructed.
[0065] The adjacency matrix provides an efficient adjacency query index for subsequent recursive search operations. During the search process, all candidate successor nodes of any gate can be quickly obtained by simply using the row index, without repeatedly parsing the netlist or traversing the linked list.
[0066] (2-2) Search Task
[0067] Establish a mapping relationship between input ports and output ports and the corresponding basic logical units in the adjacency relationship data to form a path search task;
[0068] The basic logic units that are directly connected to each input port and each output port are identified and used as the search start point and search end point, respectively.
[0069] The path search task includes an input port, an output port, and their corresponding search start point and search end point.
[0070] Specifically, in this embodiment, the processor extracts the original input port set PI={pi_1,pi_2,...,pi_NPI} and the original output port set PO={po_1,po_2,...,po_NPO} from the circuit integrity linked list Lc; for any original input port pi_a, the basic logic unit directly connected to it (i.e., directly driven by the input port) is determined, denoted as G_s(pi_a), as the search starting point for the input port, G_s(pi_a)=Fanout(pi_a); for any original output port po_b, the basic logic unit directly driving the output port is determined, denoted as G_t(po_b), as the search ending point for the output port, G_t(po_b)=Fanout(po_b).
[0071] Based on the above mapping relationship, the processor constructs an input / output task set Set_IO, where each task in Set_IO is represented as...
[0072] Set_IO(a, b) = {pi_a, po_b, G_s(pi_a), G_t(po_b)}
[0073] Here, the value of 'a' ranges from 1 to NPI, and the value of 'b' ranges from 1 to NPO. Therefore, the total number of tasks in Set_IO is NPI×NPO, covering all combinations from all raw inputs to all raw outputs, ensuring the comprehensiveness and completeness of subsequent searches.
[0074] (3) Recursive expansion search
[0075] For the path search task, the processor performs a recursive search operation based on the adjacency relationship data. During the search process, it dynamically updates the current search path status and records the branch backtracking information simultaneously, expanding the current search path level by level until the search termination condition is met.
[0076] Specifically, before performing the search, the search state of the current task is initialized. The current path variable Path is initialized to [G_s] to record the ordered gate sequence of the current branch. The state stack Stack is initialized to a stack frame containing (G_s, β=1) ([(G_s, β=1)]), where β represents the branch cursor of the current gate node, used to indicate the current successor position that the node is trying in the candidate successor set. The visit flag set Visited is initialized to {G_s} to record the gate nodes already visited by the current branch. At the global level, the all path set All_paths is initialized to an empty set, the path signature set Hset is initialized to an empty set, the path number pid is initialized to 0, and Unreach is initialized to an empty set to store the input / output combinations for which no reachable path exists.
[0077] The recursive expansion process specifically includes the following sub-steps:
[0078] a) Based on the end node of the current search path, determine the candidate successor node that is directly connected to the end node and is not yet included in the current search path according to the adjacency relationship data;
[0079] In this embodiment, the top gate node x of the state stack Stack is read as the end node of the current search path. Based on the corresponding row index of gate node x in the adjacency relationship data, a candidate successor set Cx is generated, defined as follows:
[0080] Cx = {g_y | AM[id(x), id(g_y)] = 1, and g_y Path}
[0081] That is, Cx contains all the gate nodes that are directly connected to x and are not yet included in the current search path Path; this filtering condition not only utilizes the efficient query capability of the adjacency matrix, but also avoids loops in the path by excluding visited nodes.
[0082] b) Select one of the candidate successor nodes to extend to the current search path, and record the current branch state;
[0083] In this embodiment, if the candidate successor set Cx is not empty and the value of the current branch cursor β does not exceed the number of elements in Cx, then the β-th element in Cx is selected as the target successor gate y, y is appended to the end of Path, (y, β=1) is pushed onto Stack as a new stack frame, and y is added to the Visited set; then y is used as the new current gate node, and the next round of recursive search is entered.
[0084] c) When the candidate successor node is empty or all candidate successor nodes have been tried, fall back to the previous search state and restore the branch information of the previous search state to continue trying other candidate branches.
[0085] In this embodiment, if the candidate successor set Cx is empty or the value of β exceeds the number of elements in Cx, a state rollback operation is performed, popping the top element of Stack (i.e. removing the current gate node x), removing x from the end of Path, and incrementing the β value of the new top element of Stack (i.e., the parent node) by 1 to restore the search state of the parent node and continue to try its unexpanded candidate branches.
[0086] Through the alternation of state advancement and rollback, the processor forms a path recursive expansion mechanism based on state stack and branch cursors. This mechanism uses the current active path Path and the branch cursors β of each level of parent nodes as the search state carriers, and completes the expansion of all reachable path spaces without pre-saving all the complete intermediate states of concurrent branches, thereby reducing the storage overhead in multi-branch hierarchical expansion scenarios.
[0087] (4) Path verification and storage
[0088] When the current search path meets the search termination condition, the validity of the current search path is verified, and the current search path that passes the verification is determined as a complete path and stored.
[0089] The search termination conditions include the current search path ending at the search endpoint G_t corresponding to the path search task, or the current search path being unable to be extended further.
[0090] Validation includes:
[0091] The connectivity check is used to verify whether there is a valid connection between adjacent nodes in the current search path in the adjacency data. Specifically, it checks whether there is a valid connection between any adjacent gate nodes Path_t and Path_{t+1} in the current search path Path in the adjacency data, that is, whether AM[id(Path_t), id(Path_{t+1})] = 1 is true. If all adjacent node pairs in Path satisfy the above condition, the connectivity check passes; otherwise, the path is determined to be an illegal path and is discarded.
[0092] Uniqueness verification involves generating a path signature h based on the input port pi_a, output port po_b, and the ordered numbers of each gate node in the current search path Path (according to a preset hash algorithm). This signature h is then compared with the path signature set Hset, which contains the complete paths. If the path signature does not belong to the path signature set, the current search path is determined to be a non-duplicate path. Otherwise, the path has already been recorded and is discarded to prevent duplicate storage.
[0093] The complete path is at least associated with an ordered sequence of basic logical units traversed by the path, the corresponding input ports, and the corresponding output ports. A path that passes the above double verification is confirmed as a valid complete path. The processor increments the pid by 1 as the path number and writes the complete path consisting of (pi_a, Path, po_b) into the all-paths set All_paths. Simultaneously, the path number pid, the original input port pi_a, the original output port po_b, the search start point G_s, the search end point G_t, the path signature h, and the ordered sequence of gate node numbers are associated and stored in PathInfo. The number of gate nodes in the path can be directly obtained from the ordered sequence of numbers and does not need to be stored as a separate necessary field.
[0094] After the path storage is completed, the processor performs a state rollback operation and continues to search for other reachable paths under the same task until all branches of the task have been traversed. At this point, it enters the next Set_IO task.
[0095] (5) Matrix output
[0096] Output a set of complete paths.
[0097] Based on the set of complete paths, path association data is generated to describe the relationship between each complete path and each basic logic unit; the path association data is output as input for reliability critical path identification or gate-level circuit fault propagation analysis.
[0098] In this embodiment, after all Set_IO tasks have been processed, the processor generates path association data based on the set of complete paths to describe the relationship between each complete path and each basic logic unit, and outputs the path association data.
[0099] In a preferred embodiment of the present invention, the path association data is implemented in the form of a path adjacency matrix (PAM). Let the total number of paths NP = pid (i.e., the number of all stored complete paths), construct a matrix PAM of size NP×NG, and initialize all elements to 0; for the p-th path in All_paths, if the path passes through the q-th basic gate unit g_q, then PAM[p, q] is assigned a value of 1, otherwise it remains 0. That is, the row index of PAM corresponds to each complete path, the column index corresponds to each basic gate unit in the circuit, and the element value represents whether the path passes through the gate.
[0100] Finally, the processor outputs the following structured data:
[0101] The structural adjacency matrix AM is used to characterize the direct connection relationships between gates;
[0102] The input / output task set Set_IO is used to represent the port combination and the corresponding start and end gates;
[0103] All_paths is a set of all paths used to store the gate sequence for each complete path;
[0104] The PathInfo table stores metadata for each complete path.
[0105] The path adjacency matrix (PAM) is used to represent the association between paths and gates.
[0106] The number of paths, NP, is used to represent the total number of all identified paths.
[0107] In the above output, All_paths provides the complete gate sequence for each path, and PAM describes the path-gate relationship in a matrix form. The combination of the two can be directly used as candidate path input for downstream tasks such as reliability critical path identification, path reliability criticality calculation, gate-level circuit fault propagation analysis, or fixed-point reinforcement object screening, without the need for additional format conversion or data reconstruction.
[0108] In an optional embodiment of the present invention, if the pid does not change after a Set_IO task is completed, the {pi_a, po_b, G_s, G_t} corresponding to the task is written to Unreach to indicate that there is no reachable gate-level propagation path for the input / output combination under the current structure adjacency relationship data.
[0109] In another optional embodiment of the present invention, for large-scale circuits, for example when the total number of basic gates NG reaches thousands or tens of thousands, and the number of non-zero elements in the structural adjacency matrix AM or path adjacency matrix PAM is much smaller than the total number of elements in the corresponding matrix, a sparse storage method can be used to reduce storage overhead. Each path in All_paths can adopt a variable-length storage structure to adapt to the differences in path length.
[0110] Specifically, AM can be stored using a compressed sparse row structure: set up a row pointer array AM_RowPtr of length NG+1, and set up a column index array AM_ColIdx. Write the column index q that satisfies AM[p,q]=1 into AM_ColIdx in the order of the gate nodes. The storage range of the successor gate index of the p-th row is defined by AM_RowPtr[p] and AM_RowPtr[p+1]. Since AM is a binary matrix, the independent numerical array can be omitted.
[0111] PAM can be configured with a row pointer array PAM_RowPtr and a gate index array PAM_ColIdx of length NP+1 to record the gate nodes traversed by each complete path.
[0112] All_paths can be constructed using a one-dimensional gate number array PathNode and a path offset array PathOffset of length NP+1, forming a variable-length storage structure. PathOffset[p] and PathOffset[p+1] define the start and end positions of the p-th complete path in PathNode.
[0113] The above compressed sparse row structure can also be replaced by an adjacency list or a sparse index table with the same indexing function.
[0114] The present invention also relates to an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the gate-level combinational logic circuit full-path identification method.
[0115] (6) Verification experiment of C17 reference combinational logic circuit
[0116] In a specific application example of the present invention, as follows Figure 4 The C17 gate-level combinational logic circuit in the ISCAS-85 series benchmark circuit shown is used as the verification object. This circuit includes 5 raw inputs PI1 to PI5, 2 raw outputs OUT1 and OUT2, and 6 NAND basic logic units NAND1 to NAND6.
[0117] During verification, the C17 standard BENCH netlist is used as input, and the baseline path set obtained by checking the netlist connection relationships item by item is used as a reference. The path set output by the method of the present invention is compared with the baseline path set, and the results of the determination of the number of missed paths, the number of duplicate paths, the number of illegal paths, and the number of unreachable input-output combinations are used as verification indicators.
[0118] During the structured parsing phase, the processor obtains the following connection relationships based on the C17 netlist: NAND1 is driven by PI1 and PI2, NAND2 is driven by PI2 and PI3, NAND3 is driven by NAND2 and PI4, NAND4 is driven by NAND2 and PI5, NAND5 is driven by NAND1 and NAND3 and connected to OUT1, and NAND6 is driven by NAND3 and NAND4 and connected to OUT2. This results in the successor set including Succ(NAND1) = {NAND5}, Succ(NAND2) = {NAND3, NAND4}, Succ(NAND3) = {NAND5, NAND6}, and Succ(NAND4) = {NAND6}.
[0119] Based on the above connection relationships, a 6×6 adjacency matrix AM is constructed, forming NPI×NPO=10 input / output search tasks Set_IO. For unreachable tasks, the processor writes them into Unreach; in this embodiment, there are no reachable gate-level propagation paths from PI1 to OUT2 and from PI5 to OUT1, therefore Unreach={(PI1,OUT2),(PI5,OUT1)}.
[0120] The method of this invention is used to perform full path identification on the C17 circuit. The processor takes each input and output task in Set_IO as the boundary and sequentially executes the state stack-driven path recursive expansion, connectivity verification and path signature deduplication, and finally obtains NP=11 complete paths. The identification results are shown in Table 1 below.
[0121] Table 1. Full Path Identification Results of C17 Circuit
[0122] serial number Input end Output Full paths (All_paths[p]) P1 PI1 OUT1 NAND1-NAND5 P2 PI2 OUT1 NAND1-NAND5 P3 PI2 OUT1 NAND2-NAND3-NAND5 P4 PI3 OUT1 NAND2-NAND3-NAND5 P5 PI4 OUT1 NAND3-NAND5 P6 PI2 OUT2 NAND2-NAND3-NAND6 P7 PI3 OUT2 NAND2-NAND3-NAND6 P8 PI4 OUT2 NAND3-NAND6 P9 PI2 OUT2 NAND2-NAND4-NAND6 P10 PI3 OUT2 NAND2-NAND4-NAND6 P11 PI5 OUT2 NAND4-NAND6
[0123] As shown in Table 1, the 11 complete paths output by the method of this invention are consistent with the baseline path set one by one. The number of missed paths, duplicate paths, and illegal paths are all 0, and the two sets of unreachable input-output combinations, PI1 to OUT2 and PI5 to OUT1, are correctly identified. For paths of the same gate sequence but triggered by different inputs, they can still be distinguished as different complete paths by using the path signature h=Hash(pi_a,Path,po_b), thereby avoiding path omissions or incorrect merging.
[0124] Furthermore, a path adjacency matrix PAM is generated based on All_paths. The matrix rows correspond to complete paths, and the matrix columns correspond to NAND1 to NAND6. An element value of 1 indicates that the path passes through the corresponding basic gate, and an element value of 0 indicates that it does not pass through the corresponding basic gate. The matrix transformation results are shown in Table 2.
[0125] Table 2 C17 Circuit Path Adjacency Matrix (PAM)
[0126] path NAND1 NAND2 NAND3 NAND4 NAND5 NAND6 P1 1 0 0 0 1 0 P2 1 0 0 0 1 0 P3 0 1 1 0 1 0 P4 0 1 1 0 1 0 P5 0 0 1 0 1 0 P6 0 1 1 0 0 1 P7 0 1 1 0 0 1 P8 0 0 1 0 0 1 P9 0 1 0 1 0 1 P10 0 1 0 1 0 1 P11 0 0 0 1 0 1
[0127] As shown in Table 2, PAM can directly reflect the relationship between each complete path and each basic gate. For example, P3 and P4 both pass through NAND2, NAND3, and NAND5, but their corresponding input terminals are different, so they have different input port fields and path signatures in PathInfo. For the propagation process triggered by PI2 and PI3 respectively, path pairs P6 and P9 and path pairs P7 and P10 reach NAND6 through two successor branches of NAND2, which reflects the situation in the C17 circuit where the fan-out and then converge structure forms multiple reachable paths.
[0128] The above experiments demonstrate that, in C17 combinational logic circuits with fan-out, re-convergence, multiple inputs, and multiple outputs, this invention can completely identify all reachable paths based on the structural adjacency matrix and port mapping relationships, and simultaneously output structured results such as All_paths, PathInfo, PAM, NP, and Unreach. Compared to outputting only two schematic paths, this output is more suitable for subsequent reliability critical path identification, path reliability criticality calculation, and gate-level fault propagation analysis.
[0129] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0131] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0132] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0133] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0134] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method of full-path identification of a gate-level combinational logic circuit, characterized by, The computer processor performs the following steps: S1 obtains the netlist of the gate-level combinational logic circuit, performs structured parsing on it, obtains each basic logic unit in the circuit and its connection relationship, input port, output port, and generates circuit description data to characterize the circuit topology. S2 establishes adjacency relationship data to characterize the connection relationship between each basic logic unit based on the circuit description data; establishes the mapping relationship between the input port and the output port and the corresponding basic logic unit in the adjacency relationship data to form a path search task; S3 For the path search task, a recursive search operation is performed based on the adjacency relationship data. During the search process, the current search path status is dynamically updated and branch backtracking information is recorded synchronously. The current search path is expanded level by level until the search termination condition is met. S4 When the current search path meets the search termination condition, the validity of the current search path is verified, and the current search path that passes the verification is determined as a complete path and stored. S5 outputs a set of complete paths.
2. The method of claim 1, wherein, In S1, the circuit description data includes at least the type information, input port information, output port information, predecessor basic logic unit information, successor basic logic unit information, and identification information as to whether each basic logic unit is directly connected to an input port or an output port.
3. The method according to claim 1, characterized in that, In S2, the adjacency relationship data is in the form of a two-dimensional matrix with basic logical units as row and column indices. Its element values are used to identify whether there is a direct connection relationship between the basic logical units corresponding to the row index and the basic logical units corresponding to the column index.
4. The method according to claim 1, characterized in that, In S2, the basic logic units that are directly connected to each input port and each output port are determined and used as the search start point and search end point, respectively. The path search task includes an input port, an output port, and their corresponding search start point and search end point.
5. The method according to claim 1, characterized in that, In S3, based on the end node of the current search path, candidate successor nodes that are directly connected to the end node and are not yet included in the current search path are determined according to the adjacency relationship data. Select one of the candidate successor nodes to extend to the current search path, and record the current branch state; When the candidate successor node is empty or all candidate successor nodes have been tried, the search returns to the previous search state and restores the branch information of the previous search state to continue trying other candidate branches.
6. The method according to claim 1, characterized in that, In S4, the search termination conditions include the end node of the current search path being the search endpoint corresponding to the path search task, or the current search path being unable to be further extended.
7. The method according to claim 1, characterized in that, In S4, validity verification includes: Connectivity check is used to verify whether there are valid connections between adjacent nodes in the current search path in the adjacency data. Uniqueness verification involves generating a path signature based on the input port, output port, and ordered number of each gate node in the current search path corresponding to the current search task. This signature is then compared with the path signature set of the stored complete path. If the path signature does not belong to the path signature set, the current search path is determined to be a non-duplicate path.
8. The method according to claim 1, characterized in that, The complete path is at least associated with an ordered sequence of basic logical units traversed by the path, their corresponding input ports, and their corresponding output ports.
9. The method according to claim 1, characterized in that, Based on the set of complete paths, path association data is generated to describe the relationship between each complete path and each basic logic unit; the path association data is output as input for reliability critical path identification or gate-level circuit fault propagation analysis.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the full-path identification method for gate-level combinational logic circuits as described in any one of claims 1 to 9.
