用多智能体定位故障+随机思维树生成修复方案,提升硬件代码自动修复可靠性。
R3A: Reliable RTL Repair Framework with Multi-Agent Fault Localization and Stochastic Tree-of-Thoughts Patch Generation
- 多智能体定位故障点,缩小修复搜索范围。
- 随机思维树策略平衡探索与利用,修复成功率90.6%。
- 适合芯片设计中需高可靠性的自动化调试场景。
硬件设计中的RTL错误修复至关重要。传统自动程序修复方法依赖固定模板,仅能处理有限类型错误。而大语言模型虽能理解代码语义,却因固有随机性和长输入上下文导致结果不可靠。为此,我们提出R3A框架,基于大模型实现更可靠的RTL修复。R3A采用随机思维树方法控制修复生成智能体,在启发式函数指导下采样搜索状态,平衡探索与利用,提升修复可靠性;同时引入多智能体故障定位机制,精准识别故障候选点,作为修复起点。实验表明,R3A在给定时间限制内可修复RTL-repair数据集90.6%的漏洞,比传统方法和其它基于LLM的方法多覆盖45%的漏洞,平均pass@5率达到86.7%,展现出高可靠性。
原文摘要 · Abstract (English)
Repairing RTL bugs is crucial for hardware design and verification. Traditional automatic program repair (APR) methods define dedicated search spaces to locate and fix bugs with program synthesis. However, they heavily rely on fixed templates and can only deal with limited bugs. As an alternative, Large Language Models with the ability to understand code semantics can be explored for RTL repair. However, they suffer from unreliable outcomes due to inherent randomness and long input contexts of RTL code and waveform. To address these challenges, we propose R3A, an LLM-based automatic RTL program repair framework upon the basic model to improve reliability. R3A proposes the stochastic Tree-Of-Thoughts method to control a patch generation agent to explore a validated solution for the bug. The algorithm samples search states according to a heuristic function to balance between exploration and exploitation for a reliable outcome. Besides, R3A proposes a multi-agent fault localization method to find fault candidates as the starting points for the patch generation agent, further increasing the reliability. Experiments show R3A can fix 90.6% of bugs in the RTL-repair dataset within a given time limit, which covers 45% more bugs than traditional methods and other LLM-based approaches, while achieving an 86.7% pass@5 rate on average, showing a high reliability.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。