Running Instructions
In this page, we will explain how to run and configure SimpleSSD.
Execution of SimpleSSD-FullSystem
Build SimpleSSD-FullSystem using instruction.
Now you can start simulation using following command (Assume ARM architecture):
./build/ARM/gem5.opt --debug-flag=M5Print --debug-file=debug.txt \
./configs/example/fs.py --kernel=aarch64-vmlinux-4.9.92 \
--dtb-file=armv8_gem5_v1_4cpu.dtb --machine-type=VExpress_GEM5_V1 \
--num-cpu=4 --cpu-clock=2GHz --caches --l2cache --cpu-type=AtomicSimpleCPU \
--mem-size=4GB --mem-type=DDR4_2400_8x8 \
--ssd-interface=nvme --ssd-config=./src/dev/storage/simplessd/config/sample.cfg
Note
If you want to use disk image provided by CAMELab (Assume ARM architecture),
append --disk-image=linaro-aarch64-linux.img
to the end of the above command.
Note
If you want to use SATA or UFS interface as SimpleSSD interface,
you need to append --root-device=/dev/sdb1
to the end of the above command.
This is because gem5’s IDE controller is initialized after the SATA or UFS controller.
You can ignore this note if you try to boot gem5 using SimpleSSD, not using the IDE controller.
Let’s check all the options used in above command line. Command line for executing gem5 has following format:
./build/<arch>/gem5.<build mode> [gem5 options] <simulation script> [script options]
<arch>
can be ARM
or X86
, because SimpleSSD only supports these two architectures.
<build mode>
can be debug
, opt
, fast
, prof
, and perf
.
For more details, check gem5 build instruction.
<simulation script>
defines simulation hardware and software system.
gem5 provides example simulation scripts (in ./configs/example
).
We modified default full system simulation script (./configs/example/fs.py
) to enable SimpleSSD inside gem5.
Following sections describes each options used in command line.
Options for gem5 executable
In above example, --debug-flag
and --debug-file
options are used.
Here is the description of each options, including commonly used other options.
Options |
Description |
---|---|
|
Set comma-separated list of debug flags. This determine which debug log of hardware module will be printed. |
|
Set file to store debug log. |
|
Set directory to store all simulation outputs. |
|
Redirect stdout and stderr of gem5 to |
|
Redirect stderr of gem5 to |
For more options, use ./build/ARM/gem5.opt --help
or check here.
Options for simulation script
For options for ./configs/example/fs.py
, check following table.
Options |
Description |
---|---|
|
Set kernel image to use. This path is relative to |
|
Set # CPU of system to simulate.
If you are using |
|
Set CPU model to use. Default is |
|
Set clock speed (frequency) of CPU. |
|
Enable private L1I and L1D caches.
You can change size and associativity using following options:
|
|
Enable shared L2 cache.
You can change size and associativity using following options:
|
|
Set capacity of system memory (DRAM). |
|
Set memory model to use.
Possible values can be checked using |
|
Set script file automatically executed after boot. |
|
Set disk partition to mount as root (e.g., |
|
Set disk image to use as OS image. Default is |
Following options are ARM
architecture specific, so you don’t need to specify when using X86
architecture.
Options |
Description |
---|---|
|
Set compiled DeviceTree ( |
|
Set hardware platform to simulate.
You can check possible values using |
Following options are added by SimpleSSD.
Options |
Description |
---|---|
|
Set host interface protocol/hardware to use. Default is |
|
Set SimpleSSD configuration file. This path is relative to current working directory. |
For more options, use ./build/ARM/gem5.opt ./configs/example/fs.py --help
or check here.
For supported Linux Kernel versions, see Build Linux Kernel for gem5.
Execution of SimpleSSD-Standalone
Build SimpleSSD-Standalone using instruction.
Now you can start simulation using following command.
./simplessd-standalone ./config/sample.cfg ./simplessd/config/sample.cfg
Execution of SimpleSSD-Standalone is quite simple because all simulation options are defined in a separated file.
First file (./config/sample.cfg
) defines simulation configuration.
Second file (./simplessd/config/sample.cfg
) defines SSD configuration.
For SSD configuration, see above section.
Simulation configuration
Sample simulation file is provided with source code.
See config/sample.cfg
file for options and explanations.