This Version: 2/16/2007 Getting started with Simplescalar for elec525 using Owlnet computers These directions are intended for ELEC/COMP 525 students at Rice University. While others may find these directions useful, no support whatsoever is provided with them to others who are not enrolled in the course. If you are not a 525 student at Rice, please refer to the simplescalar mailing list archive for further assistance. (Even if you are a 525 student at Rice, the simplescalar mailing list archive is a good place to start when searching for solutions to specific installation problems). Before you start - A note about host and simulator endianess Though simplescalar seems to claim that you can simulate cross-endian binaries (e.g., you should be able to simulate big-endian simplescalar benchmarks if you build a big-endian simulator even if running on a little-endian host, such as i386), this functionality does not seem to work correctly. Therefore, you will need to build a simulator that matches the endianess of your host. Owlnet UNIX hosts computers are big-endian, so you would build a big-endian PISA (portable instruction set architecture - simplescalar's ISA) simulator if you plan to use Owlnet, and you would need to use the big-endian PISA benchmark binaries for your experiments. If you want to compile any benchmarks (for instance, mediabench), you would use the big-endian PISA compiler that is on Owlnet. Conversely, if you use an i386 Linux host (which is little-endian), you would need to build a little-endian PISA simulator, use little-endian PISA benchmark binaries, and build your own little-endian PISA cross-compiler. A) Building Simplescalar 3.0 on Owlnet: You will need only one download: simplesim-3v0d.tgz from simplescalar.com. To build your custom simulator, do: 1) tar -xvzf simplesim-3v0d.tgz 2) cd simplesim-3.0 3) make config-pisabig 4) make That's it. Your simulator has been compiled. If you want to modify the simulator in any way, you need to modify the files in the simplesim-3.0 directory and rerun the "make" command. To test that your simulator works, do: ./sim-fast tests-pisa/bin.big/test-math You should see some printouts of floating-point math values, followed by a summary of the simulator's execution. If you want to compile your own benchmarks for this simulator on owlnet, you must use the set of gcc tools in: /home/elec525/simplescalar/bin (For example, ssbig-na-sstrix-gcc is GCC to create big-endian PISA binaries). The SPEC 2000 big-endian PISA binaries are available on Owlnet at: ~elec525/benchmarks B) Building Simplescalar 3.0 on i386 Linux Building Simplescalar on i386 Linux is not currently supported for elec525, but the following steps should work if you're using Fedora Core 2 on an i386 machine. These directions may work on other configurations, but be warned that it may not work for your configuration. These directions do not include specific directions for building the cross-compiler 1) Download the following files linked to from simplescalar.com Tools: simplesim-3v0d.tgz simpletools-2v0.tgz simpleutils-990811.tar.gz [this version is on the MIRV site - do NOT use 2v0.tgz] Extensons: gcc-2.7.2.3.ss.tar.gz 2) Choose an installation location and move these files to that location. We'll use the example /usr/525. You'll need to reference this location in several places during installation. 3) Unpack simpletools i) tar -xvzf simpletools-2v0.tgz 4) Make binutils: i) tar -xvzf simpleutils-990811.tar.gz ii) cd simpleutils-990811 iii) ./configure --host=i686-fedora-linux --target=sslittle-na-sstrix --with-gnu-ld --prefix=/usr/525 iv) make v) make install 5) Make simplescalar i) tar -xvzf simplesim-3v0d.tgz ii) cd simplesim-3.0 iii) make config-pisalit iv) make Your simulator has been compiled, but you do not yet have a cross-compiler to build any little-endian PISA binaries (such as mediabench). If you want to modify the simulator in any way, you need to modify the files in the simplesim-3.0 directory and rerun the "make" command. To test that your simulator works, do: ./sim-fast tests-pisa/bin.little/test-math You should see some printouts of floating-point math values, followed by a summary of the simulator's execution. You would need to use the little-endian PISA binaries for SPEC, which you can download from http://www.eecs.umich.edu/mirv/benchmarks/benchmarks.html 6) Make the little-endian PISA cross-compiler (See below for overcoming various bugs in this process) i) tar -xvzf gcc-2.7.2.3.ss.tar.gz ii) cd gcc-2.7.2.3 iii) export PATH=$PATH:/usr/525/sslittle-na-sstrix/bin iv) ./configure --host=i686-fedora-linux --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=/usr/525 v) make LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" vi) make enquire vii) ../simplesim-3.0/sim-safe ./enquire -f >& float.h-cross viii) delete every line in float.h-cross above (but not including): /* float.h */ which should be around line 33, and delete every line in float.h-cross below (and including): sim: ** simulation statistics ** ix) make install LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" Bugs: a) errors in insn-output.c - append '\' at the end of lines 675, 750, and 823. Then, rerun make LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" b) errors building libgcc2.c - delete "__NORETURN" in /usr/525/sslittle-na-sstrix/include/stdio.h, then rerun make LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" c) errors building enquire.c - delete "__NORETURN" in /usr/525/sslittle-na-sstrix/include/setjmp.h, then rerun make enquire 7) Using the cross-compiler i) Prior to compiling any benchmarks for your little-endian PISA simulator (such as mediabench), you need to do: export PATH=$PATH:/usr/525/bin (Replace /usr/525 with whatever your installation location was) C) Running SPEC benchmarks You'll probably want to start by runing these benchmarks using the reduced data sets, which are available at: ~elec525/simplescalar/SPEC_2000_REDUCED Browse that directory tree for the inputs and README files that describe the syntax for correctly running each benchmark.