Gem 5
Gem 5
Qi Guo <[email protected]> Institute of Computing Technology, Chinese Academy of Sciences M5 was updated as Gem5. This tutorial introduces how to running Gem5 in full system mode on X86 Ubuntu system.
% make install % m5term localhost 3456 Now you can successfully communicate with the simulated system on Ubuntu 10 running on the VMWARE workstation, and the simulation speed is not bad : ) 7. Using scripts to running commands on simulated system a) You can refer to $GEM5/config/boot/*.rcS to write your own running scripts b) ./build/ALPHA_FS/gem5.opt ./configs/example/fs.py --script=configs/boot/runscript.rcS
8. Integrate with McPAT a) Obtaining McPAT from website as http://www.hpl.hp.com/research/mcpat/ b) Obtaining patch from Richard Strongs website (UCSD) as https://bitbucket.org/rickshin/m5-mcpat-parser c) Patching d)
3. Patching it following instructions provided from http://www.capsl.udel.edu/splash/ 4. Modifying $SPLASH/codes/Makefile.config Replacing original gcc with cross compiler
CC := $CROSSCOMPILER/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-cc
$CROSSCOMPILER is the base directory where that cross compiler places. 5. Compiling each program Most programs can be compiled directly via make command under corresponding directory. Id like to introduce this process of some nontrivial programs, e.g., VOLREND: Compiling VOLREND a. Enter subdiretory ./libtiff to obtain libtiff.a for building executable VOLREND, modifying ./libtiff/Makefile as:
29 -AR= 29 +AR= /usr/bin/ar $CROSSCOMPILER/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-ar
150 150 +
b. Archive file libtiff.a could be obtained by make c. Executable file VOLREND could be obtain by make in top level directory. 6. Updating current disk image I will elaborate how to insert SPLASH-2 binaries into PARSEC-2.1 disk image provided by http://www.cs.utexas.edu/~parsec_m5, You can refer to their manual for the following steps and writing you own running scripts for SPLASH-2 and PARSEC-2.1. a. Mounting obtained linux image with PARSEC test % sudo mount o loop, offset=32256 /path/to/image/file /mount/point b. Transferring file to this disk % sudo cp /path/to/splash2 /mount/point/splash2 c. Unmounting this disk % sudo umount /mount/point