arXiv:2412.07822cs.ARcs.LG2024-12被引 39

MAGE用多智能体系统自动生成高正确率的Verilog代码,提升芯片设计效率。

MAGE: A Multi-Agent Engine for Automated RTL Code Generation

  • 采用多智能体协作与高温采样策略,提升代码候选质量。
  • 通过状态检查点机制提前发现功能错误,正确率达95.7%。
  • 适合芯片设计自动化、AI辅助硬件开发人员使用。

随着大语言模型的发展,通过自然语言指令自动生成RTL代码(如Verilog)成为有前景的方向。然而,生成语法和功能均正确的RTL代码仍面临重大挑战。现有单智能体方法因需处理多种编程语言及复杂生成、验证与修改任务而受限。本文提出MAGE,首个开源的多智能体AI系统,用于鲁棒且准确的Verilog RTL代码生成。我们设计了一种新颖的高温RTL候选采样与调试系统,有效探索代码候选空间,显著提升候选质量。此外,提出一种新型Verilog状态检查点机制,可早期检测功能错误并提供精准反馈,显著提高生成代码的功能正确性。在VerilogEval-Human 2基准测试中,MAGE实现95.7%的语法与功能正确率,超越SOTA Claude-3.5-sonnet 23.3%,展现出可靠的AI驱动式RTL设计流程。

原文摘要 · Abstract (English)

The automatic generation of RTL code (e.g., Verilog) through natural language instructions has emerged as a promising direction with the advancement of large language models (LLMs). However, producing RTL code that is both syntactically and functionally correct remains a significant challenge. Existing single-LLM-agent approaches face substantial limitations because they must navigate between various programming languages and handle intricate generation, verification, and modification tasks. To address these challenges, this paper introduces MAGE, the first open-source multi-agent AI system designed for robust and accurate Verilog RTL code generation. We propose a novel high-temperature RTL candidate sampling and debugging system that effectively explores the space of code candidates and significantly improves the quality of the candidates. Furthermore, we design a novel Verilog-state checkpoint checking mechanism that enables early detection of functional errors and delivers precise feedback for targeted fixes, significantly enhancing the functional correctness of the generated RTL code. MAGE achieves a 95.7% rate of syntactic and functional correctness code generation on VerilogEval-Human 2 benchmark, surpassing the state-of-the-art Claude-3.5-sonnet by 23.3 %, demonstrating a robust and reliable approach for AI-driven RTL design workflows.

硬件生成多智能体VerilogLLM应用

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