MIPS R4000 FP Pipeline

The R4000 FP unit has adder, multiplier, and divider functional units; FP operations use different sequences of internal stages.

Stage types from the lecture

StageFunctional unitDescription
AAdderMantissa ADD stage
DDividerDivide
EMultiplierException test
MMultiplierMultiplier I
NMultiplierMultiplier II
RAdderRounding
SAdderOperand shift
UNot assigned to one of the three units in the tableUnpack numbers

These are eight stage types, not eight identical sequential cycles for every FP operation. They are also distinct from the R4000 integer pipeline’s eight stages.

FP operation table (slide 37)

FP instructionLatencyInitiation intervalPipe stages
Add, subtract43U, S+A, A+R, R+S
Multiply84U, E+M, M, M, M, N, N+A, R
Divide3635U, A, R, D^27, D+A, D+R, D+A, D+R, A, R
Square root112111U, E, (A+R)^108, A, R
Negate21U, S
Absolute value21U, S
FP compare32U, A, R

Commas separate cycles; + combines stage activities within one cycle; powers denote repeated cycles. Thus add/subtract has four listed cycles, and square root repeats A+R for 108 cycles.

Slide 38 states that latency is reduced by 1 if the consuming instruction is a store. It refers to the instruction receiving the result, not to a destination register being a store.

Clarification: implications

The timing table here counts the operation’s listed execution cycles. Keep it separate from the introductory table where a four-stage adder has latency 3. See Latency and Initiation Interval for that distinction.

Even independent FP operations may require spacing: the R4000 add/subtract II is 3, unlike II = 1 in the introductory adder example. Also, the stage sequences show that operations can use stages associated with another functional unit, such as multiply using A and R. Resource conflicts can therefore depend on internal stage use as well as operation names.

Related: MIPS R4000 Pipeline, Structural Hazards in Multicycle Pipelines, Pipeline CPI and Stall Costs.

Source

E. Sanchez, Multicycle operations, Politecnico di Torino, ASE 2026/27, slides 36-38. PDF page numbers match slide numbers.

Lecture context: Lecture 05 - Multicycle Operations. Sections marked as clarification or reusable explanation add study guidance to the slide material.