GVSoC is the PULP chips simulator that is natively included in the Pulp SDK and is described and evaluated fully in Bruschi et al. [arXiv:2201.08166v1].
For a streamlined experience, you can build, run, and test the dramsys-integrated GVSoC simply by following instructions below:
On the ETH Network:
- Run the command:
Note: If you encounter errors related to Python packages not being found, please install the necessary packages yourself.
source dramsys_pushbutton_ETHenv.sh
Outside the ETH Network:
Ensure your system meets the following environment requirements:
- GCC version 11.2.0 or higher
- G++ version 11.2.0 or higher
- CMake version 3.18.1 or higher
Once these requirements are met, proceed by using:
source dramsys_pushbutton.sh
To help you get start with GVSoC+DRAMSys, we prepared GVSoC target pulp-open-ddr
is a template model of Pulp-SoC connected with external DRAM models. The default configuration utilizes one HBM2 channel for the DRAM model. If you want to use different DRAM models, you can modify the code in core/models/memory/dramsys.py
import gvsoc.systree as st
class Dramsys(st.Component):
def __init__(self, parent, name):
super(Dramsys, self).__init__(parent, name)
self.set_component('memory.dramsys')
self.add_properties({
'require_systemc': True,
'dram-type': 'hbm2',
})
You can change the dram-type
to ddr3
, ddr4
, hbm2
, lpddr4
, which they models DRAM of:
ddr3
: DDR3 DIMM (8 x MICRON_DDR3 Chips, 1GB capacity, 1600MHz-DDR)ddr4
: DDR4 DIMM (8 x JEDEC_SPEC_DDR4 Chips, 4GB capacity, 1866MHz-DDR )hbm2
: Single Channel of HBM2 Stack (1GB capacity, 2000MHz-DDR)lpddr4
: Single Channle of LPDDR4 Chip (1GB capacity, 3200MHz-DDR)
Once you have successfully go through source dramsys_pushbutton.sh
, the environment for GVSoC+DRAMSys co-simulation is setup
Then You can freely develop your own model, instance multiple DRAM models and connect them. You can follow the example in pulp/pulp/chips/pulp_open/pulp_open.py
80 ddr = memory.dramsys.Dramsys(self, 'ddr')
130 self.bind(soc_clock, 'out', ddr, 'clock')
164 self.bind(soc, 'ddr', ddr, 'input')
Note: If you opened a new terminal/shell to your workplace, please do source sourceme.sh
before building your GVSoC target, this will make sure neccesary environment parameters set properly for GVSoC+DRAMSys co-simulation.
There are a lot of on-developing GVSoC branchs for different extensions. To enbale GVSoC+DRAMsys co-simulations on those branches, there are following steps to follow:
- copy folder
add_dramsyslib_patches
- copy
dramsys_pushbutton_ETHenv.sh
anddramsys_pushbutton.sh
- Merge the
## Make Targets for DRAMSys Integration ##
part in Makefile - Merge the
## Envirment Parameters for DRAMSys Integration ##
part insourceme.sh
- Try to run
make drmasys_apply_patch
- if you encounter any errors, please try modify
core
&pulp
submodules accroding toadd_dramsyslib_patches/gvsoc_core.patch
andadd_dramsyslib_patches/gvsoc_pulp.patch
, and generate new patches replacing the old one inadd_dramsyslib_patches
- if you encounter any errors, please try modify
- After all setps above, you can run
source dramsys_pushbutton_ETHenv.sh
orsource dramsys_pushbutton.sh
to build, run, and test the dramsys-integrated GVSoC on your branch.
If you intend to use or reference GVSoC for an academic publication, please consider citing it:
@INPROCEEDINGS{9643828,
author={Bruschi, Nazareno and Haugou, Germain and Tagliavini, Giuseppe and Conti, Francesco and Benini, Luca and Rossi, Davide},
booktitle={2021 IEEE 39th International Conference on Computer Design (ICCD)},
title={GVSoC: A Highly Configurable, Fast and Accurate Full-Platform Simulator for RISC-V based IoT Processors},
year={2021},
volume={},
number={},
pages={409-416},
doi={10.1109/ICCD53106.2021.00071}}
These instructions were developed using a fresh Ubuntu 22.04 (Jammy Jellyfish).
The following packages needed to be installed:
sudo apt-get install -y build-essential git doxygen python3-pip libsdl2-dev curl cmake gtkwave libsndfile1-dev rsync autoconf automake texinfo libtool pkg-config libsdl2-ttf-dev
Additional Python packages are needed and can be installed with the following commands from root folder:
git submodule update --init --recursive -j8
pip3 install -r core/requirements.txt
pip3 install -r gapy/requirements.txt
Get submodules and compile GVSoC with this command:
make all
It will by default build it for generic targets rv32 and rv64. You can build it for another target with this command:
make all TARGETS=pulp-open
On ETH network, please use this command to get the proper version of gcc and cmake:
CXX=g++-11.2.0 CC=gcc-11.2.0 CMAKE=cmake-3.18.1 make all TARGETS=pulp-open
The following example can be launched on pulp-open:
./install/bin/gvsoc --target=pulp-open --binary examples/pulp-open/hello image flash run