RTL Bug-Finding Benchmarks With Simulation-Based Verification
RTL Bug-Finding Benchmarks With Simulation-Based Verification
Register-transfer level design is where hardware bugs are cheapest to catch and most expensive to miss. Yet RTL bug-finding benchmarks with simulation-based verification remain one of the least developed corners of AI evaluation. Most frontier models can recite Verilog syntax. Few can locate a subtle timing violation in a pipelined FSM, reason about a race condition across clock domains, or distinguish a functional bug from a legal-but-wrong microarchitectural choice. Building benchmarks that expose this gap requires more than test cases. It requires simulation oracles, expert-authored bug seeds, and a verification pipeline that can produce a binary or partial-credit signal without human review on every sample.
Answer Capsule: RTL bug-finding benchmarks with simulation-based verification pair expert-seeded hardware defects in synthesisable RTL with a simulation harness that acts as an automated verifier. A model's output is scored by running its proposed fix or bug label against a reference testbench in a logic simulator such as Icarus Verilog or Verilator. Pass criteria are defined at the signal level, making scoring deterministic. Difficulty is calibrated empirically by measuring pass@k across multiple frontier models, not by authoring intuition alone.
Why RTL Bug-Finding Benchmarks Demand Simulation-Based Verification
Text-match and LLM-as-judge scoring fail for RTL tasks because hardware correctness is not a matter of style or plausibility. A module that compiles is not a module that is correct. A fix that looks reasonable in natural language may introduce a new hazard at the gate level. Simulation-based verification resolves this by treating the simulator as a ground-truth oracle: if the corrected RTL passes all assertions in the testbench, the fix is accepted; if it fails, the fix is rejected, regardless of how fluent the model's explanation was.
This is the same principle described in simulator-backed verification and physics reward oracles: the verifier is a physical-law-equivalent constraint, not a human preference. For RTL, that constraint is the behaviour of digital logic under a defined set of input stimuli. The simulator is deterministic given the same seed and the same RTL, which makes the scoring pipeline reproducible and auditable.
The practical consequence is that RTL benchmarks can scale without proportional expert review cost. Once the testbench is authored and validated, scoring thousands of model samples costs compute, not expert hours. The expensive human work is front-loaded into task authoring, bug seeding, and testbench validation, not into per-sample grading.
Anatomy of an RTL Bug-Finding Benchmark Task
A well-formed RTL bug-finding task has five components. Each is a design decision with failure modes if handled carelessly.
Base module: synthesisable RTL in Verilog or VHDL, small enough that a model can reason about the full design within its context window, complex enough that the bug is not trivially visible. Typical scope is 50 to 300 lines of RTL.
Bug seed: a single, expert-authored defect injected at a specific location. The defect must be functional (wrong behaviour under some input) rather than syntactic (compile error). Categories include off-by-one in counter logic, missing reset condition, incorrect state transition, wrong operator precedence, and clock-domain crossing without synchroniser.
Reference testbench: a set of simulation stimuli and assertions that will catch the seeded bug reliably and will pass on the correct reference design. The testbench must not be so exhaustive that it catches every plausible alternative bug, which would make the task trivially verifiable by brute-force fuzzing rather than reasoning.
Reference solution: the corrected RTL, authored by the same expert who seeded the bug, used to validate that the testbench passes on a known-good design.
Verifier script: a reproducible shell or Python script that invokes the simulator, parses the output, and returns a structured pass/fail or partial-credit signal. The script must handle simulation timeouts, compile errors, and assertion failures as distinct failure categories.
The relationship between these components matters. The testbench is not a test of the model's RTL; it is a test of whether the model's RTL behaves correctly on the stimuli the expert chose. Testbench coverage is a design parameter, not an afterthought. Under-coverage means bugs survive; over-coverage means the task degenerates into a fuzzing problem.
RTL Bug-Finding Benchmarks: Simulation-Based Verification Pipeline
The verification pipeline for RTL bug-finding benchmarks follows a three-stage protocol. Each stage has a defined input, output, and failure criterion.
Stage 1: Compilation Check
The model's output RTL is passed to the simulator's compiler. A compile error returns a structured failure code, not a pass. This stage filters syntactically invalid outputs before consuming simulation compute. It also distinguishes between a model that produces plausible-looking but broken RTL and one that produces nothing useful at all, which is a meaningful signal for failure-mode analysis.
Stage 2: Functional Simulation
The compiled design is run against the reference testbench. The simulator executes the stimuli, evaluates the assertions, and produces a pass or fail for each assertion. The verifier script aggregates these into a task-level score. For binary scoring, any assertion failure is a task failure. For partial-credit scoring, the fraction of passing assertions contributes to a continuous reward signal, which is useful for process reward models and RL training but requires careful design to avoid reward hacking. The post on partial credit verifiers and reward shaping covers this trade-off in detail.
Stage 3: Equivalence Check (Optional)
For tasks where the reference solution is available and the model is asked to produce a corrected module, formal equivalence checking between the model's output and the reference can be added as a third verification layer. This is computationally heavier and not always feasible for large designs, but it catches cases where a model produces a functionally correct fix by a different structural path, which simulation alone may not verify exhaustively.
Illustrative Example: A Pipeline Stall Bug Task
Illustrative example with made-up but plausible numbers and code fragments. Not a real benchmark result.
Consider a five-stage in-order integer pipeline in Verilog, approximately 180 lines. The expert seeds a single bug: the hazard detection unit checks rs1 == ex_rd but omits the && ex_rd != 0 guard, causing spurious stalls when the destination register is x0. The reference testbench applies a sequence of 40 instruction pairs, 12 of which write to x0, and asserts that the pipeline throughput matches the reference model on those pairs.
The verifier script runs Icarus Verilog with a 10,000-cycle timeout. A model that identifies the missing guard and adds && ex_rd != 0 passes all 12 relevant assertions and scores 1.0. A model that adds a blanket stall disable passes the throughput assertions but fails a separate correctness assertion on a data-hazard case, scoring 0.6 under partial-credit rules. A model that rewrites the hazard unit entirely may pass all assertions or introduce a new bug, which the testbench may or may not catch depending on coverage.
Across five frontier models sampled at k=10, suppose pass@10 ranges from 0.12 to 0.61 on this task class. That spread is the empirical difficulty signal. A task where all models score above 0.85 at k=1 is too easy for a frontier eval; it may still be useful as an SFT demonstration but not as a discrimination benchmark. Calibrating difficulty this way, rather than by authoring intuition, is the operational practice that keeps benchmark headroom as models improve. The post on sub-10-percent pass rate benchmarks addresses the lower bound of this calibration.
Common Failure Modes in RTL Bug-Finding Benchmarks
Six failure modes appear repeatedly in practice. Each has a detection signal and a remediation path.
Testbench under-coverage: the bug survives simulation because no stimulus triggers the faulty path. Detection: run the reference (buggy) design against the testbench; if it passes, the testbench is invalid. Fix: add stimuli that specifically exercise the seeded bug path, verified by mutation testing on the reference design.
Bug too syntactically local: the defect is a single character change visible by diff without semantic understanding. Detection: measure pass@1 on a syntax-only baseline (for example a model that applies common single-token patches). Fix: seed bugs that require understanding of the module's state machine or datapath, not just the surrounding lines.
Simulation timeout masking real failures: a model produces an RTL that causes the simulator to hang in an infinite loop, which the verifier script counts as a timeout rather than a failure. Detection: audit timeout rates per model; a high timeout rate is a model-specific failure signal, not a harness problem. Fix: add a cycle-count assertion that fires if the design does not reach a terminal state within a defined bound.
Contamination from public RTL corpora: the base module is derived from an open-source repository that is present in model training data, making the task a recall problem rather than a reasoning problem. Detection: run the base module through a code-similarity search against known public HDL repositories. Fix: author original modules or transform public modules beyond recognition. The post on contamination in code benchmarks covers detection methods applicable to HDL.
Reward hacking via testbench gaming: in RL settings, a model learns to produce RTL that passes the specific assertions without fixing the underlying bug, for example by hardcoding expected output values for the testbench stimuli. Detection: hold out a second testbench with different stimuli and check that passing models generalise. Fix: use a held-out verification set and rotate testbench stimuli periodically.
Expert disagreement on bug severity: two experts disagree on whether a given RTL pattern is a bug or a valid microarchitectural choice. Detection: inter-annotator agreement below 0.8 on bug labelling tasks is a signal of underspecified task design. Fix: add a natural-language specification of intended behaviour to the task, making the ground truth explicit rather than implicit in the expert's mental model.
Where This Approach Breaks Down
Simulation-based verification is deterministic only for the stimuli in the testbench. A model that passes the testbench may still produce RTL with latent bugs on untested input sequences. This is not a failure of the benchmark design; it is a fundamental property of simulation-based verification as opposed to formal verification. Benchmarks built on simulation should be understood as measuring performance on a defined coverage target, not on exhaustive correctness.
Testbench authoring is also a significant expert cost. A testbench that reliably catches a specific bug class without over-constraining the solution space requires an expert who understands both the design intent and the failure modes of the bug category. Throughput for this kind of task authoring is lower than for natural-language tasks. The post on expert task authoring throughput gives a framework for estimating this cost honestly.
Finally, difficulty calibration drifts. A task that discriminates well among frontier models today may be saturated in six months. Static benchmarks require a refresh cycle tied to model capability, not to a fixed calendar. The post on static, dynamic, and private holdout benchmark design addresses how to structure this refresh without invalidating historical comparisons.
Frequently Asked Questions
What simulators are appropriate for RTL bug-finding benchmarks?
Icarus Verilog and Verilator are the most common open-source choices for Verilog-based benchmarks. Icarus Verilog supports a broader subset of SystemVerilog behavioural constructs; Verilator compiles RTL to C++ for faster simulation of large designs. The choice depends on the RTL subset used in the benchmark and the simulation throughput required for large-scale model evaluation.
How many tasks are needed for a statistically reliable RTL eval?
The minimum sample size depends on the effect size you want to detect and the variance of pass@k across tasks. As a practical starting point, 100 tasks with diverse bug categories and base modules provides enough signal to rank models with reasonable confidence at the benchmark level. Fewer tasks are acceptable for a pilot or a domain-specific slice, but confidence intervals will be wide. The post on expert task sourcing for hard benchmarks covers the authoring pipeline implications of this target.
Can synthetic RTL bug generation replace expert-authored bug seeds?
Synthetic mutation tools such as random bit-flip or operator-swap mutators produce large volumes of bugs quickly, but they are biased toward syntactically local, structurally simple defects. Expert-authored bugs cover semantic and microarchitectural failure modes that mutation tools rarely produce. For SFT data volume, synthetic bugs may be acceptable with expert review. For frontier evals where discrimination matters, expert-authored seeds are the higher-signal choice.
How do you prevent testbench solutions from leaking into model training data?
Keep testbenches and reference solutions in a private holdout. Never publish them as part of a public benchmark release. For tasks used in both eval and training, maintain separate authoring pools with no overlap. Version-control access logs and treat the testbench as a security asset, not a documentation artifact.
What bug categories are hardest for current frontier models?
Results vary by model, scaffold, and evaluation date, so no specific model claim is made here. As a general pattern across the literature, models perform weakest on bugs that require multi-cycle temporal reasoning (for example a bug that only manifests after a specific sequence of state transitions), cross-module interface violations, and clock-domain crossing hazards. These categories require understanding of time and causality in digital logic, not just local syntax.
What This Means in Practice
RTL bug-finding benchmarks with simulation-based verification are technically feasible today. The tools exist. The verification pipeline is deterministic and auditable. The hard work is expert authoring: designing base modules that are original, seeding bugs that require genuine reasoning, and building testbenches with the right coverage. Difficulty must be calibrated empirically against the models being evaluated, not guessed from first principles. And the benchmark must be treated as a living artifact, refreshed as model capability advances, not as a one-time deliverable.
The domains where this approach has the most untapped potential are not the ones with the most public RTL corpora. They are the ones where expert knowledge is tacit, where bugs are subtle, and where frontier models currently have the least reliable signal. That is where the evaluation gap is largest, and where the return on expert-authored benchmark investment is highest.
If you are building evals or RL environments in RTL, EDA, or adjacent hardware design domains, get in touch with Chiron Data Labs.
Have questions or want personalised guidance? Contact us and we'll be happy to help.
Register-transfer level design is where hardware bugs are cheapest to catch and most expensive to miss. Yet RTL bug-finding benchmarks with simulation-based verification remain one of the least developed corners of AI evaluation. Most frontier models can recite Verilog syntax. Few can locate a subtle timing violation in a pipelined FSM, reason about a race condition across clock domains, or distinguish a functional bug from a legal-but-wrong microarchitectural choice. Building benchmarks that expose this gap requires more than test cases. It requires simulation oracles, expert-authored bug seeds, and a verification pipeline that can produce a binary or partial-credit signal without human review on every sample.
Answer Capsule: RTL bug-finding benchmarks with simulation-based verification pair expert-seeded hardware defects in synthesisable RTL with a simulation harness that acts as an automated verifier. A model's output is scored by running its proposed fix or bug label against a reference testbench in a logic simulator such as Icarus Verilog or Verilator. Pass criteria are defined at the signal level, making scoring deterministic. Difficulty is calibrated empirically by measuring pass@k across multiple frontier models, not by authoring intuition alone.
Why RTL Bug-Finding Benchmarks Demand Simulation-Based Verification
Text-match and LLM-as-judge scoring fail for RTL tasks because hardware correctness is not a matter of style or plausibility. A module that compiles is not a module that is correct. A fix that looks reasonable in natural language may introduce a new hazard at the gate level. Simulation-based verification resolves this by treating the simulator as a ground-truth oracle: if the corrected RTL passes all assertions in the testbench, the fix is accepted; if it fails, the fix is rejected, regardless of how fluent the model's explanation was.
This is the same principle described in simulator-backed verification and physics reward oracles: the verifier is a physical-law-equivalent constraint, not a human preference. For RTL, that constraint is the behaviour of digital logic under a defined set of input stimuli. The simulator is deterministic given the same seed and the same RTL, which makes the scoring pipeline reproducible and auditable.
The practical consequence is that RTL benchmarks can scale without proportional expert review cost. Once the testbench is authored and validated, scoring thousands of model samples costs compute, not expert hours. The expensive human work is front-loaded into task authoring, bug seeding, and testbench validation, not into per-sample grading.
Anatomy of an RTL Bug-Finding Benchmark Task
A well-formed RTL bug-finding task has five components. Each is a design decision with failure modes if handled carelessly.
Base module: synthesisable RTL in Verilog or VHDL, small enough that a model can reason about the full design within its context window, complex enough that the bug is not trivially visible. Typical scope is 50 to 300 lines of RTL.
Bug seed: a single, expert-authored defect injected at a specific location. The defect must be functional (wrong behaviour under some input) rather than syntactic (compile error). Categories include off-by-one in counter logic, missing reset condition, incorrect state transition, wrong operator precedence, and clock-domain crossing without synchroniser.
Reference testbench: a set of simulation stimuli and assertions that will catch the seeded bug reliably and will pass on the correct reference design. The testbench must not be so exhaustive that it catches every plausible alternative bug, which would make the task trivially verifiable by brute-force fuzzing rather than reasoning.
Reference solution: the corrected RTL, authored by the same expert who seeded the bug, used to validate that the testbench passes on a known-good design.
Verifier script: a reproducible shell or Python script that invokes the simulator, parses the output, and returns a structured pass/fail or partial-credit signal. The script must handle simulation timeouts, compile errors, and assertion failures as distinct failure categories.
The relationship between these components matters. The testbench is not a test of the model's RTL; it is a test of whether the model's RTL behaves correctly on the stimuli the expert chose. Testbench coverage is a design parameter, not an afterthought. Under-coverage means bugs survive; over-coverage means the task degenerates into a fuzzing problem.
RTL Bug-Finding Benchmarks: Simulation-Based Verification Pipeline
The verification pipeline for RTL bug-finding benchmarks follows a three-stage protocol. Each stage has a defined input, output, and failure criterion.
Stage 1: Compilation Check
The model's output RTL is passed to the simulator's compiler. A compile error returns a structured failure code, not a pass. This stage filters syntactically invalid outputs before consuming simulation compute. It also distinguishes between a model that produces plausible-looking but broken RTL and one that produces nothing useful at all, which is a meaningful signal for failure-mode analysis.
Stage 2: Functional Simulation
The compiled design is run against the reference testbench. The simulator executes the stimuli, evaluates the assertions, and produces a pass or fail for each assertion. The verifier script aggregates these into a task-level score. For binary scoring, any assertion failure is a task failure. For partial-credit scoring, the fraction of passing assertions contributes to a continuous reward signal, which is useful for process reward models and RL training but requires careful design to avoid reward hacking. The post on partial credit verifiers and reward shaping covers this trade-off in detail.
Stage 3: Equivalence Check (Optional)
For tasks where the reference solution is available and the model is asked to produce a corrected module, formal equivalence checking between the model's output and the reference can be added as a third verification layer. This is computationally heavier and not always feasible for large designs, but it catches cases where a model produces a functionally correct fix by a different structural path, which simulation alone may not verify exhaustively.
Illustrative Example: A Pipeline Stall Bug Task
Illustrative example with made-up but plausible numbers and code fragments. Not a real benchmark result.
Consider a five-stage in-order integer pipeline in Verilog, approximately 180 lines. The expert seeds a single bug: the hazard detection unit checks rs1 == ex_rd but omits the && ex_rd != 0 guard, causing spurious stalls when the destination register is x0. The reference testbench applies a sequence of 40 instruction pairs, 12 of which write to x0, and asserts that the pipeline throughput matches the reference model on those pairs.
The verifier script runs Icarus Verilog with a 10,000-cycle timeout. A model that identifies the missing guard and adds && ex_rd != 0 passes all 12 relevant assertions and scores 1.0. A model that adds a blanket stall disable passes the throughput assertions but fails a separate correctness assertion on a data-hazard case, scoring 0.6 under partial-credit rules. A model that rewrites the hazard unit entirely may pass all assertions or introduce a new bug, which the testbench may or may not catch depending on coverage.
Across five frontier models sampled at k=10, suppose pass@10 ranges from 0.12 to 0.61 on this task class. That spread is the empirical difficulty signal. A task where all models score above 0.85 at k=1 is too easy for a frontier eval; it may still be useful as an SFT demonstration but not as a discrimination benchmark. Calibrating difficulty this way, rather than by authoring intuition, is the operational practice that keeps benchmark headroom as models improve. The post on sub-10-percent pass rate benchmarks addresses the lower bound of this calibration.
Common Failure Modes in RTL Bug-Finding Benchmarks
Six failure modes appear repeatedly in practice. Each has a detection signal and a remediation path.
Testbench under-coverage: the bug survives simulation because no stimulus triggers the faulty path. Detection: run the reference (buggy) design against the testbench; if it passes, the testbench is invalid. Fix: add stimuli that specifically exercise the seeded bug path, verified by mutation testing on the reference design.
Bug too syntactically local: the defect is a single character change visible by diff without semantic understanding. Detection: measure pass@1 on a syntax-only baseline (for example a model that applies common single-token patches). Fix: seed bugs that require understanding of the module's state machine or datapath, not just the surrounding lines.
Simulation timeout masking real failures: a model produces an RTL that causes the simulator to hang in an infinite loop, which the verifier script counts as a timeout rather than a failure. Detection: audit timeout rates per model; a high timeout rate is a model-specific failure signal, not a harness problem. Fix: add a cycle-count assertion that fires if the design does not reach a terminal state within a defined bound.
Contamination from public RTL corpora: the base module is derived from an open-source repository that is present in model training data, making the task a recall problem rather than a reasoning problem. Detection: run the base module through a code-similarity search against known public HDL repositories. Fix: author original modules or transform public modules beyond recognition. The post on contamination in code benchmarks covers detection methods applicable to HDL.
Reward hacking via testbench gaming: in RL settings, a model learns to produce RTL that passes the specific assertions without fixing the underlying bug, for example by hardcoding expected output values for the testbench stimuli. Detection: hold out a second testbench with different stimuli and check that passing models generalise. Fix: use a held-out verification set and rotate testbench stimuli periodically.
Expert disagreement on bug severity: two experts disagree on whether a given RTL pattern is a bug or a valid microarchitectural choice. Detection: inter-annotator agreement below 0.8 on bug labelling tasks is a signal of underspecified task design. Fix: add a natural-language specification of intended behaviour to the task, making the ground truth explicit rather than implicit in the expert's mental model.
Where This Approach Breaks Down
Simulation-based verification is deterministic only for the stimuli in the testbench. A model that passes the testbench may still produce RTL with latent bugs on untested input sequences. This is not a failure of the benchmark design; it is a fundamental property of simulation-based verification as opposed to formal verification. Benchmarks built on simulation should be understood as measuring performance on a defined coverage target, not on exhaustive correctness.
Testbench authoring is also a significant expert cost. A testbench that reliably catches a specific bug class without over-constraining the solution space requires an expert who understands both the design intent and the failure modes of the bug category. Throughput for this kind of task authoring is lower than for natural-language tasks. The post on expert task authoring throughput gives a framework for estimating this cost honestly.
Finally, difficulty calibration drifts. A task that discriminates well among frontier models today may be saturated in six months. Static benchmarks require a refresh cycle tied to model capability, not to a fixed calendar. The post on static, dynamic, and private holdout benchmark design addresses how to structure this refresh without invalidating historical comparisons.
Frequently Asked Questions
What simulators are appropriate for RTL bug-finding benchmarks?
Icarus Verilog and Verilator are the most common open-source choices for Verilog-based benchmarks. Icarus Verilog supports a broader subset of SystemVerilog behavioural constructs; Verilator compiles RTL to C++ for faster simulation of large designs. The choice depends on the RTL subset used in the benchmark and the simulation throughput required for large-scale model evaluation.
How many tasks are needed for a statistically reliable RTL eval?
The minimum sample size depends on the effect size you want to detect and the variance of pass@k across tasks. As a practical starting point, 100 tasks with diverse bug categories and base modules provides enough signal to rank models with reasonable confidence at the benchmark level. Fewer tasks are acceptable for a pilot or a domain-specific slice, but confidence intervals will be wide. The post on expert task sourcing for hard benchmarks covers the authoring pipeline implications of this target.
Can synthetic RTL bug generation replace expert-authored bug seeds?
Synthetic mutation tools such as random bit-flip or operator-swap mutators produce large volumes of bugs quickly, but they are biased toward syntactically local, structurally simple defects. Expert-authored bugs cover semantic and microarchitectural failure modes that mutation tools rarely produce. For SFT data volume, synthetic bugs may be acceptable with expert review. For frontier evals where discrimination matters, expert-authored seeds are the higher-signal choice.
How do you prevent testbench solutions from leaking into model training data?
Keep testbenches and reference solutions in a private holdout. Never publish them as part of a public benchmark release. For tasks used in both eval and training, maintain separate authoring pools with no overlap. Version-control access logs and treat the testbench as a security asset, not a documentation artifact.
What bug categories are hardest for current frontier models?
Results vary by model, scaffold, and evaluation date, so no specific model claim is made here. As a general pattern across the literature, models perform weakest on bugs that require multi-cycle temporal reasoning (for example a bug that only manifests after a specific sequence of state transitions), cross-module interface violations, and clock-domain crossing hazards. These categories require understanding of time and causality in digital logic, not just local syntax.
What This Means in Practice
RTL bug-finding benchmarks with simulation-based verification are technically feasible today. The tools exist. The verification pipeline is deterministic and auditable. The hard work is expert authoring: designing base modules that are original, seeding bugs that require genuine reasoning, and building testbenches with the right coverage. Difficulty must be calibrated empirically against the models being evaluated, not guessed from first principles. And the benchmark must be treated as a living artifact, refreshed as model capability advances, not as a one-time deliverable.
The domains where this approach has the most untapped potential are not the ones with the most public RTL corpora. They are the ones where expert knowledge is tacit, where bugs are subtle, and where frontier models currently have the least reliable signal. That is where the evaluation gap is largest, and where the return on expert-authored benchmark investment is highest.
If you are building evals or RL environments in RTL, EDA, or adjacent hardware design domains, get in touch with Chiron Data Labs.
Have questions or want personalised guidance? Contact us and we'll be happy to help.