Skip to content
STIMSMITH

Constrained Random Verification

Technique WIKI v5 · 7/4/2026

Constrained Random Verification (CRV) is a stimulus-generation technique used in hardware design verification in which random inputs are sampled subject to protocol or design constraints so that only legal actions are produced. The provided evidence portrays CRV as an established baseline in chip-design verification studies (sampling uniformly over legal actions per cycle, enforcing legality by construction, and used within coverage-driven simulation flows such as UVM-based verification), as a conventional method whose coverage limitations motivate newer approaches such as coverage-guided fuzzing and reinforcement-learning-based stimulus generation, and as the subject of dedicated RISC-V verification studies. New evidence also documents a formal, uniformity-guaranteed CRV sampler (TraceSampler) that addresses the lack of distribution guarantees in conventional CRV, and a Python-based PyUVM/PyVSC verification environment that targets constrained randomization and functional coverage. Evidence-supported descriptions of CRV focus on its role and comparative positioning rather than internal algorithmic details.

Constrained Random Verification

Overview

Constrained Random Verification (CRV) is a constrained-random or constraint-based testcase-generation technique used in hardware design verification. In the evidence available, CRV is described as a stimulus generator that "samples uniformly over the subset of legal actions at each cycle, modeling typical constrained-random stimulus," and is used as one of several compared stimulus-generation methods in recent chip-verification studies. [crv-stimulusrl]

In the FuSS paper, CRV is grouped with "random and constrained-random verification" as part of "conventional verification approaches" that "struggle to achieve adequate coverage of the vast state space in modern SoCs," motivating coverage-guided and semi-formal alternatives. [crv-fuss]

In industry-oriented reporting on RISC-V verification, CRV is described as one of the methodologies needed to achieve complete RISC-V verification, exemplified through "coverage driven simulation based on UVM constrained random methods and compliant with the Universal Verification Methodology (UVM) standard," using the Google RISCV-DV open-source project as an example flow. [crv-riscv-uvm]

Description from evidence

The provided evidence characterizes CRV at a high level rather than specifying a single internal algorithm:

  • Action space sampling: CRV is modeled as sampling actions uniformly from the subset of legal actions at each cycle, rather than uniformly over the entire action space. [crv-stimulusrl]
  • Legality enforcement: CRV enforces protocol legality by construction (sampling only from legal actions), which means it does not explicitly target bins corresponding to illegal operations; in the StimulusRL evaluation, this is why CRV converges to fewer bins than Random on benchmarks such as FIFO8 where some bins encode illegal-operation attempts. [crv-stimulusrl]
  • No coverage feedback or learned policy: In the compared taxonomy of stimulus generators, CRV uses legality constraints but neither coverage feedback nor a learned policy. [crv-stimulusrl]
  • Runtime profile: CRV completes quickly relative to learning-based methods because it only samples actions and steps the design model; on the DMCache design, a 2000-step run takes 0.537 ± 0.004 s, compared with 0.378 ± 0.004 s for Random and 2.111 ± 0.005 s for StimulusRL. [crv-stimulusrl]
  • Coverage limitations: CRV is described as struggling to achieve adequate coverage in modern SoCs; "even millions of random or constrained-random test vectors (input stimuli) fail to activate a majority of complex execution paths, leaving many potential corner cases untested." [crv-fuss]

Relationship to coverage-driven simulation

The SemiEngineering whitepaper on UVM functional coverage for RISC-V cores describes coverage driven simulation based on UVM constrained random methods that comply with the Universal Verification Methodology (UVM) standard, using Google RISCV-DV as the open-source test-generator. CRV supplies the stimulus-generation mechanism, while coverage-driven simulation supplies the feedback metric and closure methodology that guides test selection and randomization weights. [crv-riscv-uvm]

Python-based CRV environments

A 2024 study evaluates a Python-based verification environment for constrained random verification built on open-source frameworks such as PyUVM (a Python-based UVM 1.2 implementation) and PyVSC (which facilitates constrained randomization and functional coverage), and compares the resulting testbenches against established SystemVerilog-UVM methodology across multiple design IPs. [crv-pyuvm]

Formal distribution guarantees for CRV

A separate line of work addresses the fact that conventional CRV solutions provide no formal guarantees on the distribution of generated stimuli. The TraceSampler paper presents an algorithm based on Algebraic Decision Diagrams for sampling bounded traces (sequences of states) of a sequential circuit with provable uniformity (or bounded bias) guarantees while satisfying given constraints, and reports that TraceSampler outperforms alternative approaches offering similar uniformity guarantees. [crv-tracesampler]

Relationship to RISC-V verification

A reference list in a RISC-V test-sequence generation paper cites Constrained random verification for RISC-V: Overview, evaluation and discussion by Ahmadi-Pour, Herdt, and Drechsler (MBMV 2021; 24th Workshop, 2021: 1–8), placing CRV directly within the RISC-V verification literature. [crv-riscv-overview]

Relationship to coverage-guided fuzzing

