200 likes | 211 Views
Tutorial 0 SimpleScalar Installation. CPEG-323 Intro. To Computer Engineering Tom St. John September 19, 2008. Outline. Introduction Installation How to Use Demo Labwork. Introduction. What is SimpleScalar tool set? A Complete Computer Architecture Test Bed Includes: Compiler
E N D
Tutorial 0SimpleScalar Installation CPEG-323 Intro. To Computer Engineering Tom St. John September 19, 2008
Outline • Introduction • Installation • How to Use • Demo • Labwork
Introduction • What is SimpleScalar tool set? • A Complete Computer Architecture Test Bed • Includes: • Compiler • Assembler • Linker • Binary Utilities • Architecture Simulators • Software capable of replicating the functions and capabilities of a computer system or device • Helps predict the output of a machine with a given input
The Simulators • sim-fast Simulator designed for optimal speed and does not check for cache memory. • sim-safe Simulator similar to sim-fast, but checks for memory alignment and access. • sim-profile Obtains information on text symbol, memory accesses, etc. • sim-cache Simulator of multi-level cache. • sim-cheetah Cache simulator with multiple configurations and runs a single pass of the program. • sim-bred Branch predictor simulator. • sim-outorder Most complicated and detailed simulator that performs out-of-order execution of instructions.
Why SimpleScalar? • Test programs and applications on various ISAs. • PISA, ARM, Alpha, and x86 • Simulators can emulate computer devices, such as, cache and branch predictor. • It’s software! • Cuts production cost and time • Don’t have to rely on one machine • Most importantly…its PORTABLE!
Where to get it? • Web Site: • http://www.capsl.udel.edu/~jmanzano/simplescalar_patched.tar.gz • Download using either wget or a web browser
Outline • Introduction • Installation • How to Use • Demo • Lab Work
Installation – Step 1 • Use SSH Secure Shell Client to log in to account at “linuxlab.acad.ece.udel.edu” • You need an account to do the labs! • Copy the tarball file to your home directory • Untar the files • tar xzvf simplescalar_patched.tar.gz • If the command fails, try this sequence • gzip –d simplescalar_patched.tar.gz • tar xvf simplescalar_patched.tar
Directory Checklist • simplesim-3.0/: SimpleScalar simulators’ source code. • binutils-2.5.2/: The GNU binary utilities code. • sslittle-na-sstrix/: Root directory of little-endian SimpleScalar binary utilities and compiler tools and contains header files and a pre-compiled copy of libc. • ssbig-na-sstrix/: Same as above, except it holds big-endian binary utilities. • gcc-2.6.3/: The GNU C compiler code.
Step 2 – Build GNU Utilities • cd binutil-2.5.2 • (cd $PATH_TO_FOLDER/CPEG323/binutils-2.5.2) • ./configure --host=i386-unknown-gnu/linux --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$PATH_TO_FOLDER/CPEG323 • make • make install
Step 3 – Build Simulator • cd ../simplesim-3.0 • (cd $PATH_TO_FOLDER/CPEG323/simplesim-3.0) • make
Step 4 – Build Compiler • cd ../gcc-2.6.3 • (cd $PATH_TO_FOLDER/CPEG323/gcc-2.6.3) • ./configure --host=i386-unknown-gnu/linux --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$PATH_TO_FOLDER/CPEG323 • make LANGUAGES=c • ../simplesim-3.0/sim-safe ./enquire -f >! float.h-cross • make install
Outline • Introduction • Installation • How to Use • Demo • Lab Work
How to Use • Write the program. • C language or assembly • Compile source code. • sslittle-na-sstrix-gcc –o xxx xxx.cC code to binary code • sslittle-na-sstrix-gcc –o xxx.s –S xxx.cC code to Assemble code • sslittle-na-sstrix-gcc –o xxx xxx.sAssemble code to binary code • Use simulators to run binary code. • sim-safe foo Necessary for lab. • sim-fast foo Gain optimal speed. - etc.
Outline • Introduction • Installation • How to Use • Demo • Lab Work
Outline • Introduction • Installation • How to Use • Demo • Lab Work
A Warning! • Your linuxlab accounts have limited disk quota! • Don’t use tar command too frequently or you’ll use up all your disk quota • If quota exceeded, then cannot install SimpleScalar • Send a help request the server’s admin.
Installation Complete? Test it! • Construct a simple C program • E.g. Adding 2 integers together or a series of arithmetic operations. • Compile and run code on simulator. • Code is running correctly? Then move on to the lab questions