HardwareTeams.com - The #1 job board and blog for electrical and computer engineers


Introduction #

The cocotb documentation is very good and can be followed for this step. However, I recommend installation of cocotb in a virtual environment. Assuming you have Python 3.6+ and Pip installed you can follow these steps:

1. Create a Python Virtual Environment #

python3 -m venv /path/to/new/virtual/environment

2. Start Virtual Environment #

shell command
bash/zsh source /bin/activate
csh/tcsh source /bin/activate.csh

3. Install Requirements #

put whatever python packages you want in a file called requirements.txt

cocotb
numpy
matplotlib

then call pip install -r requirements.txt in your virtual environment

4. Install iverilog and gtkwave #

Most of the tutorials in this book use the icarus simulator and gtkwave to view output waveforms. To follow along you’ll need to install both.

  1. Install icarus verilog simulator for simulating verilog

    • mac (with homebrew installed): brew install icarus-verilog
    • windows: follow this guide
    • linux: sudo apt install iverilog
  2. Install gtkwave for viewing .vcd files

Further Reading #

HardwareTeams.com Copyright © 2024
comments powered by Disqus