1 / 18

SimpleScalar Tool Set, Version 2

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?

jui
Télécharger la présentation

SimpleScalar Tool Set, Version 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 Simulator source Host C compiler Results

  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 <file> - read config parameters from <file> • -dumpconfig <file> - save config parameters into <file>

  10. 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

  11. sim-cache

  12. sim-cache …(cont.) • The cache size is therefore the product of, <nsets>, <bsize>, <assoc>. • 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

More Related