Computer Organization & Architecture

Pipelining

Use this for “How long do 100 instructions take on a 5-stage pipeline with 200 ps stages?”

Diagram

12345678…104i1FDXMWi2FDXMWi3FDXMWi4FDXMW…i100FDXMWF = IF · D = ID · X = EX · M = MEM · W = WB104 cycles
k + n − 1 = 5 + 100 − 1 = 104 cycles.
Time = 104 × 0.2 ns = 20.8 ns.
Speedup
=
100
×
0.8
ns
20.8
ns
=
3.846.
This is an example. Type your own values to start a new problem.
t (ns)
=
(
k
+
n
−
1)
×
tₛ (ns)
t₁
Single-cycle period
example
Nc
Clock cycles
calculated
S
Speedup
calculated
S∞
Long-run speedup
calculated

Formulas

Nc
=
k
+
n
−
1
104 = 5 + 100 − 1
t
=
Nc
×
tₛ
20.8 = 104 × 0.2
S
=
n
×
t₁
t
3.8462
=
100
×
0.8
20.8
S∞
=
t₁
tₛ
4
=
0.8
0.2

Assumptions

•
No stalls: a new instruction enters the pipeline every cycle.
•
Every stage takes tₛ, the slowest stage plus its register delay (1 ns = 1000 ps).
•
The speedup compares with a single-cycle machine whose clock period is t₁.

Step-by-step

WE KNOW
k = 5, n = 100, tₛ = 0.2 ns, t₁ = 0.8 ns
FIND
clock cycles (Nc), pipelined time (t), speedup (S), long-run speedup (S∞)
Step 1 · Find clock cycles (Nc)
Use Nc = k + n − 1
The
first
instruction
needs
k
cycles
to
fill
the
pipeline;
each
later
one
finishes
one
cycle
after
it.
Nc = 5 + 100 − 1
Nc = 104
Step 2 · Find pipelined time (t)
Use t = Nc × tₛ
Every clock cycle lasts one stage time.
t
=
104
×
0.2
t
=
20.8
ns
Step 3 · Find speedup (S)
Use S = n × t₁ ÷ t
Without
the
pipeline
each
instruction
takes
the
whole
period
t₁
,
one
after
another.
S
=
100
×
0.8
20.8
S
=
80
20.8
S
=
3.8462
Step 4 · Find long-run speedup (S∞)
Use S∞ = t₁ ÷ tₛ
For
long
programs
the
k
−
1
filling
cycles
hardly
count,
so
one
instruction
finishes
each
tₛ.
S∞
=
0.8
0.2
S∞ = 4
Check
Put the numbers back in. Both sides should match.
104 = 5 + 100 − 1 ✓
20.8 = 104 × 0.2 ✓
3.8462
=
100
×
0.8
20.8
✓
4
=
0.8
0.2
✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

More problem types

© 2026 SME. All rights reserved.