arXiv:2507.04736cs.AIcs.AR2025-07ACL被引 6

用强化学习让大模型生成既正确又高效的硬件代码

ChipSeek: Optimizing Verilog Generation via EDA-Integrated Reinforcement Learning

  • 通过EDA工具反馈构建分层奖励,引导大模型优化硬件设计
  • 在标准测试中同时达到最高功能正确率和最优功耗性能面积表现
  • 适合想提升芯片设计自动化效率的工程师和研究者

大型语言模型已成为自动化寄存器传输级(RTL)代码生成的强大工具,但仍面临关键挑战:现有方法难以同时优化功能正确性与功耗、性能、面积(PPA)等硬件效率指标。依赖监督微调的方法常生成功能正确但性能欠佳的设计,因缺乏学习硬件优化原则的内在机制;而生成后的外部后处理技术则效率低下,无法提升模型本身能力。为此,我们提出ChipSeek,一种集成EDA仿真器与综合工具反馈的分层奖励强化学习框架,旨在促使大模型生成兼具功能正确性与高PPA性能的RTL代码。通过课程引导的动态策略优化(CDPO),ChipSeek显著提升了生成高质量优化代码的能力。在标准基准上的评估显示,ChipSeek在功能正确性和PPA性能上均达到当前最佳水平。此外,在针对功耗、延迟、面积等细粒度优化目标单独训练时,仍能持续生成高效设计。相关代码已开源:https://github.com/rong-hash/chipseek。

原文摘要 · Abstract (English)

Large Language Models have emerged as powerful tools for automating Register-Transfer Level (RTL) code generation, yet they face critical limitations: existing approaches typically fail to simultaneously optimize functional correctness and hardware efficiency metrics such as Power, Performance, and Area (PPA). Methods relying on supervised fine-tuning commonly produce functionally correct but suboptimal designs due to the lack of inherent mechanisms for learning hardware optimization principles. Conversely, external post-processing techniques aiming to refine PPA performance after generation often suffer from inefficiency and do not improve the LLMs' intrinsic capabilities. To overcome these challenges, we propose ChipSeek, a novel hierarchical reward based reinforcement learning framework designed to encourage LLMs to generate RTL code that is both functionally correct and optimized for PPA metrics. Our approach integrates direct feedback from EDA simulators and synthesis tools into a hierarchical reward mechanism, facilitating a nuanced understanding of hardware design trade-offs. Through Curriculum-Guided Dynamic Policy Optimization (CDPO), ChipSeek enhances the LLM's ability to generate high-quality, optimized RTL code. Evaluations on standard benchmarks demonstrate ChipSeek's superior performance, achieving state-of-the-art functional correctness and PPA performance. Furthermore, it excels in specific optimization tasks, consistently yielding highly efficient designs when individually targeting fine-grained optimization goals such as power, delay, and area. The artifact is open-source in https://github.com/rong-hash/chipseek.

硬件生成强化学习LLMEDA

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。