Skip to content

When to Test, Repair, or Regenerate: Decision-Guided Efficient RTL Generation

Feiyang Pan, Shenghe Zheng, Pengfei Xiao, Chunyan Yin, Guangbin Dou

cs.AR

Abstract

Large language models (LLMs) can generate register-transfer-level (RTL) designs from natural-language specifications. To improve functional correctness, many RTL agents use simulation feedback to guide refinement. However, without a reference testbench, generating one for every initial implementation incurs inference cost even when the RTL is correct. We therefore introduce an adaptive harness that uses a specialized decision model to orchestrate testing, refinement, and candidate selection. It accepts high-scoring initial implementations and generates testbenches for the rest. When further search is needed, the initial score guides repair--regeneration allocation, while defect rankings and simulation feedback guide repair. For final selection, the harness prioritizes test-passing candidates and ranks them using decision-model scores. Across three benchmarks, the harness with DeepSeek improves mean Pass@1 by 5.4--7.1 percentage points over initial implementations and reduces aggregate estimated inference cost by 11.0--14.3% relative to a testbench-guided repair baseline with the same candidate cap.

Create a lesson