Equivalence verification method based on XOR majority logic

By using an XOR majority logic-based method in equivalence verification, the Miter circuit is constructed and structure rewrites, the problem of low efficiency in the existing technology when dealing with complex XOR circuits is solved, and more efficient and accurate equivalence verification is achieved.

CN120197568AActive Publication Date: 2025-06-24NINGBO UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510677389.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-06-24
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

Existing equivalence verification methods are less efficient and difficult to effectively verify equivalence when dealing with complex combined logic circuits, especially circuits containing a large number of XOR structures.

Method used

Using the equivalence verification method based on XOR majority logic, the Miter circuit is constructed, converted into XOR majority logic diagram XMG, and structure rewrites, reducing the number of nodes and logic levels and improving verification efficiency.

Benefits of technology

It significantly improves the efficiency and accuracy of equivalence verification, and is especially suitable for verification of complex multiplication and addition hybrid arithmetic circuits and XOR-intensive circuits, and the verification speed is several times higher than that of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197568A_ABST
    Figure CN120197568A_ABST
Patent Text Reader

Abstract

The invention discloses an XOR majority logic-based equivalence verification method, which comprises the following steps of: constructing two circuits of which the equivalence is to be verified into a Miter circuit, if main output values of the Miter circuit after structure rewriting are not all zero, ending the method, otherwise, performing equivalence verification on the Miter circuit by using an SAT solver; if the SAT solver obtains a solving result, the method is ended, otherwise, simulation signals of all nodes in the Miter circuit are obtained through random simulation, potential equivalent nodes are classified into an equivalent class and optimized, nodes with potential equivalent relations are randomly obtained from the optimized equivalent class, the equivalent nodes are iteratively merged, and the optimized Miter circuit is obtained. And finally, carrying out final equivalence verification on the optimized Miter circuit by using an SAT solver. The method can improve the efficiency and accuracy of equivalence verification, and is especially suitable for verifying complex multiply-add mixed arithmetic circuits and XOR intensive circuits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated circuit design automation, and particularly to an equivalence verification method based on exclusive - or majority logic. Background Art

[0002] With the continuous expansion of the scale of integrated circuit design and the continuous improvement of circuit complexity, the importance of verification in the integrated circuit design process has become increasingly prominent. As an indispensable key link in the design process, the core goal of verification is to ensure the functional correctness and implementation reliability of the circuit design, avoid tape - out failures, reduce development costs, and effectively shorten the product's time - to - market. However, in the face of the growing design scale and complexity, the traditional verification methods relying on manual verification and simple simulation are no longer able to meet the requirements of modern design for efficiency and accuracy. Therefore, there is an urgent need to introduce more efficient and highly automated verification means to improve verification efficiency and design quality.

[0003] Combinational Equivalence Checking (CEC) is one of the core technologies in the Electronic Design Automation (EDA) process, and is widely used in various stages of integrated circuit design from high - level descriptions (such as Register Transfer Level, RTL) to physical implementation and even silicon wafer manufacturing. The main task of CEC is to ensure the functional equivalence between the results of logic synthesis, optimization, and different design implementations, and to ensure that the design maintains the same function during the optimization process. Usually, the same design will produce implementation versions with significantly different structures due to different optimization strategies, so it is necessary to prove their functional consistency through equivalence verification. However, the existing equivalence verification methods face many challenges. Especially in complex combinational logic circuits, the widespread exclusive - or (XOR) structures and intricate interconnection characteristics greatly increase the difficulty of equivalence verification.

[0004] The &cec command in the existing open - source logic synthesis tool ABC is one of the most widely used circuit equivalence verification methods. This method is based on the AIG representation, and verifies the equivalence of internal circuit nodes in topological order through a SAT solver, and merges equivalent nodes to achieve fast verification. However, in practical applications, the circuit to be verified often contains equivalent node pairs with a small fan - out cone but a high XOR chain density. For traditional SAT solvers, it is a great challenge to prove the equivalence of such node pairs, resulting in a decrease in verification efficiency. The traditional equivalence verification method based on the Boolean Satisfiability Problem (SAT), although theoretically complete, faces problems of low solving efficiency and high consumption of computing resources when dealing with circuits containing a large amount of XOR logic and highly optimized circuits. Summary of the Invention

[0005] To overcome the limitations of traditional equivalence verification methods when dealing with high-density XOR circuits, the present invention provides an equivalence verification method based on XOR majority logic to improve the efficiency and accuracy of equivalence verification. By utilizing the structural characteristics represented by XOR majority logic, the method of the present invention provides a more compact circuit representation, which is particularly suitable for expressing arithmetic circuits containing a large number of XOR structures.

[0006] Aiming at the problem of low efficiency in existing combinational equivalence verification when dealing with multiply-accumulate hybrid arithmetic circuits and XOR-intensive circuits, a more efficient solution is proposed.

[0007] The technical solution adopted by the present invention to solve the above technical problems is as follows: an equivalence verification method based on XOR majority logic, and the method is as follows: Construct two circuits to be verified for equivalence into a Miter circuit, read the And-Inverter Graph (AIG) containing the information of the Miter circuit, and convert the AIG into an XOR majority logic graph XMG. The XMG contains 3-input XOR and MAJ logic gates, which is more compact than the AIG containing 2-input AND gates; perform structural rewriting on the XMG to reduce the number of nodes, logical levels, and the number of inverters in the XMG, reduce the circuit complexity, and generate a circuit structure with more high-fan-out nodes; Calculate the Primary Output (PO) value of the Miter circuit after structural rewriting. By preferentially calculating the primary output value, the equivalence of the two circuits can be quickly verified, improving the verification efficiency; if the primary output values are not all zero, the method ends; otherwise, use a SAT solver to perform equivalence verification on the Miter circuit after structural rewriting; if the SAT solver obtains a solution result, the method ends; otherwise, obtain the simulation signals of all nodes in the Miter circuit after structural rewriting through random simulation, set the nodes with equal simulation signals as potential equivalent nodes, and divide the potential equivalent nodes into equivalence classes; Optimize the equivalence classes to reduce the low-quality nodes in the equivalence classes. By optimizing the equivalence classes, the quality gap between the equivalence classes and the equivalence classes after the subsequent merging of equivalent nodes can be narrowed as short as possible, so as to reduce the low-quality nodes in the equivalence classes, thereby reducing the calls of the SAT solver in step 7 of the subsequent steps, accelerating the merging of equivalent nodes, and improving the overall scanning efficiency of the SAT solver; randomly obtain two nodes with potential equivalent relationships from the optimized equivalence classes, perform the merging of equivalent nodes, and iterate to merge equivalent nodes until the equivalence class is empty or the preset number of iterative executions is reached, obtaining an optimized Miter circuit, and then use a SAT solver to perform the final equivalence verification on the optimized Miter circuit.

[0008] An equivalence verification method based on exclusive-or majority logic proposed by the present invention is an efficient equivalence verification method for Miter circuits, which can improve the efficiency and accuracy of equivalence verification, and is particularly suitable for verifying complex multiply-accumulate hybrid arithmetic circuits and XOR-intensive circuits, providing a new solution for equivalence verification.

[0009] Preferably, the equivalence verification method based on exclusive-or majority logic of the present invention specifically includes the following steps: Step 1: Construct two circuits to be verified for equivalence into a Miter circuit, read the NAND graph AIG containing the information of the Miter circuit, and use the LUT mapping and exact synthesis method to convert the AIG into an exclusive-or majority logic graph XMG, and rewrite the structure of the XMG using the algebraic properties of XOR gates and MAJ gates; Step 2: Calculate the main output value of the Miter circuit after structure rewriting. If the main output values are not all zero, it is determined that the two circuits are not equivalent, and this method ends. Otherwise, go to Step 3; Step 3: Preset the conflict count limit of the SAT solver to M times, and use the SAT solver to perform equivalence verification on the Miter circuit after structure rewriting. If the SAT solver obtains a solution result within the M conflict count limit, this method ends. Otherwise, obtain the simulation signals of all nodes in the Miter circuit after structure rewriting through random simulation, set the nodes with equal simulation signals as potential equivalent nodes, and classify the potential equivalent nodes into equivalence classes; Step 4: Optimize the equivalence classes to reduce the low-quality nodes in the equivalence classes; randomly obtain two nodes with potential equivalent relationships from the optimized equivalence classes, and perform equivalent node merging. Iteratively merge equivalent nodes in this way until the equivalence class is empty or the preset number of N iteration executions is reached, and obtain the optimized Miter circuit; Step 5: Use the SAT solver to perform the final equivalence verification on the optimized Miter circuit, and the final solution result output by the SAT solver is the equivalence verification result of the two circuits.

