A Type System for Communication-Safe Hardware Design
Aditya Ranjan Jha, Jason Zhijingcheng Yu, Umang Mathur, Prateek Saxena
Abstract
Hardware components communicate through clock-cycle-sensitive protocols. Hardware Description Languages (HDLs), however, provide limited support for expressing these protocols or for checking that independently developed components agree on them. When components disagree, the composed design can perform unsynchronized exchanges or stop making progress. We call these failures communication-safety violations. Communication safety is thus a global property, determined by interactions between components. This makes it difficult to check modularly. This paper presents Pact, a typed extension of Anvil for modular verification of communication safety in synchronous hardware. Pact types describe message-passing, control-flow, and clock-cycle behaviour. Each component is checked against its type. Compatible types guarantee that the components compose into a communication-safe system. Pact also supports incremental design. It can check a subsystem before the rest of the system exists. The check produces a summary type that captures the communication behaviour left for future compositions. To reduce annotation burden, Pact infers types by abstracting payload values while preserving communication, timing, control, and fairness. These inferred types are optimal for the checker: whenever some checker-accepted types can prove compatibility, the inferred types can prove it as well. Type inference and type checking are decidable, and compatibility is decided by a sound and complete algorithm. We implement Pact by extending the Anvil compiler and evaluate it along five dimensions: detecting communication errors in incremental design, expressiveness on ten clock-cycle-accurate translations of open-source hardware IPs, compatibility-checking time, generated hardware overhead, and annotation burden. Pact expresses realistic protocols and verifies all ten benchmarks in reasonable time.
Create a lesson
Related papers
The Reversible Intermediate Language L4, its Type System, and its Bidirectional Small-Step Semantics
Shared title terminology · Torben Ægidius Mogensen
Coco: An Agentic Copilot for the Hardware--Software Co-Design Lifecycle
Shared title terminology · Samuel Kushnir, Kavya Sreedhar, Yeshwanth Reddy Pogula et al.
Forte: A sensitivity type system for imperative Rust
Shared title terminology · Chiké Abuah
Unifying Function- and Argument-First Bidirectional Type Systems
Shared title terminology · Takuma Yoshioka, Taro Sekiyama, Atsushi Igarashi
Tacet: A Language and Type System for Automatic Statistical Validity Accounting
Shared title terminology · Chiké Abuah
NoC-Out: A Formally-verified Network-on-Chip Library for Rule-based Hardware Designs
Shared title terminology · Max Kurze, František Farka, Sebastian Ertel