This change updates the gem5 SST Bridge to use SST 13.0.0. Changes are made to replace SimpleMem class to StandardMem class as SimpleMem will be deprecated in SST 14 and above. In addition, the translator.hh is updated to translate more types of gem5 packets. A new parameter `ports` was added on SST's side when invoking the gem5 component which does not require recompiling the gem5 component whenever a new outgoing bridge is added in a gem5 config. Change-Id: I45f0013bc35d088df0aa5a71951422cabab4d7f7 Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
94 lines
2.5 KiB
Markdown
94 lines
2.5 KiB
Markdown
# Installing SST
|
|
|
|
The links to download SST source code are available at
|
|
<http://sst-simulator.org/SSTPages/SSTMainDownloads/>.
|
|
This guide is using the most recent SST version (13.0.0) as of September 2023.
|
|
The following guide assumes `$SST_CORE_HOME` as the location where SST will be
|
|
installed.
|
|
|
|
## SST-Core
|
|
|
|
### Downloading the SST-Core Source Code
|
|
|
|
```sh
|
|
wget https://github.com/sstsimulator/sst-core/releases/download/v13.0.0_Final/sstcore-13.0.0.tar.gz
|
|
tar xzf sstcore-13.0.0.tar.gz
|
|
```
|
|
|
|
### Installing SST-Core
|
|
|
|
```sh
|
|
cd sstcore-13.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`,
|
|
|
|
```sh
|
|
export PATH=$SST_CORE_HOME/bin:$PATH
|
|
```
|
|
|
|
## SST-Elements
|
|
|
|
### Downloading the SST-Elements Source Code
|
|
|
|
```sh
|
|
wget https://github.com/sstsimulator/sst-elements/releases/download/v13.0.0_Final/sstelements-13.0.0.tar.gz
|
|
tar xzf sstelements-13.0.0.tar.gz
|
|
```
|
|
|
|
### Installing SST-Elements
|
|
|
|
```sh
|
|
cd sst-elements-library-13.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),
|
|
|
|
```sh
|
|
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$SST_CORE_HOME/lib/pkgconfig/" >> ~/.bashrc
|
|
```
|
|
|
|
### Building gem5 library
|
|
|
|
At the root of the gem5 folder, you need to compile gem5 as a library. This
|
|
varies dependent on which OS you are using. If you're using Linux, then
|
|
execute the following:
|
|
```sh
|
|
scons build/RISCV/libgem5_opt.so -j $(nproc) --without-tcmalloc --duplicate-sources
|
|
```
|
|
In case you're using Mac, then type the following:
|
|
```sh
|
|
scons build/RISCV/libgem5_opt.dylib -j $(nproc) --without-tcmalloc --duplicate-sources
|
|
```
|
|
|
|
**Note:**
|
|
* `--without-tcmalloc` is required to avoid a conflict with SST's malloc.
|
|
* `--duplicate-sources` is required as the compilation of SST depends on sources to be present in the "build" directory.
|
|
* The Mac version was tested on a Macbook Air with M2 processor.
|
|
|
|
### Compiling the SST integration
|
|
|
|
Go to the SST directory in the gem5 repo.
|
|
```sh
|
|
cd ext/sst
|
|
```
|
|
Depending on your OS, you need to copy the correct `Makefile.xxx` file to
|
|
`Makefile`.
|
|
```sh
|
|
cp Makefile.xxx Makefile # linux or mac
|
|
make -j4
|
|
```
|
|
The make file is hardcoded to RISC-V. IN the case you wish to compile to ARM,
|
|
edit the Makefile or pass `ARCH=RISCV` to `ARCH=ARM` while compiling.
|
|
### Running an example simulation
|
|
|
|
See `README.md`
|