Getting Started

In this section, we will explain how to prepare SimpleSSD in step by step.

SimpleSSD-FullSystem

Prerequisite

Before downloading SimpleSSD-FullSystem, you should install dependencies. As gem5 only supports Linux system, SimpleSSD-FullSystem does not supports other operating systems such as Windows or Mac OS.

# For Debian based Linux
apt install build-essentials
apt install scons python-dev zlib1-dev m4 cmake
apt install libprotobuf-dev protobuf-compiler
apt install libgoogle-perftools-dev

# For Red Hat based Linux
yum groupinstall "Development Tools"
yum install epel-release
yum install scons python2-devel zlib-devel cmake
yum install protobuf-devel google-perftools-devel

Download source code

After installing libraries, clone GitHub repository and configure submodules.

git clone git@github.com:simplessd/simplessd-fullsystem
cd simplessd-fullsystem
git checkout v2.0.1
git submodule update --init --recursive

Build

Build SimpleSSD-FullSystem using scons. SimpleSSD only supports ARM and X86 architectures.

For more details on command line, check gem5 build instruction.

# For ARM architecture
scons build/ARM/gem5.opt -j 8 --ignore-style

# For X86 architecture
scons build/X86/gem5.opt -j 8 --ignore-style

Prepare full system files

As we will boot gem5 in full system simulation mode, we need full system files such as Linux Kernel image and disk image. If you want to download original gem5-provided full system files, visit gem5 download page. We recommend to download files from here, because the files from gem5 does not support NVMe. You don’t need to download kernel_configs directory if you are not plan to build Linux Kernel on your own.

Create directory to store downloaded files and set M5_PATH environment variable points that directory.

mkdir $HOME/m5
export M5_PATH=$HOME/m5

Download files from the above link. If you only downloaded files we provided, a directory tree should looks like:

$M5_PATH
├─ binaries
│ ├─ boot.arm
│ ├─ boot_emm.arm
│ ├─ boot_emm.arm64
│ ├─ aarch64-vmlinux-4.9.92
│ └─ x86_64-vmlinux-4.9.92
└─ disks
  ├─ linaro-aarch64-linux.img
  └─ x86root

ARM specific stuff

We need to compile dtc files to create dtb files. These file define hardware components (and its information) exist on current system.

Install a DeviceTree Compiler.

# For Debian based Linux
apt install device-tree-compiler

# For Red Hat based Linux
yum install dtc

You can find dtc files in system/arm/dt of SimpleSSD-FullSystem repository.

cd system/arm/dt
make

make will generates dtb files for VExpress_GEM5_V1 system of gem5. Each file defines architecture (armv7 or armv8) and the number of CPU in the system (1, 2, 4. 8 or 16). Copy or move produced dtb to $M5_PATH/binaries.

mv *.dtb $HOME/m5/binaries

Now you are ready to execute SimpleSSD-FullSystem. See Execution of SimpleSSD-FullSystem for running instructions.

SimpleSSD-Standalone

Prerequisite

Before downloading SimpleSSD-Standalone, you need C/C++ compiler which supports C++11 and <regex>. If you are on Windows, MSVC 2015 or newer will work. If you are on Linux system, gcc/g++ 4.9 or newer will work.

SimpleSSD-Standalone uses cmake for build system. If you prefer to use LLVM you may need to modify CMakeList.txt file.

Install cmake 3.10 or newer. (> 2.8 may work.)

Download source code

After installing cmake, clone GitHub repository and configure submodules.

git clone git@github.com:simplessd/simplessd-standalone
cd simplessd-standalone
git checkout v2.0-rc3
git submodule update --init --recursive

Build

Build SimpleSSD-Standalone using following command line.

cmake -DDEBUG_BUILD=off .
make -j 8

To build SimpleSSD-Standalone in debug mode, use -DDEBUG_BUILD=on. After successful build, you can find simplessd-standalone executable on current working directory.

Now you are ready to execute SimpleSSD-Standalone. See Execution of SimpleSSD-Standalone for running instructions.