Large Language Models (LLMs) are used for Register-Transfer Level (RTL) code generation, but they face two main challenges: functional correctness and Power, Performance, and Area (PPA) optimization. Iterative, feedback-based methods partially address these, but they are limited to local search, hindering the discovery of a global optimum. This paper introduces REvolution, a framework that combines Evolutionary Computation (EC) with LLMs for automatic RTL generation and optimization. REvolution evolves a population of candidates in parallel, each defined by a design strategy, RTL implementation, and evaluation feedback. The framework includes a dual-population algorithm that divides candidates into Fail and Success groups for bug fixing and PPA optimization, respectively. An adaptive mechanism further improves search efficiency by dynamically adjusting the selection probability of each prompt strategy according to its success rate. Experiments on the VerilogEval and RTLLM benchmarks show that REvolution increased the initial pass rate of various LLMs by up to 24.0 percentage points. The DeepSeek-V3 model achieved a final pass rate of 95.5\%, comparable to state-of-the-art results, without the need for separate training or domain-specific tools. Additionally, the generated RTL designs showed significant PPA improvements over reference designs. This work introduces a new RTL design approach by combining LLMs' generative capabilities with EC's broad search power, overcoming the local-search limitations of previous methods.
翻译:大语言模型(LLMs)被用于寄存器传输级(RTL)代码生成,但面临两大挑战:功能正确性以及功耗、性能和面积(PPA)优化。基于迭代和反馈的方法部分解决了这些问题,但它们仅限于局部搜索,阻碍了全局最优解的发现。本文介绍了REvolution,一个将进化计算(EC)与大语言模型相结合,用于自动RTL生成与优化的框架。REvolution并行进化一个候选解群体,每个候选解由设计策略、RTL实现和评估反馈定义。该框架包含一种双群体算法,将候选解分别划分为失败组和成功组,以分别进行错误修复和PPA优化。一种自适应机制通过根据每个提示策略的成功率动态调整其选择概率,进一步提高了搜索效率。在VerilogEval和RTLLM基准测试上的实验表明,REvolution将多种大语言模型的初始通过率最高提升了24.0个百分点。DeepSeek-V3模型实现了95.5%的最终通过率,与最先进的结果相当,且无需单独训练或领域专用工具。此外,生成的RTL设计相较于参考设计显示出显著的PPA改进。这项工作通过结合大语言模型的生成能力与进化计算的广泛搜索能力,克服了先前方法的局部搜索局限,引入了一种新的RTL设计途径。