The SPU has two pipelines, named even (pipeline 0) and odd (pipeline 1). Into these pipelines, the SPU can issue can issue and complete up to two instructions per cycle, one in each of the pipelines.
Instruction Class | Description | Latency (clock cycles) | Pipeline |
---|---|---|---|
LS | Load and store | 6 | Odd |
HB | Branch hints | 15 | Odd |
BR | Branch resolution | 4 | Odd |
CH | Channel interface, special-purpose registers | 6 | Odd |
SP | Single-precision floating-point | 6 | Even |
DP | Double-precision floating-point | 13² | Even |
FI | Floating-point integer | 7 | Even |
SH | Shuffle | 4 | Odd |
FX | Simple fixed-point | 2 | Even |
WS | Word rotate and shift | 4 | Even |
BO | Byte operations | 4 | Even |
NOP | No operation (execute) | - | Even |
LNOP | No operation (load) | - | Odd |
The SPU issues all instructions in program order according to the pipeline assignment. Each instruction is part of a doubleword-aligned instruction pair called a fetch group.
A fetch group can have one or two valid instructions, but it must be aligned to doubleword boundaries. This means that the first instruction in the fetch group is from an even word address, and the second instruction from an odd word address.
The SPU processes fetch groups one at a time, continuing to the next fetch group when the current instruction group becomes empty. An instruction becomes issueable when register dependencies are satisfied and there is no structural hazard (resource conflict) with prior instructions or DMA or error-correcting code (ECC) activity.
Dual-issue occurs when a fetch group has two issueable instructions in which the first instruction can be executed on the even pipeline and the second instruction can be executed on the odd pipeline. If a fetch group cannot be dual-issued, but the first instruction can be issued, the first instruction is issued to the proper execution pipeline and the second instruction is held until it can be issued. A new fetch group is loaded after both instructions of the current fetch group are issued.