CS211 Dr. Narahari SimpleScalar Install Guide This document is a guide for installing SimpleScalar, targeted for the PISA architecture, on a Linux system. This guide has been tested on Redhat 9.0. 1. Download SimpleScalar Tool Set You may find these files useful: install_guide_v2.txt, users_guide_v2.pdf These can be found on the SimpleScalar website, http://www.simplescalar.com/docs.html You need the following files before installing: simplesim-3v0d.tgz simpleutils-990811.tar.gz simpletools-2v0.tgz gcc-2.7.2.3.ss.tar.gz They can be found at the following locations: simplesim & simpletools: http://www.simplescalar.com/tools.html simpleutils: http://www.eecs.umich.edu/mirv/ gcc: http://arch.cs.ucdavis.edu/RAD/gcc-2.7.2.3.ss.tar.gz 2. Untar the source code Untar the source code into a simplesim directory mkdir simplesim (wherever you want to put this...you can name it whatever) tar xzvf (the z flag unzips a gzip file as well as untars it.... if you have straight tar files then use tar xvf ) In simpetools-2v0.tgz, there is a gcc-2.6.3 compiler. Since we don't need this, delete it. rm -rf gcc-2.6.3 3. Install Setup environment variables for easy install. export HOST=i386-unknown-linux export IDIR=/home/your-login-name/simplescalar (or your install directory's name) Install simpleutils*. cd $IDIR/simpleutils-990811 ./configure --host=$HOST --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$IDIR make make install Install simplesim*. cd $IDIR/simplesim-3.0 make config-pisa make Install gcc*. cd $IDIR/gcc-2.7.2.3 ./configure --host=$HOST --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$IDIR make LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" make install LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" NOTE: You might encounter an error with stdio.h. If so, find the right place in that file and delete __NORETURN *For Fedora Core 4 (or any distribution using gcc4), the instructions would have to be changed as follows (Contributed by Dustin) Install simpleutils. cd $IDIR/simpleutils-990811 CC="gcc32" ./configure --host=$HOST --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$IDIR make make install Install simplesim. cd $IDIR/simplesim-3.0 make config-pisa make CC="gcc32" Install gcc. cd $IDIR/gcc-2.7.2.3 CC="gcc32" ./configure --host=$HOST --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$IDIR make LANGUAGES="c c++" CFLAGS="-O3" CC="gcc32" make install LANGUAGES="c c++" CFLAGS="-O3" CC="gcc32" if anyone is using x86_64 Linux they would need to set CC="gcc32 -m32" 4. Verify First verify that simplesim is installed correctly. cd $IDIR/simplesim-3.0 ./sim-outorder tests-pisa/bin.little/test-math If results are generated from this, simplesim is most likely installed correctly. Next verify that the cross-compiler is working. Create a basic C program (like the "hello world" program), name it test.c, and place it in a new directory called dev. cd $IDIR mkdir dev cd dev (create test.c and place in $IDIR/dev) cd $IDIR bin/sslittle-na-sstrix-gcc -o test dev/test.c simplesim-3.0/sim-outorder test If results are generated from this, the cross compiler is most likely installed correctly.