VeriPilot:一个基于LLM的Verilog调试框架
VeriPilot: An LLM-Powered Verilog Debugging Framework
AI总结:
提出VeriPilot框架,利用黄金参考模型和LLM实现细粒度Verilog调试,通过内部变量语义对齐和CDFG信号追踪定位并修复错误,在CVDP基准上将GPT-4o修复成功率从54.3%提升至85.71%。
摘要:
Verilog调试仍然是数字电路设计中最耗时的阶段之一。大语言模型(LLM)的最新进展已实现自动化调试;然而,大多数现有方法仅以端到端方式依赖测试输出和编译器反馈,限制了其对复杂错误的有效性。一个关键挑战是,错误的根本原因可能与其可观察输出相距甚远,使得LLM难以追踪代码中的长依赖链。在大型代码库中,长上下文长度阻碍了高效推理,进一步加剧了这一挑战。为解决这些限制,我们提出VeriPilot,一个基于LLM的调试框架,利用黄金参考模型实现细粒度的错误定位和修复。VeriPilot超越输出级比较,通过基于LLM的分析对齐Verilog设计与其对应黄金模型之间的内部变量语义。然后,它使用从静态分析导出的控制数据流图(CDFG)执行逐步信号追踪,识别最小可疑代码区域及其来自黄金模型的正确对应部分。这些结构化见解随后提供给LLM,以指导推理和自动代码修复。在NVIDIA的综合Verilog设计问题(CVDP)基准上的实验结果表明,VeriPilot将GPT-4o的修复成功率从54.3%提高到85.71%,显著提升了复杂Verilog设计的错误定位准确性和修复效果。源代码和基准已在Github上公开:此 https URL。
英文摘要:
Verilog debugging remains one of the most time-consuming stages in digital circuit design. Recent advances in Large Language Models (LLMs) have enabled automated debugging; however, most existing approaches rely solely on test outputs and compiler feedback in an end-to-end manner, limiting their effectiveness on complex bugs. A key challenge is that the root cause of an error may be far removed from its observable outputs, making it difficult for LLMs to trace long dependency chains in code. This challenge is further exacerbated in large codebases, where long context lengths hinder efficient reasoning. To address these limitations, we propose VeriPilot, an LLM-powered debugging framework that leverages golden reference models to enable fine-grained bug localization and repair. VeriPilot goes beyond output-level comparison by aligning internal variable semantics between the Verilog design and its corresponding golden model through LLM-based analysis. It then performs step-by-step signal tracing using Control-Data-Flow Graphs (CDFGs) derived from static analysis, identifying a minimal set of suspicious code regions along with their correct counterparts from the golden model. These structured insights are subsequently provided to the LLM to guide reasoning and automated code repair. Experimental results on the Comprehensive Verilog Design Problems (CVDP) benchmark from NVIDIA demonstrate that VeriPilot improves the repair success rate of GPT-4o from 54.3\% to 85.71\%, significantly enhancing both bug localization accuracy and repair effectiveness for complex Verilog designs. The source code and benchmark are publicly available at Github https://github.com/YihanWn/VeriPilot.git.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。