ChatPaper.aiChatPaper

Spec2RTL-Agent: LLMエージェントシステムを用いた複雑な仕様からの自動ハードウェアコード生成

Spec2RTL-Agent: Automated Hardware Code Generation from Complex Specifications Using LLM Agent Systems

June 16, 2025
著者: Zhongzhi Yu, Mingjie Liu, Michael Zimmer, Yingyan Celine Lin, Yong Liu, Haoxing Ren
cs.AI

要旨

LLMを用いたハードウェアRTLコード生成における最近の進展にもかかわらず、既存のソリューションは、実用的なアプリケーションシナリオと現実世界のRTLコード開発の要件との間に依然として大きな隔たりを抱えている。従来のアプローチは、過度に単純化されたハードウェア記述に焦点を当てるか、複雑な仕様を処理するために広範な人間のガイダンスに依存しており、そのスケーラビリティと自動化の可能性を制限している。本論文では、この隔たりを埋めるために、複雑な仕様ドキュメントを直接処理し、対応するRTLコード実装を生成するように設計されたLLMエージェントシステム「Spec2RTL-Agent」を提案し、LLMベースのRTLコード生成をより現実的なアプリケーション設定に向けて前進させる。この目標を達成するために、Spec2RTL-Agentは、以下の3つの主要な要素を統合した新しいマルチエージェント協調フレームワークを導入する:(1) 仕様を構造化された段階的な実装計画に変換する推論と理解モジュール、(2) 複数の表現にわたってコードを反復的に洗練し、RTL変換のための正確性と合成可能性を向上させる漸進的コーディングとプロンプト最適化モジュール、(3) 生成中のエラーの原因を特定し追跡する適応的リフレクションモジュール。自然言語から直接RTLを生成する代わりに、本システムは戦略的に合成可能なC++コードを生成し、それをHLS向けに最適化する。このエージェント駆動の洗練により、単純な直接RTL生成アプローチと比較して、より高い正確性と互換性が確保される。Spec2RTL-Agentを3つの仕様ドキュメントで評価し、既存の方法と比較して最大75%少ない人間の介入で正確なRTLコードを生成することを示す。これは、非構造化仕様からのRTL生成において、ハードウェア設計における人間の努力への依存を軽減する初の完全自動化されたマルチエージェントシステムとしての役割を強調している。
English
Despite recent progress in generating hardware RTL code with LLMs, existing solutions still suffer from a substantial gap between practical application scenarios and the requirements of real-world RTL code development. Prior approaches either focus on overly simplified hardware descriptions or depend on extensive human guidance to process complex specifications, limiting their scalability and automation potential. In this paper, we address this gap by proposing an LLM agent system, termed Spec2RTL-Agent, designed to directly process complex specification documentation and generate corresponding RTL code implementations, advancing LLM-based RTL code generation toward more realistic application settings. To achieve this goal, Spec2RTL-Agent introduces a novel multi-agent collaboration framework that integrates three key enablers: (1) a reasoning and understanding module that translates specifications into structured, step-by-step implementation plans; (2) a progressive coding and prompt optimization module that iteratively refines the code across multiple representations to enhance correctness and synthesisability for RTL conversion; and (3) an adaptive reflection module that identifies and traces the source of errors during generation, ensuring a more robust code generation flow. Instead of directly generating RTL from natural language, our system strategically generates synthesizable C++ code, which is then optimized for HLS. This agent-driven refinement ensures greater correctness and compatibility compared to naive direct RTL generation approaches. We evaluate Spec2RTL-Agent on three specification documents, showing it generates accurate RTL code with up to 75% fewer human interventions than existing methods. This highlights its role as the first fully automated multi-agent system for RTL generation from unstructured specs, reducing reliance on human effort in hardware design.
PDF22June 24, 2025