4.1.23 · D1Computer Architecture (Deep)

Foundations — Superscalar — multiple execution units

2,041 words9 min readBack to topic

Before you can read the parent note Superscalar, you need to own every symbol it throws at you. This page builds each one from nothing — plain words, a picture, and the reason the topic can't live without it.


0. The clock — the heartbeat everything is measured in

Everything a CPU does is measured in ticks of a clock. Picture a metronome inside the chip going tick… tick… tick… billions of times a second. One "tick" is one clock cycle.

Why the topic needs it: superscalar is about doing more per beat. You cannot count "more per beat" until you have named the beat. Look at the figure below — each vertical white line is one tick.

Figure — Superscalar — multiple execution units

1. An instruction — the atom of a program

We will write instructions in a simple made-up style:

r1 = r2 + r3

Read this as: "take whatever number is stored in box r2, add the number in box r3, and put the answer in box r1."

Why the topic needs it: the whole game of superscalar is spotting when two instructions touch different boxes (safe to run together) versus the same box (must wait). Registers are the objects we watch.


2. The pipeline — an assembly line for instructions

Before superscalar, understand pipelining (see Pipelining). Building a car, you don't finish one car completely before starting the next — you set up stations (weld, paint, assemble) and a different car sits at each station at once.

A CPU does the same. A classic instruction passes through 5 stages:

  1. Fetch — grab the instruction from memory.
  2. Decode — figure out what it means.
  3. Execute — do the arithmetic.
  4. Memory — read/write memory if needed.
  5. Write-back — store the result into a register.
Figure — Superscalar — multiple execution units

Look at the figure: each column is one clock cycle, each row is one instruction. Because the stages overlap, once the pipeline is full, one instruction finishes every cycle — even though each individual instruction still takes 5 cycles start to finish.


3. Execution unit — the workbench that does the actual work

A scalar CPU has essentially one lane through Execute. A superscalar CPU installs several execution units side by side, so several instructions can be in the Execute step in the same cycle.

Figure — Superscalar — multiple execution units

Look at the two floors in the figure: the top floor (scalar) has one workbench, so instructions queue single-file. The bottom floor (superscalar) has two workbenches, so two independent instructions get built at once.

Why the topic needs it: "multiple execution units" is the definition of superscalar. This is the picture behind the chapter title.


4. Issue width — how many lanes we built

The symbol appears constantly in the parent note. Now it just means: count the workbenches.


5. IPC and CPI — the two scorecards

We need a number that says how well we're actually doing. Two mirror-image numbers do this.

Why two names for one idea? Because sometimes it's natural to say "this instruction cost 4 cycles" (CPI language) and sometimes "we finished 2 per cycle" (IPC language). They carry the same information.

Recall Quick reciprocal check

If a CPU finishes work at IPC , what is its CPI? IPC 2 → CPI ::: cycles per instruction.


6. The performance equation — putting the symbols together

Now we can read the parent note's headline formula. How long does a whole program take?

Read it as a chain of "how many × how much":

  • = how many instructions the program runs (the dynamic count — instructions actually executed, loops counted every pass).
  • = how many cycles each one costs on average.
  • = how many seconds each cycle lasts.

Multiply them and the cycle-and-instruction units cancel, leaving seconds. Now swap CPI for :


7. Dependency — why the lanes sometimes sit empty

Two instructions are independent if neither needs the other's result. They can run in parallel. If one needs the box the other is still filling, we have a dependency and must wait.

Figure — Superscalar — multiple execution units

The figure shows two mini-programs. On the left, the arrows never touch — independent, both lanes busy. On the right, each instruction's output feeds the next (a dependency chain) — a single-file line no matter how many lanes exist.

Why the topic needs it: dependencies are the reason real IPC falls short of . This one concept powers the whole "why we rarely hit peak" section of the parent note. Deeper coverage of how the CPU fights dependencies lives in Out-of-Order Execution, Register Renaming, and the Reorder Buffer (ROB) — but the foundation is just: same box → must wait.


8. The parallel fraction — and Amdahl's shape

The parent note bounds IPC with:

Every symbol is now familiar except .

Test the two extremes — this is exactly Amdahl's Law wearing an ILP costume:

  • (everything independent): denominator , so . Perfect — every lane full.
  • (one long dependency chain): denominator , so . Extra lanes are useless.

Prerequisite map

Clock cycle and T_cycle

Pipeline finishes 1 per cycle

Instruction and Registers

Execution units the workbenches

Issue width N lanes

IPC and CPI scorecards

Performance equation T

Data dependency same register

Parallel fraction p

Superscalar performance model


Equipment checklist

Cover the right side and see if you can answer each before revealing.

What is one clock cycle in plain words?
One beat of the CPU's internal metronome — the smallest unit of time the hardware counts in.
What does measure?
How many seconds one clock beat lasts (the clock period).
What is a register?
A tiny, very fast storage box inside the CPU that holds one number, named like r1, r2, r3.
What does a 5-stage pipeline let you finish per cycle at best?
One instruction per cycle, once the pipeline is full.
What is an execution unit?
The hardware that performs the Execute step (integer ALU, multiplier, load/store, FPU).
What is issue width ?
How many instructions the CPU can send to execution units in one cycle — the number of lanes.
What is IPC and how does it relate to CPI?
IPC = instructions finished per cycle; IPC = 1/CPI (they are reciprocals).
Write the CPU performance equation.
T = N_inst × CPI × T_cycle = N_inst × T_cycle / IPC.
Which term of the performance equation does superscalar attack, and why?
IPC (equivalently CPI) — it's the only factor extra execution units can change.
What is a RAW data dependency?
An instruction must read a register that an earlier, not-yet-finished instruction is still writing.
What does the parallel fraction represent?
The fraction of instructions independent enough to run in parallel; is the serial-chain fraction.
Why is real IPC usually less than ?
Because dependencies (and structural/control hazards) force some instructions to wait, leaving lanes idle.