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

Wang, Ning, Yao, Bingkun, Zhou, Jie, Hu, Yuchen, Wang, Xi, Guan, Nan, Jiang, Zhe

arXiv.org Artificial Intelligence 

--Large Language Models (LLMs) have demonstrated remarkable potential in debugging for various programming languages. However, the application of LLMs to V erilog debugging remains insufficiently explored. Here, we present V eriDebug, an approach that integrates contrastive representation and guided correction capabilities for automated V erilog debugging. Unlike existing methods, V eriDebug employs an embedding-based technique to accurately retrieve internal information, followed by bug-fixing. V eriDebugunifies V erilog 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 V eriDebugin enhancing V erilog debugging. 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. Large Language Models (LLMs) have revolutionized natural language processing, enabling the generation of human-like text across diverse topics due to their unprecedented scale and complexity.