VFlow: Discovering Optimal Agentic Workflows for Verilog Generation

📅 2025-03-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address the low efficiency of generating high-quality Verilog code in hardware design automation, this paper proposes the first framework integrating Monte Carlo Tree Search (MCTS) into workflow optimization to dynamically search for optimal large language model (LLM) invocation sequences. Building upon AFLOW, we extend it with hardware-specific operators and embed a closed-loop feedback system comprising Verilog syntax checking, RTL simulation validation, and logic synthesis. This enables domain-adaptive workflow orchestration. Experimental results on the VerilogEval benchmark show a pass@1 accuracy of 83.6%, outperforming PromptV by 6.1% and direct LLM invocation by 36.9%. Moreover, our method boosts DeepSeek-V3’s performance beyond GPT-4o by 141.2%, while reducing API cost to only 13% of GPT-4o’s.

Technology Category

Application Category

📝 Abstract
Hardware design automation faces challenges in generating high-quality Verilog code efficiently. This paper introduces VFlow, an automated framework that optimizes agentic workflows for Verilog code generation. Unlike existing approaches that rely on pre-defined prompting strategies, VFlow leverages Monte Carlo Tree Search (MCTS) to discover effective sequences of Large Language Models invocations that maximize code quality while minimizing computational costs. VFlow extends the AFLOW methodology with domain-specific operators addressing hardware design requirements, including syntax validation, simulation-based verification, and synthesis optimization. Experimental evaluation on the VerilogEval benchmark demonstrates VFlow's superiority, achieving an 83.6% average pass@1 rate-a 6.1% improvement over state-of-the-art PromptV and a 36.9% gain compared to direct LLM invocation. Most significantly, VFlow enhances the capabilities of smaller models, enabling DeepSeek-V3 to achieve 141.2% of GPT-4o's performance while reducing API costs to just 13%. These findings indicate that intelligently optimized workflows enable cost-efficient LLMs to outperform larger models on hardware design tasks, potentially democratizing access to advanced digital circuit development tools and accelerating innovation in the semiconductor industry
Problem

Research questions and friction points this paper is trying to address.

Optimizing agentic workflows for efficient Verilog code generation
Enhancing code quality while minimizing computational costs
Democratizing access to advanced hardware design tools
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses Monte Carlo Tree Search for optimal LLM sequences
Extends AFLOW with hardware-specific validation operators
Enables smaller models to outperform larger ones cost-effectively
Y
Yangbo Wei
Shanghai Jiao Tong University, Shanghai, China; Ningbo Institute of Digital Twin, Eastern Institute of Technology, Ningbo, China
Z
Zhen Huang
Ningbo Institute of Digital Twin, Eastern Institute of Technology, Ningbo, China; University of Science and Technology of China, Hefei, China
Huang Li
Huang Li
Shanghai Jiao Tong University, Shanghai, China; Ningbo Institute of Digital Twin, Eastern Institute of Technology, Ningbo, China
Wei W. Xing
Wei W. Xing
The University of Sheffield
Bayesian optimizationElectronic design automation (EDA)AI4EDAmachine learning
T
Ting-Jung Lin
Ningbo Institute of Digital Twin, Eastern Institute of Technology, Ningbo, China
L
Lei He
Ningbo Institute of Digital Twin, Eastern Institute of Technology, Ningbo, China; University of California, Los Angeles