[0010] Preferably, in Step 1, a Miter circuit is constructed based on the combinational equivalence check CEC, that is, the corresponding output ports of the two circuits to be verified for equivalence are connected one by one through XOR gates, and the outputs of all XOR gates are converged to an OR gate to form the main output of the Miter circuit.

[0011] More preferably, the specific process of Step 2 is: Assign a set of random values to the input ports of the Miter circuit after structural rewriting, and perform local simulation on an XOR gate, that is, extract the information of each node in the XOR gate and its logic cone. Starting from the input ports of the Miter circuit after structural rewriting, deduce the simulation signals of each node step by step upward in the order of the connection relationships of the nodes in the logic cone, and use the calculated simulation signal of the XOR gate as the output value of the XOR gate; traverse all XOR gates to obtain the output values of all XOR gates; If there is a case where the output value is 1 among the output values of all XOR gates, it indicates that there is a case where the main output value of the OR gate in the Miter circuit after structural rewriting is 1, that is, the main output values are not all zero, then it is determined that the two circuits are not equivalent, and this method ends; if the output values of all XOR gates are 0, it indicates that the main output values of the OR gates in the Miter circuit after structural rewriting are all 0, that is, the main output values are all zero, and enter step 3.

[0012] In the process of calculating the main output value of the Miter circuit after structural rewriting above, calculating the output value of the XOR gate based on logical cone tracking of relevant nodes can narrow the simulation range, avoid redundant simulation of irrelevant logic, and improve the calculation efficiency. Since the Miter circuit is represented by XMG and the calculation of its MAJ gate depends on 3-input XOR, the rewritten results of the MAJ gate can be fully reused during local simulation, reducing the probability of repeated calculation.

[0013] Preferably, the specific process of optimizing the equivalence class in step 4 is as follows: By traversing the nodes in the equivalence class, first exclude the nodes in the equivalence class whose simulation signals are all 0 or all 1, and then exclude the low-quality nodes in the equivalence class whose proportion of the characters 0 or 1 in the simulation signals is less than 20%, so as to generate simulation signals with a higher switching rate, thereby improving the efficiency of subsequent potential equivalent node merging; Calculate the flip rate of each node in the equivalence class. If the flip rate of a certain node exceeds the preset threshold, skip this node; if the flip rate of a certain node does not exceed the preset threshold, then flip the last bit of the simulation signal of this node to 0 or 1 as the bit value of the next simulation signal of this node. Based on this bit value, verify this node with a SAT solver. If the solution result is UNSAT, it indicates that the output of the simulation signal of this node is always 0 or always 1, and replace this node with a constant node, thereby reducing the subsequent calculation burden.

[0014] Preferably, the specific process of equivalent node merging in step 4 is as follows: randomly obtain two nodes with potential equivalent relationships from the optimized equivalent classes, use a SAT solver to verify whether these two nodes are equivalent. If the solution result of the SAT solver is UNSAT, it is determined that these two nodes are equivalent and merge these two nodes; otherwise, it is determined that these two nodes are not equivalent, obtain the input signals of the SAT solver that cause these two nodes to be not equivalent, and use this input signal as a new simulation signal for re-simulation to refine the equivalent classes.