The strongest direct evidence connecting CRV-adjacent testcase generation to coverage-guided fuzzing comes from the paper Verifying Instruction Set Simulators using Coverage-guided Fuzzing. That paper proposes using coverage-guided fuzzing (CGF) for ISS verification, implemented on top of LLVM libFuzzer with a functional coverage metric that complements code coverage and a mutation procedure tailored to ISS verification. [cgf-method]

The paper reports a case study on three publicly available RISC-V ISSs. It states that the fuzzer was effective at maximizing most coverage metrics and found new errors in every considered ISS, including an error in the official RISC-V reference simulator Spike. [cgf-results]

For CRV, the relevant comparison point is complementarity: the paper states that fuzzing is useful for triggering and checking corner cases and error cases and "can complement other testcase generation techniques." Its references include constraint-based and constrained-random verification work, indicating that CRV belongs to the broader testcase-generation landscape against which CGF is positioned. [cgf-complementarity]

Practical interpretation from the evidence

Within the limits of the provided evidence, CRV should be treated as a constrained-random stimulus-generation technique that samples from the legal action subspace, commonly used as a baseline in chip-design verification studies. Coverage-driven simulation wraps CRV with UVM-compliant feedback and closure methodology, coverage-guided fuzzing and reinforcement-learning-based stimulus agents (such as StimulusRL) are presented as related but distinct techniques that can complement CRV (particularly for ISS corner-case and error-case discovery and for addressing CRV's coverage limitations on complex SoC designs), and formal approaches such as TraceSampler address CRV's lack of distribution guarantees by providing provably uniform sampling under given constraints. [crv-fuss][crv-stimulusrl][crv-riscv-uvm][crv-tracesampler][cgf-complementarity]

LINKED ENTITIES

1 links

CITATIONS

12 sources
12 citations
[1] CRV samples uniformly over the subset of legal actions at each cycle, modeling typical constrained-random stimulus. StimulusRL: A Universal Deep Reinforcement Learning Stimulus Agent for Coverage-Driven Chip Design Verification
[2] CRV and StimulusRL enforce legality and therefore converge to 36/38 bins (0.947) on FIFO8 because the coverage model includes two explicit illegal-operation attempt bins. StimulusRL: A Universal Deep Reinforcement Learning Stimulus Agent for Coverage-Driven Chip Design Verification
[3] CRV in the compared taxonomy of stimulus generators uses legality constraints but neither coverage feedback nor a learned policy. StimulusRL: A Universal Deep Reinforcement Learning Stimulus Agent for Coverage-Driven Chip Design Verification
[4] On DMCache, a 2000-step CRV run takes 0.537 ± 0.004 s, compared with 0.378 ± 0.004 s for Random and 2.111 ± 0.005 s for StimulusRL. StimulusRL: A Universal Deep Reinforcement Learning Stimulus Agent for Coverage-Driven Chip Design Verification
[5] Conventional verification approaches, such as random and constrained-random verification, struggle to achieve adequate coverage of the vast state space in modern SoCs, and even millions of random or constrained-random test vectors fail to activate a majority of complex execution paths. FuSS: Coverage-Directed Hardware Fuzzing with Selective Symbolic Execution
[6] Complete RISC-V verification requires multiple methodologies, one of which is coverage driven simulation based on UVM constrained random methods and compliant with the Universal Verification Methodology (UVM) standard. Universal Verification Methodology Coverage for Bluespec RISC-V Cores
[7] A Python-based verification environment for constrained random verification uses PyUVM (Python-based UVM 1.2 implementation) and PyVSC (facilitating constrained randomization and functional coverage), and is compared against SystemVerilog-UVM methodology. Towards Efficient Design Verification -- Constrained Random Verification using PyUVM
[8] Conventional CRV solutions provide no formal guarantees on the distribution of generated runs; TraceSampler uses Algebraic Decision Diagrams to sample bounded traces of a sequential circuit with provable uniformity (or bias) guarantees while satisfying given constraints. On Uniformly Sampling Traces of a Transition System (Extended Version)
[9] A RISC-V test-sequence generation paper cites Ahmadi-Pour, Herdt, and Drechsler, Constrained random verification for RISC-V: Overview, evaluation and discussion, MBMV 2021, 24th Workshop, 2021, pages 1–8. A RISC-V Test Sequences Generation Method Based on Instruction ...
[10] Coverage-guided fuzzing for ISS verification uses LLVM libFuzzer with a functional coverage metric that complements code coverage and a mutation procedure tailored to ISS verification. A RISC-V Test Sequences Generation Method Based on Instruction ...
[11] The coverage-guided fuzzing case study on three RISC-V ISSs was effective at maximizing most coverage metrics and found new errors in every considered ISS, including an error in the official RISC-V reference simulator Spike. A RISC-V Test Sequences Generation Method Based on Instruction ...
[12] Coverage-guided fuzzing is useful for triggering and checking corner cases and error cases and can complement other testcase generation techniques, with references including constraint-based and constrained-random verification work. A RISC-V Test Sequences Generation Method Based on Instruction ...

VERSION HISTORY

v5 · 7/4/2026 · minimax/minimax-m3 (current)
v4 · 6/25/2026 · minimax/minimax-m3
v3 · 5/29/2026 · gpt-5.5
v2 · 5/28/2026 · gpt-5.5
v1 · 5/26/2026 · gpt-5.5