Automatic Constraint Generation
Definition and Motivation
Automatic constraint generation refers to techniques that derive simulation constraints algorithmically, instead of relying on a verification engineer to hand-write them. It is positioned within the broader area of constraint-based stimuli generation, which is widely used in simulation-based verification of complex Systems-on-Chips (SoCs) to produce stimuli that deliberately trigger corner-case behavior and previously under-covered scenarios. The motivation for automating constraint generation is twofold: it reduces the time-consuming and error-prone manual constraint composition process, and it can improve the controllability of internal signals, both of which contribute to higher functional coverage during simulation-based verification.
Relationship to Constraint-Based Stimuli Generation
Constraint-based stimuli generation is the established practice in which, for insufficiently covered cases, constraints on the stimuli are formulated and then solved by a constraint solver, yielding inputs that directly trigger those scenarios. This forms a coverage-driven verification loop. Automatic constraint generation is one of two main research trends that aim to improve this loop; the other trend manipulates existing constraints (for example, to obtain a compact stimulus set or to increase solving efficiency). Automatic constraint generation instead focuses on constructing the constraints themselves.
Origin: Yeh & Huang (2010)
The concept was introduced in the context of guided random simulation by H.-H. Yeh and C.-Y. Huang at the ASP Design Automation Conference. The paper, Automatic Constraint Generation for Guided Random Simulation (Yeh & Huang, 2010), proposes generating constraints automatically so that guided random simulation can more effectively reach desired coverage targets. It is cited as one of the representative works in the line of research that improves constraint-based stimuli generation by boosting the capability of constraint formulation itself.
Role in Coverage-Driven Verification
Coverage-driven verification relies on coverage metrics to identify under-covered scenarios, then solves or formulates constraints so that stimuli close the coverage gap. Automatic constraint generation fits into this loop at the constraint-formation step:
- Coverage analysis identifies scenarios that have not been sufficiently exercised.
- Instead of having an engineer manually encode the needed stimuli as constraints, automatic constraint generation derives them.
- A constraint solver (e.g., an SMT solver) produces concrete stimuli from those constraints.
- Simulation runs the stimuli and updates coverage information.
By automating step 2, the methodology addresses both the engineering cost of constraint writing and the risk of missing constraints that would expose hard-to-reach behavior.
Distinction from Other Approaches
Within simulation-based verification, automatic constraint generation is distinct from:
- Manual constraint composition — the traditional workflow in which verification engineers encode desired stimulus shapes by hand.
- Constraint manipulation — techniques that take existing constraints and optimize them, for example to derive a minimal set of stimuli or to speed up solving. Such work exploits Boolean satisfiability techniques but operates on constraints that were already authored.
- Formal methods such as property checking or completeness checking, which analyze a design's behavior exhaustively but suffer from high computational cost for complex SoCs.
The closest complement to automatic constraint generation within the same research trend is constraint manipulation: together they cover the two axes of improving constraint-based stimuli generation—better constraints and better use of existing constraints.
Status
Automatic constraint generation is a concept-level technique category that is used by the broader concept of constraint-based stimuli generation. Its primary published instantiation, as documented in the literature, is the Yeh & Huang (2010) guided random simulation work.