VeriDebug: A Unified LLM for Verilog Debugging via Contrastive Embedding and Guided Correction

📅 2025-04-27
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Low automation in Verilog HDL debugging and insufficient exploration of large language models (LLMs) for this task motivate this work. We propose VeriDebugLoc-Type, a unified end-to-end LLM framework for Verilog bug localization and repair. It introduces, for the first time, a joint modeling mechanism combining contrastive embedding and guided correction, enabling simultaneous learning of bug detection patterns and repair strategies within a shared parameter space—departing from conventional decoupled debugging paradigms. The framework integrates contrastive learning–based embedding retrieval, instruction-tuned lightweight LLMs, and Verilog syntax–aware guided decoding. On standard benchmarks, VeriDebugLoc-Type achieves 64.7% top-1 bug repair accuracy (Acc1), outperforming open-source state-of-the-art by +11.3 points and GPT-3.5-turbo by +28.1 points. This establishes a scalable, high-accuracy paradigm for automated hardware design debugging.

Technology Category

Application Category

📝 Abstract
Large Language Models (LLMs) have demonstrated remarkable potential in debugging for various programming languages. However, the application of LLMs to Verilog debugging remains insufficiently explored. Here, we present VeriDebug, an approach that integrates contrastive representation and guided correction capabilities for automated Verilog debugging. Unlike existing methods, VeriDebug employs an embedding-based technique to accurately retrieve internal information, followed by bug-fixing. VeriDebug unifies Verilog bug detection and correction through a shared parameter space. By simultaneously learning bug patterns and fixes, it streamlines debugging via contrastive embedding and guided correction. Empirical results show the efficacy of VeriDebug in enhancing Verilog debugging. Our VeriDebugLoc, Type model achieves 64.7 accuracy in bug fixing (Acc1), a significant improvement from the existing open-source SOTAs 11.3. This performance not only outperforms open-source alternatives but also exceeds larger closed-source models like GPT-3.5-turbo (36.6), offering a more accurate alternative to conventional debugging methods.
Problem

Research questions and friction points this paper is trying to address.

Developing a unified LLM for Verilog debugging
Integrating contrastive embedding for accurate bug detection
Enhancing bug-fixing accuracy via guided correction techniques
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses contrastive embedding for accurate information retrieval
Unifies bug detection and correction in shared space
Combines guided correction with contrastive learning
🔎 Similar Papers
No similar papers found.
N
Ning Wang
City University of Hong Kong
Bingkun Yao
Bingkun Yao
City University of Hong Kong
EDA
J
Jie Zhou
Southeast University
Y
Yuchen Hu
Southeast University
X
Xi Wang
Southeast University
Nan Guan
Nan Guan
City University of Hong Kong
Cyber-Physical systemsEmbedded systemsReal-time systems
Z
Zhe Jiang
Southeast University