Compiling Imperative Hardware Protocol Specifications to Hardware
Nikil V. Shyamsunder, Ernest Ng, Adrian Sampson, Kevin Laeufer
Abstract
Correct modular composition in hardware depends on interfaces with subtle multi-cycle timing behavior, yet such protocols remain difficult to specify, test, and debug. Recent work has demonstrated that hardware communication specifications can take the form of compact imperative programs that describe the cycle-by-cycle behavior of each logical transaction. However, prior tools only use these specifications for simulation-based testing and debugging, and their semantics remain informal. In this work, we develop a theory of hardware protocol specifications using automata. In addition to making the specifications' meaning precise, the automaton representation lets us compile them into synthesizable hardware. We implement a compiler that produces RTL modules for driving hardware interfaces and for reconstructing logical transactions from low-level I/O signals. We demonstrate a variety of use cases for synthesizable protocol drivers and reconstructors, including runtime monitors that check security properties in the Wishbone protocol and a binding generator that synthesizes interfaces between RTL modules and programs in the Calyx intermediate language.
Create a lesson
Related papers
MLIRBench - A Benchmark and Dataset for Compiler and Hardware-Aware Reasoning
Shared title terminology · Pranava Sai Maganti, Meghasyam Peddireddy, Muzakker Hossain et al.
Preserving Separation Logic Specifications through Compilation
Shared title terminology · Carmine Abate, Kleio Liotati, František Farka et al.
Compositional Temporal Specifications for Interaction Trees
Shared title terminology · Linyu Yang, Jianwei Yin, Mingshuai Chen
Tenon: A Unified Programming Framework for Retargetable PIM Compilation
Shared title terminology · Niansong Zhang, Shiran Guo, Zhiru Zhang
A Compilation Model for Divergent Parallel Workloads
Shared title terminology · Alexander J Root, Christophe Gyurgyik, Devanshu Ladsaria et al.
SAFE: Formal Specification and Implementation of a Scalable Analysis Framework for ECMAScript
Shared title terminology · Hongki Lee, Sooncheol Won, Joonho Jin et al.