Large language models (LLMs) can write and repair RTL, but successful compilation or testbench execution does not establish defect removal, behavioral preservation, security, or implementation feasibility. Existing LLM-based RTL repair methods often report a single repair rate without retaining separate evidence for these properties, limiting reproducible comparison and integration into hardware design flows. We present REFORGE, which, to our knowledge, is the first LLM-assisted RTL repair framework that maintains and accumulates structured repair evidence across iterations, allowing it to generate fixes that satisfy multiple objectives simultaneously, including functionality, behavioral equivalence, security, and cost efficiency. REFORGE profiles buggy RTL, identifies structural and security-relevant features, localizes failing behavior, and uses verification-guided diagnosis to generate complete RTL repair variants. Each variant undergoes syntax checking, simulation, formal analysis, off-trigger preservation, security re-scan, and synthesis-based power, performance, and area analysis. We implement REFORGE as a backend-independent repair-and-verification flow and evaluate it in 288 runs across three LLM backends and three benchmark suites. On CirFix, the proposed context and diagnosis increase runs delivering a checked repair from 32/63 to 51/63, while every configuration repairs the Hack@DAC OpenTitan defect. Evidence records also show that a testbench-only criterion reports 3.9 times more repairs than the full set of applicable checks, security-clean outputs may lack functional verification, and different RTL repairs can implement equivalent hardware. These results show that LLM-generated RTL repairs require explicit multi-stage verification evidence rather than a single pass/fail outcome.
Figures & tables
System (year)
Task
Functional [-2pt] oracle
Bug [-2pt] removal
Behavior [-2pt] preservation
Formal [-2pt] depth
Counterexample [-2pt] feedback
Security [-2pt] check
Security [-2pt] re-scan
PPA [-2pt] measurement
PPA [-2pt] constraint
Diverse [-2pt] selection
Context [-2pt] reuse
Functional RTL repair, localization, and debugging
CirFix (2022) [ 9 ]
R
S+M
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
RTL-Repair (2024) [ 10 ]
R
S+F k
❍
❍
❍
✗
✗
✗
✗
✗
✗
✗
RTLFixer (2024) [ 3 ]
R syn
S
✗
✗
✗
❍
✗
✗
✗
✗
✗
✗
MEIC (2024) [ 11 ]
R
S+A
✗
✗
✗
❍
✗
✗
✗
✗
✗
✗
R3A (2025) [ 12 ]
R
S
✗
✗
✗
❍
✗
✗
✗
✗
✗
✗
TABLE I: Supported acceptance evidence in prior RTL work and this paper. ✓ full, ❍ partial, ✗ absent, – not applicable.
Fig. 1: The REFORGE repair flow. Profiling and failure localization define generation directions; independent repair, preservation, security, and cost checks determine acceptance; failure evidence guides later rounds; and similarity selection retains distinct verified variants.
Fig. 2: Prompt structure used to generate repair variants. Fixed text is verbatim; brackets identify data filled and retained by the framework.
Tool
Purpose
Icarus Verilog
Simulation, testbench replay, and VCD traces.
Slang/Verilator
SystemVerilog syntax and elaboration checks.
Yosys
Open-source synthesis and miter construction.
SymbiYosys
Bounded formal verification of RTL properties.
Cadence Genus
Commercial synthesis and PPA measurement.
Cadence Conformal
Commercial logic-equivalence checking.
TABLE II: Major tools used in the evaluation.
Fig. 3: CirFix repair outcomes by backend and prompt configuration. (a) Runs producing at least one checked repair; (b) runs reaching the full five-candidate target. Context and feedback increase checked repair delivery, although five-variant target attainment is not monotonic.
Fig. 4: Combined similarity score S(i,j) for one matched CirFix/ Codex case; bold labels and boxed cells identify selected candidates. The lower dmin under guided prompting shows that verification feedback can reduce dispersion among selected variants.
Verification consumes the majority of modern chip design effort, yet the formal verification tools that provide mathematical guarantees of correctness remain expensive and restrictively licensed. While large language models (LLMs) have shown promise for hardware design, existing approaches to RTL repair validate their results through simulation - which exercises only a subset of inputs - or rely on commercial tools, and few combine formal proof with an entirely open-source toolchain. In this paper, we present a multi-agent pipeline that couples an LLM with an open-source formal backend (Yosys, SymbiYosys, and Z3) to repair RTL through counterexample-guided iteration: the framework generates formal properties, verifies the design, and feeds counterexamples back to the LLM until the design is proved correct by k-induction or an iteration budget is exhausted. Through an ALU case study, we show that the pipeline can detect and repair a real functional bug with a formal proof of correctness. Across a six-benchmark suite, one design is repaired reliably, and we characterize four distinct failure modes: bounded-cover vacuity, specification ambiguity, temporal-logic bugs, and multi-property pressure. We frame this work as a feasibility study with a detailed failure analysis, and additionally report a practical limitation of the Yosys bind directive relevant to the open-source formal verification community.
Large Language Models show great potential for automated Register-Transfer Level repair, yet they struggle with non-local faults where root causes and failing outputs reside far apart in source code. Treating RTL as a flat token sequence obscures hardware dataflows, whereas exposing complete synthesized graphs overwhelms the model with fine-grained metadata. To resolve this representation dilemma, we propose GRODE-RTL, an anchor-centric representation that extracts the single-clock-stage fan-in cone of a suspect register from the netlist, maps netlist nodes back to editable source lines, and organizes them into a compact hop-partitioned dependency view. By prioritizing direct drivers and folding distant hops, GRODE-RTL guides standard tool-using agents without exposing ground-truth hints or oracle feedback. We evaluate GRODE-RTL across 30 formally validated non-local faults using three LLMs (DeepSeek-V4-Flash, GLM-5.2, and MiniMax-M3) alongside a controlled six-configuration ablation study. GRODE-RTL improves pass@1 over source-level exploration by 16.7% on DeepSeek, by 26.7% on GLM-5.2, and by 20.0% on MiniMax-M3, with consistent gains on the hard-to-retrieve far-distance and indirect-anchor subsets of all three models. Our controls isolate structural relevance from generic context expansion, proving that selective dependency organization rather than full graph exposure is key to effective RTL repair.
Jingyi Zhou, Yi Liu, Bin Sun +3
Department of Computer Science and Engineering, The Chinese University of Hong Kong · Institute of Computing Technology, CAS
RTL program repair remains a critical bottleneck in hardware design and verification. Traditional automatic program repair (APR) methods rely on predefined templates and synthesis, limiting their bug coverage. Large language models (LLMs) and coding agents based on them offer flexibility but suffer from randomness and context corruption when handling long RTL code and waveforms. We present Clover, a neural-symbolic agentic harness that orchestrates RTL repair as a structured search over code manipulations to explore a validated solution for the bug. Recognizing that different repair operations favor distinct strategies, Clover dynamically dispatches tasks to specialized LLM agents or symbolic solvers. At its core, Clover introduces stochastic tree-of-thoughts, a test-time scaling mechanism that manages the main agent's context as a search tree, balancing exploration and exploitation for reliable outcomes. An RTL-specific toolbox further empowers agents to interact with the debugging environment. Evaluated on the RTL-repair benchmark, Clover fixes 96.8% of bugs within a fixed time limit, covering 94% and 63% more bugs than both pure traditional and LLM-based baselines, respectively, while achieving an average pass@1 rate of 87.5%, demonstrating high reliability and effectiveness.