BetterV: Controlled Verilog Generation with Discriminative Guidance

Zehua Pei, Hui-Ling Zhen, M. Yuan, Yu Huang, Bei Yu

arXiv:2402.03375 · 2026-07-27 공개 · arXiv · PDF

instruction-tuning llm-finetuning eda verilog-generation generative-discriminator verilogeval synthesis-optimization sat-solving

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.

한국어 요약

한 줄 요약

BetterV는 생성적 판별기를 결합한 지도 학습을 통해 Verilog 생성 성능을 향상시키는 프레임워크로, GPT-4보다 VerilogEval 벤치마크에서 우수한 결과를 보인다.

핵심 기여도

핵심 아이디어

BetterV는 EDA에서의 Verilog 생성 문제를 해결하기 위해 **LLM을 도메인 특화 데이터셋에 fine-tuning**하고, **생성적 판별기**를 통해 특정 최적화 목표를 반영하는 지도 학습을 결합한 프레임워크이다. 기존 연구는 데이터셋 선택에 집중했으나, BetterV는 **Verilog 구문 및 기능적 정확도**를 모델 학습 과정에서 직접 통합한다. 또한, **C 프로그램과의 정렬**을 통해 LLM이 Verilog를 효과적으로 이해하도록 돕는다.

이 프레임워크는 **다운스트림 EDA 작업**(예: 합성, 검증)의 성능을 고려하여 Verilog 구현을 최적화하도록 설계되었다. 이는 **Bayes rule 기반의 생성-판별적 손실 함수**(hybrid generative-discriminative loss)를 통해 LLM이 자연어 입력으로부터 직접 Verilog를 생성하거나 수정하도록 유도한다.

기술적 접근법

주요 결과

의의 및 한계

BetterV는 EDA에서의 Verilog 생성 문제를 해결하는 **새로운 연구 방향**을 제시하며, **LLM의 도메인 적응성**과 **다운스트림 최적화**를 동시에 고려한 첫 번째 시도이다. 특히, **task-specific generative discriminator**를 도입함으로써 산업적 생산 과정에서의 **반복 횟수 감소**에 기여할 수 있다.

그러나, **구체적인 수치**(예: 노드 감소율, SAT solving 시간 감소율)는 명시되지 않았으며, **모델의 확장성**이나 **다른 HDL 언어**(예: VHDL)에 대한 적용 가능성도 명시되지 않았다. 또한, **데이터셋의 편향 가능성**이나 **모델의 일반화 능력**에 대한 평가도 추가 연구가 필요하다.

실용적 활용

BetterV는 **반도체 설계 업계**에서 **자동화된 Verilog 생성** 및 **검증 과정 최적화**에 활용될 수 있다. 또한, **EDA 툴 개발자**나 **하드웨어 설계 엔지니어**가 복잡한 회로 설계를 효율적으로 수행할 수 있도록 지원하며, **AI 기반 설계 자동화** 분야의 발전에 기여할 수 있다.