arXiv:2606.15500cs.ARcs.AI2026-06

用工具辅助大模型生成更高质量的硬件代码,效果接近GPT-4O但模型更小。

LLM4RTL: Tool-Assisted LLM for RTL Generation

论文配图:LLM4RTL: Tool-Assisted LLM for RTL Generation
图 1 · 摘自论文原文
  • 设计分层工具链动态辅助模型理解表格数据中的逻辑关系。
  • 在VerilogEval上性能超越多数现有方法,仅用小模型达到GPT-4O水平。
  • 通过筛选与精炼公开数据集,提升训练样本质量,解决逻辑推理短板。

大型语言模型(LLMs)在软件工程、代码生成和系统开发中取得显著进展。与此同时,越来越多研究探索将LLMs应用于硬件与芯片设计,例如基于功能描述生成RTL代码。然而,开放的Verilog/RTL代码生成仍需高质量训练样本,以通过微调或低秩适配构建高效专用模型。本文提出“判断-更新-检查-更新-检查”(JRCRC)流水线,利用多层级商用先进LLM对现有公开数据集进行迭代筛选与精炼,实现低成本高质量训练数据构建。实验揭示了LLMs在规则推理与逻辑建模上的普遍弱点,据此设计预处理工具辅助架构,动态支持模型从表格格式中推断逻辑关系。所提出的LLM4RTL系统在VerilogEval基准测试中表现优异,性能超越多种前沿方法,且仅使用较小规模模型即达到GPT-4O水平。

原文摘要 · Abstract (English)

Large language models (LLMs) have facilitated impressive progress in software engineering, code generation, tooling, and systems. Concurrently, a significant body of research has developed which explores a growing variety of methods and systems for applying LLMs to hardware and chip design (e.g., systems for RTL code generation based on functional description). However, when it comes to open Verilog/RTL code-generation, we need high-quality training samples to build specialized and more effective LLM systems through fine-tuning or low-rank adaptation. Here, we propose a ``judge-renew-check-renew-check'' (JRCRC) pipeline which updates a current public dataset using a hierarchy of state-of-the-art commercial LLM models differing in their costs and capabilities in RTL code generation. This approach achieves a cost-effective mechanism for filtering and refining code-generation samples into a higher-quality training dataset. Our experiments also identify some common weaknesses of LLMs in rule-based reasoning and logic, and consequently, in RTL code-generation. Having identified these weaknesses, we develop an architecture for incorporating pre-processing tools to dynamically assist the LLMs in inferring logical relationships from tabular data formats. With our tools-assisted architecture for RTL code generation, we achieve significant overall performance gains in the VerilogEval benchmark and outperform many state-of-the-art methods. Our LLM4RTL system achieves performance comparable to that of GPT-4O using a significantly much smaller LLM.

硬件生成工具辅助LLM优化RTL代码

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