arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.15186cs.ARcs.AI
收藏

位置是关键:利用大语言模型进行 Verilog 功能缺陷定位

Location is Key: Leveraging Large Language Model for Functional Bug Localization in Verilog

City University of Hong Kong(香港城市大学);Southeast University(东南大学);Zhejiang Normal University(浙江师范大学)

Bingkun Yao, Ning Wang, Jie Zhou, Xi Wang, Hong Gao, Zhe Jiang, Nan Guan

AI总结:

本文提出开源 LLM 方案 Location-is-Key,仅凭设计规范和错误代码片段即可定位 Verilog 功能缺陷,定位准确率达 93.3%,并能显著提升后续缺陷修复效率,为 Verilog 自动调试开辟新方向。

摘要:

Verilog 代码中的缺陷定位是硬件设计验证过程中一项关键且耗时的工作。自问世以来,大语言模型(LLMs)已展现出强大的编程能力。然而,目前尚无工作考虑将 LLMs 用于 Verilog 代码的缺陷定位。本文提出了 Location-is-Key(LiK),一个开源的 LLM 解决方案,用于定位 Verilog 代码片段中的功能错误。LiK 实现了较高的定位准确率,在基于 RTLLM 的测试数据集上,其 pass@1 定位准确率达到 93.3%,超过了 GPT-4 的 77.9%,并与 Claude-3.5 的 90.8% 相当。此外,LiK 获得的缺陷位置显著提升了 GPT-3.5 的缺陷修复效率(Functional pass@1 从 40.39% 提高到 58.92%),凸显了缺陷定位在基于 LLM 的 Verilog 调试中的重要性。与现有方法相比,LiK 仅需要设计规范和错误的代码片段,无需测试平台、断言或任何其他 EDA 工具。本研究证明了使用 LLMs 进行 Verilog 错误定位的可行性,从而为 Verilog 代码的自动调试提供了一个新的方向。

英文摘要:

Bug localization in Verilog code is a crucial and time-consuming task during the verification of hardware design. Since introduction, Large Language Models (LLMs) have showed their strong programming capabilities. However, no work has yet considered using LLMs for bug localization in Verilog code. This paper presents Location-is-Key, an opensource LLM solution to locate functional errors in Verilog snippets. LiK achieves high localization accuracy, with a pass@1 localization accuracy of 93.3% on our test dataset based on RTLLM, surpassing GPT-4's 77.9% and comparable to Claude-3.5's 90.8%. Additionally, the bug location obtained by LiK significantly improves GPT-3.5's bug repair efficiency (Functional pass@1 increased from 40.39% to 58.92%), highlighting the importance of bug localization in LLM-based Verilog debugging. Compared to existing methods, LiK only requires the design specification and the erroneous code snippet, without the need for testbenches, assertions, or any other EDA tools. This research demonstrates the feasibility of using LLMs for Verilog error localization, thus providing a new direction for automatic Verilog code debugging.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