toolchain_guideintermediateconfidence 5/5CC BY 4.0

When cocotb is useful

cocotb lets Python testbenches drive HDL simulators, which is useful for protocol tests, scoreboards and integration-style verification.

Use cocotb when a test needs structured transactions, randomization, scoreboards or Python reference models. Keep protocol timing explicit and run the same tests in CI.

Graph links

Boards: none
Chips: none
Toolchains: cocotb, verilator, icarus-verilog, ghdl
Protocols: uart, spi, axi, wishbone
Pitfalls: Do not let Python tests hide nondeterministic timing assumptions in the RTL.

Commands

pytest
make SIM=verilator

Sources

Suggest correction