Simple Scalar CS 401 A Computer Architecture Simulator

  • Slides: 17
Download presentation
Simple. Scalar CS 401

Simple. Scalar CS 401

A Computer Architecture Simulator Primer n What is an architectural simulator? n – Tool

A Computer Architecture Simulator Primer n What is an architectural simulator? n – Tool that reproduces the behavior of a computing device

Simulation Suite Overview

Simulation Suite Overview

Global Simulator Options (cont. ) n n n n • Supported on all simulators

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>

Global Simulator Options n n n n • Configuration files – To generate a

Global Simulator Options n n n n • Configuration files – To generate a configuration file • Specify non-default options on command line • And, include “-dumpconfig <file>” to generate configuration file – Comments allowed in configuration files, all after “#” ignored – Reload configuration files using “-config <file>”

sim-cheetah …(cont. ) n n n n -R <string> # replacement policy, i. e.

sim-cheetah …(cont. ) n n n n -R <string> # replacement policy, i. e. , lru or opt -C <string> # cache configuration, i. e. , fa, sa, or dm -a <int> # min number of sets (log base 2, line size for DM) -b <int> # max number of sets (log base 2, line size for DM) -l <int> # line size of the caches (log base 2) -n <int> # max degree of associativity to analyze (log base 2)

sim-cheetah (example) n Configurations: n least-recently-used (LRU) replacement policy 128 to 2048 sets 1

sim-cheetah (example) n Configurations: n least-recently-used (LRU) replacement policy 128 to 2048 sets 1 -way to 4 -way associativity 16 -byte cache lines n Configuration file: n n n n -R -a -b -l -n lru 7 11 4 2 # replacement policy is lru. # min number of sets (log 128) # max number of sets (log 2048) # line size of the caches (log 16) # max degree of associativity to analyze (log 4)

sim-cache …(cont. ) n n n -cache: dl 1 <string> # l 1 data

sim-cache …(cont. ) n n n -cache: dl 1 <string> # l 1 data cache config, i. e. , {<config>|none} -cache: dl 2 <string> # l 2 data cache config, i. e. , {<config>|none} -cache: il 1 <string> # l 1 inst cache config, i. e. , {<config>|dl 1|dl 2|none} -cache: il 2 <string> # l 2 instruction cache config, i. e. , {<config>|dl 2|none} -tlb: itlb <string> # instruction TLB config, i. e. , {<config>|none} -tlb: dtlb <string> # data TLB config, i. e. , {<config>|none}

sim-cache …(cont. )

sim-cache …(cont. )

sim-cache …(cont. )

sim-cache …(cont. )

sim-bpred n n n n -bpred <string> -bpred: bimod <int> -bpred: 2 lev <int

sim-bpred n n n n -bpred <string> -bpred: bimod <int> -bpred: 2 lev <int list. . . > -bpred: comb <int> # branch predictor type {nottaken|bimod|2 lev|comb} # bimodal predictor config (<table size>) # 2 -level predictor config (<l 1 size> <l 2 size> <hist_size> <xor>) # combining predictor config (<meta_table_size>) n * Predictor `comb' combines a bimodal and a 2 -level predictor. n -bpred: ras n <int> # return address stack size (0 for no return stack)

Running Simple. Scalar Tools …(cont. ) n n n The tool set takes binaries

Running Simple. Scalar Tools …(cont. ) n n n The tool set takes binaries compiled for the Simple. Scalar architecture and simulates their execution on one of several provided processor simulators. sets of precompiled binaries (including SPEC 95) a modified version of GNU GCC (with associated utilities) that allows you to compile your own Simple. Scalar test binaries from FORTRAN or C code.

Running Simple. Scalar Tools (The SPEC 95 Benchmark Binaries) n n n The Standard

Running Simple. Scalar Tools (The SPEC 95 Benchmark Binaries) n n n The Standard Performance Evaluation Corporation (SPEC) provides (for a fee) a set of benchmarks that are used to evaluate processors. You can find information about these benchmarks on the Web at http: //www. spec. org/osg/cpu 95/.

Running Simple. Scalar Tools (compile your own test binaries ) n Compiling a C

Running Simple. Scalar Tools (compile your own test binaries ) n Compiling a C program, e. g. n ssbig-na-sstrix-gcc -g -O -o foo. c –lm n Compiling a Fortran program, e. g. n ssbig-na-sstrix-f 77 -g -O -o foo. f -lm

Running Simple. Scalar Tools …(cont. ) n • Running a program. /sim-cheetah -config <file>

Running Simple. Scalar Tools …(cont. ) n • Running a program. /sim-cheetah -config <file> <executable file for Simple. Scalar> <parameters> n • Example. /sim-cheetah -config test go. ss 2 8 go. in

Running Simple. Scalar Tools n • Example. /sim-cheetah -config <arguments> go. ss 2 8

Running Simple. Scalar Tools n • Example. /sim-cheetah -config <arguments> go. ss 2 8 go. in n n n • Where <arguments> : the list of sim-cheetah parameters needed to produce results for the specified cache configurations. go. ss : the Simple. Scalar binary for the "go" benchmark. "2 8“ : the play quality and the board size for the go simulation. "go. in" : a file that specifies the starting board position (in this case an empty file. )

More Information n n http: //www. simplescalar. com For more information about simplescalar, you

More Information n n http: //www. simplescalar. com For more information about simplescalar, you can download userguide and hackguide for it.