Spec-Driven Hardware Evolution via Executable Contract Refinement and Proof-Guided RTL Update

Shibo Zhao, Yang Zhang, Mengxia Tao, Baoqi Zhang, Kezhi Li, Qiang Xu, Binwu Zhu, Hao Yan, Min LiarXiv 2026 · arXiv

TL;DR

Most LLM-based hardware design tools focus on generating code entirely from scratch, ignoring the reality that real-world chip design is evolutionary. This paper introduces a spec-driven hardware evolution framework that refines new feature requests into precise, executable contracts to incrementally update trusted legacy Register-Transfer Level (RTL) designs. By combining mutation-based semantic probing with a proof-guided formal verification loop, the framework successfully automates functional updates while preserving validated legacy logic.

What Problem Does This Paper Address?

In actual industrial hardware development, engineers rarely rewrite a complex circuit from scratch when a new feature is requested. Instead, they evolve a trusted, previously validated legacy design. However, current Large Language Model (LLM) approaches treat hardware design primarily as a "prompt-to-RTL" generation task.

This creates a major gap: natural language prompts are too ambiguous to safely guide modifications in complex hardware, where cycle-level timing and strict interface dependencies matter. If an LLM directly edits legacy RTL based on a loose description, it risks breaking existing functionality. Hardware design needs a method that establishes a strict, verification-consumable boundary to safely guide an LLM through incremental version updates.

Methods

The authors propose a four-stage workflow—Specify, Plan, Implement, and Validate—bridging human intent with automated backend execution.

Figure 2: Overall workflow of the proposed spec-driven hardware evolution framework.
  1. Specify (Executable Contract Refinement): A natural language feature request is converted into an "executable contract" consisting of a C/C++ behavioral reference model and formal checking properties (harness functions specifying inputs, timing, and outputs). This contract is reviewed and approved by a human designer to ensure semantic clarity before any RTL editing begins.
  2. Plan (Mutation-Based Semantic Probing): To understand how the legacy RTL implements the original spec, the framework deliberately injects faults (mutations like arithmetic sign inversions or branch negations) into the legacy RTL. By observing what fails during formal verification, the system maps out exact code dependencies and localizes the regions that need modification.
  3. Implement: Guided by the localized map, an LLM subagent performs precise, legacy-aware patching on the RTL rather than regenerating the module.
  4. Validate: The updated RTL is formally verified against the new executable contract using hw-cbmc (a bounded model checker). If verification fails, the counterexample is fed back into an iterative repair loop until the design achieves functional convergence.

To prevent the LLM from losing track of instructions over long tasks, the architecture employs task-isolated subagents coordinated by a main orchestrator, alongside a hierarchy-aware bottom-up repair strategy that fixes lower-level submodules before addressing top-level blocks.

Datasets

Because standard LLM hardware benchmarks (like VerilogEval or RTLLM) focus on one-shot generation rather than version evolution, the authors constructed a controlled version-evolution case study based on dot_core.

dot_core is a representative Tensor Processing Unit (TPU) datapath block that implements a 32-way dot-product accumulation pipeline across a multi-level module hierarchy. The task evolved the design from supporting INT8, FP4, and FP8 (Version $N$) to adding support for TF32 (Version $N+1$), requiring structural changes to mantissa/exponent widths and interface propagation throughout the hierarchy.

Key Insights and Ideas

  • Contracts Over Prompts: Treating high-level code (C/C++) as a reviewable, binding contract rather than an implementation recipe gives automated agents a mathematically precise target to hit.
  • The Verifier as an Oracle: Instead of using formal verification only at the very end, mutation-based semantic probing uses the verifier early on to discover hidden structural relationships between the specification and the legacy code.
  • Isolation Defeats Instruction Drift: For long-horizon hardware tasks, a single LLM agent quickly suffers from "instruction drift." Breaking the problem down into fresh, task-isolated subagents significantly stabilizes the evolution process.

Key Results

The framework was evaluated using several state-of-the-art LLMs. Only top-tier models (GPT-5.4, Claude Opus 4.6, and Claude Sonnet 4.6) successfully achieved functional convergence and passed top-level formal verification.

Comparison of repair iterations, token usage, monetary cost, wall-clock time, and post-synthesis PPA across models.
  • Efficiency: GPT-5.4 proved to be the most efficient, achieving functional convergence in just 2 iterations and taking 91 minutes.
  • Cost-Effectiveness: GPT-5.4 was exceptionally token-efficient, consuming 7.6M tokens ($15.65), which is roughly 29% of the tokens consumed by Claude Opus 4.6.
  • Ablation Importance: Removing mutation-based probing caused the repair loop to jump from 2 iterations to 10. Eliminating task-isolated subagents caused the entire process to fail outright due to instruction drift, proving the necessity of the framework's structural constraints.

Limitations and Future Work

The primary limitation acknowledged by the authors is that the framework currently focuses strictly on functional evolution (ensuring the circuit behaves correctly) rather than Power, Performance, and Area (PPA) optimization. While the generated RTL serves as an excellent functionally correct starting point, human engineers or downstream tools must still optimize it for physical constraints.

The authors view this work as a foundational step toward a broader, unified agentic pipeline that will eventually integrate executable intent capture, functional convergence, and automated PPA optimization into a single flow.

Summary updated

Abstract

Hardware development is inherently evolutionary: major revisions typically begin by changing intended behavior and then updating a previously validated implementation, rather than regenerating RTL from scratch. Yet most recent LLM-based hardware research still frames the task primarily as prompt-to-RTL generation, offering limited support for semantic version evolution of trusted legacy designs. We present spec-driven hardware evolution, a contract-centered formulation for RTL version iteration. Instead of treating a new feature request as a direct prompt for RTL generation, we refine it into a reviewed executable contract for the next version. This contract specifies what must hold at the externally visible transactional level through a behavior-level reference together with explicit observation and checking semantics, while leaving how the change is realized in RTL to the evolution process. Based on this formulation, we organize hardware evolution into four stages: Specify, Plan, Implement, and Validate. After contract approval, the remaining stages proceed automatically: Plan derives cross-version semantic deltas and localizes affected RTL regions, aided by mutation-based semantic probing; Implement and Validate then perform legacy-aware RTL update under proof-guided checking and iterative repair. We evaluate the framework on a controlled version-evolution case study of a representative TPU datapath block under data-format changes. The results support the feasibility of contract-driven hardware evolution and demonstrate that the proposed backend workflow can effectively drive validated legacy RTL toward next-version functional convergence under a reviewed executable contract. An anonymous artifact for reproducibility is available at https://anonymous.4open.science/r/SDHE-3A6C.
BibTeX
@misc{zhao2026spec,
  author = {Shibo Zhao and Yang Zhang and Mengxia Tao and Baoqi Zhang and Kezhi Li and Qiang Xu and Binwu Zhu and Hao Yan and Min Li},
  title = {{Spec-Driven Hardware Evolution via Executable Contract Refinement and Proof-Guided RTL Update}},
  year = {2026},
  eprint = {2608.12684},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.12684},
}
Figure