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)|Aug 15, 2024
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コード生成を促進する。
  • 信号と遷移の詳細を含むサブタスクを生成する、Task and Circuit Relation Graph (TCRG) ベースのプランナーを開発する。
  • Verilog 生成時に機能的エラーを診断・修正するための AST ベースの波形追跡ツールを統合する。
  • ReAct プロンプティングと Verilog ツーリングを用いて、複数の AI エージェント(計画、コーディング、デバッグ)の協働を可能にする。
  • Planと AST-WT の要素による改善を定量化するため、VerilogEval-Human v2 でアブレーション研究によって評価する。

提案手法

  • Verilog コーディングとデバッグのためのマルチAIエージェントフレームワークを導入する。
  • 信号と遷移情報を含むサブタスクを生成するための TCRG ベースのタスクプランナーを開発する。
  • Verilog ASTs(Pyverilog)を用いて不一致の波形を逆追跡する AST ベースの波形追跡ツール(AST-WT)を作成する。
  • 構文正しいコード生成のために、2段の LLM コードパスを使用する:Verilog Engineer と Verilog Verification Assistant。
  • Verilogシミュレータと AST-WT を用いたデバッグエージェントでテストベンチに対する機能性を検証する。
  • ツール(iverilog、波形追跡、シミュレータ)を調整するための Thought-Action-Observation 推論を活用して ReAct プロンプティングを活用する。
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 コーディングの機能的正確性は向上するか?
  • RQ3Verilog 生成における構文および機能的正確性に対するマルチAIエージェントアーキテクチャの影響はどれほどか?
  • 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% 上回る。
  • アブレーションでは、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が作成し、人間の編集者が確認しました。