Anda di halaman 1dari 11

Introduction to GEM5

By
Ashish Panday
Documentation
http://gem5.org/Main_Page
http://www.m5sim.org/Download
http://www.m5sim.org/Documentation
Introduction
Running GEM5
https://www.youtube.com/watch?v=SW63HJ0nW90
https://www.youtube.com/watch?v=gd_DtxQD5kc
https://www.youtube.com/watch?v=OXH1oxQbuHA
http://www.m5sim.org/Tutorials
What can GEM5 be used for?
HW/SW performance verification
Need performance measures of 1st order accuracy, capturing the things that
actually matter
Early Architectural Exploration
Need an environment where it is fast and easy to model and connect the key
architectural components of hardware platform
High-level Features
Configurable CPU models
Simple one-IPC (SimpleAtomic/Timing)
Detailed in-order execution (InOrder)
Detailed out-of-order execution (O3)

Pluggable memory system


Stitch memory system together out of components
Use Wisconsins Ruby

Device Models
Enough device models to boot Linux

Boot real operating systems


Linux, Android

Many ISAs
Where did it come from?
Building GEM5
Platforms
Linux, BSD, MacOS X, Solaris, etc
64 bit machines help quite a bit
Tools
GCC/G++ 4.2+ (or clang 2.9+)
Python 2.4+
SCons 0.98.1+
http://www.scons.org
SWIG 1.3.40+
http://www.swig.org
If using Ubuntu install
apt-get install python-dev scons m4 build-essential g++ swig zlib-dev
Compile Targets
build/<isa>/<binary>
ISAs:
ARM, ALPHA, MIPS, SPARC, POWER, X86
Binaries
gem5.debug debug build, symbols, tracing, assert
gem5.opt optimized build, symbols, tracing, assert
gem5.fast optimized build, no debugging, no symbols, no tracing, no
assertions
gem5.prof gem5.fast + profiling support
Compiling and Running GEM5
[/work/gem5] scons build/ARM/gem5.opt j4
[/work/gem5] ./build/ARM/gem5.opt h
Usage
=====
gem5.opt [gem5 options] script.py [script options]
gem5 is copyrighted software; use the --copyright option for details.
Options
=======
--version show program's version number and exit
--help, -h show this help message and exit
--build-info, -B Show build information
--copyright, -C Show full copyright information
--readme, -R Show the readme
Important options
--outdir=DIR, -d DIR Set the output directory to DIR [Default:
m5out]
--redirect-stdout, -r Redirect stdout (& stderr, without -e) to file
--redirect-stderr, -e Redirect stderr to file
--stats-file=FILE Sets the output file for statistics [Default:
stats.tx
--trace-start=TIME Start tracing at TIME (must be in ticks)
--trace-file=FILE Sets the output file for tracing [Default:
cout]t]
Fundamental modes of GEM5
Full system (FS)
For booting operating systems
Models bare hardware, including devices
Interrupts, exceptions, privileged instructions, fault handlers
Simulated UART output
Simulated frame buffer output
Syscall emulation (SE)
For running individual applications, or set of applications on MP
Models user-visible ISA plus common system calls
System calls emulated, typically by calling host OS
Simplified address translation model, no scheduling
Demonstration

Anda mungkin juga menyukai