Assume an instruction mix of 20% conditional branches, 5% unconditional…

Assume an instruction mix of 20% conditional branches, 5% unconditional branches, 75% all others. 65% of the conditional branches are taken. We have a 5-stage pipeline where branch target locations are computed in the 2nd stage and branch conditions in the 4th stage. Assume no other sources of pipeline stalls.

We want to decide whether to implement "predict taken" or "predict not taken" for branch prediction for this machine. For "predict not taken", even unconditional branches are assumed not taken. Which of the following is correct?

  1. A.

    "predict taken" is better for this machine.

  2. B.

    "predict not taken" is better for this machine.

  3. C.

    For "predict taken" branch predictions, CPI is the 1.54

  4. D.

    For "predict not taken" branch predictions, CPI is the 1.54

Attempted by 39 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…