Question: Given code for a 5 - stage single - pipeline microarchitecture ( fetch , decode, execute, memory, write - back ) Loop: lw x 1
Given code for a stage singlepipeline microarchitecture fetch decode,
execute, memory, writeback
Loop: lw xx
addi xx
sw xx
addi xx
sub xxx
bnz xLoop
All ops are one cycle except LW and SW which are cycles, and branches,
which are cycles. There is no forwarding.
Show the phases of each instruction per clock cycle for one iteration of the loop.
How many clock cycles per loop iteration are lost to branch overhead?
Assume a static branch predictor, capable of recognizing a backward branch in
the decode stage. Now how many clock cycles are wasted on branch
overhead?
Assume a dynamic branch predictor. How many cycles are lost on a correct
prediction?
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
