用进化算法提升大模型生成的硬件代码正确率与性能。
REvolution: An Evolutionary Framework for RTL Generation driven by Large Language Models
- 结合大模型生成与进化计算,分组优化代码正确性与功耗性能。
- 在多个基准上使初始通过率最高提升24个百分点,最终通过率达95.5%。
- 无需额外训练或专用工具,适合芯片设计自动化研究者使用。
大型语言模型(LLM)用于寄存器传输级(RTL)代码生成时面临功能正确性和功耗-性能-面积(PPA)优化两大挑战。迭代反馈方法虽部分缓解问题,但受限于局部搜索,难以找到全局最优解。本文提出REvolution框架,将进化计算(EC)与LLM结合,实现自动RTL生成与优化。该框架并行演化一组候选方案,每项由设计策略、RTL实现及评估反馈定义。采用双种群算法,将候选分为失败组(修复错误)与成功组(优化PPA)。自适应机制根据各提示策略的成功率动态调整选择概率,提升搜索效率。在VerilogEval和RTLLM基准上的实验表明,REvolution使多种LLM的初始通过率最高提升24.0个百分点。DeepSeek-V3模型最终通过率达95.5%,媲美现有顶尖结果,且无需单独训练或领域专用工具。生成的RTL设计相较参考设计显著改善了PPA表现。本工作通过融合LLM生成能力与EC全局搜索优势,突破了以往方法的局部搜索局限。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。