No project description provided
Project description
cocotb-test
cocotb-test
provides standard python unit testing capabilities for cocotb
- allow the look and feal of python unit testing
- remove the need for Makefiles
- allow easy customization of simulation flow
- in future allow to use pytest-xdist for parallel runs
!Proof of Concept!
Usage:
-
Install and use conda for python (can be installed in user/local folder).
-
Install development tools for conda (Windows only):
conda install --yes m2w64-gcc libpython
- Install the package via pip:
pip install https://github.com/themperek/cocotb-test/archive/master.zip
or
git clone https://github.com/themperek/cocotb-test.git
pip install -e cocotb-test
- Create a
test_dff.py
file (check test folder for more):
from cocotb_test.run import run
def test_dff():
run(
verilog_sources=['dff.v'], # sources
toplevel='dff', # top level HDL
module='dff_cocotb' # name of cocotb test module
)
- Run pytest:
pytest -s
Running (some) tests and examples from cocotb
For cocotb tests/examples install cocotb in editable mode
git clone https://github.com/potentialventures/cocotb.git
pip install -e cocotb
SIM=icarus pytest -s --junitxml=test-results.xml tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cocotb-test-0.0.1.tar.gz
(6.8 kB
view hashes)