Bazel all the way down: how I build programmable hardware

This is a description of how I build programmable hardware. Everything that goes into Cocoapuffs, my RISC-V system-on-chip on an Artix-7 FPGA: the RTL, the firmware, the simulations, the synthesis, the bitstream, and the programming of the board, comes out of a single bazel build, from a machine that has nothing installed on it but bazel. The build is hermetic, ephemeral, and reproducible, and it…