HDLxGraph: Bridging Large Language Models and HDL Repositories via HDL Graph Databases

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zheng, Pingqing, Qin, Jiayin, Zhang, Fuqi, Chitla, Niraj, Wan, Zishen, Wu, Shang, Cao, Yu, Ding, Caiwen, Yang, Zhao
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866908874122985472
author Zheng, Pingqing
Qin, Jiayin
Zhang, Fuqi
Chitla, Niraj
Wan, Zishen
Wu, Shang
Cao, Yu
Ding, Caiwen
Yang
Zhao
author_facet Zheng, Pingqing
Qin, Jiayin
Zhang, Fuqi
Chitla, Niraj
Wan, Zishen
Wu, Shang
Cao, Yu
Ding, Caiwen
Yang
Zhao
contents Retrieval Augmented Generation (RAG) is an essential agent for Large Language Model (LLM) aided Description Language (HDL) tasks, addressing the challenges of limited training data and prohibitively long prompts. However, its performance in handling ambiguous queries and real-world, repository-level HDL projects containing thousands or even tens of thousands of code lines remains limited. Our analysis demonstrates two fundamental mismatches, structural and vocabulary, between conventional semantic similarity-based RAGs and HDL codes. To this end, we propose HDLxGraph, the first framework that integrates the inherent graph characteristics of HDLs with RAGs for LLM-assisted tasks. Specifically, HDLxGraph incorporates Abstract Syntax Trees (ASTs) to capture HDLs' hierarchical structures and Data Flow Graphs (DFGs) to address the vocabulary mismatch. In addition, to overcome the lack of comprehensive HDL search benchmarks, we introduce HDLSearch, an LLM generated dataset derived from real-world, repository-level HDL projects. Evaluations show that HDLxGraph improves search, debugging, and completion accuracy by 12.04%/12.22%/5.04% and by 11.59%/8.18%/4.07% over state-of-the-art similarity-based RAG and software-code Graph RAG baselines, respectively. The code of HDLxGraph and HDLSearch benchmark are available at https://github.com/UMN-ZhaoLab/HDLxGraph.
format Preprint
id arxiv_https___arxiv_org_abs_2505_15701
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle HDLxGraph: Bridging Large Language Models and HDL Repositories via HDL Graph Databases
Zheng, Pingqing
Qin, Jiayin
Zhang, Fuqi
Chitla, Niraj
Wan, Zishen
Wu, Shang
Cao, Yu
Ding, Caiwen
Yang
Zhao
Hardware Architecture
Computation and Language
Machine Learning
Retrieval Augmented Generation (RAG) is an essential agent for Large Language Model (LLM) aided Description Language (HDL) tasks, addressing the challenges of limited training data and prohibitively long prompts. However, its performance in handling ambiguous queries and real-world, repository-level HDL projects containing thousands or even tens of thousands of code lines remains limited. Our analysis demonstrates two fundamental mismatches, structural and vocabulary, between conventional semantic similarity-based RAGs and HDL codes. To this end, we propose HDLxGraph, the first framework that integrates the inherent graph characteristics of HDLs with RAGs for LLM-assisted tasks. Specifically, HDLxGraph incorporates Abstract Syntax Trees (ASTs) to capture HDLs' hierarchical structures and Data Flow Graphs (DFGs) to address the vocabulary mismatch. In addition, to overcome the lack of comprehensive HDL search benchmarks, we introduce HDLSearch, an LLM generated dataset derived from real-world, repository-level HDL projects. Evaluations show that HDLxGraph improves search, debugging, and completion accuracy by 12.04%/12.22%/5.04% and by 11.59%/8.18%/4.07% over state-of-the-art similarity-based RAG and software-code Graph RAG baselines, respectively. The code of HDLxGraph and HDLSearch benchmark are available at https://github.com/UMN-ZhaoLab/HDLxGraph.
title HDLxGraph: Bridging Large Language Models and HDL Repositories via HDL Graph Databases
topic Hardware Architecture
Computation and Language
Machine Learning
url https://arxiv.org/abs/2505.15701