Files
gem5/ext/sst/INSTALL.md
Hoa Nguyen 7bc9b0175f misc,ext: Add gem5/SST integration
Enable a gem5 system to be an SST::Component.

This change includes,
  - SST::gem5Component: responsible for,
      - initializing the Python environment for gem5
      - instantiating gem5 SimObjects
      - connecting SST::SSTResponderSubComponent to
gem5::OutgoingRequestBridge
      - hanlding the gem5 event queue (no thread-synchronization)
      - handling executing gem5 events
  - SST::SSTResponderSubComponent: responsible for,
      - receiving gem5 requests and sending the requests to
memory.
      - sending responses to the corresponding
gem5::OutgoingRequestBridge.
  - SST::SSTResponder: owned by SSTResponderSubComponent, the
actual actor that sends gem5's requests to memory.
  - gem5::OutgoingRequestBridge: receives the requests from
gem5 and sends them to SST. This SimObject allows the initialization
requests to be cached and the receiver could query the
initialization data later on.
  - gem5::SSTResponderInterface: the interface specifying how SST
communicates with gem5.
  - A working example of a gem5/SST setup.

More information is available at ext/sst/README.md.
For installation instructions, please refer to ext/sst/INSTALL.md.

Change-Id: I6b81260ef825415bcfe72b8a078854f4c94de782
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50468
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-11-27 04:24:15 +00:00

2.2 KiB

Installing SST

The links to download SST source code are available here [http://sst-simulator.org/SSTPages/SSTMainDownloads/]. This guide is using the most recent SST version (11.0.0) as of September 2021. The following guide assumes $SST_CORE_HOME as the location where SST will be installed.

SST-Core

Downloading the SST-Core Source Code

wget https://github.com/sstsimulator/sst-core/releases/download/v11.0.0_Final/sstcore-11.0.0.tar.gz
tar xf sstcore-11.0.0.tar.gz

Installing SST-Core

cd sstcore-11.0.0
./configure --prefix=$SST_CORE_HOME --with-python=/usr/bin/python3-config \
            --disable-mpi # optional, used when MPI is not available.
make all -j$(nproc)
make install

Update PATH,

export PATH=$SST_CORE_HOME/bin:$PATH

SST-Elements

Downloading the SST-Elements Source Code

wget https://github.com/sstsimulator/sst-elements/releases/download/v11.0.0_Final/sstelements-11.0.0.tar.gz
tar xf sstelements-11.0.0.tar.gz

Installing SST-Elements

cd sst-elements-library-11.0.0
./configure --prefix=$SST_CORE_HOME --with-python=/usr/bin/python3-config \
            --with-sst-core=$SST_CORE_HOME
make all -j$(nproc)
make install

Adding PKG_CONFIG_PATH to .bashrc (so pkg-config can find SST .pc file),

echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$SST_CORE_HOME/lib/pkgconfig/" >> ~/.bashrc

Building gem5 library

At the root of gem5 folder,

scons build/RISCV/libgem5_opt.so -j $(nproc) --without-tcmalloc

Compiling the SST integration

At the root of gem5 folder,

cd ext/sst
make

Running an example simulation

Downloading the built bootloader containing a Linux Kernel and a workload,

wget http://dist.gem5.org/dist/develop/misc/riscv/bbl-busybox-boot-exit

Running the simulation

sst --add-lib-path=./ sst/example.py

bbl-busybox-boot-exit contains an m5 binary, and m5 exit will be called upon the booting process reaching the early userspace. More information about building a bootloader containing a Linux Kernel and a customized workload is available at [https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/develop/src/riscv-boot-exit-nodisk/].