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.
翻译:暂无翻译