Setting up Chipyard - Ubuntu

Note:

The following tutorial content is tested on Ubuntu 20.04 and Ubuntu 22.04 systems with Chipyard release 1.10.1

Step 1. Install conda

Chipyard uses Conda to manage the development environment and packages.

Download Conda from the miniforge release page.

Select the corresponding version and download the file ending with ".sh".

After download, we need to mark the script as executable.

To do this, right click the file and select "Properties..." option. In the Properties window, go to "Permissions" tab. Check the "Allow executing file as program" selection.

Open terminal in the download folder and execute the ".sh" script.

./Mambaforge-23.3.1-1-Linux-x86_64.sh 

Follow the installation prompt. The program will prompt you to input the installation location. Here, we are using /home/tk/Documents/mambaforge.

After installation, it will ask whether to execute conda init. Enter "yes" to the prompt.

Conda is now installed on the system.

Note:

After installing conda, the conda path is not added to the PATH environment variable of the current terminal.

If the conda: command not found error occured, open a new terminal (or source ~./bashrc).

Step 2. Install conda-lock

Chipyard also requires the conda-lock module. Install conda-lock by executing the following commands.

conda install -n base conda-lock==1.4.0
conda activate base

Step 3. Clone Chipyard

Open terminal in a known location. Here, we will use the directory /home/tk/Desktop/. In the terminal, execute the following command.

git clone https://github.com/ucb-bar/chipyard.git

if you are a Chipyard developer, use the ssh url instead:

git clone git@github.com:ucb-bar/chipyard.git

For convenience, we will export the chipyard path as an environment variable on the terminal.

export chipyard=/home/tk/Desktop/chipyard/

Now, we go to the chipyard directory and check out to the correct version.

cd $chipyard
git checkout 1.10.1

Step 4. Configure Chipyard

By default, chipyard setup script initializes/installs things in the following order:

  1. Conda environment

  2. Chipyard submodules

  3. Toolchain collateral (Spike, PK, tests, libgloss)

  4. Ctags

  5. Chipyard pre-compile sources

  6. FireSim

  7. FireSim pre-compile sources

  8. FireMarshal

  9. FireMarshal pre-compile default buildroot Linux sources

  10. Runs repository clean-up

To execute the setup script, run the following command.

$chipyard/build-setup.sh riscv-tools -s 6 -s 7 -s 8 -s 9

The script will prompt the following message. Enter "y" and press Enter key to continue.

Alternatively, the release check prompt can be skipped by passing the "--force" flag.

./build-setup.sh riscv-tools -s 6 -s 7 -s 8 -s 9 --force

The set up process will take around 10-30 minutes, depending on the system configuration. After the script is finished, Chipyard is initialized and is ready to be used.

Step 5. On New Terminal

Finally, for every new terminal, run the following script to set up all the environment variables required by Chipyard.

source $chipyard/env.sh

Next Step

Next, we can try to run some simple RTL simulation.

pageRunning Chipyard RTL Simulation - Ubuntu or BWRC

Or, we can start with FPGA prototyping.

Last updated