# RTLFixer: Automatically Fixing RTL Syntax Errors with Large Language Models

Source: [RTLFixer: Automatically Fixing RTL Syntax Errors with Large Language Models](<https://www.sota2.com/research/paper/68fa734a1e209131cea5b997>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-26T02:46:17.278Z

Authors: Yun-Da Tsai, Mingjie Liu, Haoxing Ren

Published: 2023-11-28T06:18:54.000Z

## Abstract

This paper presents RTLFixer, a novel framework enabling automatic syntax errors fixing for Verilog code with Large Language Models (LLMs). Despite LLM's promising capabilities, our analysis indicates that approximately 55% of errors in LLM-generated Verilog are syntax-related, leading to compilation failures. To tackle this issue, we introduce a novel debugging framework that employs Retrieval-Augmented Generation (RAG) and ReAct prompting, enabling LLMs to act as autonomous agents in interactively debugging the code with feedback. This framework demonstrates exceptional proficiency in resolving syntax errors, successfully correcting about 98.5% of compilation errors in our debugging dataset, comprising 212 erroneous implementations derived from the VerilogEval benchmark. Our method leads to 32.3% and 10.1% increase in pass@1 success rates in the VerilogEval-Machine and VerilogEval-Human benchmarks, respectively.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Verilog Generation on VerilogEval v2 (41 filtered problems)](<https://www.sota2.com/research/sota/verilog-generation-on-verilogeval-v2-41-filtered-problems.md>): Verilog Generation; VerilogEval v2 (41 filtered problems); Solved Rate: 0.4146341463414634.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2311.16543>)

[PDF](<https://arxiv.org/pdf/2311.16543.pdf>)
