TL;DR
Even a "passing" verification suite can harbor hidden bugs if the testbench doesn't check every requirement in the specification. This paper introduces Verify the Verifier, an LLM-powered framework that inspects simulation traces of passing tests against natural language specifications to find these "scoreboard escapes." By combining LLM reasoning with formal verification, the authors successfully identified 41 confirmed bugs in mature OpenTitan hardware designs that standard industry-standard tests missed.
What Problem Does This Paper Address?
In digital design, the Universal Verification Methodology (UVM) is the gold standard. Engineers write a "scoreboard" that compares the design's output against a reference model. If they match, the test passes. However, a passing regression is only as good as the scoreboard’s checks.
The authors identify a critical gap called scoreboard escapes: bugs that violate the design specification but pass the regression because the scoreboard either doesn't monitor the relevant internal signals or has "blind spots" in its logic. For example, a PWM controller might pass all tests if its output pulses are the right width, even if the internal phase delay is completely wrong, simply because the scoreboard wasn't programmed to measure phase. Finding these escapes usually requires manual, expert-level audits, which are expensive and late-stage.
Methods
The Verify the Verifier framework (illustrated in Figure 1) treats a passing regression as evidence to be cross-examined rather than a final verdict. It operates in five main steps:
- Observation: It re-runs passing tests and converts massive waveform files into a "signal digest"—a compact, text-based summary of how signals behave over time.
- Anomaly Cross-Checker (ACC): An LLM (Claude 3.5 Opus) compares this signal digest against the natural language specification. It flags behaviors that seem to contradict the spec, even if the scoreboard reported a "PASS." Crucially, the ACC never sees the RTL code, so its judgment isn't biased by how the design was implemented.
- Assertion Generation: A second LLM takes the flagged anomalies and writes SystemVerilog Assertions (SVA). It uses the spec and a small excerpt of the RTL to get signal names and context.
- Formal Qualification: To ensure the LLM isn't "hallucinating" bugs, the framework uses a formal tool (JasperGold). An assertion is only "qualified" if it is proven true on the original (reference) design but fails on the buggy design.
- Reproduction: An "Adversarial Challenger" LLM writes a directed UVM test to reproduce the failure, proving that the bug is real and reachable within the existing test environment.
Datasets
The researchers evaluated their framework on four high-quality, open-source IP cores from the OpenTitan project:
- PWM: Pulse-Width Modulator
- PATTGEN: Pattern Generator
- SPI Host: Serial Peripheral Interface
- CSRNG: Cryptographically Secure Random Number Generator
Because real-world "escapes" are rarely documented, they created a benchmark using BugGen, an LLM-based mutation tool. They inserted 564 bugs and filtered them down to 68 candidate scoreboard escapes—bugs that were technically non-equivalent to the original design and were exercised by the tests, yet still resulted in a "PASS" from the native OpenTitan UVM environments.
Key Insights and Ideas
- LLMs as "Second Eyes": The core "aha moment" is using LLMs to bridge the gap between human-readable specifications and machine-level simulation traces. LLMs are surprisingly good at spotting semantic contradictions (e.g., "The spec says this should be idle, but I see it toggling").
- Trust but Verify: You cannot trust an LLM to write perfect assertions. The framework's strength lies in using Formal Verification as a deterministic gatekeeper. This removes the "hallucination" problem common in AI.
- Finding "Spec Bugs": When run on the original, unmodified OpenTitan designs, the tool didn't find bugs in the code, but it did find cases where the documentation contradicted the RTL. This highlights the tool's utility in improving documentation quality.
- RTL-Blind Checking: By keeping the Anomaly Cross-Checker "blind" to the RTL logic, the authors ensure the tool checks what the design does against what it should do, rather than just checking if the code looks correct.
Key Results
The framework demonstrated high effectiveness in catching bugs that mature, industry-grade testbenches missed:
- Detection Rate: The Anomaly Cross-Checker correctly identified the erroneous behavior in 81% of the candidate escapes.
- Qualified Success: The full pipeline produced a formally qualified detection for 41 out of 68 (60%) of the escapes (see Figure 3 and 4).
- Efficiency: The median time to analyze a mutant was just 9.6 minutes, making it a viable addition to a standard CI/CD pipeline.
- Accuracy: As shown in Figure 2, in designs like the SPI Host, 96% of the reported anomalies directly described the injected bug.
Limitations and Future Work
- Assertion Precision: The biggest bottleneck was the Assertion Generator. Many generated assertions were "wrong" (too strict on timing or misinterpreted the spec), leading to false positives that the formal tool had to filter out.
- Context Windows: While the "signal digest" helps, very long simulation traces can still exceed the token limits of current LLMs.
- Stimulus Gaps: The framework currently only looks at bugs exercised by existing tests. A natural next step is using the LLM to generate entirely new stimulus to reach parts of the design that are currently "dark" (uncovered).
- Timing Sensitivity: The authors noted that giving the LLM more information about design timing (without exposing the logic) could significantly improve the quality of the generated assertions.
Summary updated