Introduction
In hardware design, verification is the primary bottleneck, often consuming over half of a project's development lifecycle. While Large Language Models (LLMs) have shown proficiency in generating Register Transfer Level (RTL) code, creating effective verification stimuli—testbenches that aggressively exercise a Design Under Test (DUT)—remains a significant challenge. Effective testbenches must maximize coverage (the percentage of design logic exercised), requiring the model to target obscure corner cases that standard generation often misses.
Methodology: CD-DPO
To address this, researchers have developed Coverage-Driven Direct Preference Optimization (CD-DPO), a fine-tuning framework that integrates quantitative coverage metrics directly into the model's optimization objective.
The framework consists of three core components:
- Offline Preference Learning: Unlike traditional reinforcement learning that requires a live simulator, CD-DPO is "simulator-free" during fine-tuning. Candidate testbenches are simulated once to generate coverage data, which is then used for offline optimization, significantly improving training efficiency.
- Weighted Scaling ($\beta^*$): Standard DPO treats all preferred samples equally. CD-DPO introduces a weighted loss function where the penalty is proportional to the coverage gap between pairs. This teaches the model to prioritize samples that offer significantly higher verification value.
- Multi-Metric Feedback: The objective incorporates code, branch, and functional coverage signals to provide a holistic view of testbench quality.
Datasets
The study utilizes PairaNet, a new open-source dataset derived from PyraNet, containing 182,870 pairs of testbenches labeled with simulation-derived coverage scores. Evaluations were conducted on the CVDP CID12 benchmark suite and a proprietary high-quality dataset to analyze the impact of data richness on model convergence.
Key Results and Performance
The resulting "TB or not TB" models demonstrate substantial improvements over vanilla baselines. The CD-DPO-tuned Qwen3 8B model achieved a 77.27% improvement in code coverage compared to its vanilla counterpart.
A key finding is the high "performance ceiling" of these tuned models. In "Best of 20" scenarios—where 20 candidates are generated and the best is selected—the fine-tuned Qwen3 14B model outperformed commercial giants like Claude 3.5 Sonnet, showing a 56.78% improvement in functional coverage.
Conclusion and Future Work
CD-DPO successfully bridges the gap between open-source and proprietary models for hardware verification. While commercial models maintain higher mean performance, the tuned models excel in peak coverage scenarios. Future research will focus on improving consistency, integrating formal verification signals, and jointly optimizing for both coverage and assertion robustness to better detect hardware bugs.
Summary updated