atlas

Research map / Large language models / Agents, code and math

BetterV: Controlled Verilog Generation with Discriminative Guidance

ICML 2024 · Large language models › Agents, code and math · approach: LLMs for optimization and heuristics · 9 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Fine-tunes code LLMs on processed Verilog data with C-alignment instruct-tuning and guides generation with task-specific generative discriminators (GeDi-style Bayes-rule decoding) for functional, syntactic, synthesis-size and SAT-runtime objectives.

Problem

LLMs for Verilog generation lack domain knowledge and scarce Verilog data, and they do not optimize downstream EDA objectives (synthesis netlist size, formal verification runtime) or functional/syntactic correctness during generation.

Approach

Instruct-tune LLMs on Verilog-C translation pairs and Verilog definition-body completion, augment data with the fine-tuned model filtered by Yosys, and train a small generative discriminator (control and anti-control codes) whose Bayes-rule guidance steers decoding toward task-specific desired Verilog attributes.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
fine-tune CodeQwen1.5-7B-Chat with BetterVCodeQwen1.5-7B-Chat · VerilogEval-machinepass@1: 68.1 vs 62.5Helped
fine-tune CodeQwen1.5-7B-Chat with BetterVCodeQwen1.5-7B-Chat · VerilogEval-humanpass@1: 46.1 vs 43.5Helped
add discriminator guidance (ablation)CodeLlama-7B-Instruct · VerilogEval-humanfunctional correctness pass@1: 18.2 -> 20.3Helped
add discriminator guidance (ablation)BetterV-CodeL llama-base · VerilogEval-humanfunctional correctness pass@1: 40.0 -> 40.9Helped
add discriminator guidance (ablation)CodeLlama-7B-Instruct · VerilogEval-humansyntactic correctness pass@1: 41.5 -> 49.1Helped
add discriminator guidance (ablation)BetterV-CodeLlama-base · VerilogEval-humansyntactic correctness pass@1: 82.6 -> 87.1Helped
add synthesis-node discriminator guidanceBetterV-base · VerilogEval-human selected problemssynthesized netlist nodes: 31.68% less nodes than BetterV-baseHelped
add SAT-runtime discriminator guidanceBetterV-base · ANSI-C benchmarksSAT verification runtime: 13.99% in time compared with BetterV-baseHelped

Surprising findings

Limitations

Experimental setup

Datasets: VerilogEval GitHub Verilog/SystemVerilog repositories ANSI-C benchmarks

Benchmarks: VerilogEval-machine VerilogEval-human ANSI-C benchmarks (SAT runtime)

Metrics: pass@1 pass@5 pass@10 AIG node count SAT solving time

Baselines: GPT-3.5 GPT-4 CodeLlama-7B-Instruct DeepSeek-Coder-6.7b-Instruct CodeQwen1.5-7B-Chat ChipNeMo Thakur et al. VerilogEval RTLCoder

Builds on: GeDi PPLM DeepSpeed-Chat LoRA VerilogEval

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy