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
| Stage | Functional unit | Description |
|---|---|---|
| A | Adder | Mantissa ADD stage |
| D | Divider | Divide |
| E | Multiplier | Exception test |
| M | Multiplier | Multiplier I |
| N | Multiplier | Multiplier II |
| R | Adder | Rounding |
| S | Adder | Operand shift |
| U | Not assigned to one of the three units in the table | Unpack 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 instruction | Latency | Initiation interval | Pipe stages |
|---|---|---|---|
| Add, subtract | 4 | 3 | U, S+A, A+R, R+S |
| Multiply | 8 | 4 | U, E+M, M, M, M, N, N+A, R |
| Divide | 36 | 35 | U, A, R, D^27, D+A, D+R, D+A, D+R, A, R |
| Square root | 112 | 111 | U, E, (A+R)^108, A, R |
| Negate | 2 | 1 | U, S |
| Absolute value | 2 | 1 | U, S |
| FP compare | 3 | 2 | U, 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.