A Chip multi-procEssor for Very Energy-efficient aeRospace missiOns
If you are using the pulp VM, QuestaSim and the PULP RISCV Toolchain are already installed. The paths in this tutorial are based on the VM.
If you are following this tutorial on your own machine, adjust the paths to where you installed the tools!
To configure the access to these tools in your user, run the following commands:
# PULP Toolchain
export PULP_RISCV_GCC_TOOLCHAIN=/opt/riscv
export PATH="$PATH:/opt/riscv/bin"
# Mentor Questa
export LM_LICENSE_FILE=/opt/mentor/license.dat
export PATH=$PATH:/opt/mentor/questasim/linux_x86_64/
You should add these commands to the end of your .bashrc file, otherwise you’ll have to run it every time you log in to the machine.
For this tutorial, create a pulp-tutorial folder in your home folder:
mkdir pulp-tutorial
Enter in the folder:
cd pulp-tutorial
Clone the PULP Project
git clone https://github.com/pulp-platform/pulp.git
Enter the folder
cd pulp
Source the tools configurations
source setup/vsim.sh
Download the project’s files
make checkout
Generate scripts
make scripts
BUG CORRECTION Comment line 57 in
pulp/sim/Makefile, as it looks for amodelsim.inifile which does not exist (yet):
# @chmod +w modelsim.ini
Compile the project, you should get no errors.
make build
In your pulp-tutorial folder clone the regression_tests and pulp-runtime repositories:
git clone https://github.com/pulp-platform/regression_tests.git
git clone https://github.com/pulp-platform/pulp-runtime.git
Source pulp-runtime configurations:
source pulp-runtime/configs/pulp.sh
Set up the toolchain paths (unnecessary if you have followed Step 1!):
export PATH="$PATH:/opt/riscv/bin"
export PULP_RISCV_GCC_TOOLCHAIN="/opt/riscv"
Enter the test source folder:
cd regression_tests/hello
Compile and run (in Questa)!
make clean all run
After some errors, warnings and debug output a [STDOUT-CL31_PE0] Hello ! message must appear on the screen.
You can use the regression_tests/hello folder as a template to develop your own PULP applications. The code is run in the complete hardware simulation in Questa.