[0015] Preferably, the process of re-simulation in step 4 is as follows: add the new simulation signal to a set of random values assigned to the input ports of the Miter circuit after structural rewriting to obtain updated random values, use the updated random values to perform a re-simulation on the Miter circuit after structural rewriting, obtain the simulation signals of all nodes in the Miter circuit after structural rewriting, set the nodes with equal simulation signals as new equivalent nodes, construct new equivalent classes with the new equivalent nodes, compare the new equivalent classes with the equivalent classes obtained in step 5, and eliminate inconsistent simulation signals to refine the equivalent classes.

[0016] Compared with the prior art, the present invention has the following advantages: The equivalent verification method based on XOR majority logic of the present invention is an efficient Miter circuit equivalent verification method, which can improve the efficiency and accuracy of equivalent verification, and is particularly suitable for verifying complex multiply-accumulate hybrid arithmetic circuits and XOR-intensive circuits, providing a new solution for equivalent verification. Compared with the existing &cec and hybrid_cec methods, the method of the present invention shows good experimental results. The verification speed of the method of the present invention for circuit equivalence is 2.81 times and 2.74 times higher than that of &cec and hybrid_cec respectively. After optimizing the circuit structure through the c2rs synthesis flow command of the logic synthesis tool ABC for the test examples, the verification speed of the method of the present invention is 1.51 times higher than that of &cec and 3.71 times higher than that of hybrid_cec. Therefore, the method of the present invention provides a new research idea for circuit structures with high XOR density, and at the same time shows good experimental results, having strong engineering practical significance and application value. Description of the Drawings

[0017] Figure 1 Schematic diagram of the Miter circuit constructed in the embodiment; Figure 2 Example diagram of converting an AND-NOT graph AIG containing Miter circuit information into an XOR majority logic graph XMG; Figure 3 Schematic diagram of classifying potentially equivalent nodes into equivalent classes in the embodiment; Figure 4Schematic diagram of nodes with potential equivalence relationships constructed in the embodiments. Detailed implementation manners

[0018] The present invention will be further described in detail below in conjunction with the embodiments with reference to the drawings.

[0019] Embodiment: Take Figure 1 the two circuits Design1 and Design2 in as the two circuits to be verified for equivalence, and use the method of the present invention for equivalence verification, including the following steps: Figure 1 Step 1: Based on the combinational equivalence checking (CEC), construct the Miter circuit from the two circuits Design1 and Design2 to be verified for equivalence. As n shown, the two circuits Design1 and Design2 have the same primary inputs Pi1~Pi 1 , connect the primary output po1 n ~ po1 1 of Design1 and the corresponding primary output po2 n ~ po2 Figure 2 of Design2 to XOR1~XORn gates one by one with XOR, and converge the outputs of the XOR1~XORn gates to an OR gate to form the primary output of the Miter circuit; read the AND-inverter graph (AIG) containing the Miter circuit information, and use the LUT mapping and exact synthesis method to convert the AIG into an exclusive-or majority graph (XMG), as Figure 2 shown. Figure 2 is an example graph of converting the AND-inverter graph (AIG) containing the Miter circuit information into an exclusive-or majority graph (XMG). In

[0020]

[0021] the AIG includes three primary inputs a, b, and c, two primary outputs P0 and P1, and six AND gates. Among them, the black dotted line with an arrow represents a directed edge with an inverter, and the black solid line with an arrow represents the signal transmission path; the XMG includes three primary inputs a, b, and c, two primary outputs P0 and P1, and two XOR gates and one MAJ gate. Step 3.1: Assign a set of random values to the input ports of the Miter circuit after structural rewriting, and perform local simulation on an XOR gate, that is, extract the information of each node in the XOR gate and its logic cone. Starting from the input ports of the Miter circuit after structural rewriting, deduce the simulation signals of each node step by step upward in the order of the connection relationships of the nodes in the logic cone, and use the calculated simulation signal of the XOR gate as the output value of the XOR gate; traverse all XOR gates to obtain the output values of all XOR gates; Step 3.2: If there is a case where the output value is 1 among the output values of all XOR gates, it indicates that there is a case where the main output value of the OR gate in the Miter circuit after structural rewriting is 1, that is, the main output values are not all zero, then it is determined that the two circuits are not equivalent, and this method ends; if the output values of all XOR gates are 0, it indicates that the main output values of the OR gates in the Miter circuit after structural rewriting are all 0, that is, the main output values are all zero, and proceed to Step 4.

