
6-14
MPC7400 RISC Microprocessor Users Manual
Timing Considerations
The instruction timing for this example is described cycle-by-cycle as follows:
0. In cycle 0, instructions 0D3 are fetched from the instruction cache. Instructions 0 and
1 are placed in the two entries in the instruction queue from which they can be
dispatched on the next clock cycle.
1. In cycle 1, instructions 0 and 1 are dispatched to the IU2 and FPU, respectively.
Notice that for instructions to be dispatched they must be assigned positions in the
CQ. In this case, because the CQ is empty, instructions 0 and 1 take the two lowest
entries in the CQ. This cycle also shows a special case for instruction 0. Because it
can take a position in CQ0, this single-cycle integer instruction can execute and
complete in the same cycle.
Instructions 2 and 3 drop into the two dispatch positions in the instruction queue.
Because there were two positions available in the instruction queue in clock cycle 0,
two instructions (4 and 5) are fetched into the instruction queue. Instruction 4 is a
branch unconditional instruction, which resolves immediately as taken. Because the
branch is taken, it can therefore be folded from the instruction queue.
2. In cycle 2, assume a BTIC hit occurs and target instructions 6 and 7 are fetched into
the instruction queue, replacing the folded
Instruction 0 completes, writes back its results and vacates the CQ by the end of the
clock cycle. Instruction 1 enters the second FPU execute stage, instruction 2 is
dispatched to the IU2, and instruction 3 is dispatched into the Trst FPU execute
stage. Because the taken branch instruction (4) does not update either CTR or LR, it
does not require a position in the CQ and can be folded.
3. In cycle 3, target instructions (6 and 7) are fetched, replacing instructions 4 and 5 in
IQ0 and IQ1. This replacement on taken branches is called branch folding.
Instruction 1 proceeds through the last of the three FPU execute stages. Instruction
2 has executed but must remain in the CQ until instruction 1 completes. Instruction
3 replaces instruction 1 in the second stage of the FPU, and instruction 6 replaces
instruction 3 in the Trst stage. Also, as will be shown in cycle 4, there is a
single-cycle stall that occurs when the FPU pipeline is full.
Because there were three vacancies in the instruction queue in the previous clock
cycle, instructions 8D11 are fetched in this clock cycle.
4. Instruction 1 completes in cycle 4, allowing instruction 2 to complete. Instructions
3 and 6 continue through the FPU pipeline. Although instruction 7 is in IQ1, it
cannot be dispatched because the FPU is busy, and because instruction 7 cannot be
dispatched neither can instruction 8. The additional cycle stall allows the instruction
queue to be completely Tlled. Because there was one opening in the instruction
queue in clock cycle 3, one instruction is fetched (12) and the instruction queue is
full.
b
instruction (4) and instruction 5.