Sie sind auf Seite 1von 13

National Institute of Technology Karnataka, Surathkal

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING
GEM5 SPLASH2 BENCHMARKS REPORT
SUBMITTED BY

VIKAS B
11CO100

CONTENTS:
In this report I have explained the steps to install splash2 benchmarks once
gem5 is installed in a system.Steps to patch splash2 benchmark programs are
shown. Then I have also shown the steps to configure the makefile.config file
to make cross compiled files for various architectures such as alpha , arm and
x86. Screenshots are attached for this purpose.
Steps to make various cross compiled files for various architectures of different
splash2 programs are explained. Steps to run splash2 benchmark programs are
also shown. Steps are almost similar to running programs on full system mode.
I have also explained the steps to run a bashscript to automate the terminal so
that we can run different combinations of splash2 programs by changing the
system parameters. Screenshots are attached for this purpose.

RUNNING SPLASH2 BENCHMARKS ON GEM5


We assume gem5 and full system stuff are built.
Steps to Build/Install Splash2 benchmarks
1. Open the Terminal
2. Change to gem5 folder.cd gem5.
3. Make a folder under gem5 called benchmark.
4. mkdir benchmark
5. Now download the splash2 from website.Paste the zip file inside
benchmark directory
6. Extract the zip file using tar xvzf splash2.gz
7. Now download the patch for splash2 from website udel and paste it inside
spalsh2 directory
8. appy the patch as patch -p1<patch name
9. patch -p1<splash2-modified.patch
10.Now splash2 benchmark is built
Change Makefile.config file line 9. on line change the macros to
c.m4.null.POSIX.
Makefile.config is built in as default for x86 programs
11.In BASEDIR set the path to the Makefile.config file. It is BASEDIR=
12.To check whether splash2 is patched. Come back to home directory.
13.cd gem5
14.cd benchmark/spalsh2/codes/kernels/fft
15.type make
16.if successful then its patched
COMPILING SPLASH2 FOR DIFFERENT ARCHITECTURES
ALPHA STEPS
Make a backup copy of default(gcc-x86) Makefile.config file.
1. Open Makefile.config in splash2/codes directory
2. Now change the cc=gcc in Makefile.config as cc=path to alpha compiler.
3. cc=/home/vikas/gem5/CROSSCOMPILER/alpha-unknown-linuxgnu/bin/alpha-unknown-linux-gnu-gcc
4. Change Ld flags and Cd flags in Makefile.config file as follows
5. CFLAGS := $(CFLAGS) I/home/vikas/gem5/CROSSCOMPILER/alpha-unknown-linuxgnu/alpha-unknown-linux-gnu/sys-root/usr/include

6. CFLAGS := $(CFLAGS) -static -static-libgc


7. LDFLAGS := $(LDFLAGS) L/home/vikas/gem5/CROSSCOMPILER/alpha-unknown-linuxgnu/alpha-unknown-linux-gnu/lib
8. LDFLAGS := -lm. Makefile.config file is shown in screenshot.

Let us now make the cross compiled file for ALPHA architecture for programs
given in apps and kernels in codes under splash2 directory.
Let us make cross compiled file for splash2/codes/kernels/fft for Alpha
1. Open the terminal .Change to gem5 folder
2. Change to ftt folder. cd benchmark/splash2/codes/kernels/fft
3. type make clean
4. type make
Now the cross compiled file will be generated in fft folder. Same procedure can
be applied to other programs to generate crosscompiled files.

ARM STEPS
Replace the Makefile.config with the default Makefile.config file
1. Open Makefile.config in splash2/codes directory
2. Now change the cc=gcc in Makefile.config as cc=arm-linux-gnueabi and
save the file.

Let us now make the crosscomiled file for ALPHA architecture for programs
given in apps and kernels in codes under splash2 directory.
Let us make cross compiled file for splash2/codes/kernels/fft for Alpha
1. Open the terminal .Change to gem5 folder
2. Change to ftt folder. cd benchmark/splash2/codes/kernels/fft
3. type make clean
4. type make
Now the cross compiled file will be generated in fft folder. Same procedure
can be applied to other programs to generate crosscompiled files.

X86 STEPS:
Replace the Makefile.config with the default Makefile.config file.Since the
default Makefile.config is written for x86 we need not make any changes.

Let us now make the crosscomiled file for X86 architecture for programs given
in apps and kernels in codes under splash2 directory.
Let us make cross compiled file for splash2/codes/kernels/fft for x86
1. Open the terminal .Change to gem5 folder
2. Change to ftt folder. cd benchmark/splash2/codes/kernels/fft
3. Type make clean
4. Then make.
Now the cross compiled file will be generated in fft folder. Same procedure
can be applied to other programs to generate crosscompiled files.

RUNNING SPLASH2 PROGRAMS IN FS MODE


ARM STEPS
1. Once crosscompiled file is generated using Makefile.config. Move the
crosscompiled file to home directory
2. Now copy the compiled file to the image which you want to run in fs
mode.
3. Let us use linux-arm-ael image since it is set as default disk-image.
4. You can use any image but set the disk image you are using as default
image in benchmarks.py if you are not specifying disk image in command
line.

Make an rcs script fft.rcs and paste the file gem5/configs/boot.


Run the fft program the same way we ran fact program for alpha and arm
architectures. It is pretty similar to running any program on full system mode
FFT on ARM screenshot .We used linux-arm-ael as default image.
Type the command to run the splash2 benchmark program

FFT RUN ON ALPHA.We have used parsec image.

RUNNING SPLASH2 PROGRAMS USING BASH SCRIPT


In order to run a number of combinations of l1,l2 cache ,ram size, cpu and other
parameters its better to run commands using bashscript. Bashscript will
automate the terminal.
WRITE A BASHSCRIPT
1. Open gedit and save the file as .sh after filling in with some
commands.Let us save it as fft.sh in home directory
2. Give execute permission to fft.sh .Change to directory where fft is
present.
3. Type chmod +x fft.sh
4. To run fft.sh type ./fft.sh in terminal where fft.sh is present

Screenshot when ./fft.sh is typed in terminal is shown and fft.sh is also shown

FFT BASHSRICPT COMMAND EXECUTION

Das könnte Ihnen auch gefallen