arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.15500cs.ARcs.AIcs.SYeess.SY
收藏

LLM4RTL: 工具辅助的大语言模型用于RTL生成

LLM4RTL: Tool-Assisted LLM for RTL Generation

UC Riverside(加州大学河滨分校);Futurewei(未来科技)

Jing Jin, Robert Chu, Ning Yan, Masood S. Mortazavi

AI总结:

提出JRCRC流水线,利用商业LLM层次结构过滤和优化RTL代码生成数据集,并设计工具辅助架构提升逻辑推理能力,在VerilogEval上超越多数方法,用更小模型达到GPT-4O性能。

摘要:

大语言模型(LLMs)在软件工程、代码生成、工具和系统方面取得了显著进展。同时,大量研究探索了将LLMs应用于硬件和芯片设计的方法和系统(例如,基于功能描述的RTL代码生成系统)。然而,在开放Verilog/RTL代码生成方面,我们需要高质量的训练样本,通过微调或低秩适应来构建专门且更有效的LLM系统。在此,我们提出了一种“判断-更新-检查-更新-检查”(JRCRC)流水线,该流水线使用一系列在RTL代码生成中成本和能力不同的最先进商业LLM模型来更新现有公共数据集。这种方法实现了一种成本效益高的机制,用于过滤和优化代码生成样本,形成更高质量的训练数据集。我们的实验还识别了LLMs在基于规则的推理和逻辑方面的一些常见弱点,进而影响RTL代码生成。在识别这些弱点后,我们开发了一种架构,结合预处理工具动态辅助LLMs从表格数据格式推断逻辑关系。通过我们的工具辅助RTL代码生成架构,我们在VerilogEval基准测试中取得了显著的总体性能提升,并超越了许多最先进的方法。我们的LLM4RTL系统使用更小的模型实现了与GPT-4O相当的性能。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