SimpleScalar Installation Instructions
The following are the instructions to setup the simplescalar toolset on linux system. I have tested them on ubuntu 10.04 i686 and x86_64 machine with gcc 4.4.3.
You can either set it up on your ubuntu installation on your pc or set it up on your account in gcl.
If you want to try out the simulator without taking the pain of installation, you can append the following paths to the PATH environmental variable in your gcl account:
But it is highly recommended that you install it right away as the assignments will focus on editing the source code of the simulator.
1. Necessary Files:
Download the necessary Source code files:
2. Setting up the Environment:
- Find out the machine hardware name by running the following command on the terminal:
- Use this to set the HOST environment variable as i686-pc-linux or i386-pc-linux etc. Even if you have a 64 bit machine (machine name x86_64) use i686 itself. We will be using it as 32 bit installation even on the 64 bit machine.
Now set the following three environmental variables:
export IDIR=<Installation_directory_for_simplescalar, for instance /home/kapil/simplescalar>
- Create the installation directory, i.e. $IDIR and copy All the installations files downloaded into the same
Make sure you have the following packages installed on your system.
You can install these packages using :
sudo apt-get install <PACKAGE NAME>
3. Installing simpletools:
- Unpack the compressed file and remove the gcc folder(older version, we'll be using a newer one)
tar xzvf simpletools-2v0.tgz
rm -rf gcc-2.6.3
4. Installing simpleutils:
- Unpack the package:
tar xzvf simpleutils-990811.tar.gz
- Now one change in the code needs to be done:
- In the file ld/ldlex.l change all occurrences of yy_current_buffer with YY_CURRENT_BUFFER
- Install using following commands:
./configure -host=$HOST -target=$TARGET -with-gnu-as -with-gnu-ld -prefix=$IDIR
5. Installing simulator:
6. Installing the cross compiler:
I hope these instructions are exhaustive enough. Still, if you get stuck somewhere, do not hesitate to google out the solution.
Instructions: courtesy igoy.in