CorrectBench:使用 LLM 进行 HDL 设计的具有功能自校正的自动测试平台生成
CorrectBench: Automatic Testbench Generation with Functional Self-Correction using LLMs for HDL Design
AI总结:
针对LLM生成硬件测试平台易出错且时序任务成功率低的问题,提出CorrectBench框架,通过功能自验证与自校正机制显著提升测试平台生成的通过率,在时序电路任务中表现尤为突出。
摘要:
功能仿真是数字硬件设计中的一个关键步骤。近期,利用大型语言模型(LLMs)进行硬件测试平台生成任务引起了越来越多的关注。然而,LLMs固有的不稳定性通常会导致生成的测试平台出现功能错误。以往的方法没有包含无需人工干预的自动功能校正机制,并且成功率依然较低,尤其是在时序任务中。为了解决这一问题,我们提出了 CorrectBench,一个具有功能自验证和自校正的自动测试平台生成框架。仅利用自然语言编写的 RTL 规范,所提出的方法能够以 88.85% 的成功率验证所生成测试平台的正确性。此外,所提出的基于 LLM 的校正器利用在自验证过程中获取的缺陷信息,对生成的测试平台执行功能自校正。对比分析表明,我们的方法在所有评估任务中达到了 70.13% 的通过率,相比之下,先前基于 LLM 的测试平台生成框架为 52.18%,而直接基于 LLM 的生成方法为 33.33%。特别是在时序电路中,我们工作的性能比以往在时序任务中的工作高出 62.18%,并且通过率几乎是直接方法的 5 倍。代码和实验结果已在以下链接开源:https://github.com/AutoBench/CorrectBench
英文摘要:
Functional simulation is an essential step in digital hardware design. Recently, there has been a growing interest in leveraging Large Language Models (LLMs) for hardware testbench generation tasks. However, the inherent instability associated with LLMs often leads to functional errors in the generated testbenches. Previous methods do not incorporate automatic functional correction mechanisms without human intervention and still suffer from low success rates, especially for sequential tasks. To address this issue, we propose CorrectBench, an automatic testbench generation framework with functional self-validation and self-correction. Utilizing only the RTL specification in natural language, the proposed approach can validate the correctness of the generated testbenches with a success rate of 88.85%. Furthermore, the proposed LLM-based corrector employs bug information obtained during the self-validation process to perform functional self-correction on the generated testbenches. The comparative analysis demonstrates that our method achieves a pass ratio of 70.13% across all evaluated tasks, compared with the previous LLM-based testbench generation framework's 52.18% and a direct LLM-based generation method's 33.33%. Specifically in sequential circuits, our work's performance is 62.18% higher than previous work in sequential tasks and almost 5 times the pass ratio of the direct method. The codes and experimental results are open-sourced at the link: https://github.com/AutoBench/CorrectBench
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。