5.3.1 · D1Advanced Microarchitecture

Foundations — Superscalar execution

3,182 words14 min readBack to topic

Before you can read the parent note Superscalar execution, you must be able to see every symbol it throws at you. Below, each idea is built from nothing: plain words → a picture → why the topic needs it. Read top to bottom; each block leans on the one above.


1. A "clock cycle" — the heartbeat

The picture. Imagine a drummer keeping a steady beat. On every beat, gates open and work moves one step forward. The beat never speeds up mid-song — the whole design is built around fixed-length ticks.

Figure — Superscalar execution
Figure s01 — walkthrough. The pale-yellow square wave is the clock signal; it snaps between "low" and "high". Each dotted blue vertical line marks the rising edge that begins a new tick, and the pink labels ("tick 1", "tick 2", …) count them. Notice the spacing between the blue lines is identical everywhere — that fixed width is the whole point: a cycle is a unit of time you can count.

Why the topic needs it. Everything is counted "per cycle": instructions fetched per cycle, retired per cycle. If you don't picture the tick, phrases like " instructions per cycle" are just noise.


2. An "instruction" and the "pipeline" — the assembly line

The picture. A single conveyor belt with stations. One car per station. One car rolls off the end every tick.

Figure — Superscalar execution
Figure s02 — walkthrough. Read the grid as columns = clock cycles (c1…c8, bottom axis) and rows = pipeline stages (Fetch, Decode, Exec, Write, left axis). Each coloured box holds an instruction label (I1…I4). Follow instruction I1 on the diagonal staircase: it is Fetched in c1, Decoded in c2, Executed in c3, Written in c4. The staircase shape means four instructions are always inside the pipe at once — but trace the bottom "Write" row: only one box lands there per column (the pink arrow points at it). That is the pipeline's hard limit: overlap in time, yet only one finish per tick.

Why the topic needs it. Superscalar is defined against the plain pipeline. A plain pipeline still finishes only one instruction per tick. The whole point of the parent note is: what if we run several belts side by side?


3. IPC — the score we are chasing

  • A plain pipeline: (at best one per tick).
  • A -wide superscalar: can approach .

Why the topic needs it. The parent's whole "Derivation: Maximum IPC" is about the ceiling on this number. Every limit (units, width, dependencies) is a reason IPC falls below the ideal.


4. The symbol — issue width

The picture. Four belts side by side instead of one. Four cars enter every tick.

This is our first of several independent ceilings. Keep it in mind — we will collect three of them and combine them at the end.


5. Functional units and the symbols ,

The subscript is just a label ("ALU", "FP", "mem", "branch"). It is not a number.

Figure — Superscalar execution
Figure s03 — walkthrough. Each bar is one unit type; its height is the ceiling (instructions/cycle), printed on top. Read the ALU bar: units serving a demand gives . Now scan for the shortest bar — outlined in pink here, the memory unit at . That shortest bar is the traffic jam: no matter how tall the others are, the whole machine can only flow as fast as its most-starved unit type. The pink arrow labels it "bottleneck = smallest F/p".

Now let us make that ceiling formal, matching the width ceiling above.


6. Dependencies — RAW, WAW, WAR (why order matters)

Two instructions can only run at the same time if they don't step on each other. There are three ways they can clash, using a register (a named storage slot, like ).

Figure — Superscalar execution
Figure s04 — walkthrough. Three little stacked pairs, each an instruction A above instruction B sharing register . Left, blue (RAW): the yellow arrow runs A→B because B literally needs the value A produced — labelled TRUE. Lower-left, pink (WAW): both write ; they clash only over the name — labelled false. Right, off-white (WAR): A reads then B overwrites it — again false. The blue note at the bottom is the punchline: rename the second writer to a fresh name and both false clashes disappear.

Why "true" vs "false" matters. RAW is real data flow — no trick removes it. WAW and WAR exist only because we reused a register name. Give the second writer a fresh name and the clash vanishes. That trick is Register Renaming.

