arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.18333cs.ARcs.AI
收藏

AutoVCoder:一个使用LLM自动生成Verilog代码的系统化框架

AutoVCoder: A Systematic Framework for Automated Verilog Code Generation using LLMs

Shanghai Jiao Tong University(上海交通大学);Sun Yat-sen University(中山大学);Fudan University(复旦大学)

Mingzhe Gao, Jieru Zhao, Zhe Lin, Wenchao Ding, Xiaofeng Hou, Yu Feng, Chao Li, Minyi Guo

AI总结:

本文提出开源框架AutoVCoder,通过高质量硬件数据集生成、两轮LLM微调和领域特定RAG机制,显著提升了LLMs生成Verilog代码的语法与功能正确性,在多个基准上优于现有模型。

摘要:

最近,使用大语言模型(LLMs)进行软件代码生成(如C/C++和Python)已被证明取得了巨大成功。然而,在生成寄存器传输级(RTL)代码(如Verilog)时,LLMs仍然存在语法和功能正确性较低的问题。为了解决这个问题,本文开发了AutoVCoder,这是一个系统化的开源框架,能够显著提高LLMs生成Verilog代码的正确性,并同时提升其输出质量。我们的框架集成了三种新技术,包括高质量的硬件数据集生成方法、两轮LLM微调方法以及特定领域的检索增强生成(RAG)机制。实验结果表明,AutoVCoder在Verilog代码生成方面优于工业界和学术界的LLMs。具体而言,与BetterV相比,AutoVCoder在EvalMachine和EvalHuman基准上的功能正确性分别提高了0.5%和2.2%,并且在RTLLM基准上与RTLCoder相比,语法正确性提高了3.4%,功能正确性也提高了3.4%。

英文摘要:

Recently, the use of large language models (LLMs) for software code generation, e.g., C/C++ and Python, has proven a great success. However, LLMs still suffer from low syntactic and functional correctness when it comes to the generation of register-transfer level (RTL) code, such as Verilog. To address this issue, in this paper, we develop AutoVCoder, a systematic open-source framework that significantly improves the LLMs' correctness of generating Verilog code and enhances the quality of its output at the same time. Our framework integrates three novel techniques, including a high-quality hardware dataset generation approach, a two-round LLM fine-tuning method and a domain-specific retrieval-augmented generation (RAG) mechanism. Experimental results demonstrate that AutoVCoder outperforms both industrial and academic LLMs in Verilog code generation. Specifically, AutoVCoder shows a 0.5% and 2.2% improvement in functional correctness on the EvalMachine and EvalHuman benchmarks compared with BetterV, and also achieves a 3.4% increase in syntax correctness and a 3.4% increase in functional correctness on the RTLLM benchmark compared with RTLCoder.

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

↑