English

SpecLoop: An Agentic RTL-to-Specification Framework with Formal Verification Feedback Loop

Hardware Architecture 2026-03-04 v1 Programming Languages

Abstract

RTL implementations frequently lack up-to-date or consistent specifications, making comprehension, maintenance, and verification costly and error-prone. While prior work has explored generating specifications from RTL using large language models (LLMs), ensuring that the generated documents faithfully capture design intent remains a major challenge. We present SpecLoop, an agentic framework for RTL-to-specification generation with a formal-verification-driven iterative feedback loop. SpecLoop first generates candidate specifications and then reconstructs RTL from these specifications; it uses formal equivalence checking tools between the reconstructed RTL and the original design to validate functional consistency. When mismatches are detected, counterexamples are fed back to iteratively refine the specifications until equivalence is proven or no further progress can be made. Experiments across multiple LLMs and RTL benchmarks show that incorporating formal verification feedback substantially improves specification correctness and robustness over LLM-only baselines, demonstrating the effectiveness of verification-guided specification generation.

Keywords

Cite

@article{arxiv.2603.02895,
  title  = {SpecLoop: An Agentic RTL-to-Specification Framework with Formal Verification Feedback Loop},
  author = {Fu-Chieh Chang and Yu-Hsin Yang and Hung-Ming Huang and Yun-Chia Hsu and Yin-Yu Lin and Ming-Fang Tsai and Chun-Chih Yang and Pei-Yuan Wu},
  journal= {arXiv preprint arXiv:2603.02895},
  year   = {2026}
}
R2 v1 2026-07-01T11:00:52.643Z