NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

$\mathbf{{\textsc {PyCaliper}}}$: Python-Embedded Infrastructure for RTL Verification and Specification Synthesis

Adwait Godbole, Brian Huffman, Fangfei Liu, Carlos V. Rozas, Sanjit A. SeshiaCAV 2025

Introduction

Formal verification—the mathematical proof of a hardware design's correctness—is a critical yet expensive component of modern chip development, often consuming up to 20% of total project costs. While the semiconductor industry relies on mature, proprietary tools like Cadence Jasper, the academic community continues to innovate with new algorithms for specification synthesis. However, a significant gap exists between these two worlds: researchers often struggle to scale their tools to industry-level designs, while engineers find experimental academic tools difficult to integrate into existing workflows.

PyCaliper is a new Python-embedded framework designed to bridge this divide. It provides a unified environment to write, verify, and automatically synthesize specifications for hardware designs, allowing users to switch seamlessly between open-source solvers and industry-standard commercial tools.

The PyCaliper Framework

PyCaliper addresses the infrastructure gap by embedding a hardware specification language directly into Python. By extending a SpecModule base class, engineers can write specifications as Python classes. This approach allows for the use of object-oriented principles, standard libraries, and meta-programming to construct complex properties that would be tedious to write manually in SystemVerilog.

The PyCaliper System Architecture illustrates the flow from specifications into verification backends and synthesis engines.

Dual-Backend Interoperability

A core strength of PyCaliper is its ability to "elaborate" Python-based specifications into multiple formats. This enables a "head-to-head" comparison between different verification environments:

  1. SVA (SystemVerilog Assertions): For integration with commercial formal verification tools like Jasper FPV.
  2. BTOR2: For use with open-source symbolic execution engines and SMT solvers, such as Boolector.
The detailed backend flow shows how RTL designs and specifications are processed through SVA and BTOR2 elaboration paths.

Specification Synthesis

Beyond simple verification, PyCaliper excels at "specification synthesis." Users can define incomplete specifications containing "holes" (marked as ???). PyCaliper then uses the underlying verification tools as oracles to automatically fill these gaps. Two primary engines facilitate this:

  • Incremental Invariant Synthesis (IIS): Identifies the necessary combination of signals to prove a specific property.
  • Counterexample-Guided Inductive Synthesis (CEGIS): Iteratively refines specifications based on counterexamples provided by the solver.

Case Studies and Results

The authors evaluated PyCaliper using two secure hardware designs: IsoTAGE (a branch predictor secured against Branch Target Injection) and DAWG (a dynamically partitioned secure cache).

Key Insights

  • Hierarchical Mirroring: By aligning Python classes with RTL modules, PyCaliper makes specifications feel "native" to the hardware.
  • Neural Synthesis Strategies: In a novel experiment, the authors used GPT-4o to suggest the order for checking candidate invariants. This LLM-guided approach required only 163 verification calls for a complexity level of $k=4$, compared to 785 calls for a random strategy—a nearly 5x improvement in efficiency.
  • Performance Bottlenecks: While open-source solvers showed competitive solving times, the Python-based parsing for the BTOR2 backend was significantly slower than commercial alternatives, highlighting an area for future optimization.

Conclusion

PyCaliper demonstrates the potential of modern programming languages to simplify and enhance hardware verification. While current limitations include parsing overhead and a lack of support for "stuttering" refinement, the framework provides a robust foundation for future research in automated hardware specification and verification.

Summary updated

BibTeX
@inproceedings{godbole2025mathbf,
  author = {Adwait Godbole and Brian Huffman and Fangfei Liu and Carlos V. Rozas and Sanjit A. Seshia},
  title = {{$\textbackslash\{\}mathbf\{\{\textbackslash\{\}textsc \{PyCaliper\}\}\}$: Python-Embedded Infrastructure for RTL Verification and Specification Synthesis}},
  booktitle = {CAV},
  year = {2025},
  doi = {10.1007/978-3-031-98682-6\_21},
}
Figure