Prev

Home

Next

Suggestion Box

CPSC 418 --- Advanced Computer Architecture --- Spring 1996
Handout 14: Branch Penalties

Introduction

Pen_Tot Total Branch Penalty
Pen_Bra Branch Penalty
Pen_MisPred Branch Mispredict Penalty
%MisPred Percentage of Branches Mispredicted
Pen_Tot = Pen_Bra + (%MisPred)(Pen_MisPred)

We now compare two strategies for an ISA that tests a general purpose register in conditional branches (i.e. JUMPEQ R3 300(PC)). The two strategies are predict not-taken and predict taken.

It is interesting to note that

Predict Not-Taken

Pen_Bra 0
Pen_MisPred 2
%MisPred 0.60
Pen_Tot =
= Pen_Bra + (%MisPred)(Pen_MisPred)
= 0 + (0.60)(2)
= 1.2

Predict Taken

When we predict that branches are taken, Pen_Bra is 1, because the instruction following the branch must be killed while it is FetchInst.

Pen_Bra 1
Pen_MisPred 2
%MisPred 0.40
Pen_Tot =
= Pen_Bra + (%MisPred)(Pen_MisPred)
= 1 + (0.40)(2)
= 1.8

It is interesting to note that even though %MisPred is lower for predict-taken than predict-not-taken, the total branch penalty is lower for predict-not-taken.

Prev

Home

Next

Suggestion Box
Last modified: 20 Mar 96