2026-06-14
Authors: Ernest Ng, Nikil Shyamsunder, Francis Pham, Adrian Sampson
ArXiv: 2606.13659v1
PDF: Download PDF
Imagine you're building a chip — say, a piece of custom hardware that talks to a CPU over some protocol. To test that it works, hardware engineers traditionally write two separate programs:
These two programs are mirror images of each other. They encode the exact same protocol — just in opposite directions. But because they're written separately, by hand, for every new hardware module, engineers waste effort and frequently introduce subtle inconsistencies. The driver might think a handshake works one way; the monitor might decode it differently. Bugs hide in that gap.
The authors propose a refreshingly simple idea: write the protocol once, as a single program in a domain-specific language (DSL), and automatically generate both the driver and the monitor from it. The DSL lets you describe a transaction as a sequence of signal-level events — what bits go where, in what order, with what timing. From this single spec, their compiler produces:
The clever insight is treating communication itself as a program — a first-class artifact that can be compiled, analyzed, and reused. This is similar in spirit to how parser generators (like yacc or ANTLR) let you describe a grammar once and automatically produce both readers and writers for a language. Here, the "language" is a hardware protocol.
Why does this matter? Hardware verification is one of the most expensive parts of chip design — bugs found in silicon can cost millions. Anything that reduces hand-written boilerplate and eliminates a whole class of "the driver and monitor disagree" bugs has real economic value. It also opens the door to more advanced tooling: if protocols are programs, you can do things like formally verify that two modules' protocols are compatible, or automatically generate fuzz tests that explore edge cases of the handshake.
This work fits into a broader trend of bringing modern programming-language ideas — types, compilation, formal semantics — into the historically ad-hoc world of hardware design. It's a small idea with potentially large ripple effects.
