This repo contains experiments to study performance of gem5 against a real hardware. The experiments are based on gem5art framework.
- gem5-configs: contains python scripts that configure for skylake micro-architecture in gem5.
- system/
core.py
: contains the below CPU classes.- UnCalibCPU: configured based on the documentation available for the micro-architecture.
- CalibCPU: considering the absence of certain features in gem5, for example, absence micro-op fusion in gem5, this configuration offsets such deficiencies by improving some other parameters.
- MaxCPU: models a CPU with maximum pipeline widths, minimum pipeline and instruction latencies.
- system/
caches.py
: classic cache model. - system/
MESI_Two_Level.py
: Ruby cache system for MESI protocol. - system/
se.py
: sets a system to run experiments in SE mode. - system/
fs.py
: sets a system to run experiments in FS mode. run-se.py
: SE mode run script.run-spec-fs.py
: FS mode run script.
- system/
- results: contains the experiment results.
launch_microbm_experiment.py
: script to launch the microbenchmark experiments.launch_spec2006_experiment.py
: script to launch the spec2006 experiments.
Note: The following steps describe how to setup and run experiments with microbenchmarks, refer this tutorial for running experiments with spec2006.
git clone https://github.com/darchr/gem5-skylake-config.git
cd gem5-skylake-config
git clone https://gem5.googlesource.com/public/gem5
cd gem5
scons build/X86/gem5.opt -j8
git clone https://github.com/darchr/microbench.git
# Checkout adjust-ters branch, this branch contains benchmarks with different iteration to capture complete behavior of sim-objects in gem5.
cd microbench
git fetch --all
git checkout adjust-iters
# Build the benchmarks
make
cd ..
# Create a virtual python3 environment before using gem5art
virtualenv -p python3 venv
source venv/bin/activate
# gem5art can be installed using pip
pip install gem5art-artifact gem5art-run gem5art-tasks
docker run -p 27017:27017 -v <absolute path to the created directory>:/data/db --name mongo-<some tag> -d mongo
# To launch experiment for the Calib config and control flow benchmarks
python launch_experiment.py Calib ctrl
# To launch experiment for the all configs and all benchmarks
python launch_experiment.py all all
These are primary references for skylake micro-architecture.
- Agner Fog, Microarchitecture of Intel and CPUs
- Agner Fog, Instruction tables
- Wikichip, Skylake Microarchitecture(server)
- Intel, Architecture Optimization Manual
These are for configuring a micro-architecture in gem5