Skip to content
hw.dev
hw.dev/signal/fpga-toolbox-cocotb-preflight-error-2026
SignalFPGA Toolbox

Generated FPGA Tests Now Name Their Missing Dependency

FPGA Toolbox now tests its generated build harness without Cocotb installed and reports the dependency instead of a fake missing path.

Thesis connection

Generated hardware tests are easier to adopt when a missing tool produces an exact repair instead of a build-system riddle.

#fpga#eda#testing#tools
Read Original

Field-programmable gate array (FPGA) Toolbox generated a Makefile that failed with include /Makefile.sim when Cocotb, a Python framework for testing digital hardware, was missing. The resulting error pointed to a fake file at the root of the computer and gave the engineer no installation command.

The generator now checks whether cocotb-config exists before including Cocotb's build rules. If it is absent, make stops with the package name, installation command, and required version. Two regression checks run the generated project with a deliberately clean command path, confirm the useful error, and confirm a nonzero exit. The existing campaign and coverage suites still pass. Source files that include other hardware files remain a documented unsupported case.

This is a small repair with a useful standard for generated projects: test the first run on a machine that lacks every optional dependency. A hardware test generator that requires its author's configured workstation still leaves setup work to every user.