



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Information about computer system organization, specifically for homework 2 of the cs433g course at the university of illinois at urbana-champaign. Instructions for submission, course policies, and coding problems related to dynamic branch prediction and tomasulo's algorithm. The dynamic branch prediction problem deals with predicting the outcome of branches based on previous branch history using 1-bit, 4-bit saturation counters, and 2-level correlating predictors. The tomasulo's algorithm problem involves filling in the execution profile for instructions in a code fragment on a system with specifications provided.
Typology: Assignments
1 / 7
This page cannot be seen from the preview
Don't miss anything!




CS433G: Computer System Organization, Spring 2007 Homework 2 Due on 4:30pm, Friday, May. 4th
On-line students: Please send your solutions to [email protected] by due time. PDF is preferred. In your email please indicate alias you would like to use.
On-campus students: Please print this page and attach to your solutions. Write down your name, NetID and alias. Hand in your solutions to Molly Fresner at 4120.
Everyone: You must read and obey course policies. Policies can be found at: http://www.cs.uiuc.edu/class/sp07/cs433g/policies.html
Name: NetID: Alias:
Problem Max Points 1a. 10 1b. 10 1c. 20
1. Dynamic Branch Prediction
Consider the following MIPS code fragment.
MOV R0, # DADDI R1, R0, # LOOP1: DADDI R12, R0, # LOOP2: DSUBI R12, R12, # BNEZ R12, LOOP2 ; Branch 1 DSUBI R1, R1, # BNEZ R1, LOOP1 ; Branch 2
a) [10 points] Assume that 1 bit branch predictors are used. When the processor starts to execute the aforementioned code, both predictors contain value N (not taken). What is the number of correct predictions? Use the following tables to record the prediction and action of each branch.
Branch Step Prediction Action 1 N T 2 3 4 5 6 7 8
Branch Step Prediction Action 1 N T 2
c) [20 points] Now assume that 2 level correlating predictors of the form (2,1) are used. When the processor starts to execute the above code, the outcome of the previous two branches is not taken (N). Also, assume the initial state of predictors of all branches is not taken (N). Use the following tables to record your steps. Record the “New State” of predictors in the form W/X/Y/Z where
In the examples above ‘new state’ is considered the global history state, where only one position can be as T (True).
It is possible (and it makes more sense) to interpret the ‘new state’ as a branch predictor state. In this case positions decode the predicted outcome (Taken) for a specific branching history. If you prefer such approach you can fill in the following tables:
Branch Step Prediction Action New State 1 N T N/T/N/N 2 3 4 5 6 7 8
Branch Step Prediction Action New State 1 N T N/T/N/N 2
Branch Step Prediction Action New State 1 N T N/N/N/T 2 3 4 5 6 7 8
Branch Step Prediction Action New State 1 N T N/N/T/N 2
2. [40 points] Tomasulo’s Algorithm
This exercise examines Tomasulo’s algorithm on a simple loop operation. Consider the following code fragment: LOOP: L.D F2, 0(R1) DIV.D F4, F2, F L.D F6, 0(R2) ADD.D F2, F2, F DIV.D F6, F4, F S.D F6, 16(R1) DADDI R2, R2, # DADDI R1, R1, # BNEZ R1, LOOP
Running on a system with the following specifications:
The pipeline functional units are described by Table 1.
Table 1 Functional Unit Cycles in EX # Functional Units #Reservation Stations Integer 1 1 5 FP add/substract 6 1 4 FP mul/div 12 2 4
Continued on the next page…
3. [20 points] Memory hierarchy.
Assume memory hierarchy with 4 levels. Local miss rates for each level are:
Hit time for each level is the following:
What is the average memory access time?