TL;DR
Asking an LLM to fix a hardware bug is easy; trusting that fix before etching it into silicon is the hard part. Most AI hardware-repair tools declare victory the moment a patch passes a basic simulation test, potentially hiding broken corner cases, security holes, or bloated chip layouts. REFORGE introduces a multi-stage verification gauntlet that forces LLM-generated hardware fixes to prove they actually work, preserve existing behavior, stay secure, and meet physical cost budgets—all while keeping a detailed receipt of the evidence.
What Problem Does This Paper Address?
In chip design, engineers write code at the Register-Transfer Level (RTL)—essentially blueprints describing how digital signals move between registers and logic gates. Verification consumes roughly half of a chip project's effort because bugs in silicon can't simply be patched over the air.
Recently, researchers have used LLMs to automatically repair buggy RTL. Typically, these systems report a single "repair rate": the percentage of patches that compile and pass a testbench simulation. The catch? Passing a simulation is a low bar. A patch might fix the target bug while quietly breaking an untested corner case, opening a security vulnerability (like leaving a cryptographic lock writable), or blowing up the chip's Power, Performance, and Area (PPA)—its physical footprint, speed, and energy budget. Furthermore, if you ask an LLM for five alternative fixes so you can pick the most efficient one, it might give you five differently worded files that compile down to the exact same circuit. Without tracking separate evidence for functionality, security, and physical implementation, AI-repaired hardware isn't ready for real engineering workflows.
Methods
REFORGE separates proposing fixes from accepting and selecting them in an iterative generate–check–refine loop (tested across Codex/GPT-5.5, Claude Sonnet, and Grok-4.6):
- Profiling & Localization: Standard simulation and synthesis tools scan the buggy RTL to map out its structural anatomy (clocks, state machines, security assets) and pinpoint the likely bug region using statistical fault localization (Ochiai scoring).
- Structured Variant Generation: Instead of repeatedly asking "fix this" and getting identical answers, REFORGE nudges the LLM along distinct transformation axes (e.g., control logic vs. datapath). In Round 1, it maximizes variety; in later rounds, it uses Thompson sampling (a classic explore-vs.-exploit algorithm) to favor strategies that progressed furthest in earlier checks, feeding back formal counterexamples and failure diagnoses.
- Four-Part Verification Gate: Every candidate faces four independent checks using open-source and commercial chip-design tools:
- Repair: Simulation plus Bounded Model Checking (mathematically proving the fix matches a golden reference up to $k$ clock cycles).
- Preservation: Ensuring previously working behavior outside the bug trigger remains intact.
- Security: Static checks, formal assertions, and information-flow tracking to ensure vulnerabilities aren't merely hidden or moved elsewhere.
- Cost: Synthesizing the circuit to check if area, delay, and power stay within 20% of a reference budget.
- Multi-View Selection: Rather than just comparing source text, REFORGE measures diversity across five views—lexical text, syntax trees, synthesized gate-level netlists, switching activity, and PPA cost—to retain genuinely distinct verified designs.
Datasets
The authors evaluated REFORGE across three complementary benchmarks (no training was performed):
- CirFix: 21 seeded functional RTL bugs from an established academic benchmark.
- Hack@DAC OpenTitan: 1 real-world register-arbiter bug extracted from the open-source OpenTitan silicon-root-of-trust chip.
- Hardware-CWE Suite (Newly Introduced): 10 hand-written RTL modules containing security weaknesses based on MITRE’s Common Weakness Enumeration (CWE), paired with custom security detectors (9 of which are covered by automated detectors).
Key Insights and Ideas
- "Passing the testbench" massively inflates success: Relying solely on functional simulation reports 3.9× more repairs than when requiring full equivalence, security, and physical cost checks. Single-number repair rates mask huge gaps in verification depth.
- Different code $\neq$ different hardware: When auditing 408 pairs of LLM repairs that looked different in code but synthesized to identical PPA numbers, mathematical equivalence checking proved every single pair implemented the exact same circuit. Counting textually different files overstates true hardware diversity.
- Feedback helps fix bugs, but narrows creativity: Feeding error diagnoses back to the LLM helps it get unstuck, increasing the odds of finding at least one valid fix. However, that specific feedback also funnels subsequent attempts toward the exact same solution, reducing the diversity of the final candidate pool.
- Security fixes aren't automatically functional fixes: Candidates in the CWE suite passed differential security scans, yet lacked sufficient functional testbench coverage to prove behavioral preservation—showing why security and functional verdicts must be tracked separately.
Key Results
Across 288 primary runs (plus 20 perturbation controls) yielding 629 selected variants:
- Context & Diagnosis Boost Delivery: On CirFix, bare prompting delivered at least one checked repair in 32/63 runs (21 bugs $\times$ 3 LLMs). Adding structural context raised this to 45/63, and adding iterative failure diagnosis pushed it to 51/63. All configurations repaired the Hack@DAC bug.
- Evidence Breakdown: Of 430 functionally checked selections, 140 achieved unbounded mathematical verification, while 290 were verified up to a bounded cycle depth ($k \le 20$). On CirFix, 236 variants met the 20% PPA cost budget while 81 blew past it.
- Prompt Caching Matters: Interfaces with prompt caching (Codex, Sonnet) finished CirFix campaigns in 1.7–4.1 hours, whereas Grok's uncached CLI reprocessed context every round, taking 5.5–11.4 hours and up to 4.06M tokens.
Limitations and Future Work
- Known Security Rules Only: REFORGE catches known MITRE CWE patterns defined via rules, assertions, and taint tracking, meaning novel or unmodeled vulnerability classes can slip through. Future work aims to automatically detect and localize unknown vulnerabilities.
- Proxy Similarity vs. Exact Equivalence: Heuristic netlist similarity didn't catch all functionally identical circuits. Future versions should group final candidates using exact SAT-based equivalence checking rather than relying solely on structural proxies.
- Compute Overhead: Iterative CLI calls and repeated synthesis/formal runs are expensive; caching prompt prefixes and reusing verification artifacts across rounds are prime targets for optimization.
Summary updated