5.3.6 · D1Advanced Microarchitecture

Foundations — Reservation stations

1,914 words9 min readBack to topic

Before you can read the Reservation stations parent note, you must own every word it throws at you. This page builds each symbol from nothing — plain meaning, a picture, and why the topic needs it. Read top to bottom; each block leans on the one above.


1. Instruction, operand, result — the three nouns

Picture a tiny recipe card: the top says what to do (add), the middle lists ingredients (operands), the bottom is the finished dish (result).

The topic needs these because a reservation station's whole job is: hold the recipe, wait for missing ingredients, deliver the dish. If you can't name the recipe card's three parts, nothing later makes sense.


2. Register — a named cubbyhole

Figure — Reservation stations

Look at the figure: eight labelled cubbyholes. R2 currently holds the number 7, R3 holds 4. An instruction like R1 = R2 + R3 reads cubbyholes R2 and R3 and writes cubbyhole R1.


3. "Ready" vs "pending" — the state of an operand

An operand is in one of exactly two states:

  • Ready: its number already exists. We can copy it into the desk right now.
  • Pending: some earlier, not-yet-finished instruction will produce it. We must wait.

Why the topic needs this split: a station can't execute while any operand is a sticky note. The moment the last sticky note becomes a jar, it fires. Everything else is bookkeeping around this one condition.


4. The V and Q fields — jar and sticky note, in symbols

Why j and k? Because most operations (ADD, SUB, MUL) take exactly two inputs. j is the first, k is the second. A load needs only one; then k is simply unused.


5. Tag — the address of a waiting desk

The number of bits a tag needs is just "how many labels do I need for N desks":


6. Snoop and broadcast — the shout across the room

Figure — Reservation stations

Look at the figure: one speaker (the finishing unit) shouts a (tag, value) pair onto a single wire that touches every desk and the register boxes. Each desk compares the shouted tag against its own and . On a match, it replaces the sticky note with the jar.


7. The Common Data Bus (CDB) — the shout-wire itself

Because it is one wire, only one result travels per cycle. If two units finish together, one must wait its turn — a structural hazard (Section 9).


8. Register status table & renaming — "who owns R1 right now?"

Figure — Reservation stations

Follow the figure left to right. Initially R1's row is empty → its value is trustworthy. When MUL R1,… issues at desk Mult1, we stamp Status[R1] = Mult1: "don't trust the box; Mult1 owns R1's future." Later SUB also targets R1 at desk Add2, so we overwrite to Status[R1] = Add2.


9. Hazards — the three ways instructions collide

The whole machine exists to dodge these, from pipeline hazards:


How it all feeds the topic

Register: named box

Name vs value gap

Ready or Pending operand

Vj Vk jars and Qj Qk sticky notes

Tag: address of a desk

Register status table

Renaming: overwrite the tag

Readiness Qj=0 and Qk=0

Broadcast and Snoop

Common Data Bus

RAW WAR WAW hazards

Reservation Station fires

Every arrow says "you need the left before the right makes sense." The bottom node Z is the parent topic: an instruction executing the instant its jars are full.


Equipment checklist

Self-test: can you answer each before revealing?

What is the difference between a register's name and its value?
The name is the label on the box; the value is the number inside. Renaming re-points which desk owns a name without touching stored numbers.
When do we use versus ?
holds the operand value when it is ready (jar on desk); holds the tag of the producing desk when the value is still pending (sticky note).
What does mean?
No tag pending — the operand's value has arrived. It does NOT mean the value equals zero.
What is a tag?
A short ID naming one specific reservation station, used as the return address on a sticky note so consumers know whose result to grab.
Why broadcast on a CDB instead of point-to-point wires?
Point-to-point needs about wires; one shared shout-wire reaches all consumers with wiring, and we don't know at issue time who will need the result.
How many bits does a tag need for 64 stations?
bits.
Which hazard is "true" and which two are "false"?
RAW is true (you genuinely lack the data); WAR and WAW are false, caused only by reusing the same register name — renaming removes them.
What does overwriting Status[R1] accomplish?
It makes the newest writer the owner of R1, so later readers depend on the latest value and earlier dead writes become invisible (WAW/WAR fix).