RTLREX: LLM-Guided Framework for Exact High-Level RTL Recovery
Authors: Wuqian Tang, Fangzhou Liu, Ruijie Wang, TingTing Hwang, Bei Yu, Chun-Yao Wang
Organizations: Department of Computer Science, National Tsing Hua University, Hsinchu 300044, Taiwan · Department of Computer Science and Engineering, The Chinese University of Hong Kong, Shatin, N.T., Hong Kong SAR
Hardware designs may be available only as gate-level netlists or input-output descriptions when the original register-transfer-level (RTL) design and documentation are not accessible. Low-level representations obscure word-level computation and its finite-width behavior. Recovering high-level RTL from such representations therefore helps engineers understand a circuit's functionality and enables RTL rewriting and resynthesis. A plausible function model is also insufficient unless the generated RTL is equivalent to the original circuit for all input combinations. In this paper, we present RTLREX, a large language model (LLM)-guided framework that coordinates domain-specific tools for function recovery, RTL generation, independent verification, and cost-guided rewriting. Independent verification establishes equivalence between the recovered RTL and the original circuit. The LLM uses tool feedback to select further analyses, revise candidate RTL, and propose syntax-cost reductions. Experiments on 30 benchmarks from Problem A of the ICCAD 2022 CAD Contest show that RTLREX recovers equivalent high-level RTL for all benchmarks, surpassing the state-of-the-art method WolFEx in recovery coverage. On benchmarks recovered by both methods, RTLREX reduces mean syntax cost by 20.5% relative to WolFEx. On complete truth-table benchmarks from the IWLS 2026 Contest, our framework reduces mean syntax cost by 95.7% relative to an LLM agent baseline on the benchmarks validated by both methods.
Figures & tables
Input
Model families
Comparison inputs
Complete truth table
Boolean and affine functions, integer arithmetic, fixed-point and floating-point operations
TABLE II: Syntax-Cost Weights for PA-30 and TT-100
Criterion
Requirements
V
Exact equivalence and successful RTL validity checking.
H
All requirements of V and an audited word- or field-level representation. PA-30 additionally requires at least 70% syntax-cost reduction.
TABLE III: RTL Recovery Criteria
Recovered computation
Benchmarks
Count
BF16 unary functions
ex200 – ex219
20
FP16 unary functions
ex220 – ex239
20
FP8 E4M3FN binary functions
ex240 – ex244
5
FP8 E5M2 binary functions
ex245 – ex249
5
FP4 dot product and fused multiply-add
ex250 , ex254
2
Fixed-point dot products and sum
ex251 – ex253
3
TABLE IV: Recovered Function Categories on TT-100
Benchmark
Original netlist
Hybrid-DATE [ 6 ]
WolFEx [ 7 ]
RTLREX
#Gates ( =Q )
Cost ( Q )
Cost ( Q )
Add
Mul
Cond.
Cost ( Q )
test01
35
2
2
2
0
0
2
test02
58
2
2
1
1
0
2
test03
313
3
3
3
0
0
3
test04
7416
6
6
4
1
0
6
test05
1290
6
6
3
3
0
6
TABLE V: Recovery Coverage, Operator Counts, and Syntax Cost on PA-30. Bold marks the lowest cost, including ties, and RTLREX’s complete recovery coverage
Fig. 6: Mean syntax cost on common successful benchmarks. (a) PA-30: paired comparisons with Hybrid-DATE on 23 common benchmarks and WolFEx on 26 common benchmarks. (b) TT-100: 74 common high-level recoveries.
Configuration
Trials
V
H
RTLREX
100
100/100
80/100
LLM agent baseline
100
81/100
74/100
TABLE VI: Recovery Coverage on TT-100
Set
Common
RTLREX vs. baseline
Mean cost reduction
Wins
Ties
Losses
V
81
66
14
1
95.7%
H
74
60
14
0
31.1%
TABLE VII: Syntax-Cost Comparison on Common TT-100 Benchmarks. Wins and losses indicate lower and higher RTLREX syntax costs than the LLM agent baseline, respectively
Proof method
Count
Direct ABC CEC
15
Arithmetic replay
6
Combined arithmetic/Boolean plans
9
Bit-vector SMT
1
Total (including overlap)
31
TABLE VIII: Equivalence Proof Methods Used on PA-30
Benchmark
Cell area ( μ m 2 )
Delay (ns)
Original
RTLREX
Original
RTLREX
test01
32.5
31.7
0.242
0.274
test02
45.2
43.6
0.311
0.395
test03
273.4
260.4
0.946
0.877
test04
4199.9
2453.6
2.007
1.991
test05
1102.3
1245.7
1.460
1.609
TABLE IX: Standard-Cell Area and Delay on PA-30. Bold: better results. TLE: mapping timeout
Register Transfer Level (RTL) design translates high-level specifications into hardware using HDLs such as Verilog. Although LLM-based RTL generation is promising, the scarcity of functionally verifiable high-quality data limits both accuracy and diversity. Existing post-training typically produces a single HDL implementation per specification, lacking awareness of RTL variations needed for different design goals. We propose RTLSeek, a post-training paradigm that applies rule-based Diversity-Oriented Reinforcement Learning to improve RTL correctness and diversity. Our Diversity-Centric Multi-Objective Reward Scheduling integrates expert knowledge with EDA feedback, and a three-stage framework maximizes the utility of limited data. Experiments on the RTLLM benchmark show that RTLSeek surpasses prior methods, with ablation results confirming that encouraging broader design-space exploration improves RTL quality and achieves the principle of "the more generated, the better results." Implementation framework, including the dataset, source code, and model weights, is shown at https://anonymous.4open.science/r/DAC2026ID71-ACB4/.
Xinyu Zhang, Zhiteng Chao, Yonghao Wang +6
State Key Lab of Processors, Institute of Computing Technology, Chinese Academy of Sciences, China · University of Chinese Academy of Sciences, China · Peking University, China +1
Large language models (LLMs) have shown strong promise in specification-to-RTL generation. Among the explorations, the self-correction paradigm has significantly advanced LLM-based RTL generation. However, two challenges limit further progress. Existing benchmarks are saturated by advanced LLMs, leaving little room to evaluate the agentic self-correction framework. The monolithic self-correction paradigm rewrites the entire design at once, where LLMs are susceptible to error confusion and corruption of originally correct code. To address the benchmark challenge, we contribute ScaleBench, a more challenging benchmark of 200 complex RTL designs. To address the challenge in methodology, we propose CorrectRTL, an agentic framework that realizes a new decompose-then-correct paradigm, in which the LLM agent explicitly decouples scaffold construction from detailed implementation. CorrectRTL contributes three core techniques: (1)Structure-oriented decomposition, (2)Snippet-based RAG, and (3)~SVA-based self-correction. On ScaleBench, CorrectRTL improves Pass@1 from 20.5% to 49.0% (+28.5%). On VerilogEval, CorrectRTL achieves up to 96.1% Pass@1, demonstrating consistent improvements across both simple and complex designs.
Jing Wang, Shang Liu, Hangan Zhou +4
Hong Kong University of Science and Technology Clear Water Bay, Hong Kong
LLM-based RTL generation and reasoning is a promising direction for hardware design automation. High-quality benchmarks are critical infrastructure for tracking progress in this direction. However, existing RTL benchmarks face inherent limitations in both scale and task scope. The designs they cover are typically small and simple, and the tasks focus almost entirely on specification-to-RTL generation. Frontier models' performance already saturates on the existing benchmarks. Scaling these benchmarks up is fundamentally difficult because aligned labels are required for benchmarking, such as specifications and testbenches. Such aligned high-quality data are rarely available for real-world designs. We introduce RTL-BenchLS, a large-scale benchmark addressing both limitations above. It contains over 10,000 formally verified Verilog designs, covering substantially larger and more complex designs than existing benchmarks. Beyond specification-to-RTL generation, we propose three novel tasks that jointly evaluate reasoning and generation: round-trip reasoning, masked-content reasoning, and repository-issue reasoning. The first two are self-supervised, which directly resolves the scaling bottleneck. All tasks are verified through formal equivalence checking without any manual testbenches. We evaluate eight LLMs on RTL-BenchLS. Even the best model reaches only 23% on natural-language round-trip reasoning, 28% on masked-content reasoning, and 12% on repository-issue fixing. RTL-BenchLS is substantially more challenging than existing benchmarks. It leaves ample room for future improvement and offers guidance for developing LLM-based methods for hardware design.