Management methods and formal verification methods for clauses corresponding to dynamic integrated circuits.
By dynamically managing learning clauses and utilizing a multi-level interval splitting and conflict frequency evaluation value update mechanism, the problem of inaccurate evaluation of learning clauses is solved, thereby improving the efficiency of integrated circuit verification and memory utilization.
Patent Information
- Application Number
- CN202511301478.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-09-12
AI Technical Summary
In the existing technology, the quality assessment of learning clauses is not accurate enough, resulting in low management effectiveness of learning clauses and affecting the efficiency of SMT solvers in large-scale integrated circuit verification.
A dynamic clause management method corresponding to integrated circuits is adopted. Through multi-level interval diversion and conflict frequency evaluation value update mechanism, the quality changes of learning clauses are accurately evaluated, and the storage and deletion strategies of learning clauses are dynamically adjusted.
It improves the management effectiveness of learning clauses, reduces memory usage, enhances Boolean constraint propagation efficiency, and optimizes the solution performance of the SMT solver.
Smart Images

Figure CN120805820B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of formal verification of integrated circuit design, and more particularly to a method for managing clauses corresponding to dynamic integrated circuits. Background Technology
[0002] With the continuous increase in the scale and complexity of digital circuits, model checking-based formal verification techniques have become a key means in verifying circuit properties. For example... Figure 1 As shown, the current verification process typically involves constructing a circuit model, transforming the attribute to be verified into a Satisfaction Model Theory (SMT) problem, and then using an SMT solver to solve it. If attribute P is true, the input negation Not(P) cannot occur (UNSAT). If attribute P is false, the solver will provide a counterexample, i.e., an assignment that satisfies Not(P) (SAT), to help designers understand why attribute P is false and how to fix the problem.
[0003] However, as circuit size increases, the number of variables and constraints involved in the SMT problem increases dramatically, leading to a significant rise in solution complexity and computational resource consumption. In particular, SMT solvers based on the DPLL algorithm (Davis-Putnam-Logemann-Loveland algorithm) have gradually shown limitations when dealing with large-scale problems. The DPLL algorithm determines whether the CNF formula formed by the conjunction of clauses is satisfied (SAT / UNSAT), performs PCB propagation through variable assignment, eliminates pure text simplification of variables that only appear in one polarity, guesses the values of unassigned variables to make decisions, and backtracks when a conflict is found, undoing some assignments and trying other branches.
[0004] To improve verification efficiency, existing technologies have introduced various improvement strategies, such as restart mechanisms, activity-based branching heuristics, and Conflict-Driven Clause Learning (CDCL) techniques. CDCL analyzes the causes of conflicts—that is, which variable assignments led to the final conflict—and adds this cause as a new constraint (e.g., formally negating the conflicting clause) to the original formula to prevent the same conflict from occurring in subsequent search processes. CDCL extracts and learns key information during conflicts, then adds the generated clauses to the CNF expression of the SMT problem, effectively pruning the search space and becoming a mainstream solution strategy. However, in large-scale SMT problems, frequent conflicts lead to the generation of a large number of learned clauses. These accumulated clauses not only consume a lot of memory but may also reduce the efficiency of Boolean constraint propagation (BCP), thus affecting overall solution performance. Existing clause management methods mostly rely on pre-defined timed cleanup strategies and single evaluation metrics, failing to effectively retain high-quality clauses and delete low-quality ones. For example, evaluating clauses by only considering the LBD value leads to evaluation errors in clause quality.
[0005] Therefore, under the constraints of limited computing resources and time, how to more accurately evaluate the quality of clauses and manage clauses to improve the efficiency of SMT solution has become a key problem that urgently needs to be solved. Summary of the Invention
[0006] To address the technical problem that the quality assessment of learning clauses in existing technologies is not accurate enough, resulting in low management effectiveness of learning clauses, this invention proposes a dynamic integrated circuit-based clause management method and a formal verification method.
[0007] The present invention proposes a method for managing clauses corresponding to dynamic integrated circuits, comprising:
[0008] Step 1: Transform the properties to be verified in the integrated circuit design into a satisfaction modulus theory problem, and solve it using a satisfaction modulus theory solver;
[0009] Step 2: Obtain the current set of learning clauses, and divide the learning clauses in the set into multiple intervals according to the LBD value of the learning clauses;
[0010] Step 3: For each learning clause without an evaluation value, calculate the evaluation value based on its LBD value; sort the learning clauses in each interval according to the size of the evaluation value;
[0011] Step 4: Process the intervals other than the interval with the smallest and largest LBD values as follows: Move the learning clauses with larger evaluation values in the currently processed interval to the next adjacent interval with a larger LBD value than the currently processed interval, and move the learning clauses with smaller evaluation values to the previous adjacent interval with a smaller LBD value than the currently processed interval.
[0012] Move the learning clauses with larger evaluation values in the interval with the smallest LBD value to the next adjacent interval with a larger LBD value than that interval;
[0013] Delete the learning clauses with larger evaluation values in the interval with the largest LBD value;
[0014] Step 5: When performing conflict analysis on the clause, determine whether the current clause is a learning clause. If so, update the evaluation value of the learning clause based on the LBD value of the learning clause, the number of conflicts when the learning clause was generated, and the number of conflicts used in the conflict analysis. Then, add the learning clause obtained from the conflict analysis to the learning clause set and return to step 2.
[0015] Furthermore, for each learning clause without an evaluation value, the evaluation value is calculated based on its LBD value using the formula 1 / LBD value.
[0016] Furthermore, for each learning clause without an evaluation value, the evaluation value is calculated based on its LBD value using the following formula. Calculations are performed, in which, The error intensity is 0.01~0.1, C is the learning clause, and Noise(C) is random noise.
[0017] Furthermore, for each learning clause without an evaluation value, the evaluation value is calculated based on its LBD value using the following formula. Calculations are performed, in which, For a fixed offset, C is the learning clause.
[0018] Furthermore, for each learning clause without an evaluation value, the evaluation value is calculated based on its LBD value using the following formula.
[0019]
[0020] Calculations are performed, in which, C is the offset, C is the learning clause, and k is the LBD threshold.
[0021] Furthermore, the evaluation value of the learning clause is updated based on its LBD value, the number of conflicts generated when the learning clause was generated, and the number of conflicts used in conflict analysis. Specifically, formula E is used. i+1 = A*Pi + (1-A)*E i Update, where A is the decay factor and P is the decay factor. i =P i-1 +1 / (S2 – S1), where S1 is the number of conflicts generated when the learning clause was created, and S2 is the number of conflicts used in conflict analysis. After obtaining the P-value, the value of S2 is used to replace the value of S1. When S1 = S2, P... i =1.
[0022] Furthermore, when moving a portion of the learning clauses in each interval to the preceding or following adjacent interval, the quarter of the learning clauses with the earlier or later evaluation values within the interval are selected for movement.
[0023] Furthermore, the half of the learning clauses with smaller evaluation values in the interval with the largest LBD value are deleted.
[0024] The formal verification method proposed in this invention manages the generated learning clauses by employing the dynamic integrated circuit-corresponding clause management method described in the above technical solution when solving integrated circuit designs using a satisfaction modulus solver.
[0025] This invention employs a multi-level interval dynamic diversion mechanism for learning clauses. This mechanism more accurately reflects the changing trend of clause quality with usage, thus making the algorithm more inclined to retain learning clauses with high usage value. Furthermore, this invention incorporates conflict frequency into the calculation of the evaluation value of learning clauses, ensuring that when some clauses are activated during the solution process, their evaluation values can be quickly updated to reasonable values, preventing premature deletion. Attached Figure Description
[0026] The present invention will now be described in detail with reference to the embodiments and accompanying drawings, wherein:
[0027] Figure 1 This is the main flowchart for formal verification of integrated circuits in the prior art.
[0028] Figure 2 This is a flowchart of the dynamic management of learning clauses according to an embodiment of the present invention. Detailed Implementation
[0029] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0030] Therefore, a feature pointed out in this specification is used to describe one feature of one embodiment of the invention, and does not imply that every embodiment of the invention must have the described feature. Furthermore, it should be noted that this specification describes many features. Although certain features may be combined to illustrate possible system designs, these features may also be used in other combinations not explicitly stated. Therefore, unless otherwise stated, the described combinations are not intended to be limiting.
[0031] The method for managing clauses corresponding to dynamic integrated circuits of the present invention mainly includes the following steps.
[0032] Step 1: Transform the properties to be verified in the integrated circuit design into a Satisfaction Modular Theory (SMT) problem, and solve it using a Satisfaction Modular Theory Solver (SMT Solver).
[0033] Step 2: Obtain the current set of learning clauses. Divide the learning clauses in the set into multiple intervals based on their LBD values. The LBD value refers to the number of assignment layers contained in the learning clause. A smaller LBD value means that the learning clause contains fewer assignment layers, and the constraints between variables are more compact.
[0034] Step 3: For each learning clause without an evaluation value, calculate the evaluation value based on its LBD value; sort the learning clauses in each interval according to the size of the evaluation value;
[0035] Step 4: Process the intervals other than the interval with the smallest and largest LBD values as follows: Move the learning clauses with larger evaluation values in the currently processed interval to the next adjacent interval with a larger LBD value than the currently processed interval, and move the learning clauses with smaller evaluation values to the previous adjacent interval with a smaller LBD value than the currently processed interval.
[0036] Move the learning clauses with larger evaluation values in the interval with the smallest LBD value to the next adjacent interval with a larger LBD value than that interval;
[0037] Delete the learning clauses with larger evaluation values in the interval with the smallest LBD value;
[0038] Step 5: When performing conflict analysis on the clause, determine whether the current clause is a learning clause. If so, update the evaluation value of the learning clause based on the LBD value of the learning clause, the number of conflicts when the learning clause was generated, and the number of conflicts used in the conflict analysis. Then, add the learning clause obtained from the conflict analysis to the learning clause set and return to step 2.
[0039] This invention calculates the evaluation value of learning clauses based on LBD values and deletes learning clauses with both low LBD values and low evaluation values, effectively removing low-quality learning clauses. Furthermore, this invention adds a conflict frequency evaluation mechanism, which calculates the evaluation value of learning clauses based on conflict frequency, accelerating the update rate of learning clauses. This allows learning clauses that are frequently used in the short term to quickly improve their evaluation value, effectively retaining high-quality learning clauses.
[0040] In one embodiment, for each learning clause without an evaluation value, the evaluation value is calculated based on its LBD value using the formula 1 / LBD value.
[0041] The larger the LBD value, the smaller the evaluation value, which can filter out low-quality clauses with many assignment layers and loose constraints between variables.
[0042] Besides the formula mentioned above, there are other ways to calculate the evaluation value based on the LBD value. For example, the reciprocal of the LBD value can be linearly transformed by introducing an error term, as shown in the following formula.
[0043]
[0044] By using small perturbations, the strict ranking of LBD values can be broken, avoiding over-reliance on a single indicator.
[0045] in, It is the error intensity, and its value can be set as needed, for example, set to [0.01, 0.1]. C is the learning clause, and Noise(C) is random noise, which can be uniformly distributed in [-1, 1], or based on other features of the clause, such as the bias based on the clause length, or the bias based on the number of times the conflict occurs, etc.
[0046] In another embodiment, the reciprocal of the LBD value can be non-linearly attenuated and adjusted. The evaluation value can be calculated using the following formula based on the LBD value.
[0047]
[0048] This formula compresses the differences in high LBD values, avoiding the dominance of extreme values. A fixed offset can be considered as compensation for LBD errors; for example, it can be used to... The value of is defined as [0.5~2].
[0049] In other embodiments, piecewise functions can also be used to calculate the evaluation value, as shown in the following formula.
[0050]
[0051] In this embodiment, the advantages of learning clauses with low LBD values are enhanced, while clauses with high LBD values are suppressed. Here, k is the LBD threshold, and r is the offset. For example, those skilled in the art can define k as [3,5], r=0.05, etc., as needed.
[0052] The values of the parameters in the above embodiments can be determined by those skilled in the art based on the range of LBD values for a specific circuit. The detailed data listed above are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0053] In one embodiment, the evaluation value of the learned clause is updated based on the LBD value of the learned clause, the number of conflicts when the learned clause was generated, and the number of conflicts used in conflict analysis. Specifically, formula E is used. i+1 = A*P i +(1-A)*E i Update, where A is the decay factor and P is the decay factor. i = 1 / (S2 – S1), where S1 is the number of conflicts generated when the learning clause is produced, and S2 is the number of conflicts used in conflict analysis. After obtaining the P-value, the value of S2 is used to replace the value of S1. When S1 = S2, P... i =1.
[0054] This implementation incorporates conflict frequency into the evaluation value, rapidly increasing the evaluation score of frequently used clauses and effectively filtering out high-quality clauses. Once these clauses are used in subsequent solutions, their evaluation scores are updated quickly, ensuring their retention. This design minimizes the risk of losing potentially useful clauses later due to premature deletion, optimizing the overall quality and solution efficiency of the learned clause library.
[0055] In one embodiment, when moving a portion of the learning clauses within each interval to the preceding or following adjacent interval, the quarter of the learning clauses with the highest or lowest evaluation values within that interval are selected for movement. For intermediate intervals where the evaluation values are neither the maximum nor the minimum, half of the learning clauses can be moved each time, effectively adjusting the active clauses within each interval. Of course, this invention is not limited to moving one-quarter each time, and those skilled in the art can adjust the number of clauses moved each time as needed.
[0056] In one embodiment, the present invention deletes the half of the learning clauses with smaller evaluation values in the interval with the largest LBD value.
[0057] By filtering out clauses with large LBD values and small evaluation values, low-quality learning clauses are filtered out and deleted. This avoids the problem of too many clauses in the SMT solution process, effectively reduces memory burden, and improves the efficiency of Boolean constraint propagation (BCP propagation).
[0058] This invention also protects a formal verification method that, when solving integrated circuit designs using a satisfaction modulus solver, manages the generated learning clauses using the dynamic integrated circuit-corresponding clause management method described above.
[0059] like Figure 2 As shown, this invention uses the division of the learning clause set into three intervals as an example to illustrate the technical solution of this invention. It should be noted that this invention is not limited to dividing the learning clause set into three intervals; it can also be two intervals, or even four or more intervals. The specific number will be considered by those skilled in the art based on factors such as the scale of the integrated circuit.
[0060] First, a set of learning clauses C is obtained. Based on the LBD value of each learning clause, the learning clauses are divided into three categories, or three intervals. Learning clauses with an LBD value less than or equal to 6 are grouped into one category, C1; learning clauses with an LBD value greater than 6 and less than or equal to 12 are grouped into another category, C2; and learning clauses with an LBD value greater than 12 are grouped into another category, C3. The specific threshold for LBD value division is selected based on the LBD values of all learning clauses in the set. The specific values listed in this embodiment are not intended to limit the scope of protection of this invention.
[0061] Calculate the evaluation value for each learning clause as follows:
[0062] The conflict frequency is calculated during conflict analysis. Each time a conflict analysis is performed, it is determined whether the clause is a learning clause. If it is a learning clause, the current score P is then calculated.
[0063] The calculation of the current score P requires first defining the variables needed to calculate the conflict frequency for each learning clause, including: the number of conflicts S1 when the learning clause is generated, and the number of conflicts S2 when it is used in conflict analysis. Each time the current score P is calculated... i During the calculation, first compare the size of S1 and S2. If the two values are equal, then P... i If it is 1, then P i =P i-1 +1 / (S2 – S1);
[0064] Each time the current score P is obtained, the value of S1 should be replaced with the value of S2 to update it. This ensures that the previous update frequency is not carried over when P is calculated next time. The current score P needs to be accumulated each time the learning clause is used, so the update of the P value adopts an additive method, that is, the P value of a learning clause = the current p value + all previously calculated P values.
[0065] Initialize and update the evaluation value E. The initialization of evaluation value E occurs after the learning clause is generated and the LBD value is obtained, and it is initialized to the reciprocal of the LBD value, i.e., E = 1 / LBD value. The evaluation value E is updated after the current score P is calculated, using the following formula.
[0066] E i+1 = A*P i + (1-A)*E i ;
[0067] Where A is the attenuation factor, which is set to 10 when A < 0.6. -6 The decay factor controls the relative weight between recent and past data, and its value affects the final result. The decay factor is derived from the exponentially weighted average of the combined sequence. The initial value of A is less than 0.6, for example, 0.4. The specific value of A can be obtained later through variable monitoring using formal verification tools. The combined sequence referred to in this invention is a sequence composed of the LBD values of all learned clauses.
[0068] The three intervals C1, C2, and C3 above will be updated as the learned clauses propagate and conflict analysis proceed, and the evaluation value E of the learned clauses will be updated synchronously.
[0069] When the learning clause is assigned to interval C2, it is first sorted from largest to smallest according to the evaluation value E of the learning clause. Then, the first quarter is moved to interval C1 and the last quarter is moved to interval C3.
[0070] When a learning clause is assigned to interval C1, it is first sorted in descending order of its evaluation value E, and then the last quarter of the clauses are moved to interval C2. The processing order of intervals C1 and C2 is not restricted.
[0071] Finally, the learning clauses in interval C3 are deleted. Similarly, the learning clauses are sorted from largest to smallest according to their evaluation value E, and half of the learning clauses are deleted.
[0072] This embodiment employs a three-tiered (C1, C2, C3) hierarchical flow mechanism for learning clauses. This mechanism more accurately reflects the changing trend of clause quality with usage, thus making the algorithm more inclined to retain high-value learning clauses. Specifically, the C3 layer periodically deletes clauses from the latter half of the learning process that have lower evaluation scores. This strategy allows clauses from the first half that are not currently used to be retained for an observation period. Once these clauses are used in subsequent solutions, their evaluation scores are quickly updated, effectively ensuring their retention. This design minimizes the risk of losing potentially useful clauses later due to premature deletion, optimizing the overall quality of the learning clause library and the solution efficiency.
[0073] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method of managing clauses corresponding to integrated circuits dynamically, characterized by, The method comprises the following steps: Step 1, converting the to-be-verified attribute of an integrated circuit design into a satisfiability modulo theory problem, and solving the problem by using a satisfiability modulo theory solver; Step 2, obtaining a current set of learning clauses, and dividing the learning clauses in the set of learning clauses into multiple intervals according to the LBD values of the learning clauses; Step 3, calculating the evaluation values of the learning clauses without evaluation values according to the LBD values of the learning clauses, and sorting the learning clauses in each interval according to the evaluation values; Step 4, performing the following processing on the intervals other than the interval with the minimum LBD value and the interval with the maximum LBD value: moving a part of the learning clauses with larger evaluation values in the currently processed interval to a next adjacent interval with a larger LBD value than the currently processed interval, and moving a part of the learning clauses with smaller evaluation values to a previous adjacent interval with a smaller LBD value than the currently processed interval; moving a part of the learning clauses with larger evaluation values in the interval with the minimum LBD value to a next adjacent interval with a larger LBD value than the interval with the minimum LBD value; deleting a part of the learning clauses with larger evaluation values in the interval with the maximum LBD value; Step 5, in the conflict analysis of a clause, determining whether the current clause is a learning clause, if yes, updating the evaluation value of the learning clause according to the LBD value of the learning clause, the number of conflicts when the learning clause is generated, and the number of conflicts used in the conflict analysis, adding the learning clause obtained in the conflict analysis to the set of learning clauses, and returning to step 2; The evaluation value of the learning clause is updated according to the LBD value of the learning clause, the number of conflicts when the learning clause is generated, and the number of conflicts used in the conflict analysis, and the updating is performed according to the formula E i+1 = A*P i + (1-A)*E i , A is an attenuation factor, P i = P i-1 + 1 / (S2-S1), S1 is the number of conflicts when the learning clause is generated, S2 is the number of conflicts used in the conflict analysis, and after the value of P i is obtained, the value of S2 is used to replace the value of S1, and when S1=S2, P i =1.
2. The method of claim 1, wherein the dynamic management of the clauses corresponding to the integrated circuits is performed by a clause manager. The evaluation value of each learning clause without an evaluation value is calculated according to the LBD value of the learning clause by using formula 1 / LBD value.
3. The method of claim 1, wherein the dynamic management of the clauses corresponding to the integrated circuits is performed by a clause manager. For each learning clause without an evaluation value, the evaluation value is calculated from its LBD value using the formula The calculation is performed where, is the error strength (0.01-0.1), C is the learning clause, and Noise(C) is the random noise.
4. The method of claim 1, wherein the dynamic management of the clauses corresponding to the integrated circuits is performed by a dynamic management unit. For each learning clause without an evaluation value, the evaluation value is calculated from its LBD value using the formula The calculation is performed where, is a fixed offset, C is the learning clause.
5. The method of claim 1, wherein the dynamic management of the clauses corresponding to the integrated circuits is performed by a dynamic management unit. The evaluation value of each learning clause without an evaluation value is calculated according to the LBD value of the learning clause by using formula A calculation is made where, is the offset, C is the learning clause, and k is the LBD threshold.
6. The method of claim 2 to 5, wherein, When moving a part of the learning clauses in each interval to a previous or next adjacent interval, a quarter of the learning clauses with the largest or smallest evaluation values in the interval are selected and moved.
7. The method of claim 2 to 5, wherein, A half of the learning clauses with smaller evaluation values in the interval with the maximum LBD value are deleted.
8. A formal verification method, characterized by, In the solving of an integrated circuit design by using a satisfiability modulo theory solver, the learning clauses generated are managed by using the dynamic management method of the clauses corresponding to the integrated circuit according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for deleting learning clauses in Boolean satisfiability solver, and Boolean satisfiability solver
CN112800681A
Method for deleting learning clauses based on LBD and Berkmin strategies
CN116957081A