ࡱ> 8(  b | (www.simplescalar.com8http://www.simplescalar.com/ Pwww.capsl.udel.edu/courses/cpeg323/2005/^http://www.capsl.udel.edu/courses/cpeg323/2005// 0DTimes New Romanhhs 0DBitstream Vera Serif 0 DStarSymbolera Serif 00D[SOrSymbolera Serif 0@DCourier 10 Pitchrif 0PDBitstream Charterif 0 D .  @n?" dd@  @@`` 0E.    !"#$%&'()*/23456789:;< =>?@AB 0AAp3f3]f̙@ g4@d@dx 0ppp@ <44k 0hsg4;d;dĘ 0(p@ ppʚ;ʚ;<4dddd4l 0480___PPT10 ?8+ $CPEG323 FALL, 2005O  =,%Introduction to SimpleScalar Tool Set&b&`&       Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo"2b8j`&   C ?Why This Tutorial?b`   Course Labs and projects are based on SimpleScalar tool set. It will help you develop the ability to practice what you learned in class. b`&'   Y AOutlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8dfW`&   C   What is SimpleScalar Tool Set?b`&     2A Complete Computer Architecture Test Bed Simulators Compiler, assembler, linker Targeted to the SimpleScalar PISA architecture A source level debugger. 0*bVb`&a   - <(A Computer Architecture Simulator Primer))b( ) 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 \#:6#`:``6`    Simulators b `  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 systemWb =         *  (  >   !   e  Compiler & Other Utilitiesb`  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"b`  2Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b82df8`&   C  Where to Get It?b`   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.com or www.capsl.udel.edu/courses/cpeg323/2005/ @Yg33g33c%bg33bg33bgg33g33gg33)g33bV    (     0  03Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Cdf'`&   C   Preparation b `  @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 xzvf simplesim-3v0d.tgz tar xzvf simpletools-2v0.tgz tar xzvf simpleutils-2v0.tgzRbbbbMb !  Directories b `  Usimplesim-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. <bb.bbJbbbb=b b@b b@b V 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 install0b$b`&   Build & Install Steps - 1b`  JBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make0b$bK`&  8 Build & Install Steps - 2b`  Got Error Messages!bd3  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. `2   _  0Check 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\^"63^`"`6`3`r      '    4Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Vdf`&   C :How to Use it?b`  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 & :bbUWWW)WWWbbUbb% b  f ̙) b  f ̙% b  f ̙) b bb*                  H     =Hints for Lab1b`  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 assembly code, run the binary code, see the differencebd  8Outlineb`  wWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to write program for it? Demo22bFsdf`&   Q SimpleScalar Demob`   /L ! " # $ % &'()*+5679;>@BP  0` ̙33` ` ff3333f` 333MMM` f` f` 3x?%-a ,d  ?%-aD  E K kE%-0E K@E%-P v?" dd    " @ `@v?%-a d  PMu%-dudu%-d ud `" dd d  " d@@ d``dpu" ddu dd u" dd@u dd`uddu" ddu dd u" dd@u dd`udd KC(    N ~  ~ [#Click to edit the title text format$$   H ~ , ~ Click to edit the outline text format Second Outline Level Third Outline Level Fourth Outline Level Fifth Outline Level Sixth Outline Level Seventh Outline Level Eighth Outline Level Ninth Outline Level&g H  0ݙ0s ? ̙33 Default Design* 0  F(  ^  S  ?z7     0|  92  0 <  c $vn ? ̙3380___PPT10.`0(  0L0 0 I(      N_    F2 X  x @-  0i  Xs  CPEG323 Tutorial Long ChenH%-b %-ad  2 X  x @<  c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +  0L0 \T,(  , ,  N(̀    F2 X  x @ ,  NӀ ^V  F2 X  x @< , c $ݙ0s ? ̙332*___PPT10 +D' = @B D' = @BA?%,( < +O%,( < +D' =%(D' =%(D0' =4@BBBB%(D' =0l9 CCBB*<3<*,+q  0L0 x(     Z=    R>t X  x @      ZhD ^V ~ F2 X  x @<  c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +"  0L0 x (       Z    R>t X  x @       ZW~ ^V  F2 X  x @<   c $ݙ0s ? ̙332*___PPT10 +D' = @B D' = @BA?%,( < +O%,( < +D' =%(D' =%(D0' =4@BBBB%(D' =0l9 CCBB*<3<* 2+M   0L0 \T0(  0 0  NL    F2 X  x @ 0  N ,  F2 X  x @< 0 c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +p  0  J(  r  S 4     S 4,<$@ 0  z      ,$D 0  <|"`  v^  YDevice Simulator`  `B   0D>> >    0@~   V System input d  `B   0D>v~ ~    0D  W System outputd  `B   0D>v    0$S~n   XSystem metricsd  H  0ݙ0s ? ̙33^V___PPT106.QX+KLD ' = @B D' = @BA?%,( < +O%,( < +D4' =%(D' =%(D' =4@BBBB%(D' =1:Bvisible*o3>+B#style.visibility<*%(D' =%(Dh' =%(D' =4@BBBB%(D' =1:Bvisible*o3>+B#style.visibility<*_t%(D' =4@BBBB%(D' =1:Bvisible*o3>+B#style.visibility<*t%(+M   0L0 \T4(  4 4  N] >   F2 X  x @ 4  Nb ,F  F2 X  x @< 4 c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +M   0L0 \T8(  8 8  N8    F2 X  x @ 8  N ,  F2 X  x @< 8 c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +"  0L0 x (     Z    R>t X  x @      ZԊ~ ^&  F2 X  x @<  c $ݙ0s ? ̙332*___PPT10 +D' = @B D' = @BA?%,( < +O%,( < +D' =%(D' =%(D0' =4@BBBB%(D' =0l9 CCBB*<3<*2C+M   0L0 \T<(  < <  N\    F2 X  x @ <  Nܲ ,&6 ~ F2 X  x @< < c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +"  0L0 x@(     Z`    R>t X  x @      Z ^V  F2 X  x @<  c $ݙ0s ? ̙332*___PPT10 +D' = @B D' = @BA?%,( < +O%,( < +D' =%(D' =%(D0' =4@BBBB%(D' =0l9 CCBB*<3<*CV+M   0L0 \T@(  @ @  N A   F2 X  x @ @  N, ,  F2 X  x @< @ c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +U  0L0 d\D(  D D  NX  w'   J6 X  x @` D  N@ TE  J6 X  x @`< D c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +Q  0L0 `X H(  H H  NX$ ,[  J6 X  x @` H  N* b   F2 X  x @< H c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +Q  0L0 `X0L(  L L  NH~ ,[  J6 X  x @` L  NB b   F2 X  x @< L c $ݙ0s ? ̙33y___PPT10Y+D=' = @B + 0L0  @P(  PR P 0HO VX 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 installfP%-b P%-bP%-af &   :  X  x @`D P 6a F Build & Install Steps - 3.%-bf,  2 X  x @< P c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +  0L0 PT$(  T T  N8p 4aF   F2 X  x @ T  Ny f<$D 0  F2 X  x @< T c $ݙ0s ? ̙33___PPT10+ CD~' = @B D9' = @BA?%,( < +O%,( < +D4' =%(D' =%(D' =4@BBBB%(D' =1:Bvisible*o3>+B#style.visibility<*Ts%(D4' =%(D' =%(D' =4@BBBB%(D' =1:Bvisible*o3>+B#style.visibility<*T%(+}  0 $(  r  S `   r  S 8,  H  0ݙ0s ? ̙33___PPT10i.we+D=' = @B +"  0L0 x`(     ZT    R>t X  x @      Z .  F2 X  x @<  c $ݙ0s ? ̙332*___PPT10 +D' = @B D' = @BA?%,( < +O%,( < +D' =%(D' =%(D0' =4@BBBB%(D' =0l9 CCBB*<3<*Ve+q  0L0 x(     Z̩    R>t X  x @      Z   F2 X  x @<  c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +q  0L0 x(     Z     R>t X  x @      Z J  F2 X  x @<  c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +"  0L0 x(     Z    R>t X  x @      Z J  F2 X  x @<  c $ݙ0s ? ̙332*___PPT10 +D' = @B D' = @BA?%,( < +O%,( < +D' =%(D' =%(D0' =4@BBBB%(D' =0l9 CCBB*<3<*sx+i  0L0 xp`X(  X X  N   F2 X  x @< X c $ݙ0s ? ̙33y___PPT10Y+D=' = @B + 0 p\D(  \^ \ S  ?z7    \ S `  93   @` B \ s *vn ? ̙33 0 |D(  |^ | S  ?z7    | S   93   @` B | s *vn ? ̙33  0 D(  ^  S  ?z7     S 1  93   @` B  s *vn ? ̙33  0 D(  ^  S  ?z7     S h<  93   @` B  s *vn ? ̙33  0  D(  ^  S  ?z7     S Q  93   @` B  s *vn ? ̙33  0 0D(  ^  S  ?z7     S DH  93   @` B  s *vn ? ̙33  0 @D(  ^  S  ?z7     S P  93   @` B  s *vn ? ̙33 0 PD(  ^  S  ?z7     S   93   @` B  s *vn ? ̙33 0 `D(  ^  S  ?z7     S @~  93   @` B  s *vn ? ̙33 0 pD(  ^  S  ?z7     S d  93   @` B  s *vn ? ̙33 0 D(  ^  S  ?z7     S <  93   @` B  s *vn ? ̙33 0 D(  ^  S  ?z7     S ̪  93   @` B  s *vn ? ̙33 0 D(  ^  S  ?z7     S   93   @` B  s *vn ? ̙33  0 0b(  ^  S  ?z7     <B  93   @` B  s *vn ? ̙33  0 Pb(  ^  S  ?z7     <  93   @` B  s *vn ? ̙33  0 pb(  ^  S  ?z7     <  93   @` B  s *vn ? ̙33  0 b(  ^  S  ?z7     <  93   @` B  s *vn ? ̙33  0 b(  ^  S  ?z7     <  93   @` B  s *vn ? ̙33  0 b(  ^  S  ?z7     <  93   @` B  s *vn ? ̙33 0 V(  ^  S  ?z7     0"  93   @` B  s *vn ? ̙33 0  V(  ^  S  ?z7     0+  93   @` B  s *vn ? ̙33r@8zBD RHWimvp͆& yoe[QG=3) 0G2rpy̝)=QP[oeXNyQB18(  b | (www.simplescalar.com8http://www.simplescalar.com/ Pwww.capsl.udel.edu/courses/cpeg323/2005/^http://www.capsl.udel.edu/co Times New RomanBitstream Vera Serif StarSymbolCourier 10 PitchBitstream CharterDefault Design&Introduction to SimpleScalar Tool SetOutlineWhy This Tutorial?OutlineWhat is SimpleScalar Tool Set?)A Computer Architecture Simulator Primer SimulatorsCompiler & Other UtilitiesOutlineWhere to Get It?Outline Preparation DirectoriesBuild 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 installKBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make Slide 16Got Error Messages!Check Your InstallationOutlineHow to Use it?Hints for Lab1OutlineSimpleScalar Demo  Fonts UsedDesign Template Slide TitlesP 8@ _PID_HLINKSA http://www.simplescalar.com/0http://www.capsl.udel.edu/courses/cpeg323/2005/_}0oNEoNE Pwww.capsl.udel.edu/courses/cpeg323/2005/^http://www.capsl.udel.edu/courses/cpeg323/2005// 0DTimes New Romanhhs 0DBitstream Vera Serif 0 DStarSymbolera Serif 00D[SOrSymbolera Serif 0@DCourier 10 Pitchrif 0PDBitstream Charterif 0 D .  @n?" dd@  @@`` 0E.    !"#$%&'()*/23456789:;< =>?@AB 0AAp3f3]f̙@ g4@d@dx 0ppp@ <44k 0hsg4;d;dĘ 0(p@ ppʚ;ʚ;<4dddd4l 0480___PPT10 ?8+ $CPEG323 FALL, 2005O  =,%Introduction to SimpleScalar Tool Set&b&`&       Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo"2b8j`&   C ?Why This Tutorial?b`   Course Labs and projects are based on SimpleScalar tool set. It will help you develop the ability to practice what you learned in class. b`&'   Y AOutlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8dfW`&   C   What is SimpleScalar Tool Set?b`&     2A Complete Computer Architecture Test Bed Simulators Compiler, assembler, linker Targeted to the SimpleScalar PISA architecture A source level debugger. 0*bVb`&a   - <(A Computer Architecture Simulator Primer))b( ) 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 \#:6#`:``6`    Simulators b `  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 systemWb =         *  (  >   !   e  Compiler & Other Utilitiesb`  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"b`  2Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b82df8`&   C  Where to Get It?b`   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.com or www.capsl.udel.edu/courses/cpeg323/2005/ @Yg33g33c%bg33bg33bgg33g33gg33)g33bV    (     0  03Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Cdf'`&   C   Preparation b `  @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 xzvf simplesim-3v0d.tgz tar xzvf simpletools-2v0.tgz tar xzvf simpleutils-2v0.tgzRbbbbMb !  Directories b `  Usimplesim-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. <bb.bbJbbbb=b b@b b@b V 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 install0b$b`&   Build & Install Steps - 1b`  JBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make0b$bK`&  8 Build & Install Steps - 2b`  Got Error Messages!bd3  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. `2   _  0Check 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\^"63^`"`6`3`  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoqrtuvwxyz{|}~spRoot EntrydO)PwZCurrent User)SummaryInformation(PowerPoint Document(~DocumentSummaryInformation8Hurses/cpeg323/2005// 0DTimes New Romanhhs 0DBitstream Vera Serif 0 DStarSymbolera Serif 00D[SOrSymbolera Serif 0@DCourier 10 Pitchrif 0PDBitstream Charterif 0 D .  @n?" dd@  @@`` 0E.    !"#$%&'()*/23456789:;< =>?@AB 0AAp3f3]f̙@ g4@d@dx 0ppp@ <44k 0hsg4;d;dĘ 0(p@ ppʚ;ʚ;<4dddd4l 0480___PPT10 ?8+ $CPEG323 FALL, 2005O  =,%Introduction to SimpleScalar Tool Set&b&`&       Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo"2b8j`&   C ?Why This Tutorial?b`   Course Labs and projects are based on SimpleScalar tool set. It will help you develop the ability to practice what you learned in class. b`&'   Y AOutlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8dfW`&   C   What is SimpleScalar Tool Set?b`&     2A Complete Computer Architecture Test Bed Simulators Compiler, assembler, linker Targeted to the SimpleScalar PISA architecture A source level debugger. 0*bVb`&a   - <(A Computer Architecture Simulator Primer))b( ) 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 \#:6#`:``6`    Simulators b `  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 systemWb =         *  (  >   !   e  Compiler & Other Utilitiesb`  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"b`  2Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b82df8`&   C  Where to Get It?b`   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.com or www.capsl.udel.edu/courses/cpeg323/2005/ @Yg33g33c%bg33bg33bgg33g33gg33)g33bV    (     0  03Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Cdf'`&   C   Preparation b `  @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 xzvf simplesim-3v0d.tgz tar xzvf simpletools-2v0.tgz tar xzvf simpleutils-2v0.tgzRbbbbMb !  Directories b `  Usimplesim-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. <bb.bbJbbbb=b b@b b@b V 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 install0b$b`&   Build & Install Steps - 1b`  JBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make0b$bK`&  8 Build & Install Steps - 2b`  Got Error Messages!bd3  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. `2   _  0Check 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\^"63^`"`6`3`r      '    4Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Vdf`&   C :How to Use it?b`  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 & :bbUWWW)WWWbbUbb% b  f ̙) b  f ̙% b  f ̙) b bb*                  H     =Hints for Lab1b`  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, see the differencebd&  8 8Outlineb`  wWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to write program for it? Demo22bFsdf`&   Q SimpleScalar Demob`   /L ! " # $ % &'()*+5679;>@BPq  0L0 x(     Z     R>t X  x @      Z J  F2 X  x @<  c $ݙ0s ? ̙33y___PPT10Y+D=' = @B +r={aB18(  b | (www.simplescalar.com8http://www.simplescalar.com/ Oh+'0@Hx (Introduction to SPIM and SimpleScalaroNE141@#.W@nZ՜.+,D՜.+,   QCustom~r      '    4Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Vdf`&   C :How to Use it?b`  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 & :bbUWWW)WWWbbUbb% b  f ̙) b  f ̙% b  f ̙) b bb*                  H     =Hints for Lab1b`  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, see the differencebd  8Outlineb`  wWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to write program for it? Demo22bFsdf`&   Q SimpleScalar Demob`   /L ! " # $ % &'()*+5679;>@BPr0  TB18(  b | (www.simplescalar.com8http://www.simplescalar.com/ Pwww.capsl.udel.edu/courses/cpeg323/2005/^http://www.capsl.udel.edu/courses/cpeg323/2005// 0DTimes New Romanhhs 0DBitstream Vera Serif 0 DStarSymbolera Serif 00D[SOrSymbolera Serif 0@DCourier 10 Pitchrif 0PDBitstream Charterif 0 D .  @n?" dd@  @@`` 0E.    !"#$%&'()*/23456789:;< =>?@AB 0AAp3f3]f̙@ g4@d@dx 0ppp@ <44k 0hsg4;d;dĘ 0(p@ ppʚ;ʚ;<4dddd4l 0480___PPT10 ?8+ $CPEG323 FALL, 2005O  =,%Introduction to SimpleScalar Tool Set&b&`&       Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo"2b8j`&   C ?Why This Tutorial?b`   Course Labs and projects are based on SimpleScalar tool set. It will help you develop the ability to practice what you learned in class. b`&'   Y AOutlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8dfW`&   C   What is SimpleScalar Tool Set?b`&     2A Complete Computer Architecture Test Bed Simulators Compiler, assembler, linker Targeted to the SimpleScalar PISA architecture A source level debugger. 0*bVb`&a   - <(A Computer Architecture Simulator Primer))b( ) 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 \#:6#`:``6`    Simulators b `  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 systemWb =         *  (  >   !   e  Compiler & Other Utilitiesb`  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"b`  2Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b82df8`&   C  Where to Get It?b`   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.com or www.capsl.udel.edu/courses/cpeg323/2005/ @Yg33g33c%bg33bg33bgg33g33gg33)g33bV    (     0  03Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Cdf'`&   C   Preparation b `  @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 xzvf simplesim-3v0d.tgz tar xzvf simpletools-2v0.tgz tar xzvf simpleutils-2v0.tgzRbbbbMb !  Directories b `  Usimplesim-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. <bb.bbJbbbb=b b@b b@b V 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 install0b$b`&   Build & Install Steps - 1b`  JBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make0b$bK`&  8 Build & Install Steps - 2b`  Got Error Messages!bd3  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. `2   _  0Check 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\^"63^`"`6`3`r      '    4Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Vdf`&   C :How to Use it?b`  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 & :bbUWWW)WWWbbUbb% b  f ̙) b  f ̙% b  f ̙) b bb*                  H     =Hints for Lab1b`  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 differencebd&   8Outlineb`  wWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to write program for it? Demo22bFsdf`&   Q SimpleScalar Demob`   /L ! " # $ % &'()*+5679;>@BPq  0L0 x(     Z     R>t X  x @      Z J  F2 X  x @<  c $ݙ0s ? ̙33y___PPT10Y+D=' M= @B +r@T=7TB18(  b | (www.simplescalar.com8http://www.simplescalar.com/ Pwww.capsl.udel.edu/courses/cpeg323/2005/^http://www.capsl.udel.edu/courses/cpeg323/2005// 0DTimes New Romanhhs 0DBitstream Vera Serif 0 DStarSymbolera Serif 00D[SOrSymbolera Serif 0@DCourier 10 Pitchrif 0PDBitstream Charterif 0 D .  @n?" dd@  @@`` 0E.    !"#$%&'()*/23456789:;< =>?@AB 0AAp3f3]f̙@ g4@d@dx 0ppp@ <44k 0hsg4;d;dĘ 0(p@ ppʚ;ʚ;<4dddd4l 0480___PPT10 ?8+ $CPEG323 FALL, 2005O  =,%Introduction to SimpleScalar Tool Set&b&`&       Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo"2b8j`&   C ?Why This Tutorial?b`   Course Labs and projects are based on SimpleScalar tool set. It will help you develop the ability to practice what you learned in class. b`&'   Y AOutlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8dfW`&   C   What is SimpleScalar Tool Set?b`&     2A Complete Computer Architecture Test Bed Simulators Compiler, assembler, linker Targeted to the SimpleScalar PISA architecture A source level debugger. 0*bVb`&a   - <(A Computer Architecture Simulator Primer))b( ) 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 \#:6#`:``6`    Simulators b `  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 systemWb =         *  (  >   !   e  Compiler & Other Utilitiesb`  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"b`  2Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b82df8`&   C  Where to Get It?b`   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.com or www.capsl.udel.edu/courses/cpeg323/2005/ @Yg33g33c%bg33bg33bgg33g33gg33)g33bV    (     0  03Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Cdf'`&   C   Preparation b `  @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 xzvf simplesim-3v0d.tgz tar xzvf simpletools-2v0.tgz tar xzvf simpleutils-2v0.tgzRbbbbMb !  Directories b `  Usimplesim-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. <bb.bbJbbbb=b b@b b@b V 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 install0b$b`&   Build & Install Steps - 1b`  JBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make0b$bK`&  8 Build & Install Steps - 2b`  Got Error Messages!bd3  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. `2   _  0Check 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\^"63^`"`6`3`r      '    4Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Vdf`&   C :How to Use it?b`  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 & :bbUWWW)WWWbbUbb% b  f ̙) b  f ̙% b  f ̙) b bb*                  H     =Hints for Lab1b`  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 differencebd&   8Outlineb`  wWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to write program for it? Demo22bFsdf`&   Q SimpleScalar Demob`   /L ! " # $ % &'()*+5679;>@BPrȐB18(  b | (www.simplescalar.com8http://www.simplescalar.com/ Pwww.capsl.udel.edu/courses/cpeg323/2005/^http://www.capsl.udel.edu/courses/cpeg323/2005// 0DTimes New Romanhhs 0DBitstream Vera Serif 0 DStarSymbolera Serif 00D[SOrSymbolera Serif 0@DCourier 10 Pitchrif 0PDBitstream Charterif 0 D .  @n?" dd@  @@`` 0E.    !"#$%&'()*/23456789:;< =>?@AB 0AAp3f3]f̙@ g4@d@dx 0ppp@ <44k 0hsg4;d;dĘ 0(p@ ppʚ;ʚ;<4dddd4l 0480___PPT10 ?8+ $CPEG323 FALL, 2005O  =,%Introduction to SimpleScalar Tool Set&b&`&       Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo"2b8j`&   C ?Why This Tutorial?b`   Course Labs and projects are based on SimpleScalar tool set. It will help you develop the ability to practice what you learned in class. b`&'   Y AOutlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8dfW`&   C   What is SimpleScalar Tool Set?b`&     2A Complete Computer Architecture Test Bed Simulators Compiler, assembler, linker Targeted to the SimpleScalar PISA architecture A source level debugger. 0*bVb`&a   - <(A Computer Architecture Simulator Primer))b( ) 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 \#:6#`:``6`    Simulators b `  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 systemWb =         *  (  >   !   e  Compiler & Other Utilitiesb`  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"b`  2Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b82df8`&   C  Where to Get It?b`   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.com or www.capsl.udel.edu/courses/cpeg323/2005/ @Yg33g33c%bg33bg33bgg33g33gg33)g33bV    (     0  03Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Cdf'`&   C   Preparation b `  @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 xzvf simplesim-3v0d.tgz tar xzvf simpletools-2v0.tgz tar xzvf simpleutils-2v0.tgzRbbbbMb !  Directories b `  Usimplesim-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      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI 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. <bb.bbJbbbb=b b@b b@b V 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 install0b$b`&   Build & Install Steps - 1b`  JBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make0b$bK`&  8 Build & Install Steps - 2b`  Got Error Messages!bd3  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. `2   _  0Check 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\^"63^`"`6`3`r      '    4Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Vdf`&   C :How to Use it?b`  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 & :bbUWWW)WWWbbUbb% b  f ̙) b  f ̙% b  f ̙) b bb*                  H     =Hints for Lab1b`  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 outputsbd&   8Outlineb`  wWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to write program for it? Demo22bFsdf`&   Q SimpleScalar Demob`   /L ! " # $ % &'()*+5679;>@BPq  0L0 x(     Z     R>t X  x @      Z J  F2 X  x @<  c $ݙ0s ? ̙33y___PPT10Y+D=' M= @B +r=B18(  b | (www.simplescalar.com8http://www.simplescalar.com/ Pwww.capsl.udel.edu/courses/cpeg323/2005/^http://www.capsl.udel.edu/courses/cpeg323/2005// 0DTimes New Romanhhs 0DBitstream Vera Serif 0 DStarSymbolera Serif 00D[SOrSymbolera Serif 0@DCourier 10 Pitchrif 0PDBitstream Charterif 0 D .  @n?" dd@  @@`` 0E.    !"#$%&'()*/23456789:;< =>?@AB 0AAp3f3]f̙@ g4@d@dx 0ppp@ <44k 0hsg4;d;dĘ 0(p@ ppʚ;ʚ;<4dddd4l 0480___PPT10 ?8+ $CPEG323 FALL, 2005O  =,%Introduction to SimpleScalar Tool Set&b&`&       Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo"2b8j`&   C ?Why This Tutorial?b`   Course Labs and projects are based on SimpleScalar tool set. It will help you develop the ability to practice what you learned in class. b`&'   Y AOutlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8dfW`&   C   What is SimpleScalar Tool Set?b`&     2A Complete Computer Architecture Test Bed Simulators Compiler, assembler, linker Targeted to the SimpleScalar PISA architecture A source level debugger. 0*bVb`&a   - <(A Computer Architecture Simulator Primer))b( ) 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 \#:6#`:``6`    Simulators b `  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 systemWb =         *  (  >   !   e  Compiler & Other Utilitiesb`  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"b`  2Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b82df8`&   C  Where to Get It?b`   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.com or www.capsl.udel.edu/courses/cpeg323/2005/ @Yg33g33c%bg33bg33bgg33g33gg33)g33bV    (     0  03Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Cdf'`&   C   Preparation b `  @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 xzvf simplesim-3v0d.tgz tar xzvf simpletools-2v0.tgz tar xzvf simpleutils-2v0.tgzRbbbbMb !  Directories b `  Usimplesim-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. <bb.bbJbbbb=b b@b b@b V 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 install0b$b`&   Build & Install Steps - 1b`  JBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make0b$bK`&  8 Build & Install Steps - 2b`  Got Error Messages!bd3  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. `2   _  0Check 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\^"63^`"`6`3`r      '    4Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Vdf`&   C :How to Use it?b`  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 & :bbUWWW)WWWbbUbb% b  f ̙) b  f ̙% b  f ̙) b bb*                  H     =Hints for Lab1b`  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 outputsbd  8Outlineb`  wWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to write program for it? Demo22bFsdf`&   Q SimpleScalar Demob`   /L ! " # $ % &'()*+5679;>@BPr?B1)9(  b | (www.simplescalar.com8http://www.simplescalar.com/ Pwww.capsl.udel.edu/courses/cpeg323/2005/^http://www.capsl.udel.edu/courses/cpeg323/2005// 0DTimes New Romanhhs 0DBitstream Vera Serif 0 DStarSymbolera Serif 00D[SOrSymbolera Serif 0@DCourier 10 Pitchrif 0PDBitstream Charterif 0 D .  @n?" dd@  @@`` 0E.    !"#$%&'()*/23456789:;< =>?@AB 0AAp3f3]f̙@* g4@d@dx 0ppp@ <44k 0hsg4;d;dĘ 0(p@ ppʚ;ʚ;<4dddd4l 04<4BdBd4l 04*80___PPT10 ?8+ $CPEG323 FALL, 2005O  =,%Introduction to SimpleScalar Tool Set&b&`&       Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo"2b8j`&   C ?Why This Tutorial?b`   Course Labs and projects are based on SimpleScalar tool set. It will help you develop the ability to practice what you learned in class. b`&'   Y AOutlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8dfW`&   C   What is SimpleScalar Tool Set?b`&     2A Complete Computer Architecture Test Bed Simulators Compiler, assembler, linker Targeted to the SimpleScalar PISA architecture A source level debugger. 0*bVb`&a   - <(A Computer Architecture Simulator Primer))b( ) 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 \#:6#`:``6`    Simulators b `  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 systemWb =         *  (  >   !   e  Compiler & Other Utilitiesb`  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"b`  2Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b82df8`&   C  Where to Get It?b`   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.com or www.capsl.udel.edu/courses/cpeg323/2005/ @Yg33g33c%bg33bg33bgg33g33gg33)g33bV    (     0  03Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Cdf'`&   C   Preparation b `  @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 xzvf simplesim-3v0d.tgz tar xzvf simpletools-2v0.tgz tar xzvf simpleutils-2v0.tgzRbbbbMb !  Directories b `  Usimplesim-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. <bb.bbJbbbb=b b@b b@b V 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 install0b$b`&   Build & Install Steps - 1b`  JBuild Simulators cd $HOME/simplescalar/simplesim-3.0 make config-pisa make0b$bK`&  8 Build & Install Steps - 2b`  Got Error Messages!bd3  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. `2   _  0Check 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\^"63^`"`6`3`r      '    4Outlineb`  iWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to use it? Demo22b8Vdf`&   C :How to Use it?b`  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 & :bbUWWW)WWWbbUbb% b  f ̙) b  f ̙% b  f ̙) b bb*                  H     =Hints for Lab1b`  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 outputsbd  8Outlineb`  wWhy this tutorial? What is SimpleScalar Tool Set? Where to get it? How to install it? How to write program for it? Demo22bFsdf`&   Q SimpleScalar Demob`   /L ! " # $ % &'()*+5679;>@BP  0L0 0 V(      N_    F2 X  x @-  0i  Xs  CPEG323 Tutorial Long ChenH%-b %-ad  2 X  x @  0M  September, 2005,%-bd  2 X  x @<  c $ݙ0s ? ̙33y___PPT10Y+D=' M= @B +r?%y?}B1