Skip to main content
QUICK REVIEW

[論文レビュー] BetterV: Controlled Verilog Generation with Discriminative Guidance

Z. F. Pei, Hui‐Ling Zhen|arXiv (Cornell University)|Feb 3, 2024
Human Pose and Action Recognition被引用数 9
ひとこと要約

BetterV は7B LLM をドメイン特化の Verilog データでファインチューニングし、生成判別器を用いて downstream EDA タスクの生成を誘導することで、VerilogEval-machine での Verilog 正確性を最先端に達成し、合成と検証タスクの改善を実現する。

ABSTRACT

Due to the growing complexity of modern Integrated Circuits (ICs), there is a need for automated circuit design methods. Recent years have seen rising research in hardware design language generation to facilitate the design process. In this work, we propose a Verilog generation framework, BetterV, which fine-tunes the large language models (LLMs) on processed domain-specific datasets and incorporates generative discriminators for guidance on particular design demands. The Verilog modules are collected, filtered and processed from internet to form a clean and abundant dataset. Instruct-tuning methods are specially designed to fine-tune the LLMs to understand the knowledge about Verilog. Furthermore, data are augmented to enrich the training set and also used to train a generative discriminator on particular downstream task, which leads a guidance for the LLMs to optimize the Verilog implementation. BetterV has the ability to generate syntactically and functionally correct Verilog, which can outperform GPT-4 on the VerilogEval benchmark. With the help of task-specific generative discriminator, BetterV can achieve remarkable improvement on various electronic design automation (EDA) downstream tasks, including the netlist node reduction for synthesis and verification runtime reduction with Boolean Satisfiability (SAT) solving.

研究の動機と目的

  • 現代のIC設計の複雑さに対処する自動 Verilog 生成を促進し、HDL コーディングにおける人間の労力を削減する。
  • LLM に Verilog の概念を教えるドメイン特化の指示チューニングパイプラインを開発し、煩雑なプロンプト工学を回避する。
  • データ拡張と生成的な判別器を導入し、LLM を downstream EDA の目的に導く。
  • 機能的正確性、構文的正確性、合成ノード削減、および検証実行時間の観点で BetterV を評価する。
  • BetterV が VerilogEval-machine ベンチマークでベースラインモデルを上回り、下流タスクを改善できることを示す。

提案手法

  • オープンソースソースから Verilog データを収集・整形し、モジュール定義と本体を含むクリーンな Verilog/Verilog-C データセットを形成する。
  • V2C ツールを用いた Verilog 自動補完と Verilog-to-C/C-to-Verilog 変換を教えるドメイン特化の指示チューニングを適用する。
  • 高温サンプリングで多様な Verilog を生成してデータを拡張し、EDA ツールで構文正確性をフィルタする。
  • タスク固有の属性に基づく生成的判別器を訓練し、Bayes ルールに guided な加重デコーディングを用いて望ましい性質へ LL M の生成を誘導する。
  • 生成的目的と識別的目的を組み合わせたハイブリッド損失で LLM と判別器を更新する。
  • 機能的正確性、構文的正確性、合成ノード削減、SAT-verify-time の削減を含む複数の EDA 下流タスクを評価する。

実験結果

リサーチクエスチョン

  • RQ1ドメイン特化の指示チューニングは、 Extensive prompt engineering なしで Verilog の理解と自動補完を可能にするか。
  • RQ2タスク特異的な生成的判別器は下流 EDA タスクのための Verilog 生成品質を改善するか。
  • RQ3BetterV はベースラインと比較して機能的正確性、合成効率、検証時間をどの程度改善できるか。

主な発見

モデルVerilogEval-machine pass@1VerilogEval-machine pass@5VerilogEval-machine pass@10VerilogEval-human pass@1VerilogEval-human pass@5VerilogEval-human pass@10
GPT-3.546.769.174.126.745.851.7
GPT-460.070.673.543.555.858.9
CodeLlama43.147.147.718.222.724.3
VerilogEval46.267.373.728.845.952.3
ChipNeMo43.4--22.4--
RTLCoder62.5--36.7--
BetterV64.275.479.140.950.053.3
  • BetterV は VerilogEval-machine で最先端の性能を達成し、pass@1、pass@5、pass@10 で GPT-4 を上回る。
  • 判別器ガイダンス付き生成は、ベースの BetterV モデルと CodeLlama の機能的・構文的正確性をさらに向上させる。
  • BetterV は平均 46.52% の reference に対する削減、および 31.68% の BetterV-base に対する削減という substantial な合成ノード削減を示す。
  • BetterV は reference に対して最大 22.45% 、BetterV-base に対しては 13.99% の検証 SAT 解決時間の削減を実現する。
  • 構文的正確性全体で、判別器付き BetterV は very high pass@10 (>99%) を達成し、生成 Verilog の構文的妥当性が高いことを示す。
  • このアプローチは、判別器を特定のハードウェア/設計者要件に合わせて調整することで下流タスクへ一般化する。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。