2. Install Dependencies

To build a core and to simulate it on a test-soc, you will need the following tools:

  1. Bluespec Compiler: This is required to compile the BSV based soc, core, and other devices to Verilog.

  2. Python3.7: Python 3.7 is required to configure compilation macros and clone dependencies.

  3. Verilator 4.106+: Verilator is required for simulation purposes.

  4. RISC-V Toolchain 9.2.0+: You will need to install the RISC-V GNU toolchain to be able to compile programs that can run on ChromiteM.

  1. RISC-V OpenOCD :This is required if you would like to simulate through GDB uding remote-bitbang for JTAG communication.

Note

The user is advised to install the above tools from their respective repositories/sources.

You will need the following as well, the installation of which is presented below:

  1. Python 3.6.0+: see python

  2. DTC version 1.4.7+: see dtc

2.1. Python

Ubuntu 17.10 and 18.04 by default come with python-3.6.9 which is sufficient for using riscv-config.

If you are are Ubuntu 16.10 and 17.04 you can directly install python3.6 using the Universe repository

$ sudo apt-get install python3.6
$ pip3 install --upgrade pip

If you are using Ubuntu 14.04 or 16.04 you need to get python3.6 from a Personal Package Archive (PPA)

$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.6 -y
$ pip3 install --upgrade pip

You should now have 2 binaries: python3 and pip3 available in your $PATH. You can check the versions as below

$ python3 --version
Python 3.6.9
$ pip3 --version
pip 20.1 from <user-path>.local/lib/python3.6/site-packages/pip (python 3.6)

2.2. Install DTC (device tree compiler)

We use the DTC 1.4.7 to generate the device tree string in the boot-files. To install DTC follow the below commands:

sudo wget https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/dtc-1.4.7.tar.gz
sudo tar -xvzf dtc-1.4.7.tar.gz
cd dtc-1.4.7/
sudo make NO_PYTHON=1 PREFIX=/usr/
sudo make install NO_PYTHON=1 PREFIX=/usr/