simplescalar tool set, version 2

18
SimpleScalar Tool Set, Version 2 CSE 323 Department of Computer Engineering

Upload: jui

Post on 08-Jan-2016

41 views

Category:

Documents


1 download

DESCRIPTION

SimpleScalar Tool Set, Version 2. CSE 323 Department of Computer Engineering. A Computer Architecture Simulator. What is an architectural simulator? Tool that reproduces the behavior of a computing device What is SimpleScalar? - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: SimpleScalar Tool Set, Version 2

SimpleScalar Tool Set, Version 2

CSE 323Department of Computer

Engineering

Page 2: SimpleScalar Tool Set, Version 2

A Computer Architecture Simulator

What is an architectural simulator? Tool that reproduces the behavior of a computing device

What is SimpleScalar? A simulator that performs fast, flexible and accurate

simulation of modern processors that implement the SimpleScalar Architecture.

What is a SimpleScalar Architecture? A close derivative of the MIPS architecture.

Page 3: SimpleScalar Tool Set, Version 2

Simulation How does the simulation? Takes binaries compiled for the SimpleScalar

architecture and simulates their execution on processor simulator.

Page 4: SimpleScalar Tool Set, Version 2

Simulation Suite Overview

Page 5: SimpleScalar Tool Set, Version 2

Binaries? How to create binaries for the

architecture? The simulator provides sets of precompiled

binaries. Also provides a modified version of GCC that

allows you to compile your own binaries.

Page 6: SimpleScalar Tool Set, Version 2

SimpleScalar Overview

Results

Simulator source

Host C compiler

Page 7: SimpleScalar Tool Set, Version 2

How to make a binary for SimpleScalar You will be working on TUX machine

(IP:10.2.7.254) with your accounts and passwords. SimpleScalar is located in /usr/local/ Copy the makefile into your own directory.

cp /usr/local/simplescalar/simplesim-2.0/tests/src/Makefile ./

Add the necessary information about your c file into the make file in order to compile it.

vi Makefilemyprog1:myprog1.c$(CC) $(CFLAGS) -o myprog1 myprog1.c

Page 8: SimpleScalar Tool Set, Version 2

How to make a binary for SimpleScalar Compile your c code

make myprog1 Run the simulator

/usr/local/simplescalar/simplesim-2.0/sim-cache myprog1

Page 9: SimpleScalar Tool Set, Version 2

Global Simulator Options (cont.)

Supported on all simulators -h - print simulator help message -d - enable debug message -i - start up in DLite! debugger -q - quit immediately -config <file> - read config parameters from

<file> -dumpconfig <file> - save config parameters into

<file>

Page 10: SimpleScalar Tool Set, Version 2

Cache Simulation Options -cache:dl1 <config> l1 data cache -cache:dl2 < config > l2 data cache -cache:il1 < config > l1 inst cache -cache:il2 < config > l2 inst cache -tlb:itlb < config > instruction

TLB -tlb:dtlb < config > data TLB

Page 11: SimpleScalar Tool Set, Version 2

sim-cache

Page 12: SimpleScalar Tool Set, Version 2

sim-cache …(cont.)

The cache size is therefore the product of, <nsets>, <bsize>, <assoc>. il1:256:32:1:1 (8KB)

Page 13: SimpleScalar Tool Set, Version 2

sim-cache …(cont.)

Page 14: SimpleScalar Tool Set, Version 2

Example myprog1.c

#define N 1024main(){

int i,j,x[N][N];for(i=0;i<N;i++)

for(j=0;j<N;j++) x[i][j]=2*x[i][j];

}

Page 15: SimpleScalar Tool Set, Version 2

Example (cont’d) adding below ones into the Makefile

myprog1:myprog1.c$(CC) $(CFLAGS) -o myprog1 myprog1.c

Compile myprog1.c make myprog1

Run the simulator with sim-cache defaults /usr/local/simplescalar/simplesim-2.0/sim-

cache myprog1

Page 16: SimpleScalar Tool Set, Version 2

Example (cont’d) Collect the output

il1.misses 381 # total number of misses il1.miss_rate 0.0001 # miss rate (i.e.,

misses/ref) dl1.misses 131512 # total number of

misses dl1.miss_rate 0.0626 # miss rate (i.e.,

misses/ref) ul2.misses 65933 # total number of

misses ul2.miss_rate 0.2506 # miss rate (i.e.,

misses/ref)

Page 17: SimpleScalar Tool Set, Version 2

Example (cont’d)

Run the binary for the following cache system unified cache with 256 sets x 32 bytes

per block /usr/local/simplescalar/simplesim-2.0/sim-

cache -cache:il1 dl1 -cache:dl1 ul1:256:32:1:l -cache:dl2 none -cache:il2 none myprog1

Collect the results Comment on the results

Page 18: SimpleScalar Tool Set, Version 2

More Information

http://www.simplescalar.com