LLM based RTL generation improved with modular self correction

CorrectRTL: Boost RTL Generation Quality Through Automated Self-Correction with Instruction Decomposition

Artificial Intelligence

Summary

Generating hardware designs from specifications using AI models has improved, but errors remain a challenge. The authors created a new harder test set called ScaleBench to better evaluate performance. They also designed CorrectRTL, a method that breaks down the hardware design task into parts and checks small pieces for errors rather than rewriting everything at once. This approach greatly improved accuracy in generating RTL code, especially for complex designs.

What this means in practice

  • For hardware design teams: Improve the accuracy of automatic RTL code generation for complex digital designs by breaking down and self-correcting code generation in parts.
  • For eda tool developers: Incorporate modular self-correction methods and challenging benchmarks to enhance AI-assisted RTL generation features in design automation software.$Commercial implications: Enables advanced RTL generation features in EDA tools that reduce design iteration time and errors for hardware engineers.

Authors

Jing Wang, Shang Liu, Hangan Zhou, Wenji Fang, Yuchao Wu, Yugao Zhu, Zhiyao Xie

Abstract

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)~\emph{Structure-oriented decomposition}, (2)~\emph{Snippet-based RAG}, and (3)~\emph{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.