EvoVerilog: Large Langugage Model Assisted Evolution of Verilog Code

Ping Guo, Yiting Wang, Wanghao Ye, Yexiao He, Ziyao Wang, Xiaopeng Dai, Ang Li, Qingfu ZhangarXiv 2025 · OpenReview

Abstract

Large Language Models (LLMs) have demonstrated great potential in automating the generation of Verilog hardware description language code for hardware design. This automation is critical to reducing human effort in the complex and error-prone process of hardware design. However, existing approaches predominantly rely on human intervention and fine-tuning using curated datasets, limiting their scalability in automated design workflows. Although recent iterative search techniques have emerged, they often fail to explore diverse design solutions and may underperform simpler approaches such as repeated prompting. To address these limitations, we introduce EvoVerilog, a novel framework that combines the reasoning capabilities of LLMs with evolutionary algorithms to automatically generate and refine Verilog code. EvoVerilog utilizes a multiobjective, population-based search strategy to explore a wide range of design possibilities without requiring human intervention. Extensive experiments demonstrate that EvoVerilog achieves state-of-the-art performance, with pass@10 scores of 89.1 and 80.2 on the VerilogEval-Machine and VerilogEval-Human benchmarks, respectively. Furthermore, the framework showcases its ability to explore diverse designs by simultaneously generating a variety of functional Verilog code while optimizing resource utilization.

Introduction

Designing hardware using Verilog is a detail-oriented and error-prone task. While Large Language Models (LLMs) have shown promise in code generation, their application to hardware design faces significant hurdles. Current tools often function as "copilots" requiring human intervention, struggle to explore diverse architectural solutions, and frequently ignore hardware-specific constraints like area and power efficiency. EvoVerilog addresses these challenges by integrating LLM reasoning with evolutionary optimization to automate the design and refinement process.

Methodology: The EvoVerilog Framework

EvoVerilog operates through a two-phase automated design process designed to mimic human-like architectural exploration while maintaining algorithmic rigor.

  1. Phase 1: Idea Tree Initialization: Instead of jumping directly to code generation, the framework uses an LLM to brainstorm a tree of high-level design concepts. This "indirect representation" includes natural language descriptions and logic strategies, which are subsequently translated into executable Verilog. This ensures a diverse initial population of potential solutions.
  2. Phase 2: Evolutionary Search: The generated designs form a population that evolves over generations. The LLM serves as the evolutionary operator, performing crossover and mutation to recombine successful logic or fix bugs identified by testbenches.
The EvoVerilog framework overview, illustrating the transition from design tasks to an Idea Tree and the subsequent evolutionary search process.

A critical component of this search is Multi-Objective Selection. Using Non-dominated Sorting, EvoVerilog evaluates designs based on both functional correctness and resource efficiency (minimizing wire and cell count). This allows the system to identify Pareto-optimal solutions that balance performance and hardware constraints.

Experimental Results

The framework was evaluated on the VerilogEval benchmark, which includes both machine-generated specifications (Machine) and more challenging, sparse human-authored descriptions (Human). EvoVerilog achieved state-of-the-art (SOTA) performance, surpassing powerful base models and specialized fine-tuned alternatives.

Performance comparison of EvoVerilog against various LLMs and specialized models on the VerilogEval benchmarks. EvoVerilog achieves the highest pass@10 scores in both categories.

Specifically, EvoVerilog reached pass@10 scores of 89.1 on the Machine subset and 80.2 on the Human subset. This performance exceeds that of GPT-4 Turbo (85.8 and 79.7, respectively) without any specialized fine-tuning. Furthermore, by using DeepSeek-V3 as a backbone, EvoVerilog achieved these SOTA results at a fraction of the API cost of proprietary top-tier models.

Key Insights and Discussion

  • Scaling Law of Evolution: The effectiveness of evolutionary methods scales with the strength of the underlying model. Combining a powerful backbone like DeepSeek-V3 with EvoVerilog leads to dramatic performance leaps, suggesting that reasoning capability is the primary fuel for effective evolution.
  • Diversity vs. Accuracy Tradeoff: While evolutionary search may slightly reduce immediate "pass@1" scores, it significantly boosts "pass@10" by exploring a broader solution space, leading to more robust final designs.
  • Hardware-Aware Optimization: Unlike general-purpose code assistants, EvoVerilog successfully optimized hardware resources. In nearly 40% of complex human-authored problems, it engineered solutions that were more resource-efficient than baseline implementations.
  • Prompt Sensitivity: The research highlights that prompt design can change success rates by over 10%, emphasizing the importance of the structured initialization provided by the Idea Tree.

Conclusion

EvoVerilog demonstrates that combining LLMs with evolutionary algorithms can significantly advance automated hardware design. By moving beyond simple prompting to a structured, multi-objective search, the framework achieves superior performance and hardware efficiency. Future work will focus on scaling this approach to complex, multi-module integrated circuit designs and optimizing the search process for even greater efficiency.

Summary updated

BibTeX
@misc{guo2025evoverilog,
  author = {Ping Guo and Yiting Wang and Wanghao Ye and Yexiao He and Ziyao Wang and Xiaopeng Dai and Ang Li and Qingfu Zhang},
  title = {{EvoVerilog: Large Langugage Model Assisted Evolution of Verilog Code}},
  year = {2025},
  eprint = {2508.13156},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.13156},
}
Figure