6-20
MPC7400 RISC Microprocessor Users Manual
Timing Considerations
6.3.4 Instruction Dispatch and Completion Considerations
Several factors affect the MPC7400s ability to dispatch instructions at a peak rate of two
per cyclethe availability of the execution unit, destination rename registers, and CQ, as
well as the handling of completion-serialized instructions. Several of these limiting factors
are illustrated in the previous instruction timing examples.
To reduce dispatch unit stalls due to instruction data dependencies, the MPC7400 provides
a single-entry reservation station for the FPU, SRU, VPU, VALU, and each IU, and a
two-entry reservation station for the LSU. If a data dependency keeps an instruction from
starting execution, that instruction is dispatched to the reservation station associated with
its execution unit (and the rename registers are assigned), thereby freeing the positions in
the instruction queue so instructions can be dispatched to other execution units. Execution
begins during the same clock cycle that the rename buffer is updated with the data the
instruction is dependent on.
If both instructions in IQ0 and IQ1 require the same execution unit, the instruction in IQ1
cannot be dispatched until the Trst instruction proceeds through the pipeline and provides
the subsequent instruction with a vacancy in the requested execution unit.
The completion unit maintains program order after instructions are dispatched from the
instruction queue, guaranteeing in-order completion and a precise exception model.
Completing an instruction implies committing execution results to the architected
destination registers. In-order completion ensures the correct architectural state when the
MPC7400 must recover from a mispredicted branch or an exception.
Instruction state and all information required for completion is kept in the eight-entry, FIFO
completion queue. A CQ entry is allocated for each instruction when it is dispatched to an
execute unit; if no entry is available, the dispatch unit stalls. A maximum of two instructions
per cycle may be completed and retired from the CQ, and the ow of instructions can stall
when a longer-latency instruction reaches the last position in the CQ. Subsequent
instructions cannot be completed and retired until that longer-latency instruction completes
and retires. Examples of this are shown in Section 6.3.2.2, òCache Hit,ó and
Section 6.3.2.3, òCache Miss.ó
The MPC7400 also allows an instruction to Tnish and complete in the same cycle. If an
instruction is in CQ0 and it Tnishes, it completes in the same cycle. Likewise, if the
instruction in CQ1 also Tnishes in the same cycle with the instruction in CQ0, both can also
be simultaneously retired.
The MPC7400 can execute instructions out-of-order, but in-order completion by the
completion unit ensures a precise exception mechanism. Program-related exceptions are
signaled when the instruction causing the exception reaches the last position in the CQ.
Prior instructions are allowed to complete before the exception is taken.