HDLFORGE:一种用于高效Verilog代码生成的两阶段多智能体框架
HDLFORGE: A Two-Stage Multi-Agent Framework for Efficient Verilog Code Generation with Adaptive Model Escalation
AI总结:
HDLFORGE通过两阶段多智能体框架实现高效Verilog代码生成,通过自适应模型升级提升生成准确性与效率。
摘要:
我们提出了HDLFORGE,一种用于自动化Verilog生成的两阶段多智能体框架,优化生成速度与准确性之间的权衡。系统默认使用紧凑编码器和中等大小的LLM(阶段A),仅在需要时升级到更强的编码器和超大型LLM(阶段B),由校准的得分引导,该得分来自低成本的诊断,包括编译、检查和烟雾测试。关键创新是一个反例引导的正式代理,将有界模型检查轨迹转换为可重用的微测试,显著减少了错误检测时间和修复迭代次数。可移植的升级控制器可以包装现有的Verilog LLM流水线,而无需修改其内部。在VerilogEval Human、VerilogEval V2和RTLLM基准上评估,HDLFORGE通过全面分析墙钟时间分布、升级阈值和代理消融分析,展示了比单阶段系统更优的准确性-延迟权衡。在VerilogEval Human和VerilogEval V2上,HDLFORGE-Qwen在Pass@1上达到91.2%和91.8%,平均延迟低约50%,显著提高了准确性,比其他中等大小模型更优,并在RTLLM上达到97.2%的Pass@5。
英文摘要:
We present HDLFORGE, a two-stage multi-agent framework for automated Verilog generation that optimizes the trade-off between generation speed and accuracy. The system uses a compact coder with a medium-sized LLM by default (Stage A) and escalates to a stronger coder with an ultra-large LLM (Stage B) only when needed, guided by a calibrated score from inexpensive diagnostics including compilation, lint, and smoke tests. A key innovation is a counterexample-guided formal agent that converts bounded-model-checking traces into reusable micro-tests, significantly reducing bug detection time and repair iterations. The portable escalation controller can wrap existing Verilog LLM pipelines without modifying their internals. Evaluated on VerilogEval Human, VerilogEval V2, and RTLLM benchmarks, HDLFORGE demonstrates improved accuracy-latency trade-offs compared to single-stage systems through comprehensive analysis of wall-clock time distributions, escalation thresholds, and agent ablations. On VerilogEval Human and VerilogEval V2, HDLFORGE-Qwen achieves 91.2% and 91.8% Pass@1 with roughly 50% lower median latency, dramatically improving accuracy over other medium-sized models, and 97.2% Pass@5 on RTLLM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。