QiMeng-TheoremV: Agentic Theorem Proving with Speculated IRs for Large-Scale RTL Formal Verification
Chenrui Cao, Chongxiao Li, Yutong Wu, Hongqin Lyu, Di Huang, Chuanhao Wang, Lei Zhang, Chao Wang, Tian Zhi, Rui Zhang, Zidong Du, Qi Guo, Xing Hu, Yunji Chen
Abstract
As LLMs speed up automated Register-Transfer Level (RTL) code generation, verifying that generated designs meet their specs has become a key bottleneck. We present TheoremV, an agentic framework that uses Lean 4 theorem proving to automatically build complete proofs of end-to-end functional equivalence between large-scale RTL designs and high-level reference models. TheoremV bridges two gaps: the abstraction gap between cycle-accurate RTL and high-level reference models, and the representation gap between RTL and proof languages. For the abstraction gap, TheoremV introduces Speculated IRs: an LLM agent proposes candidate intermediate models, quickly filters out bad ones via differential simulation, and revises them using proof feedback, breaking an end-to-end proof across abstraction levels into a chain of equivalence lemmas. For the representation gap, a Yosys-based RTL-to-Lean compiler keeps industrial frontend coverage while preserving word-level signals and module hierarchy, and port-level dependency analysis removes false combinational loops at module interfaces. On tasks where commercial high-level equivalence checkers time out and existing automated provers fail, TheoremV proves the functional equivalence of silicon-proven floating-point and matrix units (XiangShan Fudian and NVDLA CMAC) against high-level reference models, as well as the PicoRV32 core against the official RISC-V Sail spec, finding a real RISC-V spec bug (in the FENCE instruction) in PicoRV32.
Create a lesson
Metadata
- Categories
- cs.AR, cs.AI, cs.LO
- Comments
- 8 pages, 5 figures
Related papers
L2C2: Enhancing Large-scale Chiplets for Agent Long-Context LLM Inference with Sparse and Distributed Attention
Shared title terminologycs.ARKangbo Bai, Zhonghua Mu, Hongze Zhou et al.
Inference-Time Scaling in Agentic Hardware Verification Workflows: A Multi-Strategy Characterization Across Protocol Complexity
Shared title terminologycs.ARVikash Kumar
Beyond Equivalence: Task-Level Verification Unlocks Architectural Optimizations by LLM Agents
Shared title terminologycs.ARFelix Arnold, Ryan Amaudruz, Renzo Andri et al.
VeriPower: A Spiral Approach to Agentic Chip Design and Verification
Shared title terminologycs.ARHaocheng Ma, Guanyuan Chen, Yier Jin
Large Language Models for RTL Design: A Review of Generation, Verification, Evaluation, and Implementation
Shared title terminologycs.ARHepziba Susan, Shivaranjani G. R., Malik Imran et al.
Glimpse: Exploiting Draft Attention for Bandwidth-Efficient Verification in Mobile Edge Speculative Decoding
Shared title terminologycs.ARChao Fang, Xiaodong Liu, Robin Geens et al.