用多智能体协作提升硬件代码生成质量,无需训练即可显著改进小模型表现。
VeriMoA: A Mixture-of-Agents Framework for Spec-to-HDL Generation
- 通过多路径生成与中间语言分解,增强LLM在硬件设计中的推理多样性。
- 在多个基准上实现Pass@1提升15%~30%,小模型性能逼近大模型。
- 适合想低成本提升HDL生成效果的芯片设计开发者使用。
寄存器传输级(RTL)设计自动化有助于应对日益增长的计算需求。大型语言模型(LLMs)在硬件描述语言(HDL)生成中展现潜力,但受限于参数知识不足和领域约束。尽管提示工程与微调存在知识覆盖与训练成本局限,多智能体架构提供无训练范式以增强协作推理。然而现有方法存在噪声传播敏感与推理空间受限两大缺陷。本文提出VeriMoA,一种无需训练的混合智能体(MoA)框架,包含两项创新:其一,基于质量的缓存机制,保留所有中间HDL输出,支持全阶段的质量排序与选择,促进多层推理中的知识积累;其二,多路径生成策略,利用C++与Python作为中间表示,将规格到HDL的转换拆分为两阶段,发挥LLM在高资源语言上的流畅性,同时提升解空间多样性。在VerilogEval 2.0与RTLLM 2.0基准上的全面实验表明,VeriMoA在多种LLM骨干网络下实现Pass@1提升15%–30%,尤其使小型模型达到大型模型及微调方案水平,且无需高昂训练成本。
原文摘要 · Abstract (English)
Automation of Register Transfer Level (RTL) design can help developers meet increasing computational demands. Large Language Models (LLMs) show promise for Hardware Description Language (HDL) generation, but face challenges due to limited parametric knowledge and domain-specific constraints. While prompt engineering and fine-tuning have limitations in knowledge coverage and training costs, multi-agent architectures offer a training-free paradigm to enhance reasoning through collaborative generation. However, current multi-agent approaches suffer from two critical deficiencies: susceptibility to noise propagation and constrained reasoning space exploration. We propose VeriMoA, a training-free mixture-of-agents (MoA) framework with two synergistic innovations. First, a quality-guided caching mechanism to maintain all intermediate HDL outputs and enables quality-based ranking and selection across the entire generation process, encouraging knowledge accumulation over layers of reasoning. Second, a multi-path generation strategy that leverages C++ and Python as intermediate representations, decomposing specification-to-HDL translation into two-stage processes that exploit LLM fluency in high-resource languages while promoting solution diversity. Comprehensive experiments on VerilogEval 2.0 and RTLLM 2.0 benchmarks demonstrate that VeriMoA achieves 15--30% improvements in Pass@1 across diverse LLM backbones, especially enabling smaller models to match larger models and fine-tuned alternatives without requiring costly training.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。