arXiv:2606.09867cs.ARcs.AI2026-06

用评分机制提升大模型生成硬件代码的正确性。

EstRTL: Functional Estimation Guided RTL Code Generation

论文配图:EstRTL: Functional Estimation Guided RTL Code Generation
图 1 · 摘自论文原文
  • 通过生成-评估-修正三阶段框架,动态判断代码质量
  • 使通用大模型生成的代码正确率提升3.2%至9.0%
  • 适合需要高可靠性的芯片设计自动化场景

在硬件设计中,优化寄存器传输级(RTL)代码至关重要。大语言模型(LLMs)为自动化的RTL代码生成与优化提供了新方法,有望大幅加速设计流程并减少人力投入。然而,现有方法多聚焦于模型微调和扩展技术以增强生成能力,忽视了功能正确性。确保生成的RTL代码不仅可编译,且在真实硬件中行为符合预期,仍是关键挑战。为此,我们提出EstRTL——一种基于静态功能评分估计的LLM协同代理框架。该框架采用三阶段范式:生成、评估与修正。其中,功能评估代理基于评分与判断结果,决定是否直接输出代码、返回重生成或移交修正模块。该框架可适配多种面向RTL生成的LLM,进一步提升生成代码的正确性。通过提供量化评分与可读的需求对比,增强了AI辅助生成的透明度。实验表明,EstRTL将通用LLM生成的代码正确率提升了3.2%至9.0%,验证了系统的实际价值。代码与实验结果已开源:https://anonymous.4open.science/status/EstRTL-E200/。

原文摘要 · Abstract (English)

Optimizing register transfer level (RTL) code is of vital importance in hardware design. Large language models (LLMs) provide new methods for the automatic generation and optimization of RTL code, offering the potential to significantly accelerate the design process and reduce human effort. However, existing methods for generating RTL code often focus on model fine-tuning and the use of various expansion techniques to enhance the RTL code generation capabilities, lacking attention to the functional correctness. Ensuring that the generated RTL code not only compiles successfully but also behaves as intended in real hardware implementations remains a critical challenge. To address this issue, we propose EstRTL, an LLM-powered collaborative agent framework for RTL code generation based on static functional score estimation. EstRTL operates a three-stage paradigm: Generation, Estimation and Correction. During the stages, the functional estimation agent statically evaluates the generated code based on score and assessment results, and decides whether to output the code directly, return it for regeneration, or forward it to the code correction agent. This framework can be applied to various LLMs that designed for RTL code generation, further enhancing the correctness of the generated code. By providing quantitative scores and human-readable requirements comparisons, it improves the transparency of AI-assisted RTL code generation. Experiments show that EstRTL significantly improves the correctness of RTL code generation by generic LLM by 3.2\%-9.0\%, demonstrating the practical value of our system. The codes and experimental results are open-sourced at link: https://anonymous.4open.science/status/EstRTL-E200/.

硬件生成大模型代码正确性RTL

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。