Professional Documents
Culture Documents
Gem5 Notes
Gem5 Notes
It can simulate a complete system with devices and an operating system in full
system mode (FS mode), or user space only programs where system services are
provided directly by the simulator in syscall emulation mode (SE mode). There are
varying levels of support for executing Alpha, ARM, MIPS, Power, SPARC, RISC-V, and
64 bit x86 binaries on CPU models including two simple single CPI models, an out of
order model, and an in order pipelined model. A memory system can be flexibly built
out of caches and crossbars or the Ruby simulator which provides even more flexible
memory system modeling.
Currently, you must compile gem5 separately for every ISA that you want to
simulate. Additionally, if using ruby-intro-chapter, you have to have separate
compilations for every cache coherence protocol.
To build gem5, we will use SCons. SCons uses the SConstruct file (gem5/SConstruct)
to set up a number of variables and then uses the SConscript file in every
subdirectory to find and compile all of the gem5 source.
If you do not need to model the operating system for your research questions, and
you want extra performance, you should use SE mode. However, if you need high
fidelity modeling of the system, or OS interaction like page table walks are
important, then you should use FS mode.