REFORGE: 구조화된 컨텍스트와 검증 피드백을 활용한 LLM 기반 RTL 버그 수정
REFORGE: LLM-Assisted RTL Bug Repair with Structured Context and Verification Feedback
REFORGE: LLM-Assisted RTL Bug Repair with Structured Context and Verification Feedback
@misc{hossain2026reforge,
title = {REFORGE: LLM-Assisted RTL Bug Repair with Structured Context and Verification Feedback},
author = {Tanvir Hossain and Sudipta Paria and Aidan Gleason Myers and Swarup Bhunia and Tamzidul Hoque},
year = {2026},
eprint = {2611.33748},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
url = {https://arxiv.org/abs/2611.33748}
}
Hossain, T., Paria, S., Myers, A. G., Bhunia, S., & Hoque, T. (2026). REFORGE: LLM-Assisted RTL Bug Repair with Structured Context and Verification Feedback [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2611.33748
HOSSAIN T, PARIA S, MYERS AG, et al. REFORGE: LLM-Assisted RTL Bug Repair with Structured Context and Verification Feedback[EB/OL]. (2026-11-25)[2026-11-29]. https://arxiv.org/abs/2611.33748.
초록
대규모 언어 모델 (LLMs) 은 RTL 을 작성하고 수정할 수 있으나, 성공적인 컴파일 또는 테스트벤치 실행은 결함 제거, 동작 보존, 보안성, 또는 구현 가능성의 확립을 보장하지 않습니다. 기존 LLM 기반 RTL 수정 방법은 이러한 속성에 대한 별도의 증거를 유지하지 않고 단일 수정률을만 보고하는 경향이 있어 재현 가능한 비교와 하드웨어 설계 플로우 통합을 제한합니다. 우리는 REFORGE 를 제시하며, 이는 현재까지 알려진 첫 번째 LLM 보조 RTL 수정 프레임워크로, 반복 과정에서 구조화된 수정 증거를 유지하고 누적함으로써 기능성, 동작 동등성, 보안성, 그리고 비용 효율성을 포함한 다중 목표를 동시에 만족하는 수정을 생성할 수 있습니다. REFORGE 는 버그가 있는 RTL 을 프로파일링하고 구조적 및 보안 관련 특징을 식별하며, 실패하는 동작을 로컬라이즈하고 검증에 기반한 진단을 통해 완전한 RTL 수정 변형을 생성합니다. 각 변형은 문법 검사, 시뮬레이션, 형식 분석, 트리거 해제 보존, 보안 재스캔, 그리고 합성 기반의 전력, 성능, 면적 분석을 거칩니다. 우리는 REFORGE 를 백엔드 독립형 수정 및 검증 플로우로 구현하여 3 개 LLM 백엔드와 3 개 벤치마크 스위트에 걸친 총 288 회 실행에서 평가했습니다. CirFix 에서 제안된 컨텍스트와 진단은 검사된 수정을 제공하는 실행 수를 32/63 에서 51/63 으로 증가시켰으며, 모든 구성이 Hack@DAC OpenTitan 결함을 수정했습니다. 증거 기록은 테스트벤치 만 기준이 적용된 수정이 전체 적용 가능한 검사 세트보다 3.9 배 많음을, 보안 청정 출력은 기능 검증이 부족할 수 있으며, 서로 다른 RTL 수정은 동등한 하드웨어를 구현할 수 있음을 보여줍니다. 이러한 결과는 LLM 생성 RTL 수정이 단일 통과/실패 결과 대신 명시적인 다단계 검증 증거를 필요로 함을 보여줍니다.
Large language models (LLMs) can write and repair RTL, but successful compilation or testbench execution does not establish defect removal, behavioral preservation, security, or implementation feasibility. Existing LLM-based RTL repair methods often report a single repair rate without retaining separate evidence for these properties, limiting reproducible comparison and integration into hardware design flows. We present REFORGE, which, to our knowledge, is the first LLM-assisted RTL repair framework that maintains and accumulates structured repair evidence across iterations, allowing it to generate fixes that satisfy multiple objectives simultaneously, including functionality, behavioral equivalence, security, and cost efficiency. REFORGE profiles buggy RTL, identifies structural and security-relevant features, localizes failing behavior, and uses verification-guided diagnosis to generate complete RTL repair variants. Each variant undergoes syntax checking, simulation, formal analysis, off-trigger preservation, security re-scan, and synthesis-based power, performance, and area analysis. We implement REFORGE as a backend-independent repair-and-verification flow and evaluate it in 288 runs across three LLM backends and three benchmark suites. On CirFix, the proposed context and diagnosis increase runs delivering a checked repair from 32/63 to 51/63, while every configuration repairs the Hack@DAC OpenTitan defect. Evidence records also show that a testbench-only criterion reports 3.9 times more repairs than the full set of applicable checks, security-clean outputs may lack functional verification, and different RTL repairs can implement equivalent hardware. These results show that LLM-generated RTL repairs require explicit multi-stage verification evidence rather than a single pass/fail outcome.