VFlow: Discovering Optimal Agentic Workflows for Verilog Generation
Yangbo Wei 1,2 , Zhen Huang 3,2 , Huang Li 1,2 , Wei W. Xing 4 , Ting-Jung Lin 2 , Lei He ∗2 · 2025
Read VFlow: Discovering Optimal Agentic Workflows for Verilog Generation by Yangbo Wei 1,2 , Zhen Huang 3,2 , Huang Li 1,2 , Wei W. Xing 4 , Ting-Jung Lin 2 , Lei He ∗2 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-03723.txt.
Introduction
Yangbo Wei and co-authors let an algorithm design its own chip-design workflow in a 2025 computing paper. Writing Verilog hardware code with language models works better when several model calls are chained, but hand-built chains vary in quality. Their framework, VFlow, treats the workflow as a graph to be searched. An evolution-guided tree search balances correctness, chip area, power, timing, and token cost at once, sharing winning patterns between populations.
Multi-level checks verify syntax, function, and whether the code can be built as a chip. On two benchmarks, success rates rose twenty to thirty percent over prompt baselines, nearing human designer quality on area and power. Small models inside a smart workflow even beat large models working alone.
Catalog record
| CREATOR | Yangbo Wei 1,2 , Zhen Huang 3,2 , Huang Li 1,2 , Wei W. Xing 4 , Ting-Jung Lin 2 , Lei He ∗2 |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 29 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-03723
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
VFlow: Discovering Optimal Agentic Workflows for Verilog Generation Yangbo Wei 1,2 , Zhen Huang 3,2 , Huang Li 1,2 , Wei W. Xing 4 , Ting-Jung Lin 2 , Lei He ∗2 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 traditional approaches relying on fixed prompts or manually designed flows, VFlow treats workflow discovery as a search over graph-structured LLM invocation sequences. It introduces a multi-population cooperative evolution (CEPE-MCTS) algorithm that balances multiple hardware objectives—functional correctness, area, power, timing and token cost—while sharing successful patterns and avoiding repeated failures. Integrated multi-level verification ensures syntactic correctness, functional behavior, and synthesizability. Experiments on VerilogEval and RTLLM2.0 show VFlow improves pass@1 by 20–30% over prompting baselines and closely matches designer-level area/power. Remarkably, VFlow enables small LLMs to outperform larger models with up to 10.9× ROI, offering a cost-effective solution for RTL design. This work paves the way for intelligent, automated hardware development, advancing LLM applications in EDA. I Introduction Recent advances in Large Language Models (LLMs) have demonstrated remarkable potential for Verilog code generation. Existing research such as VerilogEval and RTLLM series [ 1 , 2 ] has not only provided standardized benchmarks for evaluating LLMs’ ability to generate RTL code but also promoted the automated generation of complex modules ranging from combinational circuits to finite state machines. Meanwhile, methods such as VeriSeek, RTLCoder, and CodeV [ 3 , 4 , 5 ] have enhanced models’ adaptability to HDL syntax structures and parallel characteristics through reinforcement learning, structured fine-tuning, and reinforcement feedback mechanisms, respectively. Although these methods have further improved the accuracy and generalization capability of Verilog generation, most rely on limited prompt engineering or manually designed multi-stage workflows , making it difficult to efficiently explore the design space or integrate with hardware verification processes. In contrast, agent-driven automated workflow optimization frameworks (such as AFlow) [ 6 ] represent LLM-driven processes as graph structures and apply MCTS to achieve task-generic optimization. However, these approaches have not yet fully incorporated the structured requirements of hardware design and synthesis verification paths . Fig. 1: Comparison of Vflow with traditional methods. To address these challenges, this paper proposes VFlow , an automated agent workflow optimization framework specifically designed for Verilog code generation tasks. Unlike traditional methods as shown in Figure 1 , VFlow reformulates the workflow optimization problem as a search task on a graph of LLM nodes with code-based representations, employing a Cooperative Evolution with Past Experience MCTS (CEPE-MCTS) algorithm . This approach utilizes parallel multi-population groups focusing on different optimization objectives (such as functionality, area, timing, token cost and balance), combined with fragment migration mechanisms and global failure experience sharing strategies, effectively avoiding repeated failures and promoting the migration of excellent design patterns between different populations. Additionally, VFlow introduces a multi-level verification process, including syntax/static checking, functional simulation, and boundary condition testing, ensuring that the generated Verilog code meets industrial standards in terms of synthesizability and timing. Experimental results on public benchmarks such as VerilogEval and RTLLM2.0 demonstrate that VFlow achieves an average improvement of approximately 20%-30% in functional correctness (pass@1) compared to direct invocation or mainstream multi-prompt methods, and significantly approaches or even exceeds human design reference values in area and power consumption metrics. Simultaneously, through optimized agent workflows, VFlow enables smaller specialized LLMs to outperform larger general-purpose models in Verilog generation tasks, significantly reducing inference overhead and costs, exhibiting an excellent return on investment (ROI). Our main contributions are summarized as follows: 1. MCTS-driven Hardware LLM Workflow Framework: We propose a pioneering automatic discovery framework specifically designed for hardware design tasks using Monte Carlo Tree Search. 2. Domain-specific Verification Operators: We design hardware-specific verification operators that systematically ensure the syntax correctness, functional validity, and synthesizability of generated Verilog code. 3. Multi-objective Optimization Mechanisms: We construct multi-population cooperation, experience sharing, and fragment migration mechanisms to accelerate and enhance multi-objective search in the hardware design space. 4. Model Efficiency Improvements: We experimentally demonstrate that our method enables smaller specialized models to outperform larger general-purpose models, offering significant cost-effectiveness and practical potential for real-world hardware design tasks. II Background II-A Hardware Description Languages and Verilog HDLs serve as the primary tools for describing digital circuits and systems. Unlike software programming languages that execute sequentially, HDLs describe parallel hardware structures and behaviors. Verilog designs center around modules—fundamental building blocks with defined interfaces. These modules contain port declarations, internal signal definitions, behavioral descriptions using always blocks, and data manipulations through assign statements. In complex designs, modules can instantiate other modules, creating hierarchical structures that mirror physical hardware organization. Verilog code generation presents unique challenges: (1) Hardware Semantics describes concurrent hardware behavior; (2) Timing Considerations require attention to synchronous and asynchronous behaviors; (3) Synthesizability constraints mean not all valid Verilog code can be synthesized into physical hardware; (4) Verification Requirements typically demand simulation-based testbench verification. II-B LLMs for Verilog Code Generation In recent years, Verilog code generation based on LLMs has achieved significant progress, demonstrated by rapid improvements in benchmark performance, novel model architectures, and gradual expansion to applications across the entire hardware design workflow. Pinckney et al. [ 7 ] enhanced the VerilogEval benchmark by incorporating specification-to-RTL generation tasks and in-context learning (ICL). In this test, GPT-4o achieved a pass rate of approximately 63%, Llama 3.1 405B reached 58%, while RTL-Coder (6.7B)—a smaller model specifically trained for hardware design—attained a pass rate of about 34%. The graph-enhanced model RTL++ significantly improved generation correctness by encoding control flow/data flow graphs in textual form [ 8 ] . Meanwhile, CodeV-R1 introduced Reinforcement Learning with Verifiable Rewards (RLVR), achieving 68.6% pass@1 on VerilogEval v2 and 72.9% on RTLLM v1.1, outperforming previous best models by 12-20 percentage points [ 5 ] . Furthermore, more research focusing on data-oriented approaches and hallucination control for RTL generation has emerged. For example, HaVen [ 9 ] significantly reduced hallucination rates in Verilog generation through chain-of-thought reasoning. RTLLM2.0 and RTLCoder-Data expanded task scale and example diversity, providing models with more adequate training and evaluation resources [ 2 , 4 ] . Notably, LLM applications are no longer limited to code generation. Recent research shows that LLMs are also being used for root cause analysis of simulation/synthesis bugs [ 10 ] and demonstrate good results in coverage-driven test stimulus generation (e.g., LLM4DV) [ 11 ] . A survey paper on hardware design points out that there are now over 70 LLM papers specifically focused on hardware, covering scenarios such as synthesis, formal verification, and bug detection, with future work urgently needed in domain-specific models, hybrid formal/machine learning systems, and explainability [ 12 ] . These advances indicate that as benchmark systems continue to improve, and model architectures continue to innovate, LLMs have gradually transitioned from natural language and software code generation to the hardware domain, becoming indispensable intelligent components in RTL design workflows. Small to medium-scale hardware-specific models (such as RTL-Coder) demonstrate higher parameter efficiency compared to general-purpose models, further confirming the value of targeted training for hardware design. Fig. 2: Workflow of VFlow. II-C Agentic Workflows Agentic workflows have emerged as a powerful paradigm for extending LLM capabilities through structured sequences of invocations with detailed