1 / 23

Introduction to SimpleScalar Tool Set

Introduction to SimpleScalar Tool Set. CPEG323 Tutorial Long Chen. September, 2005. Outline. Why this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo. Why This Tutorial?. Course Labs and projects are based on SimpleScalar tool set.

lev
Download Presentation

Introduction to SimpleScalar Tool Set

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to SimpleScalar Tool Set CPEG323 Tutorial Long Chen September, 2005

  2. Outline • Why this tutorial? • What is SimpleScalar Tool Set? • Where to get it? • How to install it? • How to use it? • Demo

  3. Why This Tutorial? • Course Labs and projects are based on SimpleScalar tool set. • It will help you develop the ability to practice what you learned in class.

  4. Outline • Why this tutorial? • What is SimpleScalar Tool Set? • Where to get it? • How to install it? • How to use it? • Demo

  5. What is SimpleScalar Tool Set? A Complete Computer Architecture Test Bed • Simulators • Compiler, assembler, linker • Targeted to the SimpleScalar PISA architecture • A source–level debugger.

  6. System output Device Simulator System input System metrics A Computer Architecture Simulator Primer • What is an architecture simulator? • A tool that reproduces the behaviors of a computer device • Why use a simulator? • Leverage faster, more flexible S/W development cycle

  7. Simulators • sim-fast -> a very fast functional (i.e., no timing) simulator • sim-safe -> the minimal functional SimpleScalar simulator • sim-profile -> a program profiling simulator • sim-cache -> a multi-level cache simulator • sim-cheetah -> a single-pass multi-configuration cache simulator • sim-bpred -> a branch predictor simulator • sim-outorder -> a detailed out-of-order issue performance (timing) simulator with a multi-level memory system

  8. Compiler & Other Utilities • Compiler: ported from GNU gcc • Assembler: as • Linker & Loader: ld • Binary Utilities: ar, nm, objdump, objcopy, ranlib, size, strings, strip, ... • C library: pre-built glibc-1.09

  9. Outline • Why this tutorial? • What is SimpleScalar Tool Set? • Where to get it? • How to install it? • How to use it? • Demo

  10. Where to Get It? • simplesim-3v0d.tgz: SimpleScalar simulator source code; • simpletools-2v0.tgz: gcc compiler and glibc; • simpleutils-2v0.tgz: binary utilities; Obtain tar balls from www.simplescalar.comorwww.capsl.udel.edu/courses/cpeg323/2005/

  11. Outline • Why this tutorial? • What is SimpleScalar Tool Set? • Where to get it? • How to install it? • How to use it? • Demo

  12. Preparation • Logon the Linux machine in the Computer Lab, 132 Evans Hall • Create an empty directory in you home directory, say, “$HOME/simplescalar/” • Copy all three tar balls to that directory. • cd $HOME/simplescalar/ • tar xzvfsimplesim-3v0d.tgz • tar xzvf simpletools-2v0.tgz • tar xzvf simpleutils-2v0.tgz

  13. Directories • simplesim-3.0/: the sources of the SimpleScalar simulators. • binutils-2.5.2/: the GNU binary utilities code, ported to the SimpleScalar architecture. • sslittle-na-sstrix/: the root directory for the tree in which little-endian SimpleScalar binary utilities and compiler tools will be installed. The unpacked directories contain header files and a pre-compiled copy of libc. • ssbig-na-sstrix/: the same as above, except that it holds big-endian staffs. • gcc-2.6.3/: the GNU C compiler code, ported to SimpleScalar architecture. • glibc-1.09/: the GNU libraries code, ported to SimpleScalar architecture.

  14. Build & Install Steps - 1 • Build GNU Binary Utilities • cd $HOME/simplescalar/binutil-2.5.2 • ./configure --host=i386-\*-gnu/linux --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$HOME/simplescalar • make • make install

  15. Build & Install Steps - 2 • Build Simulators • cd $HOME/simplescalar/simplesim-3.0 • make config-pisa • make

  16. Build & Install Steps - 3 Build the Compiler • cd $HOME/simplescalar/gcc-2.6.3 • ./configure --host=i386-\*-gnu/linux --target=sslittle-na-sstrix --with-gnu-as --with-gnu-ld --prefix=$HOME/simplescalar • make LANGUAGE=c • ../simplesim-3.0/sim-safe ./enquire -f >! float.h-cross • make install

  17. Got Error Messages! • Do not panic! Try to solve these problems by yourself first. You will gain valuable experience in this procedure. • If you REALLY need help, please refer to the appendix of the simplescalar build memo. • If you STILL have difficulty to install the tool set, you might seek help from TA.

  18. Check Your Installation • Check $HOME/simplescalar/bin for the complier, assembler, linker, and other binary utilities. • Write simple program to verify it • Check $HOME/simplescalar/simplesim-3.0 for simulators • cd $HOME/simplescalar/simplesim-3.0 • make sim-tests

  19. Outline • Why this tutorial? • What is SimpleScalar Tool Set? • Where to get it? • How to install it? • How to use it? • Demo

  20. How to Use it? • Write program • Write C code. • Or, just write assembly code (you will learn how to do it in the following lectures) • Compile the source code • sslittle-na-sstrix-gcc –o foo foo.c C code to binary code • sslittle-na-sstrix-gcc –o foo.s –S foo.c C code to Assemble code • sslittle-na-sstrix-gcc –o foo foo.s Assemble code to binary code • Use the simulator to run the binary code • sim-fast foo • …

  21. Hints for Lab1 • Do Problem 2 first • Generate the assembly code from C code • Investigate the assembly code • Try to modify the assembly code by your own (for Problem 1) • Compile the modified assembly code, run the binary code, find the difference between outputs

  22. Outline • Why this tutorial? • What is SimpleScalar Tool Set? • Where to get it? • How to install it? • How to write program for it? • Demo

  23. SimpleScalar Demo

More Related