SystemVerilog dynamic constraint increment solving method and system based on hierarchical dependence
By constructing a hierarchical dependency graph and using an incremental update strategy, the problem of repetitive solution of SystemVerilog dynamic constraints is solved, achieving efficient and automated randomization and constraint solution, and improving the efficiency and scalability of hardware verification.
Patent Information
- Application Number
- CN202511198037.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-28
AI Technical Summary
Existing technologies, when dealing with SystemVerilog dynamic constraints, especially those involving dynamic arrays and foreach loops, suffer from high overhead due to repeated calculations and high user configuration complexity, and thus cannot effectively support complex constraint scenarios.
By constructing a hierarchical dependency graph, variables are divided into solution blocks at different levels. An incremental update strategy and solver state reuse are adopted to adaptively generate or disable random variables and constraints, thereby reducing redundant calculations and optimizing the solution process.
It significantly reduces the overhead of repeated solutions, improves simulation performance and scalability, reduces user configuration complexity, and supports complex dynamic constraint scenarios.
Smart Images

Figure CN121031480A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of chip design automation, and in particular to a SystemVerilog dynamic constraint incremental solving method and system based on hierarchical dependency. BACKGROUND
[0002] In the field of electronic design automation (EDA) and hardware verification, SystemVerilog supports constraint randomization for generating diverse test scenarios to verify hardware designs. However, due to the scale and element dependency changes of dynamic data structures (such as variable-length arrays) during randomization, the traditional method of regenerating constraints and variables each time has a huge overhead.
[0003] Verilator, as a representative of open-source SystemVerilog simulators, converts hardware description languages into C++ or SystemC code to achieve efficient simulation and is widely used for synthesizable code verification. However, its support for SystemVerilog constraint solving is extremely limited, and it can only handle simple constraints that can be solved at one time, and cannot effectively handle complex constraints involving dynamic arrays or foreach loops, resulting in limited support scenarios. Cocotb-coverage, as an extension of Cocotb, provides functional coverage and constraint randomization functions, allowing constraints to be defined as arbitrary callable objects, enhancing expressiveness. However, Cocotb-coverage requires users to manually define the solving order when dealing with variable dependencies, explicitly specifying the randomization order of variables (such as solving y first and then x) to avoid solving failures caused by dependency relationships. This manual configuration increases the user's burden, especially in complex constraint scenarios, requiring a deep understanding of variable dependencies to optimize solving efficiency. Therefore, there is an urgent need for an automatic dependency analysis, incremental generation, and solver state reuse technology to efficiently handle SystemVerilog dynamic constraints, reduce repeated solving overhead, and improve simulation performance and scalability. SUMMARY
[0004] The purpose of the present application is to solve the above-mentioned shortcomings in the prior art, and to provide a SystemVerilog dynamic constraint incremental solving method and system based on hierarchical dependency, based on hierarchical dependency analysis, incremental constraint management, and dynamic constraint solving framework for solving incremental calls, aiming to provide an efficient and automated randomization and constraint solving solution for complex dynamic data structures in hardware verification. This framework significantly improves verification efficiency by analyzing constraint relationships, optimizing solving processes, and reusing solver information.
[0005] In one aspect, a SystemVerilog dynamic constraint incremental solving method based on hierarchical dependency is provided, comprising the following steps: S1: parse the semantic structure of SystemVerilog constraints, and construct a solving dependency graph among random variables; S2: perform hierarchical allocation according to the solving dependency graph, divide variables into different levels of solving blocks, and ensure that dependent variables are solved first; S3: according to the characteristics of the size change of dynamic data structure, adaptively generate and maintain random variables and constraint conditions in the corresponding solving block; S4: adopt an incremental update strategy, only update the affected solving block, and reuse the historical state of the solver to perform local solving.
[0006] Further, in step S1, the construction of the solving dependency graph among random variables comprises: By deeply analyzing the semantic structure of SystemVerilog constraints, a hierarchical dependency model among variables is constructed, the constraint expression is parsed based on the SystemVerilog abstract syntax tree, the control dependency relationship between dynamic data structure size variables and element variables, and the variable association relationship in conditional constraints are extracted, and a directed dependency graph representing the solving order of variables is constructed.
[0007] Further, in step S2, the hierarchical allocation specifically comprises: Variables without input dependency are allocated to the initial solving block, and the solving block of the dependent variable is placed in the downstream level of the solving block of the dependent variable. For complex constraint variables of connected dynamic data structures, they are allocated to the corresponding level solving block according to their connected path with dynamic arrays in the dependency graph.
[0008] Preferably, the dynamic constraint allocation is performed according to the constraint allocation rule, which comprises: Each constraint is allocated to the most downstream solving block of all associated solving blocks of the variable involved.
[0009] Further, in step S3, the adaptive generation and maintenance of random variables and constraint conditions comprises: According to the runtime condition, the constraint block is dynamically generated and the generation information is maintained to avoid repeated generation of random variables and constraints, which specifically comprises: Monitor the size change of dynamic data structure at runtime, and according to the difference between the current size and the historical generation record, dynamically create or disable random variables in the corresponding solving block; Maintain an activation state flag for each dynamic constraint, and only generate the corresponding constraint instance when the associated variable is activated.
[0010] Preferably, step S3 further comprises: According to the hierarchical dependency model, the related variable groups coupled by the dependency relationship are assigned to the same solution block, and each solution block instantiates an independent solver to solve the collaborative constraints.
[0011] Further, in step S4, the incremental update strategy includes: When the size of the dynamic data structure changes, only the affected solution blocks are updated, where... If the size of the dynamic data structure increases, new variables and associated constraints are only generated when the new size exceeds the historical record. If the size of the dynamic data structure is reduced, disable redundant variable association constraints and retain variable instances.
[0012] Preferably, in step S4, the local solution further includes: The downstream solution block receives the upstream solution results as assumptions, injects the assumptions into the solver, and reuses historical conflict clauses and lemma information to accelerate the solution. The assumptions include: the current size of the dynamic array, the set of enabled flags for the index range in the foreach constraint, and the boundary conditions for the values of the associated variables.
[0013] More preferably, the collaborative constraint solving further includes: After each solution is completed, the internal state of each solver is persisted, including the learned conflict clauses, lemmas, and variable binding relationships. When the same solver block is called again, the historical state is loaded as the initial environment for solving.
[0014] On the other hand, a SystemVerilog dynamic constraint incremental solution system based on hierarchical dependencies is provided, including: The constraint parsing module is used to parse the semantic structure of SystemVerilog constraints and construct a solution dependency graph between random variables; The hierarchical organization module is used to perform hierarchical allocation based on the solution dependency graph, dividing variables into solution blocks at different levels to ensure that variables without dependencies are solved first. The dynamic constraint management module is used to adaptively generate and maintain random variables and constraints in the corresponding solution block according to the characteristics of dynamic data structure size changes. The incremental update and solution module is used to adopt an incremental update strategy, update only the affected solution blocks, and reuse the historical state retained by the solver for local solution.
[0015] In addition, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the SystemVerilog dynamic constraint incremental solution method based on hierarchical dependencies as described above.
[0016] Meanwhile, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the SystemVerilog dynamic constraint incremental solution method based on hierarchical dependencies as described above.
[0017] Compared with the prior art, the beneficial effects of the present invention are: (1) This invention automatically constructs a solution dependency graph through hierarchical dependency analysis, divides variables into solution blocks of different levels according to their dependency relationships, eliminates the overhead of full reconstruction of constraints in traditional methods, and combines incremental update strategy with solver state persistence. When the dynamic array size changes, only the affected solution blocks need to be locally adjusted, and historical conflict clauses and lemma information are reused, which greatly reduces the amount of repeated calculations and accelerates the iterative solution process. (2) Based on the changes in the size of the runtime data structure, this invention adaptively generates or disables random variables and associated constraints (such as foreach loop constraints), and ensures that coupled variables are solved collaboratively through logical task grouping. This mechanism eliminates the need for users to manually define the solution order (as required by Coctb-coverage), reduces the complexity of manual configuration, and is especially suitable for verification scenarios where the size of dynamic arrays changes frequently; (3) This invention resolves the control relationship between dynamic array size and elements and the variable correlation of condition constraints through dependency graph analysis, and adopts a hypothesis injection mechanism to pass the upstream solution results (such as array size value and index enable flag) to the downstream solution block, effectively supporting complex dynamic constraint scenarios such as nested constraints and circular dependencies, breaking through the limitation of traditional tools (such as Verilator) that only support static constraints. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a hierarchical dependency SystemVerilog dynamic constraint incremental solution method according to the present invention; Figure 2 This is an example diagram of a constraint that needs to be solved in SystemVerilog according to the present invention; Figure 3 This is an example of solving a dependency graph according to the present invention; Figure 4 This invention is a Figure 1 A schematic diagram illustrating the changes in variables and constraints within the solution block during the third solution iteration of a constraint instance. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] This invention constructs a hierarchical dependency graph by parsing SystemVerilog constraint semantics, divides the solution block hierarchy according to variable dependencies, and prioritizes solving variables without dependencies. It adaptively generates or disables variables and constraints based on changes in the size of dynamic data structures, and employs an incremental update strategy: when the size changes, only the affected solution blocks are locally updated, while upstream results are injected into downstream solution blocks as assumptions. By persistently reusing the solver's internal state (conflicting clauses, lemmas), it significantly reduces redundant computations and efficiently handles complex scenarios such as dynamic arrays and cyclic constraints while ensuring the correctness of dependencies, greatly improving the automation level of hardware verification and the solution efficiency.
[0021] The specific embodiments of the present invention will be described below with reference to the accompanying drawings and examples.
[0022] Example 1 like Figure 1 As shown in this embodiment, a technical solution for a SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency is provided, which includes the following steps: S1: Parse the semantic structure of SystemVerilog constraints and construct a solution dependency graph among random variables; S2: Based on the solution dependency graph, perform hierarchical allocation, divide the variables into solution blocks of different levels, and ensure that variables without dependencies are solved first; S3: Based on the characteristics of dynamic data structure size changes, random variables and constraints are adaptively generated and maintained in the corresponding solution block; S4: An incremental update strategy is adopted, which only updates the affected solution blocks and reuses the historical state retained by the solver for local solution.
[0023] First, perform constraint resolution and dependency graph construction in step S1, including: By deeply analyzing the semantic structure of SystemVerilog constraints, a hierarchical dependency model among variables is constructed. Based on the SystemVerilog Abstract Syntax Tree (AST), constraint expressions are parsed, and the control dependencies between scale variables and element variables in dynamic data structures and the variable associations in condition constraints are extracted. A directed dependency graph representing the order of variable solution is constructed.
[0024] Figure 2 This example demonstrates a SystemVerilog constraint block instance that needs to be solved in this implementation. It contains a dynamic random integer array arr[] and a random integer variable data. The constraint block contains three static constraints in lines 5-7 and a foreach constraint in lines 8-11. The foreach constraint dynamically generates constraints based on the number of elements in arr[].
[0025] Based on this, we designed a SystemVerilog dynamic constraint incremental solution method based on solver dependency analysis. According to the solver dependencies in the constraints: the solution of `arr.size()` needs to precede the elements in `arr[]`, and `data` appears in the constraint along with both `arr.size()` and the elements in `arr[]`. Figure 3 The solution dependency graph is shown below.
[0026] After obtaining the solution dependency graph, a hierarchical allocation is performed in step S2 to ensure the correct and efficient solution order, specifically including: Variables without input dependencies are assigned to the initial solver block, and the solver block containing the dependent variables is placed at a downstream level from the solver block containing the dependent variables. For complex constraint variables in connected dynamic data structures, they are assigned to the corresponding level of solution blocks based on their connection paths with the dynamic array in the dependency graph.
[0027] Simultaneously, dynamic constraint allocation is performed following constraint allocation rules, including: Each constraint is assigned to the most downstream solver block among all the associated solver blocks of the variables it relates to.
[0028] In this embodiment, based on the solution dependency graph, we divide the random variables into different solution blocks. Specifically, the variables are divided into different solution blocks according to their dependencies, and constraints are assigned to the last of all solution blocks containing the variables they relate to. Figure 3 As shown, the random variable `arr.size()` is assigned to solution block ①, the elements in the random variable `arr[]` are assigned to solution block ②, and the random variable `data`, due to having common constraints with the elements in `arr[]`, is also assigned to solution block ②. That is, each constraint is assigned to the last solution block containing its random variable, as shown below. Figure 3 As shown,Figure 2 The constraints in lines 5 and 6 are assigned to solution block ①, and the constraints in line 7 and foreach are assigned to solution block ②.
[0029] During multiple solution processes, the dynamic constraint generation is managed as described in step S3. To address the characteristics of dynamic data structure size changes, an adaptive constraint generation and management mechanism is designed. This mechanism dynamically adjusts the constraint set through a condition control strategy, reducing the coding overhead caused by dynamic constraint changes. Specifically, the adaptive generation and maintenance of random variables and constraints includes: Dynamically generating constraint blocks based on runtime conditions (such as dynamic array size) and maintaining generation information avoids the repeated generation of random variables and constraints. This mechanism supports rapid adjustment of the constraint set and reduces redundant calculations by maintaining constraint state information, recording its activation history and dependencies. Specifically, it includes: During runtime, monitor changes in the size of dynamic data structures and dynamically create or disable random variables in the corresponding solution block based on the difference between the current size and historically generated records. Maintain an activation status flag for each dynamic constraint, and generate a corresponding constraint instance only when the associated variable is activated.
[0030] Step S3 also includes: According to the hierarchical dependency model, the related variable groups coupled by the dependency relationship are assigned to the same solution block, and each solution block instantiates an independent solver to solve the collaborative constraints.
[0031] In addition, the collaborative constraint solution also includes: After each solution is completed, the internal state of each solver is persisted, including the learned conflict clauses, lemmas and variable binding relationships, for reuse in subsequent iterations, which significantly accelerates the solution process. When the same solver block is called again, the historical state is loaded as the initial environment for solving.
[0032] Specifically, in this embodiment, we first maintain the generated content for each dynamic random variable and dynamic constraint, such as... Figure 4 As shown. For Figure 4The random variable arr[] in the solution maintains the number of elements generated during the solution process. When arr.size() is 3 in the first solution, arr[] generates 3 random variables arr[0], arr[1], and arr[2] and records the number of elements as 3. When arr.size() becomes 5 in the second solution, we know from the number of elements recorded in arr[] that there are already 3 elements, so we only need to generate two more random variables arr[3] and arr[4], and at this time we record that arr[] has 5 elements. When arr.size() becomes 4 in the third solution, we can know from the number of elements recorded in arr[] that there are already 5 elements, so we do not need to generate new random variables.
[0033] The generation of random variables and constraints needs to be carried out in the order of the solution blocks divided in step S1. First, the solution block ① is solved, and then the new random variables and constraints are generated and added to the corresponding solution block.
[0034] Furthermore, in the three-stage solution process of this embodiment, after the solution block is solved, the corresponding solver state is saved, and the conflict clauses and lemmas learned by the solver in each solution are used to accelerate future solutions.
[0035] Finally, the incremental update strategy and solution described in step S4 are performed. When the size or constraints of the dynamic data structure change, the system only updates the affected solution blocks, avoiding the regeneration of all constraints. If the size increases, only newly added constraint blocks are generated; if the size decreases, redundant constraint blocks are disabled, and redundant variables can be ignored because they do not affect other solutions. This local update strategy analyzes the dynamic characteristics of constraints, identifies the scope of the changes, and reduces unnecessary computational burden, making it particularly suitable for scenarios with frequent size adjustments in hardware verification. Specifically, it includes: When the size of the dynamic data structure changes, only the affected solution blocks are updated, where... If the size of the dynamic data structure increases, new variables and associated constraints are only generated when the new size exceeds the historical record. If the size of the dynamic data structure is reduced, disable redundant variable association constraints and retain variable instances.
[0036] Furthermore, local solutions include: The downstream solution block receives the upstream solution results as assumptions, injects the assumptions into the solver, and reuses historical conflict clauses and lemma information to accelerate the solution. The assumptions include: the current size of the dynamic array, the set of enabled flags for the index range in the foreach constraint, and the boundary conditions for the values of the associated variables.
[0037] In this embodiment, variables and constraints are dynamically generated based on the solution results, such as... Figure 4As shown, in the first solution, the result of arr.size() is 3, which corresponds to the generation of three random variables arr[0], arr[1], and arr[2] in solution block ②. At the same time, foreach generates three constraints foreach[i=0], foreach[i=1], and foreach[i=2] based on the number of elements in arr[]. In the second solution, the result of arr.size() is 5. At this time, only two new random variables arr[3] and arr[4] need to be generated in solution block ②, and only two new constraints foreach[i=3] and foreach[i=4] need to be generated in foreach. In the third solution, the result of arr.size() is 4. At this time, the random variables in solution block ② do not need to change.
[0038] like Figure 4 As shown, each time solution block ② is solved, the solver of solution block ② provides assumptions based on the result of solution block ①. In the first solution, solution block ① solves arr.size()=3, and the corresponding assumptions for solution block ② are: enable[i=0…2], arr.size()=3. That is, the constraints generated by i=0, i=1, i=2 in the foreach constraint are enabled, and arr.size()=3 is provided, ensuring that the random variable data satisfies data != 3. In the second solution, solution block ① solves arr.size()=5, and the corresponding assumptions for solution block ② are: enable[i=0…4], arr.size()=5. That is, the constraints generated by i=0, i=1, i=2, i=3, i=4 in the foreach constraint are enabled, and arr.size()=5 is provided, ensuring that the random variable data satisfies data != 5. In the third solution, the solution for block ① yields arr.size()=4. The assumptions for block ② are: enable[i=0…3], arr.size()=4. This means that the constraints generated by i=0, i=1, i=2, i=3 in the foreach constraint are enabled, while the constraint generated by i=4 in the foreach constraint is disabled. Furthermore, arr.size()=4 is set to ensure that the random variable data satisfies data != 4.
[0039] By using the incremental solution method for SystemVerilog dynamic constraints based on solution dependency analysis proposed in this invention, the overhead of constraint generation and encoding when repeatedly solving SystemVerilog dynamic constraints can be significantly reduced, and the solution efficiency can be improved by reusing solver states.
[0040] On the other hand, this embodiment also provides a SystemVerilog dynamic constraint incremental solution system based on hierarchical dependencies, including: The constraint parsing module is used to parse the semantic structure of SystemVerilog constraints and construct a solution dependency graph between random variables; The hierarchical organization module is used to perform hierarchical allocation based on the solution dependency graph, dividing variables into solution blocks at different levels to ensure that variables without dependencies are solved first. The dynamic constraint management module is used to adaptively generate and maintain random variables and constraints in the corresponding solution block according to the characteristics of dynamic data structure size changes. The incremental update and solution module is used to adopt an incremental update strategy, update only the affected solution blocks, and reuse the historical state retained by the solver for local solution.
[0041] It should be noted that the steps in the SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency provided in this embodiment can be implemented based on the corresponding modules in the SystemVerilog dynamic constraint incremental solution system based on hierarchical dependency. Those skilled in the art can refer to the technical solution of the system to implement the steps of the method. That is, the embodiments in the system can be understood as preferred examples of implementing the method, and will not be elaborated here.
[0042] Besides implementing the system and its various devices provided by this invention in purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the system and its various devices of this invention appear as logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices provided by this invention can be considered as a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0043] Finally, it should be noted that the above description is only a preferred embodiment of the present invention, and the scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be pointed out that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.
[0044] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency, characterized in that, Includes the following steps: S1: Parse the semantic structure of SystemVerilog constraints and construct a solution dependency graph among random variables; S2: Based on the solution dependency graph, perform hierarchical allocation, divide the variables into solution blocks of different levels, and ensure that variables without dependencies are solved first; S3: Based on the characteristics of dynamic data structure size changes, random variables and constraints are adaptively generated and maintained in the corresponding solution block; S4: An incremental update strategy is adopted, which only updates the affected solution blocks and reuses the historical state retained by the solver for local solution.
2. The SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency as described in claim 1, characterized in that, In step S1, constructing the solution dependency graph among random variables includes: By deeply analyzing the semantic structure of SystemVerilog constraints, a hierarchical dependency model among variables is constructed. Based on the SystemVerilog abstract syntax tree, constraint expressions are parsed, and the control dependencies between scale variables and element variables in dynamic data structures and the variable associations in condition constraints are extracted. A directed dependency graph representing the order of variable solution is constructed.
3. The SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency as described in claim 2, characterized in that, In step S2, the hierarchical allocation specifically includes: Variables without input dependencies are assigned to the initial solver block, and the solver block containing the dependent variables is placed at a downstream level from the solver block containing the dependent variables. For complex constraint variables in connected dynamic data structures, they are assigned to the corresponding level of solution blocks based on their connection paths with the dynamic array in the dependency graph.
4. The SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency as described in claim 3, characterized in that, Dynamic constraint assignment follows constraint assignment rules, including: Each constraint is assigned to the most downstream solver block among all the associated solver blocks of the variables it relates to.
5. The SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency as described in claim 4, characterized in that, In step S3, the adaptive generation and maintenance of random variables and constraints includes: Dynamically generate constraint blocks based on runtime conditions and maintain generation information to avoid repeatedly generating random variables and constraints. Specifically, this includes: During runtime, monitor changes in the size of dynamic data structures and dynamically create or disable random variables in the corresponding solution block based on the difference between the current size and historically generated records. Maintain an activation status flag for each dynamic constraint, and generate a corresponding constraint instance only when the associated variable is activated.
6. The SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency as described in claim 5, characterized in that, Step S3 also includes: According to the hierarchical dependency model, the related variable groups coupled by the dependency relationship are assigned to the same solution block, and each solution block instantiates an independent solver to solve the collaborative constraints.
7. The SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency as described in claim 1, characterized in that, In step S4, the incremental update strategy includes: When the size of the dynamic data structure changes, only the affected solution blocks are updated, where... If the size of the dynamic data structure increases, new variables and associated constraints are only generated when the new size exceeds the historical record. If the size of the dynamic data structure is reduced, disable redundant variable association constraints and retain variable instances.
8. The SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency according to claim 6, wherein in step S4, the local solution further includes: The downstream solution block receives the upstream solution results as assumptions, injects the assumptions into the solver, and reuses historical conflict clauses and lemma information to accelerate the solution. The assumptions include: the current size of the dynamic array, the set of enabled flags for the index range in the foreach constraint, and the boundary conditions for the values of the associated variables.
9. The SystemVerilog dynamic constraint incremental solution method based on hierarchical dependency as described in claim 6, wherein the cooperative constraint solution further includes: After each solution is completed, the internal state of each solver is persisted, including the learned conflict clauses, lemmas, and variable binding relationships. When the same solver block is called again, the historical state is loaded as the initial environment for solving.
10. A SystemVerilog dynamic constraint incremental solution system based on hierarchical dependency, characterized in that, include: The constraint parsing module is used to parse the semantic structure of SystemVerilog constraints and construct a solution dependency graph between random variables; The hierarchical organization module is used to perform hierarchical allocation based on the solution dependency graph, dividing variables into solution blocks at different levels to ensure that variables without dependencies are solved first. The dynamic constraint management module is used to adaptively generate and maintain random variables and constraints in the corresponding solution block according to the characteristics of dynamic data structure size changes. The incremental update and solution module is used to adopt an incremental update strategy, update only the affected solution blocks, and reuse the historical state retained by the solver for local solution.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the SystemVerilog dynamic constraint incremental solution method based on hierarchical dependencies as described in any one of claims 1-9.
12. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the SystemVerilog dynamic constraint incremental solution method based on hierarchical dependencies as described in any one of claims 1-9.
