RTLExplain: A Structured Approach to RTL Code Summarization and Question Answering for Medium-to-Large Designs Using LLMs

Large Language Models (LLMs) show promise in assisting with Register Transfer Level (RTL) design tasks, including code summarization, documentation, and question answering. However, directly applying LLMs to entire RTL codebases often leads to low accuracy in these tasks. This is primarily because LLMs are less exposed to RTL code during pretraining, limiting their ability to understand RTL-specific semantics and structural dependencies. To overcome this challenge, we propose RTLExplain, which builds project-specific knowledge bases to enhance LLM performance on RTL design tasks. Our method is entirely offline and requires no additional training or fine-tuning. Experiments on code summarization using the generated knowledge bases demonstrate consistent improvements across various medium-to-large RTL projects, even when variable names are obfuscated. Furthermore, we use these knowledge bases to support Retrieval-Augmented Generation (RAG) for question answering tasks. Results show that our enhanced knowledge bases, when combined with RAG, improve question-answering accuracy by 37% compared to naïve prompting and 27% compared to conventional RAG.

Authors

Institutions

Publication Details

Published
2025-09-08
DOI
https://doi.org/10.1109/mlcad65511.2025.11189167
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

RTLExplain: A Structured Approach to RTL Code Summarization and Question Answering for Medium-to-Large Designs Using LLMs

Charles Mackin, Luyao Shi, Ehsan Degan, Hsinyu Tsai et al.
Natural Language Processing Techniques
article

RTLExplain: A Structured Approach to RTL Code Summarization and Question Answering for Medium-to-Large Designs Using LLMs

Charles Mackin, Luyao Shi, Ehsan Degan, Hsinyu Tsai, Ting-Hsun Chi, Prashanth Vijayaraghavan
article en

Abstract

Large Language Models (LLMs) show promise in assisting with Register Transfer Level (RTL) design tasks, including code summarization, documentation, and question answering. However, directly applying LLMs to entire RTL codebases often leads to low accuracy in these tasks. This is primarily because LLMs are less exposed to RTL code during pretraining, limiting their ability to understand RTL-specific semantics and structural dependencies. To overcome this challenge, we propose RTLExplain, which builds project-specific knowledge bases to enhance LLM performance on RTL design tasks. Our method is entirely offline and requires no additional training or fine-tuning. Experiments on code summarization using the generated knowledge bases demonstrate consistent improvements across various medium-to-large RTL projects, even when variable names are obfuscated. Furthermore, we use these knowledge bases to support Retrieval-Augmented Generation (RAG) for question answering tasks. Results show that our enhanced knowledge bases, when combined with RAG, improve question-answering accuracy by 37% compared to naïve prompting and 27% compared to conventional RAG.

IBM (United States) (US), National Taiwan University (TW)
Openalex Percentile: Top 85%
Natural Language Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

RTLExplain: A Structured Approach to RTL Code Summarization and Question Answering for Medium-to-Large Designs Using LLMs — Charles Mackin, Luyao Shi, et al. · (2025) | TGRS Research Map | TGRS