R3A:一种可靠的RTL修复框架,结合多智能体故障定位和随机树状思维补丁生成
R3A: Reliable RTL Repair Framework with Multi-Agent Fault Localization and Stochastic Tree-of-Thoughts Patch Generation
AI总结:
R3A通过多智能体故障定位和随机树状思维补丁生成方法,有效提高了RTL修复的可靠性,修复率高达90.6%。
摘要:
修复RTL错误对于硬件设计和验证至关重要。传统自动程序修复(APR)方法定义了专用的搜索空间来定位和修复错误。然而,它们严重依赖于固定的模板,只能处理有限的错误。作为替代方案,具有理解代码语义能力的大语言模型可以被探索用于RTL修复。然而,由于RTL代码和波形的固有随机性和长输入上下文,它们的输出不可靠。为了解决这些挑战,我们提出了R3A,一种基于基础模型的LLM自动RTL程序修复框架,以提高可靠性。R3A提出了随机树状思维方法,以控制补丁生成代理探索一个经过验证的解决方案。算法根据启发函数采样搜索状态,以在探索和利用之间取得平衡,以获得可靠的结果。此外,R3A提出了多智能体故障定位方法,以找到故障候选者作为补丁生成代理的起始点,进一步提高可靠性。实验显示,R3A可以在给定的时间限制内修复RTL修复数据集中的90.6%的错误,覆盖比传统方法和其他基于LLM的方法多45%的错误,同时在平均上达到86.7%的pass@5率,显示出高可靠性。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。