Question: Data Hazards Question 2 : Consider the following loop LDUR X 0 , [ X 1 1 , # 2 ] LDUR X 1 ,
Data Hazards
Question : Consider the following loop
LDUR XX #
LDUR XX#
ADD X X X
ADD X X X
SUB X X X
List the true data dependencies Readafterwrite in the above code. Use the number next to the instruction to identify instructions. For example, If the Instruction with line number x has a dependency on instruction with line number y Then state that "Instruction x on instruction y
Note: List all dependencies, respective of whether they cause stalls in the pipeline or not.
Assume stage pipeline with no forwarding, and each stage takes cycle.
a Show the pipeline diagram for the instruction sequence.
b Assuming that the processor stalls on a hazard. How many times does the processor stall? How long is each stall in cycles What is the execution time in cycles for the whole program?
c Assume the stage pipeline with full forwarding. Show the pipeline diagram with stalls if needed. What is the execution time in cycles for the whole program?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
