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
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