Download presentation
Presentation is loading. Please wait.
Published byJulian Mathews Modified over 9 years ago
1
SimpleScalar Tool Set, Version 2 CSE 323 Department of Computer Engineering
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.
3
Simulation How does the simulation? Takes binaries compiled for the SimpleScalar architecture and simulates their execution on processor simulator.
4
Simulation Suite Overview
5
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.
6
SimpleScalar Overview Results Simulator source Host C compiler
7
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 Makefile myprog1:myprog1.c $(CC) $(CFLAGS) -o myprog1 myprog1.c
8
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
9
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 - read config parameters from -dumpconfig - save config parameters into
10
Cache Simulation Options -cache:dl1 l1 data cache -cache:dl2 l2 data cache -cache:il1 l1 inst cache -cache:il2 l2 inst cache -tlb:itlb instruction TLB -tlb:dtlb data TLB
11
sim-cache
12
sim-cache …(cont.) The cache size is therefore the product of,,,. il1:256:32:1:1(8KB)
13
sim-cache …(cont.)
14
Example myprog1.c #define N 1024 main() { 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]; }
15
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
16
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)
17
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
18
More Information http://www.simplescalar.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.