PyGears Tools Setup for Linux

Slide to adjust verbosity level 

I will present here the solution for organizing tools on the Linux OS that worked sufficiently well for me and my team:

  • All tools are installed in /tools folder.

  • Tools fundamental to the workflow are built manually from source (of course the ones that are open-source).

  • There is a shell script that activates the tools, e.g. /tools/tools.sh.

  • $HOME is set to point to a different folder, e.g. /tools/home.

I’ve compiled a Python script for installing the PyGears workflow on Ubuntu and uploaded it to the PyPI.

Warning

This following procedures were only tested on Ubuntu 18.04, Ubuntu 16.04, Ubuntu 14.04 and openSUSE Leap 15

sudo pip3 install pygears-tools

Ubuntu distributions didn’t seem to have pip3 installed. In that case you need to install it:

sudo apt install python3-pip

Minimal workflow toolset installation

Installers for different packages have different dependencies that need to be installed system-wide. By invoking pygears-tools-install with -l option, you will get the list of needed depenendencies for all the tools you need to install first. In this process we will install the right Python version (using pyenv), PyGears itself and Verilator for RTL simulation.

pygears-tools-install -l pyenv python pygears verilator

If you want to place your tools folder under the root, you need to first create it and change ownership to yourself in sudo mode. Otherwise, you can skip this step.

sudo mkdir /tools && sudo chown <username> /tools

Finally, invoke the instaler:

pygears-tools-install -o /tools -w /tools/home  pyenv python pygears

Full workflow toolset installation

This procedure will install all available tools, see setup-pygears-tools-list.

pygears-tools-install -l

# copy and run the install commands output by 'pygears-tools-install -l', i.e
# sudo apt install build-essential
# sudo apt install git libxmlsec1-dev curl ...

# if you are using root location for the tools
sudo mkdir /tools && sudo chown <username> /tools

pygears-tools-install -o /tools -w /tools/home

Verifying that it works

Lets run a PyGears example project to verify that setup is correct. For this example to work, you need to have the Verilator RTL simulator installed. Checkout the Echo example guide for the details.

source /tools/tools.sh

git clone https://github.com/bogdanvuk/pygears ~/pygears

python ~/pygears/examples/echo/plop_test_wav_echo_sim.py

Pygears Tools List

Here’s the list of tools that can be installed using pygears-tools-install.

  • Pyenv - a simple Python version management. Pyenv offers a simple way to install specific Python version,

  • PyGears - the PyGears itself,

  • Verilator: an open-source Verilog/SystemVerilog simulator. PyGears has built-in support for it,

  • Emacs with Spacemacs configuration - an open-source editor that can handle all languages needed for using and extending PyGears (Python, SystemVerilog, Bash, Jinja2). Caution: very steep learning curve, but highly rewarding once mastered. If you don’t feel like investing in learning Spacemacs right now, at minimum you will need an editor that can handle Python, and any one will really do: PyCharm, Eclipse with PyDev, etc.

  • GtkWave - an open-source waveform viewer.

  • SCV with SystemC - an open-source tool that can be used for constrained random stimulus generation by PyGears,