Pipelines and dual-issue rules

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.

Whether an instruction goes to the even or odd pipeline depends on its instruction type, which is related to the execution unit that performs the function. Each execution unit is assigned to one of the two pipelines. Table 1 summarizes the instruction types, latencies, and pipeline assignments.
Table 1. SPU Instruction Latency and Pipeline, by Instruction Class
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
Note:
  1. Inline or correctly hinted branches have zero-cycle delay. The mispredicted branch penalty is 18-19 clock cycles.
  2. Six cycles of a double-precision floating-point operation are instruction-issue stalls. No instructions of any kind are issued for six cycles after a double-precision floating point instruction is issued.

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.