Search arXiv⌕ Search

arXiv · 2612.05355

LeanHardware: Bringing Formal Assurance to Vibe Hardware Development from Intent to RTL via Lean 4

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

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. 2026-12-03. LeanHardware: Bringing Formal Assurance to Vibe Hardware Development from Intent to RTL via Lean 4. https://searcharxiv.org/abs/2612.05355

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

ChipArc: Auditable Multi-Agent RTL Generation, Repair and Optimization with Verifier-Gated Memory

Register-transfer level (RTL) code must be both functionally correct and physically efficient in timing, area, and energy, yet LLM-based RTL agents draft plausible designs without being able to certify correctness or reliably guide repair. We present ChipArc, an auditable multi-agent framework in which models propose RTL and diagnose failures while a deterministic controller verifies each candidate and promotes only strictly verified improvements, recording every decision for offline audit. A key design choice is a single verifier-gated global memory shared across concurrent agents: each stores a bounded record of an evaluated repair (hypothesis, change, and verifier-measured outcome), so agents reuse one another's verified experiences across tasks, while excluding current-task and hidden assets (e.g., golden references). Using Kimi K3, ChipArc solves 89 of 92 tasks in CVDP's non-commercial agentic code-generation subset at the lowest mean model cost per pass among the evaluated systems. On the 43 verifier-valid ChipBench Verilog-generation tasks, it solves a mean of 38 tasks, compared with 34 for ACE-RTL and 27 for MAGE. A controlled ablation shows the shared memory raises repair coverage by about 12%. Finally, we carry the same verifier-controlled discipline all the way to physical optimization of a GCD/RSA accelerator, reporting reductions in area, delay, and energy; a bounded formal gate also exposes a protocol bug that both the functional harness and a separate 24-test regression miss.

cs.AR↗

svlang-sdk: A Zero-Dependency Multi-Domain Compiler SDK for Modular VLSI Frontend Verification and EDA

VLSI frontend flows parse the same chip five times across SystemVerilog, UPF, SDC, SystemRDL/IP-XACT, and SystemC. Disconnected tools maintain separate elaboration graphs, cache stale state, and expose unstable C++ ABIs or text dumps, forcing brittle glue scripts while IDEs and AI agents stall on full-chip re-elaboration and megabyte JSON payloads. We present svlang-sdk, a 73,892-line zero-dependency C++23 (-fno-exceptions -fno-rtti) hardware compiler spine and frozen C11 SDK (libsvlang_sdk_c). Five acyclic layers separate: (0) a Salsa-style incremental query host (AnalysisHost/AnalysisSnapshot) with durability tiers, early cutoff, cooperative cancellation, and epoch-scoped arenas; (1) five pluggable frontends (SV, UPF 3.1, SystemC 3.0, SDC, RDL/IP-XACT) bound onto one dense EntityId graph with OpenUSD-style overlays and ExplainValueSource provenance; (2) a word-level SSA RTL netlist, immutable .svdb snapshots, Hydra-style merging views, and macro-aware AtomicChange refactoring; (3) a dual-plane ABI pairing 39 C11 symbols (zero leaked C++ _Z* symbols) with the header-only Apache Arrow C Data Interface and C++23, Python, Rust, and TypeScript bindings; and (4) LSP 3.17, MCP 2026-07-28, DAP v1.71, and Surfer WCP servers. Linking svlang-sdk deleted 16,351 duplicated frontend lines from our 88,254-line sv++ simulator, drives 436 lint rules in svlang-lint, and isolates a 42,472-line consolidation seam in our 159,225-line Rust formal verifier InFormal. On arm64 macOS, all 14 C++23 test suites pass under Debug, ASan+UBSan, TSan, and Release; comment edits hit early cutoff in 10 us with flat RSS across 1,000 epochs; Arrow exports 53,005 entities in 0.9 ms (37.3x faster than JSON); and four polyglot small-tool proofs each fit under 150 lines.

cs.AR↗

HARP: Rethinking ATPG-Augmented On-Chip Random Patterns to Enhance Test Efficiency

Increasing design complexity, coupled with the emerging trend of chiplet-based heterogeneous 3D integration, necessitates substantial improvements in test efficiency in terms of the number of ATPG patterns and/or test cycles. While test cost has been a major driver behind this, 3D integration with high I/O density may also benefit from reduced external pattern application. In this paper, we present \STAR, a hybrid test generation framework that addresses the above issue by using ATPG-augmented on-chip random patterns to achieve a significant reduction in ATPG pattern count as well as overall test cycles at equivalent fault coverage compared to the same hybrid flow with fully pseudo-random patterns. Each pattern takes its primary-input bits from ATPG and its state bits from an on-chip pseudo-random number generator (PRNG), and is applied without a per-pattern scan load or unload. We show that the insertion of appropriate Design-for-Test (DFT) logic, e.g., test points, can further enhance test efficiency. We specifically note that DFT-enabled ATPG-augmented random patterns alone can provide considerably high structural coverage (avg. $\sim$89\%), leaving a small subset of random-resistant faults to be covered by structural ATPG. We have implemented \STAR~as a standalone tool integrated into a commercial test automation tool flow. Experimental analysis on open-source benchmarks, including four AI accelerators, shows promising results with 33\% improvement on average in ATPG test patterns and an average of 27\% reduction in test cycles.

cs.AR↗