[0022] Step 4: Preset the conflict count limit of the SAT solver to M = 50 times, and use the SAT solver to perform the first equivalence verification on the Miter circuit after structural rewriting. If the SAT solver obtains a solution result within the M conflict count limit, then this method ends; otherwise, proceed to Step 5.

[0023] Step 5: Obtain the simulation signals of all nodes in the Miter circuit after structural rewriting through random simulation, set the nodes with equal simulation signals as potential equivalent nodes, and divide the potential equivalent nodes into equivalence classes. As Figure 3 shown, assign the simulation signals 1111 and 0000 to the input terminals of G1, G2, and G3. In this way, the simulation signals of G1, G2, G4, and G5 are 1111, and the simulation signals of G3 and G6 are 0000. Then, the equivalence classes are G1, G2, G4, G5 and G3, G6 respectively. Among them, G1, G2, and G4 are AND gates, G3 is an OR gate, G5 is an XOR gate, and G6 is a NAND gate.

[0024] Step 6: Optimize the equivalence classes. The specific process is as follows: Step 6.1: By traversing the nodes in the equivalence class, first exclude the nodes in the equivalence class whose simulation signals are all 0 or all 1, and then exclude the low-quality nodes in the equivalence class whose proportion of the number of characters 0 or 1 in the simulation signals is less than 20%; Step 6.2, calculate the flipping rate of each node in the equivalence class. If the flipping rate of a node exceeds the preset threshold, skip the node; if the flipping rate of a node does not exceed the preset threshold, flip the last bit of the simulation signal of the node to 0 or 1, and use it as the bit value of the next simulation signal of the node. Based on the bit value, perform SAT solver verification on the node. If the solution result is UNSAT, it means that the output of the simulation signal of the node is always 0 or always 1. Replace the node with a constant node to reduce the low-quality nodes in the equivalence class and obtain the optimized equivalence class.

[0025] Step 7: Randomly obtain two nodes with potential equivalence relationship from the optimized equivalence class, and construct the outputs of these two nodes through XOR, such as Figure 4 As shown, A and B, C and D, E and F are connected and constructed by XOR1, XOR2, and XOR3, respectively. Use the SAT solver to verify whether the two nodes are equivalent. If the solution result of the SAT solver is UNSAT, the two nodes are determined to be equivalent and merged; otherwise, the two nodes are determined to be unequal, and the input signal of the SAT solver that causes the two nodes to be unequal is obtained. This input signal is used as a new simulation signal for re-simulation to refine the equivalence class. The re-simulation process is: add the new simulation signal to a set of random values ​​assigned to the input port (PIs) of the Miter circuit after the structure is rewritten to obtain an updated random value, use the updated random value to re-simulate the Miter circuit after the structure is rewritten, obtain the simulation signals of all nodes in the Miter circuit after the structure is rewritten, set the nodes with equal simulation signals as new equivalent nodes, construct a new equivalence class with the new equivalent nodes, compare the new equivalence class with the equivalence class obtained in step 5, and eliminate inconsistent simulation signals to refine the equivalence class.

[0026] Step 8, iteratively execute step 7, with the preset number of iterative executions being N=8 times, until the equivalence class is empty or the number of iterative executions reaches N times, and the optimized Miter circuit is obtained.

[0027] Step 9: Use the SAT solver to perform the final equivalence verification on the optimized Miter circuit. The final solution output by the SAT solver is the equivalence verification result of the two circuits.

[0028] The method of the present invention optimizes the number of nodes, logic levels, etc. of the Miter circuit. Figure 2 As shown, the comparison results between AIG and XMG show that XMG has a more compact structure in representation.

[0029] Table 1 shows the node information of AIG and XMG in different test circuits, and Table 2 shows the time comparison between the method of the present invention and the existing &cec and hybrid_cec methods for equivalence verification. e1 to e8, e1_c2rs to e8_c2rs in Table 1 and Table 2 are examples of equivalent circuits, and une1 and une2, une1_c2rs and une2_c2rs are examples of non-equivalent circuits.

