-- AtulRahman - 2014-09-11

SimpleScalar is a computer system architecture simulator. There happens to be different benchmarks that you can simulate on specific architecture with the help of the SimpleScalar simulator. In addition, you can simulate architecture performance for your own source code. SimpleScalar tool set can be download from http://www.simplescalar.com/

In our test machine the cross compiler and SimpleScalar utilities are installed. In case, these are not installed, you can follow the Installation guide provided in the below link to install SimpleScalar toolset. http://ecl.unist.ac.kr/twiki/bin/view/Main/SimpleScalarInstallation

SimpleScalar Installation

Ubuntu 10.04.40 (Test Machine).

Untar the tgz file , simplesim-3v0e.tgz
  • $ tar xzvf simplesin-3v0e.tgz
Go to the directory that is created after untarring
  • $ cd simplesim-3.0
Install SimpleScalar for PISA architecture.
  • $ make config-PISA
For other architectures you can use config- pisabig, config- pisalit, config- alpha.

  • $ make

Steps to use SimpleScalar:

The basic steps are,
  • Compile source code (C, C++) and make binary executable file that is compatible for PISA architecture of SimpleScalar simulator. For doing this, you will need cross compiler of SimpleScalar Simulator.
  • Simulate the binary executable file with SimpleScalar simulator. Different types of simulation options are available. For instance, sim-fast ,sim-outorder etc.
  • Analyze the obtained result for the specific architecture.

*1. Compilation of source code kiss

For using the cross compiler to compile source code in to SimpleScalar compatible binary executable file, you need to follow a format at the time of compiling. An example is shown below:
  • Create a new hello.c file:
    #include <stdio.h>
    int main(void){
        printf("Hello \n"); return 0;
    }
    
Compile it with cross compiler of SimpleScalar
  • $ sslittle-na-sstrix-gcc –o hello hello.c

In the above command, the string, “sslittle-na-sstrix-gcc” is the command of the cross compiler. If the cross compiler is installed in another directory then you will have to set Path. In our test machine the compiler is installed in the directory /simplesim/bin/. You can use the command, $PATH=$PATH:/simplesim/bin/ .

The string, “sslittle-na-sstrix-gcc” is followed by the string “-o”. This describes the optimization technique of the compiler. You can use “-O2”, “-O3” flag for better compiler optimization. To know more about these, you can search google with the keyword, “compiler optimization levels”.

The next string, “hello” is the name of the binary executable file that will be created after compilation. The next following string, “hello.c” is the source file.

At the time of using benchmarks like MIBENCH, SPEC95 you will have to edit, “Makefile” in the above mentioned format.

2. Simulate the binary executable file:

Different simulation techniques are available in SimpleScalar Simulator. If you want to use for instance, sim-outorder simulation technique and the executable file “hello” is in the same directory, “simplesim-3.0” then you can use the following command.
  • $ ./sim-outorder hello

  • If the executable file, “hello” is in another directory then you can set the path of the simplesim-3.0 by the command $ PATH=$PATH:/simplesim-3.0/. And then you can write the command, $ sim-outorder hello
For simulating executable files of a particular benchmark you need to follow the format specified in the “runme” file provided in the benchmark directory. For instance, “qsort_large input_large.dat > output_large.txt” is specified in the “runme” file of the qsort folder of the automotive group of MIBENCH benchmark. For this, the simulation command will be,
  • $ sim-outorder qsort_large input_large.dat > output_large.txt

3. Analyze the obtained Result:

Analyze the obtained result for the PISA architecture. For different compiler optimizations, the performance of the simulated architecture will vary.This includes, simulation time, number of instructions executed, L1/L2 cache misses/hit rate etc.

Experiments

Mibench

  • automotivate
benchmarks\check listSorted ascending compile execute correct result
basicmath O X -
bitcounts O O O
qsort O O O
susan O O O

  • consumer
benchmarks\check list compile execute correct result
jpeg O O O
lame X - -
mad X - -
tiff X - -
typeset X - -

  • network
benchmarks\check list compile execute correct result
dijkstra O O O
patricia O O O

  • office
benchmarks\check list compile execute correct result
ghostscript X - -
ispell X - -
rsynth X - -
sphinx X - -
stringsearch O O O

  • security - blowfish(ranlib path, cc)
benchmarks\check list compile execute correct result
blowfish O O O
pgp X - -
rijndael O O O
sha O O O

  • telecomm
benchmarks\check list compile execute correct result
CRC32 O O O
FFT O O O
adpcm O O O
gsm X - -

Topic attachments
I Attachment Action Size Date Who Comment
Result.jpgjpg Result.jpg manage 315 K 12 Sep 2014 - 08:03 AtulRahman  
This topic: Main > SimpleScalar > ResearchTopics > SimpleScalarTutorial
Topic revision: 12 Sep 2014, AtulRahman
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback