The test were run on a:
- Ubuntu 20.04.6 LTS environnement
- python 3.10
- Questa Intel Starter FPGA Edition-64 2023.2 and Questa 2024.3
- cocotb 1.9.2
- python >3.8
- questa simulator installed and referenced in the path environnement
- install cocotb 1.9.2 with command
pip install cocotb - install cocotb axi driver with command
pip install cocotbext-axiyou can check the installation of cocotb the commandcocotb-config --versionwhich will return1.9.2 - install cocotb framework from location !!URL OF COCOTB FRAMEWORK TO BE ADDED!!
The simulator Questa Intel Starter FPGA Edition-64 2023.2 is used for the test (you can use any questa simulator). It can be download at the following address:
The Questa binaries should be added to the environnement variable PATH before running the tests with command export PATH=<Questa_install_path>/questa_fse/bin:$PATH
This framework include additionnal features for cocotbext-axi such as stimuli from files and logger. This project is hosted at https://github.com/Elsys-Design/DIGITAL-VERIFICATION-COCOTB it is included in the proejct as submodule at path sim/cocotb-framework.
-
go into
sim/scenario/ -
configure your environnement for runningthe simulation. To do so you have to set at least 3 variables:
- SPACEFIBRELIGHT_ROOT_PATH : the main absolute path location of your spacefibre cloned project (the one with .git folder)
- FRAMEWORK_COCOTB_INSTALL_PATH : the absolute path location for your cocotb_framework
- GUI : set the variable to 1 to launch questa GUI or simply write 0 to directly run the simulaiton without GUI.
- HARDWARE_TARGET : sete the variable to "NG_ULTRA" or "VERSAL" depending on the target you are building the IP for
To do so you can execute in a terminal (or add them to you .bashrc)
#set you absolute path to the root of the project spacefibrelight export SPACEFIBRELIGHT_ROOT_PATH=<ABSOLUTE/PATH/>CNES_IP-SPACE-FIBRE #set your framework location export FRAMEWORK_COCOTB_INSTALL_PATH==<ABSOLUTE/PATH/>CNES_IP-SPACE-FIBRE/sim/cocyb-framework/src # Select 1 to have to gui loaded (you will have to click run all to start simualtion) # select 0 to have automatic export GUI=0 # Specfy the target, either VERSAL or NG_ULTRA export HARDWARE_TARGET="VERSAL" -
edit
RunSim.shto- match your framework installation path
- your spacefibrelight IP root dir
- select your custom parameters
-
execute
RunSim.sh <NAME_OF_THE_TEST>with NAME_OF_THE_TEST is equal to the folder name of the test to be ran. -
to execute every test available in every folders use command
RunSim.sh all
The Runme.sh script as several configuration variables:
-
SPACEFIBRELIGHT_ROOT_PATH:absolute path to the root of the project spacefibrelight -
FRAMEWORK_COCOTB_INSTALL_PATH: absolute path to the src directory of the project cocotb framework -
GUI: -Select1to have to gui loaded (you will have to click run all to start simulation) -Select0to have automatic -
WAVES- Select
1to create the full waveform for the test (questa WLF file) - select
0not to generate the waveforms
- Select
-
EXTRA_VSIM_CMD: you can set addition vsim command with this variable -
HARDWARE_TARGET:- Select
VERSALto build the IP for a VERSAL target - Select
NG_ULTRAto build the IP for a NG-ULTRA target
- Select
For convenience , you can create a file called sim/scenario/environnement.
This file will include all paramaters and will be sourced prior to launch simulation.
Here is an example of the content of the file (this file won't be part of the repository as this configuration is custom for each developper):
#set you absolute path to the root of the project spacefibrelight
export SPACEFIBRELIGHT_ROOT_PATH=/home/user/my/handsome/project/spacefibrelight
#set your framework location
export FRAMEWORK_COCOTB_INSTALL_PATH=$SPACEFIBRELIGHT_ROOT_PATH/sim/cocotb-framework/src
# Select 1 to have to gui loaded (you will have to click run all to start simualtion)
# select 0 to have automatic
export GUI=0
# Select 1 to create the full waveform for the test (questa WLF file)
# select 0 not ot generate the waveforms
export WAVES=0
# Specify target (uncomment the line needed and comment the other one)
export HARDWARE_TARGET="VERSAL"
# export HARDWARE_TARGET="NG_ULTRA"
##additionnal VSIM command
export EXTRA_VSIM_CMD="-do $SPACEFIBRELIGHT_ROOT_PATH/sim/scenario/custom.do"
#enable venv for pipx on ubuntu 24
export VIRTUAL_ENV=/home/flo/.local/lib/python3.12/site-packages/cocotb
On new ubuntu, global python installation is no longer authorized. you could use pipx which create a virtual env.
In order to make cocotb to work you should set : VIRTUAL_ENV with command
export VIRTUAL_ENV=/home/user/.local/lib/python3.12/site-packages/cocotb