[0030] Table 1 Node information of AIG and XMG in different test circuits

[0031] Table 2 Comparison of the time required for equivalence verification between the method of the present invention and the existing &cec and hybrid_cec methods

[0032] The data in the upper part of Table 1 show that compared with AIG, the number of logic gates of XMG is reduced by 49%, the number of logic levels is reduced by 24%, and the number of fan-out nodes is significantly increased by 56%. The lower part of Table 1 shows the results of optimizing the circuit structure through the c2rs synthesis flow command of the logic synthesis tool ABC. The optimization process of the method of the present invention changes the optimization method of the original logic structure. The results show that compared with AIG, XMG reduces the number of logic gates by 38%, reduces the number of logic levels by 33%, and increases the number of fan-out nodes by 9%.

[0033] As shown in Table 2, the verification speed of the circuit equivalence of the method of the present invention is 2.81 times and 2.74 times higher than that of &cec and hybrid_cec, respectively. After the test example is optimized by the c2rs synthesis flow command of the logic synthesis tool ABC, the verification speed of the method of the present invention is 1.51 times higher than that of &cec and 3.71 times higher than that of hybrid_cec.

[0034] In summary, compared with traditional methods, the equivalence verification method based on XOR majority logic proposed in the present invention significantly improves the verification efficiency, especially for examples of non-equivalent circuits, achieving faster and more effective verification, which has important practical significance for the application in the field of logic synthesis and the development of equivalence verification tools.

Claims

1. An equivalence verification method based on exclusive - OR majority logic, characterized in that, The method is as follows: Construct two circuits to be verified for equivalence into a Miter circuit, read the NAND graph AIG containing the information of the Miter circuit, convert the AIG into an exclusive-or majority logic graph XMG, and perform structural rewriting on the XMG; Calculate the primary output value of the structurally rewritten Miter circuit. If the primary output values are not all zero, the method ends. Otherwise, use a SAT solver to verify the equivalence of the structurally rewritten Miter circuit. If the SAT solver obtains a solution result, the method ends. Otherwise, obtain the simulation signals of all nodes in the structurally rewritten Miter circuit through random simulation, set the nodes with equal simulation signals as potentially equivalent nodes, and classify the potentially equivalent nodes into equivalence classes; Optimize the equivalence classes to reduce the low-quality nodes in the equivalence classes, and then randomly obtain two nodes with potentially equivalent relationships from the optimized equivalence classes to perform equivalent node merging. Iteratively merge the equivalent nodes in this way until the equivalence classes are empty or the preset number of iterative executions is reached, obtain the optimized Miter circuit, and then use a SAT solver to perform the final equivalence verification on the optimized Miter circuit.

2. The equivalence verification method based on exclusive-or majority logic according to claim 1, wherein This method specifically includes the following steps: Step 1: Construct two circuits to be verified for equivalence into a Miter circuit, read the NAND graph AIG containing the information of the Miter circuit, and use the LUT mapping and exact synthesis method to convert the AIG into an exclusive-or majority logic graph XMG, and perform structural rewriting on the XMG using the algebraic properties of XOR gates and MAJ gates; Step 2: Calculate the primary output value of the structurally rewritten Miter circuit. If the primary output values are not all zero, it is determined that the two circuits are not equivalent, and the method ends. Otherwise, proceed to Step 3; Step 3: Preset the conflict count limit of the SAT solver to M times, and use the SAT solver to verify the equivalence of the structurally rewritten Miter circuit. If the SAT solver obtains a solution result within the M - time conflict count limit, the method ends. Otherwise, obtain the simulation signals of all nodes in the structurally rewritten Miter circuit through random simulation, set the nodes with equal simulation signals as potentially equivalent nodes, and classify the potentially equivalent nodes into equivalence classes; Step 4: Optimize the equivalence classes to reduce the low-quality nodes in the equivalence classes; randomly obtain two nodes with potentially equivalent relationships from the optimized equivalence classes to perform equivalent node merging. Iteratively merge the equivalent nodes in this way until the equivalence classes are empty or the preset number of N iterative executions is reached, obtaining the optimized Miter circuit; Step 5: Use the SAT solver to perform the final equivalence verification on the optimized Miter circuit, and the final solution result output by the SAT solver is the equivalence verification result of the two circuits.

