Homework 9
When you complete this homework you should
- Better understand pipelining and pipeline hazards
- (2 points) Identify all data hazards in the following code. Assume no data forwarding or branch delay slots.
top:
beq $t5, $t7, done
lw $t3, 4($t5)
add $t3, $t3, $t4
sw $t3, 4($t5)
addi $t5, $t5, 4
b top
- (2 points) Draw a pipeline diagram for the above code under the given conditions.
- (2 points) Compute the effective CPI for the above segment of code under the given conditions.
- (6 points) Do exercise 4.2.1, 4.2.2 and 4.2.3 on page 357
- (2 points) Do exercise 4.10.1 on page 362
- (6 points) Do exercise 4.15.1, 4.15.2, and 4.15.3 on page 366
Submission
Print out your solutions and turn them in at the beginning of class time on the day the assignment is due.