Architectural Simulation • What is an architectural simulator? SimpleScalar Primer – A tool that mimics the behavior of a computing device Program outputs Processor Program CSE 471, Spring 2006 Simulator Processor Metrics Program inputs Why simulate? Simulation Tools • Easier to develop SW than HW • Simulators – Mimic processors, collect stats • Only model what you care about • Benchmarks • Control all aspects of execution – Programs run on simulated processors • Inspect internal state – Chosen for two reasons – To learn, as in SPIM • Representative of real workloads – To debug, like in Valgrind (vmware?) • Challenge the processor
SimpleScalar Toolset SimpleScalar Architecture • PISA Instruction Set • Consists of – RISC, Like MIPS – Several simulators • Simulated Processor Pipeline – Compilation tools • We’ll use Instructions flow this way – Mostly just one simulator, sim-outorder – Maybe some compilation tools SPEC95 Benchmarks The Benchmarks • Compress • Benchmarks are programs run when measuring system performance – A data compressor • Cc1 • SPEC95 benchmarks are good for – A C compiler measuring processor performance • Go • We’ll use 4 of them with SimpleScalar – AI program that plays the game of GO • Perl – A perl program interpreter
Finding the Tools Running the Simulator • Any instructional Linux machine sim-outorder <sim-params> program <prg-params> – /cse/courses/cse471/06sp/simplescalar – More details on course web Example: Running $ sim-outorder -redir:sim HelloWorld.dat HelloWorld.ss Prints “Hello, world!” and produces HelloWorld.dat HelloWorld.dat contains metrics generated by the simulator while it ran HelloWorld.ss Simulator Parameters Caveat Simulator • Most describe the simulated processor • sim-outorder is slow – E.g., how many ALUs, what size caches – Around 4000 times slower than a real – See docs on course web machine • Some control simulator output • Plan ahead – -redir:sim FILE puts metrics into FILE – Simulations in this class might take an hour – -redir:prog FILE puts program output in FILE – -dumpconfig FILE prints config options to FILE – -config FILE reads config options from FILE
Section Today • Go to one of the instructional labs • Try to use the simulator • I’ll be in 006 from 2:30 to 3:20 if you have questions
Recommend
More recommend