Simple Scalar Tool Set Version 2 CSE 323


















- Slides: 18
Simple. Scalar Tool Set, Version 2 CSE 323 Department of Computer Engineering
A Computer Architecture Simulator n What is an architectural simulator? n Tool that reproduces the behavior of a computing device n What is Simple. Scalar? n n n A simulator that performs fast, flexible and accurate simulation of modern processors that implement the Simple. Scalar Architecture. What is a Simple. Scalar Architecture? A close derivative of the MIPS architecture.
Simulation n n How does the simulation? Takes binaries compiled for the Simple. Scalar architecture and simulates their execution on processor simulator.
Simulation Suite Overview
Binaries? n n n 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.
Simple. Scalar Overview Simulator source Host C compiler Results
How to make a binary for Simple. Scalar n n n You will be working on TUX machine (IP: 10. 2. 7. 254) with your accounts and passwords. Simple. Scalar is located in /usr/local/ Copy the makefile into your own directory. n n 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. n vi Makefile myprog 1: myprog 1. c $(CC) $(CFLAGS) -o myprog 1. c
How to make a binary for Simple. Scalar n Compile your c code n n make myprog 1 Run the simulator n /usr/local/simplescalar/simplesim-2. 0/sim-cache myprog 1
Global Simulator Options (cont. ) n n n n Supported on all simulators -h -d -i -q -config <file> -dumpconfig <file> - print simulator help message - enable debug message - start up in DLite! debugger - quit immediately - read config parameters from <file> - save config parameters into <file>
Cache Simulation Options n n n -cache: dl 1 -cache: dl 2 -cache: il 1 -cache: il 2 -tlb: itlb -tlb: dtlb <config> < config > < config > l 1 data cache l 2 data cache l 1 inst cache l 2 inst cache instruction TLB data TLB
sim-cache
sim-cache …(cont. ) n The cache size is therefore the product of, <nsets>, <bsize>, <assoc>. n il 1: 256: 32: 1: 1 (8 KB)
sim-cache …(cont. )
Example n myprog 1. c n #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]; }
Example (cont’d) n adding below ones into the Makefile myprog 1: myprog 1. c $(CC) $(CFLAGS) -o myprog 1. c n Compile myprog 1. c n n make myprog 1 Run the simulator with sim-cache defaults n /usr/local/simplescalar/simplesim-2. 0/sim-cache myprog 1
Example (cont’d) n Collect the output n n n il 1. misses il 1. miss_rate dl 1. misses dl 1. miss_rate ul 2. misses ul 2. miss_rate 381 # total number of misses 0. 0001 # miss rate (i. e. , misses/ref) 131512 # total number of misses 0. 0626 # miss rate (i. e. , misses/ref) 65933 # total number of misses 0. 2506 # miss rate (i. e. , misses/ref)
Example (cont’d) n Run the binary for the following cache system n n unified cache with 256 sets x 32 bytes per block /usr/local/simplescalar/simplesim-2. 0/sim-cache: il 1 dl 1 -cache: dl 1 ul 1: 256: 32: 1: l -cache: dl 2 none -cache: il 2 none myprog 1 Collect the results Comment on the results
More Information n http: //www. simplescalar. com


















