TL;DR
Dr. RTL is an autonomous multi-agent framework that optimizes human-written Register-Transfer Level (RTL) digital designs for better timing and area by interacting directly with commercial EDA tools. By distilling its optimization trajectories into a reusable, interpretable skill library, Dr. RTL achieves a 21% average timing improvement and a 6% area reduction over industry-leading commercial synthesis tools.
What Problem Does This Paper Address?
In digital circuit design, the quality of Register-Transfer Level (RTL) code dictates the performance, power, and area (PPA) of the final chip. While downstream logic synthesis tools optimize code at the gate level, they cannot alter high-level structural choices like pipelining or datapath organization. Consequently, human engineers must manually rewrite RTL in a tedious, iterative loop guided by synthesis reports.
Recently, researchers have turned to Large Language Models (LLMs) to automate this process. However, existing LLM-based RTL optimizers suffer from three major flaws:
- Weak Baselines: They evaluate on artificially degraded RTL rather than clean, human-optimized code.
- Unrealistic Toolchains: They rely on weak, open-source synthesis tools (like Yosys) whose gaps are easily filled by commercial tools.
- Toy Scale: They test on tiny modules (often just tens of lines of code), failing to capture the complexity of real-world hardware.
Methods
To bridge this gap, the authors introduce Dr. RTL, a tool-grounded, closed-loop multi-agent framework that mimics an expert hardware engineer's workflow.
The framework splits responsibilities across three specialized agents coordinated by an Orchestrator:
- Timing Analysis Agent: Examines post-synthesis timing reports, performs path-to-RTL mapping, and diagnoses the root causes of timing slack bottlenecks.
- RTL Optimization Agent: Proposes equivalent code transformations (combinational or sequential) in parallel, guided by both the timing analysis and an evolving skill library.
- Evaluation Agent: Executes commercial logic synthesis and Sequential Equivalence Checking (SEC) to verify functional correctness and measure PPA changes.
Crucially, Dr. RTL avoids the pitfall of noisy absolute PPA feedback through Group-Relative Skill Learning. Instead of evaluating a code modification in isolation, an auxiliary agent compares parallel candidates generated from the same parent RTL. It computes a relative advantage signal to extract successful "pattern-strategy" pairs (e.g., condition pre-computation or common subexpression elimination) into a confidence-aware skill library for cross-design reuse.
Datasets
The authors established a realistic benchmark consisting of 20 real-world, human-written Verilog designs collected from diverse open-source projects. The dataset spans buffers, processors, cryptographic modules, and SoCs, averaging 812 lines of code (LOC) per design (with a maximum of 4,615 LOC)—roughly 10× larger and significantly more complex than prior benchmarks.
They also evaluated Dr. RTL on large designs from the existing RTLRewriter benchmark to demonstrate its ability to optimize beyond what was previously considered the "upper bound."
Key Insights and Ideas
- Relative over Absolute Signals: Absolute PPA metrics from EDA tools are highly heuristic and noisy. Evaluating LLM edits based on how well they perform relative to their peers in the same iteration provides a much cleaner signal for self-improvement.
- Human RTL is Not the Upper Bound: Prior works assumed that recovering the original human-written RTL from a degraded version was the goal. Dr. RTL proves that even well-written human RTL leaves significant optimization opportunities on the table that commercial synthesis tools cannot exploit.
- Role Decomposition Prevents Hallucinations: Separating code rewriting from timing analysis and tool execution ensures that the framework remains strictly grounded in verified EDA tool feedback, eliminating LLM hallucinations.
Key Results
Evaluated against industry-standard tools (Synopsys Design Compiler and Cadence Jasper SEC), Dr. RTL achieved remarkable results:
- Timing Improvements: An average reduction of 21.3% in Worst Negative Slack (WNS) and 16.9% in Total Negative Slack (TNS).
- Area Reduction: An average 5.8% reduction in area, proving that the timing gains did not come at the expense of massive hardware overhead.
- Reliability: Maintained an average SEC pass rate of 86% across all optimization iterations.
- Scalability: The framework scales robustly with LLM capability; switching the backbone from Claude Haiku to Claude Opus boosted the average PPA improvement from 3% to 21%.
Limitations and Future Work
While highly effective, Dr. RTL currently excludes power optimization from its objective function, as accurate power estimation requires workload-dependent dynamic simulations that cannot be reliably assessed via static evaluation alone. Additionally, because the framework relies on commercial EDA toolchains, the optimization runtime is bottlenecked by the time it takes to run synthesis and formal verification (ranging from minutes to hours per design).
Future directions include adapting the framework to smaller, domain-specialized LLMs to improve deployment flexibility and exploring richer human-in-the-loop refinement strategies.
Summary updated