5.3.1 · D3Advanced Microarchitecture

Worked examples — Superscalar execution

2,532 words12 min readBack to topic

This is a worked-examples deep dive for Superscalar execution. The parent note derived one master formula for how many instructions a superscalar core finishes each clock tick. Here we throw every kind of input at that formula until you can spot the bottleneck by eye.

Before we compute anything, let us re-earn every symbol, because a smart 12-year-old should be able to read from line one.

Why min and not a sum or average? Because a chain is only as strong as its weakest link — the machine can never go faster than its tightest constraint, so the smallest of the three numbers is the real speed. That is the whole idea; every example below just asks which gate is smallest.

Figure — Superscalar execution

Look at the three gates above. An instruction stream (the arrows) can be squeezed by any one of them. The red gate in each example is the one that actually limits us — that is what we are hunting for.


The scenario matrix

Every superscalar-IPC problem falls into one of these cells. The examples that follow are labelled with the cell they hit, and together they cover all of them.

# Case class What is special Which gate usually wins Example
A Front-end bound plenty of units, small gate 1 () Ex 1
B Execution bound (memory) one unit type overloaded gate 2 Ex 2
C Execution bound (compute) different unit type overloaded gate 2 Ex 3
D Dependency bound long chain, tiny ROB gate 3 Ex 4
E Degenerate: a unit type unused (divide-by-zero risk) ignore that unit Ex 5
F Degenerate: or no chains / instant results gate 3 blows up (∞) Ex 5
G Tie / two gates equal boundary case either Ex 6
H Real-world word problem you must build from counts any Ex 7
I Exam twist: "what to fix?" find gate, then improve it reasoning Ex 8
J Limiting behaviour or ROB remaining gate Ex 9

The examples


Recall Quick self-test

Front-end bound means IPC equals which symbol? ::: (the issue width) If for some unit type, what do you do with its term? ::: Drop it — an unused unit can never bottleneck; the ratio is undefined (). Which gate is ? ::: The dependency gate (gate 3); it shrinks with long chains and high latency , grows with a bigger ROB window. In a balanced design, two gates are equal — why is that hard to improve? ::: Relieving one leaves the other at the same value, so you must improve both to gain speed. A workload is 60% memory with 2 mem units. Hard ceiling on IPC? ::: , no matter how wide the machine.

See also: Tomasulo's Algorithm, Branch Prediction, Cache Hierarchy, VLIW Architecture, Power-Performance Tradeoffs.