Skip to main content

No project description provided

Project description


Build Status PyPI version

cocotb-test provides standard python unit testing capabilities for cocotb

  • allow the look and feel of Python unit testing
  • remove the need for Makefiles (includes Makefile compatibility mode)
  • allow easy customization of simulation flow
  • easy installation (especially on Windows)
  • allow to use pytest-xdist or pytest-parallel for parallel runs

!Proof of Concept!


  • Install and use conda for Python (can be installed in user/local folder).

  • Install development tools for conda (Windows only):

conda install m2w64-gcc libpython
  • Install simulator (for Icarus Verilog):
conda install -c conda-forge iverilog
  • Install the package via pip:
pip install -v


git clone
pip install -v -e cocotb-test
  • Create a file (check test folder for more examples):
from import run
def test_dff():
        verilog_sources=["dff.v"], # sources
        toplevel="dff",            # top level HDL
        module="dff_cocotb"        # name of cocotb test module
pytest -s 

Running (some) tests and examples from cocotb

For cocotb tests/examples install cocotb in editable mode

git clone
pip install -e cocotb
SIM=icarus pytest -s --junitxml=test-results.xml --cocotbxml=test-cocotb.xml tests

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cocotb-test, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size cocotb-test-0.0.4.tar.gz (12.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page