Skip to content
Preprint

Automated Multi-Line Bug Repair Using Model Checker Aided LLMs: A Case Study on RISC-V Processors

Oct 2026 · 1 citation · 30 references
Computer Science

TL;DR

This paper proposes a novel automated RTL bug repair methodology that combines LLMs, assertions, and a model checker to provide scalable, trustworthy semantic grounding and formal guarantees, and is the first work to show automated, LLM-assisted RTL multi-line bug repair results on a complex RISC-V processor design in a scalable manner.

Abstract

Functional verification of Register-Transfer Level(RTL) designs has become a critical bottleneck in modern semiconductor development, often consuming the majority of project resources. Debugging, in particular, remains an especially time-consuming task, requiring careful analysis of simulation traces or counterexamples. Recent work has explored applying Large Language Models (LLMs) to RTL debug and repair with great promise. However, the existing approaches typically are for single-line bugs, operate in open-loop, rely heavily on prompts or retrieval, lack scalability, and often produce incorrect fixes. In this paper, we propose a novel automated RTL bug repair methodology that combines LLMs, assertions, and a model checker to provide scalable, trustworthy semantic grounding and formal guarantees. Concretely, the methodology leverages failing assertions to guide the LLM in generating patches for multi-line bugs. Each candidate patch is formally verified using a model checker (JasperGold), ensuring only valid repairs are accepted. We evaluate the efficacy and scalability of our methodology on the BRISC-V RISC-V core using mutation testing, introducing several mutation types, and demonstrate that our methodology can repair up to 98% of single-line RTL bugs and 93% of the multi-line bugs. To the best of our knowledge, this is the first work to show automated, LLM-assisted RTL multi-line bug repair results on a complex RISC-V processor design in a scalable manner.

View source

Similar papers

Open access Oct 2026

LLM-driven test and test-repair automation for legacy Perl systems: an empirical study at IBM

Automated unit test generation using Large Language Models (LLMs) has shown promise for widely used programming languages such as Java and Python. It may further benefit legacy systems lacking a test base, and the investigation of less widespread legacy languages remains relevant as many companies still operate systems...

Simon Leunig, K. Petersen · 0 citations

Self-Spec Verifiable Code Generation

Large language models (LLMs) may generate unreliable code on corner cases missed by testing, while formal verification can provide machine-checkable guarantees. Recently, researchers have proposed several benchmarks to evaluate the capabilities of LLMs in generating formally verifiable code, where LLMs need to formulat...

Jia-Ru Qian, Yihong Dong, Yong-Ming Li et al. · 0 citations
#artificial intelligence Preprint Oct 2026

Can LLMs Fix It Without Code? Toward Automated Verification of No-Code Bug Fixes

A no-code fix resolves an invalid bug report by directing the user to change a setting, update to a version where the problem is already fixed, or adjust their workflow. Manually verifying whether a proposed no-code fix resolves the reported bug takes considerable developer time. This study proposes an automated, execu...

U. B. Torun, Veli Karakaya, Eray Tuzun · 0 citations
Open access Oct 2026

Enhancing LLM-Based Bug Reproduction via Code Entity Retrieval and Test Case Repair

Experimental results on the widely-used Defects4J benchmark show that LTER substantially outperforms the best performance in automated bug reproduction, increasing the reproduction success rate to 46.2% with successfully identifying a valid reproduction test as the top candidate in 38.1% of the cases.

Hao Ding, Yan-Jie Jiang, Yu-Xia Zhang et al. · 0 citations
Conference Open access Oct 2026

LLM Assisted RTL Bug Localization and Auto Patching in Complex SoC Verification Flows

Debugging Register Transfer Level (RTL) is still an obstacle for the process of verifying a SystemonaChip (SoC) because of growing design complexity; bugs exhibiting nonlocal behavior; and the difference between simulation results and design intent; This paper describes a Common Framework for Automated Bug Localization...

Radhakrishnan Pachyappan, Arun Ayilliath Keezhadath, Bhaskar Yakkanti et al. · 0 citations
Sep 2026

VSpector: Specification-Driven Bug Detection for RISC-V CPUs

VSpector is presented, a specification-driven bug detection pipeline that directly checks whether CPU register-transfer level (RTL) implementations adhere to official specification rules, without requiring specialized construction of reference models, formal properties, or custom bug patterns.

Tian-Yu Jia, Zhao-Yang Yu, Yuan-Liang Chen et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.