Skip to content
STIMSMITH

BDD Solver

Concept WIKI v1 · 5/28/2026

The BDD Solver is a constraint-solver mode in which the solver elaborates the entire solution space for a randomize call before selecting a solution. This can consume significant memory and time up front, but the elaborated solution space is cached, making the approach effective when the same manageable randomize problem is repeated many times, such as in CPU opcode generation.

Overview

The BDD Solver is a constraint-solving mode described in the context of VCS constrained-random stimulus generation. In this mode, the solver elaborates the entire solution space of a randomize call before selecting a solution. This up-front solution-space elaboration can take significant time and memory, but the solution space is cached to accelerate later randomization calls of the same form.

Performance characteristics

The BDD Solver is most attractive when:

  • the randomization problem does not require excessive memory;
  • the same randomize call occurs many times; and
  • the verification architecture can benefit from reusing the cached solution space.

The cited AMD microcode-stimulus generation study identifies CPU opcode generation as a case where repeated randomization calls are common and where the BDD Solver can work well if memory use remains manageable.

Relationship to solution-space elaboration

BDD solving depends directly on solution-space elaboration: the solver builds the complete solution space for a randomize call before choosing a result. This makes memory profiling especially important, because elaborating the full space can require large amounts of memory before any individual solution is selected.

Comparison with the RACE Solver

In the AMD x86 opcode-generation study, runtime was compared across two testbench architectures and two solvers: the default RACE Solver and the BDD Solver. A multiple-class architecture, which reduced the active variables and constraints for each opcode category, improved runtime with both solvers. The reported speedup was about 4x with the default RACE Solver and about 2x with the BDD Solver.

Memory measurements in the study focused on the BDD Solver because RACE memory consumption was described as typically smaller and not a limiting factor. The multiple-class architecture also reduced memory requirements for BDD solving.

Design implications

For workloads using the BDD Solver, the key design lever is reducing the size of each randomization problem. In the opcode-generation case, randomizing instructions by first selecting an opcode category reduced the set of relevant variables and constraints. The study reports that the revised implementation had 7x fewer constraints than the original, enabling more efficient solution calculation and reducing both runtime and memory pressure.

Practical guidance from the evidence:

  1. Use constraint profiling to identify high-cost randomize calls and memory-heavy partitions.
  2. Keep each BDD-randomized problem small enough that full solution-space elaboration is practical.
  3. Prefer architectures that repeatedly invoke the same manageable randomize call, so cached solution spaces can be reused.
  4. Reduce inactive or irrelevant constraints, for example by partitioning generation by opcode category.

CITATIONS

6 sources
6 citations
[1] In BDD mode, the solver elaborates the entire solution space of a randomize call before selecting a solution, and the elaborated solution space is cached for subsequent randomization calls. Generating AMD microcode stimuli using VCS constraint solver
[2] Solution-space elaboration in BDD solving can take significant memory and time. Generating AMD microcode stimuli using VCS constraint solver
[3] The BDD solver works well for specific architectures when the randomization problem does not take excessive memory and the same randomize call occurs many times, as in CPU opcode generation. Generating AMD microcode stimuli using VCS constraint solver
[4] In the cited opcode-generation comparison, a multiple-class architecture was faster with both the default RACE solver and the BDD solver, with reported speedups of 4x for RACE and 2x for BDD. Generating AMD microcode stimuli using VCS constraint solver
[5] The study measured memory results for the BDD solver because RACE memory consumption was typically smaller and not a limiting factor. Generating AMD microcode stimuli using VCS constraint solver
[6] The multiple-class implementation reduced the active constraint problem; the study reports 7x fewer constraints than the original implementation, improving solver efficiency. Generating AMD microcode stimuli using VCS constraint solver