You are on page 1of 4

In the name of God

by Amirali Boroumand

SimpleScalar Installation
This document describes the steps used to install SimpleScalar.

Files These are the files that you need to install SimpleScalars. Make sure you have all of them. Simplesim-3v0e.tgz Simpletools-2v0.tgz Simpleutils-990811.tar.gz Gcc-2.7.2.3.ss.tar.gz

Preparing your environment You have to create the directory simplescalar under your home directory. Then you have to move your files into it. Use the following command (I made that directory for those use ubuntu 11.10 on VMware): $mkdir /home/YOUR USER NAME/simplescalar You are going to use this path for several times. Also there is some other information we are going to use alot. So its better to use Variables in order to save them for us. Use these commands: $export IDIR = /home/YOUR USER NAME/simplescalar $export TARGET = sslittle-na-sstrix

SimpleScalar installation tutorial

You will get to know your kernel version and the type of linux installed. (by using uname command ) Depending on that, set the HOST variable as either HOST = i686pc-linux by using this command: $ export HOST = i686-pc-linux or HOST=i386-pc-linux by using this command: $export HOST = i386-pc-linux

Use these commands to make sure you have installed the following packages: $ Sudo apt-get install flex $ Sudo apt-get install bison $ Sudo apt-get install build-essential

Install SimpleUtils
First you have to un-zip the Simple tools package file : $ cd $IDIR $ tar xzvf simpletools-2v0.tgz then you have to remove the old gcc folder : $ rm r gcc-2.6.3 now we are going to un-zip SimpleUtils package file. $ tar xzvf simpleutils-990811.tar.gz
$ cd simpleutils-990811

now you have to correct some errors in source files. Use this command to do so:
$ find . -type f -print0 | xargs -0 sed -i -e s,yy_current_buffer,YY_CURRENT_BUFFER,g now everything is ready to install SimpleUtils. Use these commands to do so:

SimpleScalar installation tutorial

$ ./configure -host=$HOST -target=$TARGET -with-gnu-as -with-gnu-ld -prefix=$IDIR $ make $ make install

Install SimpleScalar simulator


In this part we are going to install the simulator. Just like the above, first you have to un-zip the simplesim-3v0d.tgz package files. cd $IDIR tar xzvf simplesim-3v0e.tgz then cd simplesim-3.0 make config-pisa make

If you have done every above steps correctly, now simpleScalar is installed. You can test the installation by this command: $ ./sim-fast test/bin.little/test-printf If you installed it successfully, you will see a text like this :
sim: ** simulation statistics ** sim_num_insn 1813877 # total number of instructions executed sim_num_refs 516941 # total number of loads and stores executed sim_elapsed_time 1 # total simulation time in seconds sim_inst_rate 1813877.0000 # simulation speed (in insts/sec) ld_text_base 0x00400000 # program text (code) segment base ld_text_size 74640 # program text (code) size in bytes ld_data_base 0x10000000 # program initialized data segment base ld_data_size 13636 # program init'ed `.data' and uninit'ed `.bss' size in bytes ld_stack_base 0x7fffc000 # program stack segment base (highest address in stack) ld_stack_size 16384 # program initial stack size ld_prog_entry 0x00400140 # program entry point (initial PC) 3 SimpleScalar installation tutorial

ld_environ_base 0x7fff8000 # program environment base address address ld_target_big_endian 0 # target executable endian-ness, non-zero if big endian mem.page_count 29 # total number of pages allocated mem.page_mem 116k # total size of memory pages allocated mem.ptab_misses 32 # total first level page table misses mem.ptab_accesses 8786073 # total page table accesses mem.ptab_miss_rate 0.0000 # first level page table miss rate

Some points
1) if you have any problem on installation, feel free to ask me. 2) SimpleScalar has very rich documentations and tutorials. So if you face any problem you can google it and find a lot of solutions easily!

Reference
http://www.simplescalar.com/docs/install_gude_v2.txt/ http://researchweb.iiit.ac.in/~abu_saad/simplescalarinstall.html http://www.igoy.in/simplescalar-installation-made-simple/

SimpleScalar installation tutorial

You might also like