Cocotb Tutorials

Cocotb Tutorials

1. Create a Python Virtual Environment 

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

2. Start Virtual Environment 

shellcommand
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

Github Examples #

All examples in this book can be found at the learncocotb github

 

posted @ 2025-12-28 12:16  大块头  阅读(4)  评论(0)    收藏  举报