1-10
MPC7400 RISC Microprocessor Users Manual
MPC7400 Microprocessor Features
Branch instructions that do not affect the LR or CTR are removed from the instruction
stream. The BPU folds branch instructions when a branch is taken (or predicted as taken);
branch instructions that are not taken, or predicted as not taken, are removed from the
instruction stream through the dispatch mechanism.
Instructions issued beyond a predicted branch do not complete execution until the branch
is resolved, preserving the programming model of sequential execution. If branch
prediction is incorrect, the instruction unit ushes all predicted path instructions, and
instructions are fetched from the correct path.
1.2.2.1 Instruction Queue and Dispatch Unit
The instruction queue (IQ), shown in Figure 1-1, holds as many as six instructions and
loads up to four instructions from the instruction cache during a single processor clock
cycle. The instruction fetcher continuously attempts to load as many instructions as there
were vacancies in the IQ in the previous clock cycle. All instructions except branch, Return
from Interrupt (
rT
), System Call (
sc
), and Instruction Synchronize (
isync
) instructions are
dispatched to their respective execution units from the bottom two positions in the
instruction queue (IQ0 and IQ1) at a maximum rate of two instructions per cycle.
Reservation stations are provided for the IU1, IU2, FPU, LSU, SRU, VPU, and VALU. The
dispatch unit checks for source and destination register dependencies, determines whether
a position is available in the completion queue, and inhibits subsequent instruction
dispatching as required.
Branch instructions can be detected, decoded, and predicted from anywhere in the
instruction queue. For a more detailed discussion of instruction dispatch, see Section 6.3.4,
òInstruction Dispatch and Completion Considerations.ó
1.2.2.2 Branch Processing Unit (BPU)
The BPU receives branch instructions from the sequential fetcher and performs CR
lookahead operations on conditional branches to resolve them early, achieving the effect of
a zero-cycle branch in many cases.
Unconditional branch instructions and conditional branch instructions in which the
condition is known can be resolved immediately. For unresolved conditional branch
instructions, the branch path is predicted using either the architecture-deTned static branch
prediction or the MPC7400-speciTc dynamic branch prediction. Dynamic branch
prediction is enabled if HID0[BHT] = 1.
When a prediction is made, instruction fetching, dispatching, and execution continue from
the predicted path, but instructions cannot complete and write back results to architected
registers until the prediction is determined to be correct (resolved). When a prediction is
incorrect, the instructions from the incorrect path are ushed from the processor and
processing begins from the correct path. The MPC7400 allows a second branch instruction
to be predicted; instructions from the second predicted instruction stream can be fetched
but cannot be dispatched.