Question: 1 . ( 2 0 points ) The following sequence of instruction is executed in a basic fivestage pipelined processor discussed in the class. There
points The following sequence of instruction is executed in a basic fivestage pipelined processor discussed in the class. There is NO forwarding support.
ldur xx#
add xxx
add xxx
sub xxx
cbz x exit
stur xx#
ldur xx#
sub xxx
add xxx
exit:
add xxx
a List all hazards in the above code. For each hazard, indicate the instruction which creates the hazard and all affected instructions.
b Rewrite the code including minimum number of nop instructions to eliminate potential hazards. You can reorder the instructions. Assume that the pipeline has full forwarding support. Also, assume that register read and write at the same address can happen in one clock cycle.
c Could branch prediction help eliminate the hazards in the code for this question? Please explain why or why not in one or two sentences.
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
