Closing the Loop on FPGA Development
The Status Quo(s)
Proprietary IDEs, thumb-drive version control, and golden “Works on My Machine” laptops are, within the software world, almost-forgotten graybearded anecdotes of an era gladly left where it belongs. While software was once synonymous with its physical medium of storage, a dizzying array of “git-ops” tooling has since gone from cutting-edge to best-practice more quickly than most engineers can keep up with. The standard in programming has at this point evolved to depend on containerized builds and K8S clusters churning CI pipelines every step of the way.
All the while, a sect of people who do write code but had more in common with Electrical Engineers than with on-trend Silicon Valley “devs” were content enough with their workflow and detached enough from the habits of “coders” that, somewhere in their career backlit by graphical enterprise SDKs, they forgot to ask why binaries were painstakingly compiled on thin clients, repeatability meant staying late at the office, and traceability amounted to “trust me bro”.
Firmware & FPGA devs aren’t entirely to blame, if at all. The corporate wave of fat Windows-native GUIs was pushed on developers of all breeds for decades, including those eventually free enough to return to their roots: open standard, open source, and shell-native tooling ripe for automation. Firmware engineers were next in tow, followed eventually, reluctantly by the more forward-thinking of digital designers.
The New Tools
FPGA development has officially had its GCC moment
When I first started playing with Project Icestorm in 2020, support was more intimate than widespread, examples were few and far between, and tools were compiled from source. At this point, however, tools are mature & mainlined in package managers, and every clanker I’ve interrogated knows how to use them.
This Dockerfile builds trivially & gives you a playground for most ICE-40 and ECP-5 parts.
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
build-essential \
autoconf \
flex \
bison \
libfl2 \
libfl-dev \
zlib1g zlib1g-dev \
help2man \
perl \
gcc \
g++ \
gdb \
make \
meson \
ninja-build \
cmake \
python3 \
python3-pip \
python3-venv \
ca-certificates \
usbutils \
yosys \
nextpnr-ecp5 \
nextpnr-ice40 \
fpga-icestorm \
fpga-trellis \
gtkwave
RUN git clone https://github.com/verilator/verilator && \
cd verilator && git checkout v5.044 && autoconf && ./configure && make && make install
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install cocotb
To be continued