Lab Software⚓
Get the Thales CVA6 contest project⚓
Warning
Depending on where your homedirectory is hosted (Brest or Nantes) you can experience very slow compilations. In any case, you can use the local disk of the computer but at your own risk (no data redundancy), and the data will not be accessible simply from another computer.
If you decide to work on the local disk, do not forget to copy the folder in your homedir at the end of sessions.
Open a terminal Ctrl+Alt+T then create the folder for the project with one of the methods below:
1 2 | |
1 2 | |
Clone the 2023-2024 git version :
1 2 3 4 5 | |
Installing the RISC-V toolchain in the util folder⚓
1 2 3 4 5 | |
Info
Note : This step may take around 50 minutes.
Clone Coremark in the app folder⚓
The Coremark app is missing on the git repository:
1 2 3 | |
Compiling mnist application⚓
We will run mnist later so let's compile it now:
With a text editor modify the first line of the files bin2mem.py and mem2coe.py:
1 2 3 | |
For example you can use nano in the terminal :
nano $PROJECTROOT/sw/utils/bin2mem.pynano $PROJECTROOT/sw/utils/mem2coe.py
Use Ctrl+X to save and close
Then compile mnist
1 2 3 | |
At the end of the compilation the mnist.riscv executable file must be created.
Simulation⚓
When the development environment is set up, it is now possible to run a simulation. Some software applications are available into the sw/app directory. Especially, there are benchmark applications such as Dhrystone and CoreMark and other test applications.
To simulate a software application on CVA6 processor, run the following command:
1 2 3 4 5 6 | |
This command:
- Compiles CVA6 architecture and testbench with Questa Sim tool.
- Compiles the software application to be run on CVA6 with RISCV tool chain.
- Runs the simulation.
Questa tool will open with waveform window. Some signals will be displayed; you are free to add as many signals as you want.
Moreover, all printf used in software application will be displayed into the transcript window of Questa Sim and save into uart file to the root directory.
Simulation may take lot of time, so you need to be patient to have results.
Simulation is programmed to run 10000000 cycles but the result is displayed before the end of simulation.
/!\ It will generate the vsim.wlf file of several GB. For mnist application, at the end of the simulation, result is diplayed as following:
1 2 3 4 5 6 | |
CVA6 software environment is detailed into sw/app directory.