How to Get Started

On this page, we’ll guide you through the process of setting up SimpleSSD, step by step.

Setting Up SimpleSSD-FullSystem

Preparatory Steps

Before you proceed with downloading SimpleSSD-FullSystem, there are certain prerequisite dependencies you need to install. Please note that gem5, which is integrated with SimpleSSD-FullSystem, only supports the Linux operating system. Therefore, unfortunately, SimpleSSD-FullSystem is not compatible with other operating systems, such as Windows or macOS.

For those utilizing Red Hat Enterprise Linux (RHEL) 8 or CentOS 8, you might need to install scons using pip2. We strongly suggest using virtualenv to manage your Python environments to avoid installing packages directly into the root directory. This approach not only maintains a clean root directory but also helps in avoiding any potential package conflicts.

# For Debian/Ubuntu based Linux
apt install build-essential
apt install scons python-dev zlib1g-dev m4 cmake
apt install libprotobuf-dev protobuf-compiler
apt install libgoogle-perftools-dev

# For RHEL 7 or before 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

# For RHEL 8 or later based Linux
## Run as root
dnf group install "Development Tools"
dnf install python3-virtualenv cmake zlib-devel python3-pip python3-devel
## Run as non-root
virtualenv -p python3 <your virtual env name>
. <your virtual env name>/bin/activate
pip install scons==3.1.2

Downloading the Source Code

Once the required libraries are successfully installed, the next step involves cloning the GitHub repository and configuring its submodules. If you wish to use a specific version of SimpleSSD, make sure to use the git checkout <version> command before initializing the submodules. This will ensure that the correct version is selected and prepared for further actions.

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

Building SimpleSSD-FullSystem

After downloading and configuring the source code, proceed to build SimpleSSD-FullSystem using scons. Please note that SimpleSSD only supports ARM and X86 architectures. If you need more specific details on using the command line during this process, you can refer to the gem5 build instruction, which provides a comprehensive guide on the subject.

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

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

Preparing Full System Files

Given that gem5 will be booted in full system simulation mode, full system files such as the Linux Kernel image and disk image are necessary. If you want to use the original gem5-provided full system files, you can find them on the gem5 download page. However, we recommend downloading files from the provided link, as the files directly from gem5 do not support NVMe. Unless you’re planning on building the Linux Kernel independently, there’s no need to download the kernel_configs directory.

Start by creating a dedicated directory to store these downloaded files. Then, set your M5_PATH environment variable to point to this directory. This will ensure that the system knows where to find the necessary files during the simulation process. Once you’ve downloaded the files from the link provided, your directory tree should resemble the structure described in the next section if you’ve only used the files we’ve provided. This structure is important for the successful operation of the system.

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 Preparations

Before you can successfully run SimpleSSD-FullSystem, there are a few ARM-specific tasks to complete. One of these tasks involves compiling .dts (Device Tree Source) files to create .dtb (Device Tree Binary) files. These .dtb files are crucial as they define the various hardware components, as well as relevant information about them, existing in the current system. To accomplish this, you will need to install a DeviceTree Compiler.

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

# For Red Hat based Linux
yum install dtc

# Or
dnf --enablerepo=PowerTools install dtc

You can locate the necessary .dts files within the ‘system/arm/dt’ directory of the SimpleSSD-FullSystem repository.

cd system/arm/dt
make

By using the ‘make’ command, these files can be compiled into .dtb files, each tailored for the VExpress_GEM5_V1 system of gem5. These .dtb files will define specific system architectures (armv7 or armv8) and the number of CPUs present in the system (options include 1, 2, 4, 8, or 16). Once the .dtb files are generated, copy or move them to the ‘$M5_PATH/binaries’ directory. This step ensures that the system can locate the .dtb files when running the simulation.

mv *.dtb $M5_PATH/binaries

Now, you’re all set to run SimpleSSD-FullSystem. For instructions on how to execute it, please refer to the Execution of SimpleSSD-FullSystem section.

Setting Up SimpleSSD-Standalone

Prerequisite Steps

Before initiating the download of SimpleSSD-Standalone, ensure that you have a C/C++ compiler installed, which supports both C++11 and the ‘<regex>’ library. For Windows users, Microsoft Visual C++ 2015 (MSVC 2015) or a more recent version will suffice. If you are using a Linux system, you should have gcc/g++ version 4.9 or newer installed.

SimpleSSD-Standalone employs ‘cmake’ as its build system. If you prefer to use LLVM as your compiler, it’s important to note that you might need to make modifications to the ‘CMakeList.txt’ file to ensure compatibility. Please install ‘cmake’ version 3.10 or newer before proceeding.

Downloading the Source Code

Once ‘cmake’ is properly installed, clone the SimpleSSD-Standalone repository from GitHub. Like the FullSystem version, you should also configure the submodules. Should you wish to use a specific version of SimpleSSD-Standalone, remember to execute the ‘git checkout <version>’ command before initializing the submodules. This allows you to select the correct version for your needs.

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

Building SimpleSSD-Standalone

With the necessary prerequisites installed and the source code downloaded, it’s time to build SimpleSSD-Standalone. Use the following commands in your terminal or command prompt:

cmake -DDEBUG_BUILD=off .
make -j 8

The first line initiates the building process using ‘cmake’, with the debug build option turned off. The second line runs the ‘make’ command, using 8 cores (as specified by ‘-j 8’) for the build process. If you wish to build SimpleSSD-Standalone in debug mode, replace ‘off’ with ‘on’ in the ‘cmake’ command line:

cmake -DDEBUG_BUILD=on .

Upon a successful build, the ‘simplessd-standalone’ executable will be available in your current working directory. With these steps completed, you are now prepared to run SimpleSSD-Standalone. For detailed instructions on how to execute the simulator, please refer to the Execution of SimpleSSD-Standalone section.