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 코드 구현을 생성하도록 설계된 Spec2RTL-Agent라는 LLM 에이전트 시스템을 제안함으로써 LLM 기반 RTL 코드 생성을 보다 현실적인 응용 환경으로 발전시킨다. 이를 달성하기 위해 Spec2RTL-Agent는 세 가지 핵심 요소를 통합한 새로운 다중 에이전트 협업 프레임워크를 도입한다: (1) 명세서를 구조화된 단계별 구현 계획으로 변환하는 추론 및 이해 모듈, (2) RTL 변환을 위한 정확성과 합성 가능성을 향상시키기 위해 다중 표현에 걸쳐 코드를 반복적으로 개선하는 점진적 코딩 및 프롬프트 최적화 모듈, (3) 생성 과정에서 오류의 원인을 식별하고 추적하여 보다 견고한 코드 생성 흐름을 보장하는 적응형 반성 모듈. 자연어에서 직접 RTL을 생성하는 대신, 본 시스템은 합성 가능한 C++ 코드를 전략적으로 생성한 후 HLS를 위해 최적화한다. 이 에이전트 주도적 개선은 단순한 직접 RTL 생성 접근법에 비해 더 큰 정확성과 호환성을 보장한다. 우리는 Spec2RTL-Agent를 세 가지 명세서 문서에 대해 평가하여, 기존 방법 대비 최대 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.