Install SimpleScalar in Ubuntu 10.10
Environment: Ubuntu 10.10; gcc 4.4.5;
Architecture experiments are required. Installation is troublesome. The main reason is that the cross-compiler gcc version is 2.7.2. SimpleScalar writes "newer version" (compared with its own version 2.6 ). Basically, each make operation is an error... According to the instructor's instruction, there are still errors in step-by-step installation, or I have encountered errors in step-by-step installation. It takes a lot of effort to complete the installation. Finally, it depends on the resources of foreign universities. There is an installation script on the website, which is successfully executed on my Ubuntu10.10.
First the web site drying: http://www.ann.ece.ufl.edu/courses/eel5764_10fal/project/
It seems to be the materials used by an assistant professor at the University of Florida for teaching, including some installation of SimpleScalar and an installation script buildSS. The installation instructions are basically the same as those in my lab guide. The installation script is the most useful. Thank you!
Directly paste the script code for future use:
- NAME = Simplescalar
- PACKAGE = simplescalar
- TOOL = simpletools-2v0
- UTIL = simpleutils
- SIM = simplesim
- # Update Ubuntu Software Package
- Sudo apt-get update
- # Getting required applications
- Sudo apt-get install flex-old bison build-essential
- # Create Simplescalar Directory
- Cd
- Mkdir $ NAME
- Cd $ NAME
- # Getting simplescalar tar file
- Wget http://csrl.unt.edu/downloads/?package.tgz
- # Extraction
- Tar xvfz $ PACKAGE. tgz
- Export CC = "gcc"
- # Setting up installation
- Export HOST = i686-unknown-linux
- Export TARGET = sslittle-na-sstrix
- Export IDIR = ~ /$ NAME
- # Build Simplescalar tools
- Cd ~ /$ NAME
- Tar xvfz $ TOOL. tgz
- Rm-rf gcc-2.6.3
- # Build Simplescalar utils
- Cd ~ /$ NAME
- Tar xvfz $UTIL-990811.tar.gz
- UTIL-990811 cd $
- ./Configure -- host = $ HOST -- target = $ TARGET -- with-gnu-as -- with-gnu-ld -- prefix = $ IDIR
- Make CC = gcc
- Sudo make install CC = gcc
- # Build Simplescalar
- Cd ~ /$ NAME
- Tar xvfz$ SIM-3v0d.tgz
- SIM-3.0 cd $
- Make config-pisa
- Make CC = gcc
- # Build Compiler
- Cd ~ /$ NAME
- Tar xvfz gcc-2.7.2.3.ss.tar.gz
- Cd ~ /$ NAME/gcc-2.7.2.3
- Export PATH = $ PATH: $ IDIR/simpleutils-990811/sslittle-na-sstrix/bin
- ./Configure -- host = $ HOST -- target = $ TARGET -- with-gnu-as -- with-gnu-ld -- prefix = $ IDIR
- # Fix file errors
- Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
- Sed-I's/return \ "FIXME \ n/return \" FIXME \ n \/G '~ /$ NAME/gcc-2.7.2.3/insn-output.c
- Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
- Wget http://www.ict.kth.se/courses/IS2202/ar
- Wget http://www.ict.kth.se/courses/IS2202/ranlib
- Chmod 700 ar
- Chmod 700 ranlib
- Sudo cp ar $ IDIR/sslittle-na-sstrix/bin/ar
- Sudo cp ranlib $ IDIR/sslittle-na-sstrix/bin/ranlib
- Rm ar
- Rm ranlib
- Chmod + w ~ /$ NAME/gcc-2.7.2.3/obstack. h
- Sed-I's/next_free) ++/next_free ++)/G '~ /$ NAME/gcc-2.7.2.3/obstack. h
- Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
- Sed-I '98i \
- # Define BITS_PER_UNIT 8
- '~ /$ NAME/gcc-2.7.2.3/libgcc2.c
- # Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
- Cp $ IDIR/gcc-2.7.2.3/patched/sys/cdefs. h $ IDIR/sslittle-na-sstrix/include/sys/cdefs. h
- Make versions ages = "c ++" CFLASS =-O3 CC = "gcc"
- Make enquire CC = gcc
- Sudo make install versions ages = "c ++" CFLASS =-O3 CC = "gcc" PATH = $ PATH :~ /$ NAME/bin
- # Done!
- Exit 0
If you have downloaded the required tar package, you can
- Wget http://csrl.unt.edu/downloads/?package.tgz
Remove this line. You can also download it directly, that is, the speed may be a little slow. This package contains all required tools. Use the simscalar-cheetath script.