RTLFixer: Automatically Fixing RTL Syntax Errors with Large Language Model
Yunda Tsai, Mingjie Liu, Haoxing Ren
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. The source code and benchmark are available at https://github.com/NVlabs/RTLFixer.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 13498d6b-8a63-4b6c-8cf5-3b46def7edf6Cited by top-tier papers7
- SymRTLO: Enhancing RTL Code Optimization with LLMs and Neuron-Inspired Symbolic ReasoningYiting Wang, Wanghao Ye, Ping Guo, Yexiao He et al.NeurIPS 2025 · 24 citations
- MAGE: A Multi-Agent Engine for Automated RTL Code GenerationYujie Zhao, Hejia Zhang, Hanxian Huang, Zhongming Yu et al.DAC 2025 · 20 citations
- ChipSeek: Optimizing Verilog Generation via EDA-Integrated Reinforcement LearningZhirong Chen, Kaiyan Chang, Zhuolin Li, Cangyuan Li et al.ACL 2026 · 6 citations
- Free and Fair Hardware: A Pathway to Copyright Infringement-Free Verilog Generation using LLMsSam Bush, Matthew DeLorenzo, Phat Tieu, Jeyavijayan RajendranDAC 2025 · 5 citations
- UVLLM: An Automated Universal RTL Verification Framework using LLMsYuchen Hu, Junhao Ye, Ke Xu, Jialin Sun et al.DAC 2025 · 4 citations
Builds on7
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIsYujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu et al.ICLR 2024 · 1,469 citations
- Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 citations
- ReACC: A Retrieval-Augmented Code Completion FrameworkShuai Lu, Nan Duan, Hojae Han, Daya Guo et al.ACL 2022 · 208 citations
Related papers
- VerilogASTBench: Benchmark Construction of Verilog AST Dataset with Dual-Stage AST Semantic Enhancement FrameworkLuping Zhang, Chao Chen, Dapeng Yan, Hui Xu et al.FSE 2026
- Data is all you need: Finetuning LLMs for Chip Design via an Automated design-data augmentation frameworkKaiyan Chang, Kun Wang, Nan Yang, Ying Wang et al.DAC 2024 · 59 citations
- Insights from Rights and Wrongs: A Large Language Model for Solving Assertion Failures in RTL DesignJie Zhou, Youshu Ji, Ning Wang, Yuchen Hu et al.DAC 2025
- ExVerus: Verus Proof Repair via Counterexample ReasoningJun Yang, Yuechun Sun, Yi Wu, Rodrigo Caridad et al.ICML 2026 · 3 citations
- BetterV: Controlled Verilog Generation with Discriminative GuidanceZehua Pei, Hui-Ling Zhen, Mingxuan Yuan, Yu Huang et al.ICML 2024 · 155 citations
