Question: If the pipeline: has a one - bit branch predictor that predicts the branch outcome ( taken / not taken ) to be the same

If the pipeline:
has a one-bit branch predictor that predicts the branch outcome (taken/not taken) to be the same as the outcome of the last execution of the same branch, as shown in the figure below, and,
both the branch outcome and the target of the branch are predicted in the IF stage, and,
resolves the actual branch target address and taken/not taken direction in the ID stage, and,
is initialized to taken;
How many stall cycles will this code incur because of branches?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!