3. The equivalence verification method based on exclusive - OR majority logic according to claim 2, wherein, In Step 1, construct a Miter circuit based on the combinational equivalence checking CEC, that is, connect the corresponding output ports of the two circuits to be verified for equivalence one by one through XOR gates, and converge the outputs of all XOR gates to an OR gate to form the primary output of the Miter circuit.

4. The equivalence verification method based on exclusive-or majority logic according to claim 2, characterized in that, The specific process of Step 2 is as follows: Assign a set of random values ​​to the input port of the Miter circuit after the structural rewrite, perform local simulation on an XOR gate, that is, extract the information of the XOR gate and each node in its logic cone, and deduce the simulation signal of each node step by step from the input port of the Miter circuit after the structural rewrite according to the order of the connection relationship of each node in the logic cone, and use the calculated simulation signal of the XOR gate as the output value of the XOR gate; traverse all XOR gates to obtain the output values ​​of all XOR gates; If the output value of all XOR gates is 1, it indicates that the main output value of the OR gate in the Miter circuit after the structure rewrite is 1, that is, the main output value is not all zero, then the two circuits are determined to be unequal, and this method ends; if the output values ​​of all XOR gates are 0, it indicates that the main output value of the OR gate of the Miter circuit after the structure rewrite is 0, that is, the main output value is all zero, and proceed to step 3.

5. The equivalence verification method based on exclusive - OR majority logic according to claim 2, characterized in that The specific process of optimizing the equivalence class in step 4 is: By traversing the nodes in the equivalence class, the nodes whose simulation signals are all 0 or all 1 in the equivalence class are excluded first, and then the low-quality nodes whose simulation signals have the characters 0 or 1 accounting for less than 20% in the equivalence class are excluded; Calculate the flip rate of each node in the equivalence class. If the flip rate of a node exceeds the preset threshold, skip the node. If the flip rate of a node does not exceed the preset threshold, flip the last bit of the simulation signal of the node to 0 or 1, which is used as the bit value of the next simulation signal of the node. Based on the bit value, perform SAT solver verification on the node. If the solution result is UNSAT, it means that the output of the simulation signal of the node is always 0 or always 1, and replace the node with a constant node.

6. The equivalence verification method based on exclusive - OR majority logic according to claim 2, wherein, The specific process of merging equivalent nodes in step 4 is as follows: randomly obtain two nodes with potential equivalence relationship from the optimized equivalence class, use the SAT solver to verify whether the two nodes are equivalent, if the solution result of the SAT solver is UNSAT, then the two nodes are determined to be equivalent and merged; otherwise, the two nodes are determined to be unequal, obtain the input signal of the SAT solver that causes the two nodes to be unequal, and use this input signal as a new simulation signal to re-simulate to refine the equivalence class.

7. The equivalence verification method based on exclusive - OR majority logic according to claim 6, characterized in that, The re-simulation process in step 4 is: adding the new simulation signal to a set of random values ​​assigned to the input port of the Miter circuit after the structural rewrite to obtain an updated random value, using the updated random value to re-simulate the Miter circuit after the structural rewrite to obtain the simulation signals of all nodes in the Miter circuit after the structural rewrite, setting the nodes with equal simulation signals as new equivalent nodes, constructing a new equivalence class with the new equivalent nodes, comparing the new equivalence class with the equivalence class obtained in step 5, eliminating inconsistent simulation signals, and refining the equivalence class.

Citation Information

Patent Citations

  • Equivalence verification device and method based on XMG combinational circuit

    CN115544926A

  • Logic equivalence verification method based on CDCL algorithm and computer algebra

    CN116306478A

  • Distributed data path combination equivalence verification method and distributed server

    CN119494301A

  • CNF generation method and system for equivalence checking

    WO2022077645A1