Skip to main content
QUICK REVIEW

[논문 리뷰] VerilogCoder: Autonomous Verilog Coding Agents with Graph-based Planning and Abstract Syntax Tree (AST)-based Waveform Tracing Tool

Chia-Tung Ho, Haoxing Ren|arXiv (Cornell University)|2024. 08. 15.
Algorithms and Data Compression인용 수 5
한 줄 요약

VerilogCoder는 TCRG 작업 계획자와 AST 기반 파형 추적을 이용한 다중 에이전트 프레임워크로 Verilog 코드를 자율적으로 생성하고 문법 및 기능 오류를 수정하며 VerilogEval-Human v2에서 높은 합격률을 달성합니다.

ABSTRACT

Due to the growing complexity of modern Integrated Circuits (ICs), automating hardware design can prevent a significant amount of human error from the engineering process and result in less errors. Verilog is a popular hardware description language for designing and modeling digital systems; thus, Verilog generation is one of the emerging areas of research to facilitate the design process. In this work, we propose VerilogCoder, a system of multiple Artificial Intelligence (AI) agents for Verilog code generation, to autonomously write Verilog code and fix syntax and functional errors using collaborative Verilog tools (i.e., syntax checker, simulator, and waveform tracer). Firstly, we propose a task planner that utilizes a novel Task and Circuit Relation Graph retrieval method to construct a holistic plan based on module descriptions. To debug and fix functional errors, we develop a novel and efficient abstract syntax tree (AST)-based waveform tracing tool, which is integrated within the autonomous Verilog completion flow. The proposed methodology successfully generates 94.2% syntactically and functionally correct Verilog code, surpassing the state-of-the-art methods by 33.9% on the VerilogEval-Human v2 benchmark.

연구 동기 및 목표

  • 복잡한 IC의 설계 시간과 인간 실수를 줄이기 위한 자동 Verilog 코드 생성의 동기 부여.
  • signal 및 전이 세부정보를 포함한 하위 작업을 생성하기 위해 Task and Circuit Relation Graph (TCRG) 기반 플래너 개발.
  • Verilog 생성 중 기능적 오류를 진단하고 수정하기 위한 AST 기반 파형 추적 도구(AST-WT) 통합.
  • ReAct 프롬프트와 Verilog 도구를 사용한 다중 AI 에이전트(계획, 코딩, 디버깅) 간의 협업 Enable.
  • 계획 및 AST-WT 구성 요소로부터의 개선을 정량화하기 위해 VerilogEval-Human v2에서의 파단 연구를 통해 평가

제안 방법

  • Verilog 코딩 및 디버깅을 위한 다 AI 에이전트 프레임워크 도입.
  • Signal 및 전이 정보를 포함한 하위 작업을 생성하기 위한 Task and Circuit Relation Graph (TCRG) 기반 작업 플래너 개발.
  • Verilog AST를 기반으로 한 파형 추적 도구(AST-WT)를 만들어 Verilog AST(Pyverilog)를 통한 불일치 파형의 역추적.
  • 문법적으로 올바른 코드를 생성하기 위한 두 가지 LLM 경로: Verilog Engineer와 Verilog Verification Assistant 사용.
  • 테스트벤치에 대한 기능 검증을 지원하는 Verilog 시뮬레이터와 AST-WT를 활용한 디버그 에이전트 사용.
  • Thought-Action-Observation 추론을 위한 ReAct 프롬프트를 활용해 도구(iverilog, 파형 추적, 시뮬레이터) 협업를 조정
Figure 1: Illustrations of (A) traditional LLM planning versus TCRG based planning, and (B) human Verilog designer debugging process and AST signal back tracing in Motivation and Preliminary Study section.
Figure 1: Illustrations of (A) traditional LLM planning versus TCRG based planning, and (B) human Verilog designer debugging process and AST signal back tracing in Motivation and Preliminary Study section.

실험 결과

연구 질문

  • RQ1그래프 기반의 작업 플래너(TCRG)가 전통적 계획에 비해 Verilog 코드 생성을 위한 하위 작업 품질을 향상시킬 수 있는가?
  • RQ2AST 기반 파형 추적 도구의 통합이 자율 Verilog 코딩의 기능적 정확도를 향상시키는가?
  • RQ3다중 AI 에이전트 아키텍처가 Verilog 생성의 문법적 및 기능적 정확도에 미치는 영향은?
  • RQ4제안된 VerilogCoder가 기존 LLM 접근법과 비교하여 VerilogEval-Human v2 벤치마크에서 어떻게 성능을 보이는가?

주요 결과

방법모델 크기모델 유형패스 비율 (%)
RTL-Coder6.7BOpen36.5
DeepSeek Coder6.7BOpen28.2
CodeGemma7BOpen23.1
DeepSeek Coder33BOpen37.2
CodeLlama70BOpen41.0
Llama370BOpen41.7
Mistral LargeUndisclosedClosed48.7
GPT-4UndisclosedClosed50.6
GPT-4 TurboUndisclosedClosed60.3
VerilogCoder (Llama3)70BOpen67.3
VerilogCoder (GPT-4 Turbo)UndisclosedClosed94.2
  • VerilogCoder는 VerilogEval-Human v2에서 문법 및 기능적 정확도에 대해 94.2%의 합격률을 달성하여 최첨단 대비 33.9%를 상회합니다.
  • ABLATION은 TCRG 기반 플래너와 AST-WT가 가장 큰 이득을 가져오며, AST-WT가 특정 작업 카테고리에서 11.5%의 향상을 기여합니다.
  • 비에이전트 벤치마크와 비교할 때 VerilogCoder은 조합 논리 및 FSM 관련 작업에서 상당한 개선을 보입니다(K-map, 전이 테이블 등).
  • GPT-4 Turbo 기반 VerilogCoder가 94.2%의 합격률을 달성하는 반면, 같은 벤치마크에서 Llama3 기반 VerilogCoder는 67.3%에 도달합니다.
  • 평균 상호작용 지표는 메시징이 다소 있지만 실질적인 의미를 가진 수치를 보이며(1.58회의 고수준 플래너 라운드, 1.09회의 TCRG 검색 라운드; 코드 에이전트 ~2.37회의 시뮬레이터 호출 및 1.37회의 AST-WT 호출).
Figure 2: Flow overview of VerilogCoder. (a) Overall flow of VerilogCoder for Verilog code completion task. (b) LLM roles of multi-LLM agents in VerilogCoder. (c) Multi-LLM agents for steps in task planning. (d) Multi-LLM Agents for sub-tasks in Verilog Code Implementation.
Figure 2: Flow overview of VerilogCoder. (a) Overall flow of VerilogCoder for Verilog code completion task. (b) LLM roles of multi-LLM agents in VerilogCoder. (c) Multi-LLM agents for steps in task planning. (d) Multi-LLM Agents for sub-tasks in Verilog Code Implementation.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.