Power PC 471
As all three pipelines are independent of each other, the difference in their execution time require-
ment is automatically compensated, permitting Power PC to execute three instructions per cycle.
C.6.1 Branch Processing by Power PC
The real success or ef ciency of any pipeline depends mainly on its branch predicting ef ciency. In
Chapter 12, we have already discussed about common branch predicting algorithms used by many
processors (Section 12.5.2). However, Power PC handles the branch prediction in a different manner,
which is worth discussing.
In Figure C.1 the branch and branch exec. modules of Power PC were shown. The branch processing
unit is also schematically represented in Figure C.6 . This branch processing unit is responsible for han-
dling the branch instructions. It is so designed that in most of the cases branching instructions have no
effect in pipeline execution, which is, generally, referred as zero-cycle branches . To achieve this, Power
PC uses a simple strategy as described below.
The branch unit of Power PC keeps on scanning the dispatch buffer continuously for any eventual branch
instruction. Whenever, any such branch instruction is encountered within the queue, the branch target
addresses are immediately generated, provided processing of no previous branch instruction is pending.
Next, the branch prediction unit tries to nd out if the condition code for the branch is already evalu-
ated or not. Thereafter, one of the three possible cases are processed accordingly. The three possible
cases are
R A branching ill take place
R No branching will take place
R Unable to determine (insuf cient information).
Processing for the rst two cases does not pose any problem. For the third case, the branch prediction
unit checks if the branch address is backward or forward. For all backward jump cases (generally for
loops) the branch prediction unit predicts that the branch would be taking place as this prediction would
fail only once for any loop statements. For all forward jump cases, the prediction is that the branching
would not take place. Further instructions following the branch instruction are passed to the pipeline in
a conditional manner, which may quickly be aborted if the prediction goes wrong.
Instruction cache
Instruction fetch
Decode and dispatch
Data cache
Integer unit
Floating point unit
Branch processing unit
Figure C.6 Schematic representation of Power PC pipelines
Z03_GHOS1557_01_SE_C18_App_C.indd 471Z03_GHOS1557_01_SE_C18_App_C.indd 471 4/29/11 5:42 PM4/29/11 5:42 PM