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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhao, Yujie, Zhang, Hejia, Huang, Hanxian, Yu, Zhongming, Zhao, Jishen
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910739066781696
author Zhao, Yujie
Zhang, Hejia
Huang, Hanxian
Yu, Zhongming
Zhao, Jishen
author_facet Zhao, Yujie
Zhang, Hejia
Huang, Hanxian
Yu, Zhongming
Zhao, Jishen
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2412_07822
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle MAGE: A Multi-Agent Engine for Automated RTL Code Generation
Zhao, Yujie
Zhang, Hejia
Huang, Hanxian
Yu, Zhongming
Zhao, Jishen
Hardware Architecture
Machine Learning
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.
title MAGE: A Multi-Agent Engine for Automated RTL Code Generation
topic Hardware Architecture
Machine Learning
url https://arxiv.org/abs/2412.07822