Classification-Based Automatic HDL Code Generation Using LLMs

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Sun, Wenhao, Li, Bing, Zhang, Grace Li, Yin, Xunzhao, Zhuo, Cheng, Schlichtmann, Ulf
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917734207455232
author Sun, Wenhao
Li, Bing
Zhang, Grace Li
Yin, Xunzhao
Zhuo, Cheng
Schlichtmann, Ulf
author_facet Sun, Wenhao
Li, Bing
Zhang, Grace Li
Yin, Xunzhao
Zhuo, Cheng
Schlichtmann, Ulf
contents While large language models (LLMs) have demonstrated the ability to generate hardware description language (HDL) code for digital circuits, they still suffer from the hallucination problem, which leads to the generation of incorrect HDL code or misunderstanding of specifications. In this work, we introduce a human-expert-inspired method to mitigate the hallucination of LLMs and improve the performance in HDL code generation. We first let LLMs classify the type of the circuit based on the specifications. Then, according to the type of the circuit, we split the tasks into several sub-procedures, including information extraction and human-like design flow using Electronic Design Automation (EDA) tools. Besides, we also use a search method to mitigate the variation in code generation. Experimental results show that our method can significantly improve the functional correctness of the generated Verilog and reduce the hallucination of LLMs.
format Preprint
id arxiv_https___arxiv_org_abs_2407_18326
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Classification-Based Automatic HDL Code Generation Using LLMs
Sun, Wenhao
Li, Bing
Zhang, Grace Li
Yin, Xunzhao
Zhuo, Cheng
Schlichtmann, Ulf
Hardware Architecture
Artificial Intelligence
While large language models (LLMs) have demonstrated the ability to generate hardware description language (HDL) code for digital circuits, they still suffer from the hallucination problem, which leads to the generation of incorrect HDL code or misunderstanding of specifications. In this work, we introduce a human-expert-inspired method to mitigate the hallucination of LLMs and improve the performance in HDL code generation. We first let LLMs classify the type of the circuit based on the specifications. Then, according to the type of the circuit, we split the tasks into several sub-procedures, including information extraction and human-like design flow using Electronic Design Automation (EDA) tools. Besides, we also use a search method to mitigate the variation in code generation. Experimental results show that our method can significantly improve the functional correctness of the generated Verilog and reduce the hallucination of LLMs.
title Classification-Based Automatic HDL Code Generation Using LLMs
topic Hardware Architecture
Artificial Intelligence
url https://arxiv.org/abs/2407.18326