Question: Assume a five-stage single-pipeline microarchitecture (fetch, decode, execute, memory, write back) and the code in Figure 2.41. All ops are 1 cycle except LW and
Assume a five-stage single-pipeline microarchitecture (fetch, decode, execute, memory, write back) and the code in Figure 2.41. All ops are 1 cycle except LW and SW, which are 1 + 2 cycles, and branches, which are 1 + 1 cycles. There is no forwarding. Show the phases of each instruction per clock cycle for one iteration of the loop.
a. How many clock cycles per loop iteration are lost to branch overhead?
b. Assume a static branch predictor, capable of recognizing a backwards branch in the decode stage. Now how many clock cycles are wasted on branch overhead?
c. Assume a dynamic branch predictor. How many cycles are lost on a correct prediction?
Step by Step Solution
3.33 Rating (162 Votes )
There are 3 Steps involved in it
The convention is that an instruction does not enter the execution phase until all of its operands a... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
903-C-S-S-A-D (3173).docx
120 KBs Word File
