SimpleScalar Guide
SimpleScalar Guide
What is it?
SimpleScalar is a suite of processor simulators and tools used for simulating real programs running on a
modern processor and systems. It is used to build modeling applications for program performance
analysis, detailed micro-architectural modeling, and hardware-software co-verification.
The tool set includes sample simulators ranging from a fast functional simulator to a detailed, dynamically
scheduled processor model that supports non-blocking caches, speculative execution, and state-of-theart branch prediction. Basically, SimpleScalar is a C program which models a processor and it accepts the
programs (that could run on this hypothetical processor) as arguments.
SimpleScalar simulators can emulate the Alpha, PISA, ARM, and x86 instruction sets, and these are very
similar to the MIPS architecture that will be discussed in EE5364/CSCI5204.
SimpleScalar was developed at the University of Wisconsin in Madison and is one of the most widely used
architectural simulators in academia.
Why are we using this?
You will be using SimpleScalar for your assignments and/or course projects and this guide is being posted
now so that you may properly install the simulator on your CSELabs accounts and get comfortable with
the simulator well in advance.
Installing and setting up SimpleScalar on your CSELabs accounts
It is highly recommended that you install SimpleScalar on your CSELabs accounts since some simulations
take several hours (sometimes days) to complete and it may not be feasible for you to run them on your
personal machines. Having said that, you can always install it on your personal machines for development
work.
1. Find a big endian machine
This C code snippet will enable you to identify a big/little endian machine, however, all CSELabs
machines running Linux are big endian.
#include <stdio.h>
main()
{
long one=1;
if(!(*((char*)(&one))))
printf("Big endian\n");
else
printf("Small endian\n");
}
2. If, for example, you have to compare the IPC for different cache replacement policies (viz. FIFO,
Random, LRU, NMRU) for four different benchmarks (GCC, GO, GZIP, Anagram), then the graph
would look like this.
It is strongly recommended that you start using SimpleScalar for the getting simulation statistics for the
benchmarks provided. Also, it will be useful to start going through the C/C++ code of SimpleScalar
because your project and/or assignment may require you to make some modifications in the code to
achieve a particular processor functionality.