Docsity

Project #2 on Instruction Level Parallelism Simulation | CSCE 513, Study Guides, Projects, Research of Computer Architecture and Organization

Toggle sidebar
bg1
CSE513 Computer Architecture
Project 2 Instruction Level Parallelism Simulation
Date Assigned: October 23, 2006
Due Date: November 6, 2006 (11:59pm)
Introduction
In this project, you will use SimpleScalar (http://www.simplescalar.com) to study the
pipeline performance and related techniques for instruction level parallel (ILP)
exploitation. In the previous project, you have used several SimpleScalar tools such as
sim-profile, sim-fast, etc. You should have already felt comfortable with the
SimpleScalar simulation environment. In this project, you need to use another tool, sim-
outorder, one of the most powerful and detailed pipeline simulation tools in current
version of SimpleScalar.
Figure 1 Pipeline for Sim-OutOrder
The sim-outorder tool can be used to simulate more advanced pipeline architecture
than what we have discussed in the class. The pipeline stages are depicted in Figure 1
(http://www.simplescalar.com/docs/users_guide_v2.pdf). Different from the Tomasulo’s
pipeline, the sim-outorder tool can simulate pipeline that allows the out-of-order issues
and executions of the instructions (Recall that Tomasulo requires in-order issues.) In
Figure 1, instructions go through six stages, i.e., Fetch, Dispatch, Scheduler(Memory
scheduler), Exec(Mem), Writeback, and Commit.
There are two immediately noticeable differences comparing with the Tomasulo’s
pipeline. First, the instruction issue stage is split into two stages, i.e., Dispatch and
Scheduler, to support more complicated operations in instruction decoding, register
renaming, branch prediction, tracking memory and register dependencies, etc. Second,
there is an additional stage called the “Commit”. This is essential for the pipeline that
allows speculation, i.e., speculating on the outcome of branches and executing the
program as if the prediction results are always right. It also greatly helps exception
pf3
pf4

Partial preview of the text

Download Project #2 on Instruction Level Parallelism Simulation | CSCE 513 and more Study Guides, Projects, Research Computer Architecture and Organization in PDF only on Docsity!

CSE513 Computer Architecture

Project 2 Instruction Level Parallelism Simulation

Date Assigned: October 23 , 200 6 Due Date: November 6, 2006 (11:59pm)

Introduction

In this project, you will use SimpleScalar (http://www.simplescalar.com) to study the pipeline performance and related techniques for instruction level parallel (ILP) exploitation. In the previous project, you have used several SimpleScalar tools such as sim-profile, sim-fast, etc. You should have already felt comfortable with the SimpleScalar simulation environment. In this project, you need to use another tool, sim- outorder, one of the most powerful and detailed pipeline simulation tools in current version of SimpleScalar.

Figure 1 Pipeline for Sim-OutOrder

The sim-outorder tool can be used to simulate more advanced pipeline architecture than what we have discussed in the class. The pipeline stages are depicted in Figure 1 (http://www.simplescalar.com/docs/users_guide_v2.pdf). Different from the Tomasulo’s pipeline, the sim-outorder tool can simulate pipeline that allows the out-of-order issues and executions of the instructions (Recall that Tomasulo requires in-order issues.) In Figure 1, instructions go through six stages, i.e., Fetch, Dispatch, Scheduler(Memory scheduler), Exec(Mem), Writeback, and Commit. There are two immediately noticeable differences comparing with the Tomasulo’s pipeline. First, the instruction issue stage is split into two stages, i.e., Dispatch and Scheduler , to support more complicated operations in instruction decoding, register renaming, branch prediction, tracking memory and register dependencies, etc. Second, there is an additional stage called the “ Commit ”. This is essential for the pipeline that allows speculation , i.e., speculating on the outcome of branches and executing the program as if the prediction results are always right. It also greatly helps exception

recovery since an instruction can be executed but the corresponding action only takes effect after it is committed, or as somebody called, graduated. The speculated execution can exploit the instruction level parallelism that crosses branches and therefore can significantly increase the performance provided that the prediction of branch behavior is accurate enough. If the prediction results turn out to be wrong, we can undo the speculated instruction sequence before the instructions are committed. Therefore, an instruction can be executed but is allowed to perform any updates that cannot be recovered---which is called “ instruction commit ”---only after the instruction is no longer speculative. Thus, only those instructions committed are “useful” for the application. For more details, you can refer to the section 3.7 in the textbook. The sim-outorder tool provides you with a great deal of flexibility to explore other architecture issues such as the impacts of numbers of functional integer/floating units, different branch prediction strategies, etc. You can easily change the features of a targeted architecture by simply modifying the configuration file. It also provides abundant and detailed information for the simulation. You can also dump the execution trace of a program into a file from which you can check cycle-by-cycle execution status. For more details, please refer to the SimpleScalar version 2.0 user's guide (http://www.simplescalar.com) and other related document.

What to do

  1. Read the SimpleScalar document at http://www.simplescalar.com/.
  2. The Role of Compiler. a. Compile the source C program foo.c to assembly code using SimpleScalar compiler with following compiler options (You can type “man gcc” at the command line to see what these options mean): i. – O0 -S ii. – O2 -S iii. – O2 – funroll-loops –S After each compilation, you can see the assembly file foo.s located in the same directory. Check the assembly files and discuss what differences you observed. How many times the loop is unrolled when you use the third set of compilation options? b. Recompile the executables using the same sets of compilation options and simulate the executables using sim-outorder with the default set of configurations. c. Which one has the largest number of code size, instruction executed, instruction committed, and CPI? Discuss your findings.
  3. Performance Evaluation a. Simulate go.ss and compress95.ss using command lines similar to that as follows (if you do not know how to generate/update a configuration file, you need to read the SimpleScalar document again): sim-outorder -config go.cfg go.ss 2 8 sim-outorder – config compress.fig compress95.ss < compress95.in > compress95.out You need to update go.cfg and compress.fig with the three configurations in Table 1 (use the default value for the fields not shown in the table). b. Which “architecture” has the best performance? Show the details.

[3] T.-Y. Yeh and Y. Patt. A comparison of dynamic branch predictors that use two levels of branch history. In ISCA'93, pages 257--266, May 1993. http://citeseer.ist.psu.edu/yeh93comparison.html