LeanHardware: Bringing Formal Assurance to Vibe Hardware Development from Intent to RTL via Lean 4
Wenji Fang, Ziyi Yang, Peichen Xie, Xian Zhang, Ruize Tang, Tianyu Chen, Fan Yang, Jing Wang, Yao Lu, Mengming Li, Wenkai Li, Zhiyuan Yan, Hongce Zhang, Zhiyao Xie
Abstract
As LLMs become increasingly capable of generating RTL, ensuring that AI-generated hardware faithfully implements designer intent remains a fundamental challenge. This requires addressing two correctness gaps: natural-language specifications may not accurately capture intended behavior, and generated RTL may not satisfy the resulting specifications. To address these challenges, we present LeanHardware, a formal-methods-based framework that brings end-to-end assurance to vibe hardware development from designer intent to RTL in two stages. In Stage 1, LeanHardware uses executable LeanSpec models to identify specification uncertainties through concrete execution and clarify intended behavior through designer feedback. In Stage 2, LeanHardware directly generates Verilog, translates it into LeanRTL using a deterministic parser, and constructs Lean-checked refinement proofs against the clarified LeanSpec reference models. Across 329 designs from four benchmarks, LeanHardware achieves 98%, 98%, 94%, and 91% functional correctness on VerilogEval, RTLLM, CVDP, and ChipBench, respectively. With the same backbone LLM, Stage 1 improves RTL correctness from 81.5% to 96.0% on corrected benchmarks, while Stage 2 establishes unbounded refinement proofs for 79.0% and 92.1% of designs against cycle-level and transaction-level specifications, respectively. Our results show that proof-guided correction further improves weaker LLMs, while for stronger LLMs, specification clarification drives most correctness gains and formal proving primarily provides certification.
Create a lesson
Related papers
Hardware and Software Implementation of Image Security Algorithms With AI-ML Integration : A Comprehensive Survey
Shared title terminologycs.ARPoulomi Ghosh, Sudip Ghosh, Hafizur Rahaman
No Lease, No Function: ECC-Embedded Hardware Runtime Authorization for Shared IPs
Shared title terminologycs.ARMohammed Nabeel, Akashdeep Saha, Armin Darjani et al.
Sattva: A Hardware-Algorithm Co-Designed SAT Solving Accelerator with Off-Chip Scalability
Shared title terminologycs.ARHuifeng Ke, Michael Lo, Justin Oh et al.
CANN Bench 2: Evolving a Hardware-Anchored Kernel Benchmark to the Frontier
Shared title terminologycs.ARJiasheng Li, Xue-Jian Gao, Deng Pan et al.
Exploring Runtime-Configurable Piecewise Linear Function Interpolation for FPGA-Based LLM Hardware Acceleration
Shared title terminologycs.ARPatrick Nepveu-Nelson, Fabiola Jiménez-Chacón, Roger Morales-Monge et al.
VeSGA: Microsecond, Microjoule Hyperdimensional Graph Classification through Algorithm-Hardware Co-Design
Shared title terminologycs.ARAhmad Tahmasivand, Hamed Poursiami, Guojing Cong et al.