Veri-Sure: Multi-Agent RTL Code Generation with Temporal Tracing, Slicing and Formal Verification

Jiale Liu, Taiyu Zhou, Tianqi JiangNeurIPS 2026

TL;DR

LLMs are great at writing sequential Python scripts, yet they stumble when writing hardware code where everything happens simultaneously on the tick of a clock. Veri-Sure bridges this gap with a team of specialized AI agents bound by a strict "design contract," using waveform tracing, static code slicing, and formal mathematical proofs to surgically patch bugs rather than recklessly rewriting entire files. The result is a major leap toward reliable, silicon-grade automated chip design.

What Problem Does This Paper Address?

Software executes line by line. Hardware, described at the Register-Transfer Level (RTL) using languages like Verilog, is a different beast entirely: thousands of logic gates and registers update concurrently, governed by strict cycle-accurate timing. Because LLMs are trained as sequential text predictors—and high-quality hardware code is scarce online—they often generate RTL that looks syntactically fine but fails on subtle timing protocols or state transitions.

Worse, existing AI debugging loops are clumsy. They usually rely on sparse pass/fail simulation logs (which miss rare corner cases), rewrite the entire file on every bug fix (introducing new regressions), and suffer from "semantic drift" as different agents play a game of telephone with the original prompt across iterations. In chip design, a surviving bug doesn't just trigger a quick software patch—it ruins a multimillion-dollar physical fabrication run.

Methods

Veri-Sure replaces free-form agent chatter and whole-file rewrites with a disciplined, Electronic Design Automation (EDA)-inspired workflow:

Figure 1: An overview of our VERI-SURE framework.
  • Design Contracts: Before writing a single line of Verilog, an Architect agent translates the messy natural-language prompt into a linted, structured JSON contract. This locks down port definitions, clock/reset polarities, and cycle latencies so the Coder and Verifier agents share an unambiguous source of truth.
  • Trace-Driven Slicing & Surgical Patching: When simulation fails in Verilator, Veri-Sure doesn't just read text logs. It inspects the actual signal waveforms (VCD files) to find the exact clock cycle and signal where behavior first diverged. It then traces backward through the code's read/write dependencies (static slicing) to isolate the few "suspect" blocks capable of causing the error. The Debugger agent is only permitted to patch those isolated lines—and if a patch doesn't measurably push back the failure time or reduce mismatches, it gets rolled back immediately.
Figure 2: The tracing, static slicing and patch- ing mechanism.
  • Dual-Branch Formal Verification: To catch bugs that simple testbenches miss, two formal agents step in to generate diagnostic hints. An Asserter binds SystemVerilog timing assertions to catch sequential errors (like updating on the wrong clock edge), while a Boolean Proofer uses the SymbiYosys engine and Z3 SMT solver to mathematically check pure combinational logic for exact equivalence against the contract.

Datasets

Standard benchmarks like VerilogEval-v2 lean heavily on short, textbook-style exercises. To test real-world engineering grit, the authors introduce VerilogEval-v2-EXT, expanding the original 156 tasks with 53 industrial-grade problems (209 total). These new tasks cover realistic IP blocks like UART communication controllers, FIFO queues, clock-domain crossings, and wide datapaths up to 1,024 bits. They also stratify all 209 problems into Easy, Medium, and Hard tiers based on structural complexity.

Figure 3: VERILOGEVAL-V2-EXT problem taxonomy.

Key Insights and Ideas

  • Scale beats narrow specialization: Surprisingly, massive general-purpose frontier models (like GPT-5.2 and Gemini-3-Pro) crush smaller 7B models specifically fine-tuned on Verilog—especially on Hard tasks. Broad reasoning scale matters more for multi-cycle hardware logic than domain-specific syntax training alone.
  • Surgical edits prevent debugging spirals: Whole-file regeneration alters an average of 68.8 lines per attempt, constantly risking new bugs. Veri-Sure’s sliced patching touches just 7.9 lines on average, keeping working logic intact.
  • Formal proofs shine when complexity spikes: Removing formal verification drops overall accuracy by 3.8 percentage points, but on Hard problems, performance plunges by 11.9 percentage points—showing that mathematical proofs catch deep logic flaws that finite simulations leave in the dark.

Key Results

Evaluated across 15 standalone LLMs, iterative single-agent loops, and competing multi-agent systems (MAGE and VerilogCoder), Veri-Sure (with GPT-5.2) sets a new state of the art on VerilogEval-v2-EXT:

  • Achieves 100% syntax validity and 93.30% overall functional Pass@1, jumping +16.74 percentage points over standalone GPT-5.2 (76.56%) and surpassing MAGE (89.95%).
  • Dominates the Hard subset at 85.07%, compared to 59.70% for standalone GPT-5.2 (which saw zero improvement on Hard tasks from basic simulator-log feedback alone).
  • Boosts the open-weight DeepSeek-3.2 model from 61.24% standalone to 71.29% functional accuracy.

Limitations and Future Work

Veri-Sure isn't magic when specifications are vague: of the 14 tasks it failed to solve, 10 stemmed from under-specified timing descriptions where agents ran out of repair iterations trying to guess unspoken cycle behavior. Additionally, an audit revealed errors in 5.7% (12/209) of the Architect's generated contracts, particularly around tricky floating-point rounding and subnormal arithmetic. Because formal assertions and reference models are themselves LLM-generated from that contract, they occasionally time out or miss conditions—which is why Veri-Sure smartly treats formal outputs strictly as diagnostic hints rather than the final judge. Explicit future work directions are not discussed in the paper.

Summary updated

Abstract

In the rapidly evolving field of Electronic Design Automation (EDA), the deployment of Large Language Models (LLMs) for Register-Transfer Level (RTL) code generation has emerged as a promising direction. However, because RTL code describes concurrent hardware behavior with strict cycle-level timing and thus differs fundamentally from software code, LLM-based RTL code generation remains bottlenecked by (i) sparse feedback and limited test coverage of simulation-centric evaluation, (ii) regressions and repair hallucinations introduced by whole-file regeneration during debugging, and (iii) semantic drift as intent is reinterpreted across repair iterations and agent handoffs. In this work, we propose Veri-Sure, a multi-agent framework that establishes a design contract to align agents' intent and uses a patching mechanism guided by static dependency slicing to perform precise, localized repairs. By integrating a multi-branch verification pipeline that couples trace-driven temporal analysis with formal checking, Veri-Sure can generate RTL code with better reliability and robustness. We also introduce VerilogEval-v2-EXT, extending the original benchmark with 53 more industrial-grade design tasks and stratified difficulty levels, and show that Veri-Sure achieves state-of-the-art verified-correct RTL code generation performance, surpassing standalone LLMs and prior agentic systems. Code and dataset are available at https://github.com/xyjoey/Veri-Sure.
BibTeX
@inproceedings{liu2026veri,
  author = {Jiale Liu and Taiyu Zhou and Tianqi Jiang},
  title = {{Veri-Sure: Multi-Agent RTL Code Generation with Temporal Tracing, Slicing and Formal Verification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=b570WrnLlN},
}
Figure