arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.16543cs.AR
收藏

RTLFixer:利用大语言模型自动修复RTL语法错误

RTLFixer: Automatically Fixing RTL Syntax Errors with Large Language Models

Yun-Da Tsai, Mingjie Liu, Haoxing Ren

AI总结:

针对大语言模型生成的Verilog代码语法错误率高的问题,提出结合RAG与ReAct提示的RTLFixer框架,让LLM自主交互式调试,大幅提升语法错误修复率与基准测试通过率。

摘要:

本文提出了RTLFixer,这是一种借助大语言模型(LLMs)自动修复Verilog代码语法错误的新型框架。尽管LLM展现出可观的能力,但我们的分析表明,LLM生成的Verilog代码中约55%的错误与语法相关,会导致编译失败。为解决该问题,我们提出了一种新型调试框架,该框架采用检索增强生成(RAG)和ReAct提示技术,让LLM作为自主智能体,结合反馈交互式调试代码。该框架在解决语法错误上表现出色,在我们的调试数据集(包含源自VerilogEval基准的212个错误实现)中,成功修复了约98.5%的编译错误。我们的方法使VerilogEval-Machine和VerilogEval-Human基准的pass@1成功率分别提升了32.3%和10.1%。

英文摘要:

This paper presents RTLFixer, a novel framework enabling automatic syntax errors fixing for Verilog code with Large Language Models (LLMs). Despite LLM's promising capabilities, our analysis indicates that approximately 55% of errors in LLM-generated Verilog are syntax-related, leading to compilation failures. To tackle this issue, we introduce a novel debugging framework that employs Retrieval-Augmented Generation (RAG) and ReAct prompting, enabling LLMs to act as autonomous agents in interactively debugging the code with feedback. This framework demonstrates exceptional proficiency in resolving syntax errors, successfully correcting about 98.5% of compilation errors in our debugging dataset, comprising 212 erroneous implementations derived from the VerilogEval benchmark. Our method leads to 32.3% and 10.1% increase in pass@1 success rates in the VerilogEval-Machine and VerilogEval-Human benchmarks, respectively.

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

↑