AutoChip:使用 LLM 反馈自动化 HDL 生成
AutoChip: Automating HDL Generation Using LLM Feedback
AI总结:
本文提出 AutoChip,结合 LLM 交互与 Verilog 仿真反馈实现 HDL 自动生成,实验证明引入编译器上下文使生成准确率提升 24.20%。
摘要:
传统上,设计使用 Verilog 硬件描述语言(HDL)编写,并由硬件工程师进行调试。虽然这种方法有效,但对于复杂设计而言,它既耗时又容易出错。大型语言模型(LLMs)在自动化 HDL 代码生成方面具有广阔前景。LLMs 在海量文本和代码数据集上进行训练,能够学习生成可编译且功能准确的代码。我们旨在评估 LLMs 生成功能正确的 HDL 模型的能力。我们通过结合 LLMs 的交互能力和 Verilog 仿真的输出,构建了 AutoChip 来生成 Verilog 模块。我们从一个模块的设计提示以及来自编译错误和调试消息的上下文开始,这些上下文突出了预期输出与实际输出之间的差异。这确保了无需人工干预即可生成准确的 Verilog 代码。我们使用来自 HDLBits 的问题集对 AutoChip 进行了评估。我们使用多个 LLMs 和问题类别对 AutoChip 进行了全面分析。结果表明,结合来自编译器工具(如 Icarus Verilog)的上下文可提高有效性,生成准确度提高 24.20% 的 Verilog。我们在以下链接开源了我们的评估脚本和数据集:https://github.com/shailja-thakur/AutoChip。
英文摘要:
Traditionally, designs are written in Verilog hardware description language (HDL) and debugged by hardware engineers. While this approach is effective, it is time-consuming and error-prone for complex designs. Large language models (LLMs) are promising in automating HDL code generation. LLMs are trained on massive datasets of text and code, and they can learn to generate code that compiles and is functionally accurate. We aim to evaluate the ability of LLMs to generate functionally correct HDL models. We build AutoChip by combining the interactive capabilities of LLMs and the output from Verilog simulations to generate Verilog modules. We start with a design prompt for a module and the context from compilation errors and debugging messages, which highlight differences between the expected and actual outputs. This ensures that accurate Verilog code can be generated without human intervention. We evaluate AutoChip using problem sets from HDLBits. We conduct a comprehensive analysis of the AutoChip using several LLMs and problem categories. The results show that incorporating context from compiler tools, such as Icarus Verilog, improves the effectiveness, yielding 24.20% more accurate Verilog. We release our evaluation scripts and datasets as open-source contributions at the following link https://github.com/shailja-thakur/AutoChip.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。