Why the topic needs it. The whole "Rename and Dispatch" stage, and the parent's dependency-chain length , are about these hazards.


7. The ROB — the instruction "waiting room"

Before we can write the parent's dependency ceiling we need one more symbol: the size of the buffer that holds in-flight instructions.

The picture. A ticket queue: people are served (compute) in any order, but they leave through the door one-by-one in the order they arrived — so from the outside everything looks orderly. is how many tickets the queue can hold.

Why the topic needs it. A bigger ROB = a bigger window to hunt for independent work = higher IPC. That's why sits inside the IPC formula built in the next section.


8. and — chain length and latency

Deriving the dependency ceiling — step by step. We now have every symbol to build the parent's third ceiling. It is still ordinary IPC (section 3), but computed under one specific limit: the supply of independent work.

Read the shape: a longer chain ( big) or slower ops ( big) shrink the ceiling; a bigger ROB ( big) grows it by giving more independent work to overlap. This is the third and last ceiling.


9. Control-flow dependencies — the branch ceiling

There is one more way to stall that isn't RAW/WAW/WAR at all.

Why this is its own ceiling. A misprediction empties the whole pipeline and re-fetches from the correct target, wasting a fixed number of cycles (the misprediction penalty). The more branches, and the worse the prediction, the more often the wide fetch engine runs dry. So even with perfect units and infinite ROB, control flow caps IPC:


10. Combining the ceilings — why minimum?

We collected three independent ceilings, each a true upper bound that must hold on its own:


The prerequisite map

Clock cycle

Pipeline

Superscalar width W

IPC score

Functional units F_i

Unit ceiling F_i over p_i

Instruction mix p_i

Hazards RAW WAW WAR

Register Renaming

Dependency chain D and latency L

Reorder Buffer ROB size

Dependency ceiling

Control flow branches

Superscalar execution 5.3.1

Each foundation flows into the IPC score, and the IPC score is what the parent note derives a ceiling for.


Once these symbols are solid, the machinery that implements them lives in: Register Renaming · Tomasulo's Algorithm · Reorder Buffer · Branch Prediction · Cache Hierarchy · VLIW Architecture · Power-Performance Tradeoffs. And the Hindi walkthrough: 5.3.01 Superscalar execution (Hinglish).


Equipment checklist

Read the question, answer aloud, then reveal.

What does one clock cycle represent?
One tick of the CPU's metronome; all work is measured per tick.
How is a plain pipeline different from a superscalar?
A pipeline overlaps stages of instructions in time (1 finish/tick max); a superscalar runs multiple belts so several instructions share the same stage and several finish per tick.
Define IPC in one sentence.
The average number of instructions the CPU finishes per clock cycle.
What is the symbol and what ceiling does it place on IPC?
Issue width — instructions started per cycle; you can never finish more than you start, so .
What do and mean, and what must satisfy?
= number of functional units of type ; = fraction of instructions needing that type; the classes are disjoint so .
Why is the unit ceiling a division, and where does it come from?
From (demand can't exceed supply), giving ; supply over demand-fraction.
Name the three hazards and which are false.
RAW (true), WAW (false), WAR (false); the false ones vanish with register renaming.
What does the symbol stand for?
The size of the reorder buffer — how many instructions can be in flight at once.
What do and stand for?
= length of a RAW dependency chain; = cycles for one instruction to produce its result.
In the dependency ceiling, what counts as available slots vs occupied slots?
= staged instruction-slots available; = cycle-slots one in-order chain occupies.
Why do the three ceilings combine with a minimum?
Each is an upper bound that must hold at once, so IPC cannot exceed the smallest — the tightest bound wins.
Besides RAW/WAW/WAR, what other dependency caps IPC?
Control-flow (branch) dependencies — mispredictions flush the pipeline and waste staged work.
Latency vs throughput — the difference?
Latency = time for one op to finish; throughput = how many ops start per cycle.
What does the ROB provide and why does its size matter?
In-order commit despite out-of-order execution (precise exceptions); a bigger ROB gives a wider window to find independent work, raising IPC.