Using cocotb requires installation of prerequisites and installation of cocotb itself.
In this document, we are assuming that you already have a
supported simulator available in
Installation of Prerequisites¶
Cocotb has the following requirements:
GCC 4.8.1+ or Clang 3.3+ and associated development packages
A Verilog or VHDL simulator, depending on your RTL source code
Changed in version 1.4: Dropped Python 2 support
In order to use a 32-bit simulator you need to use a 32-bit version of Python.
The installation instructions vary depending on your operating system:
Installation of cocotb¶
pip may belong to a different Python installation to what you expect.
pip -V to check.
If this prints “(python 2.7)”, use
python3 -m pip in place of
pip in the command shown.
If you want to install the development version of cocotb, instructions are here.
After installation, you should be able to execute
If it is not found, you need to append its location to the
PATH environment variable.
This may happen when you use the
--user option to
pip, in which case the location is documented here.
For more installation options, please see our Wiki.