5.2.4 · D3Processor Datapath & Pipelining

Worked examples — Pipeline registers and control signals

2,475 words11 min readBack to topic

This page is the drill-ground for the parent topic. We do not re-teach the theory; we hammer it against every kind of case until no scenario can surprise you. If a term feels unfamiliar, jump back to the parent and to Single-cycle datapath first.


The scenario matrix

Every problem this topic can throw at you is one of the cells below. A "case class" here is a distinct way pipeline registers or control signals behave. We will cover all of them.

# Case class What makes it different Example that hits it
A Width arithmetic (normal) Sum the fields a register must carry Ex 1
B Degenerate width (a stage that drops fields) Later registers get narrower Ex 2
C Zero-signal instruction An instruction that sets a control bit to 0 Ex 3
D Signal-lifetime trace One bit's journey across all 4 stages Ex 4
E Wrong-register bug (destructive case) What breaks if dest# is not carried Ex 5
F Limiting value (deepest signal) The signal that must survive the most stages Ex 6
G Real-world word problem Timing / throughput reasoning Ex 7
H Exam twist (the "5th register" trap) Symmetry intuition that is wrong Ex 8
I Branch data survival PC+4 must reach a later stage than fetch Ex 9

Nine cells, nine worked examples — one per row. Let us walk each.


Figure — Pipeline registers and control signals



Figure — Pipeline registers and control signals






Recall Quick self-test on the matrix

Widest pipeline register and its width? ::: ID/EX at 141 bits (holds all 3 control bundles). Narrowest pipeline register and its width? ::: MEM/WB at 71 bits (only WB bundle). How many registers does a WB signal traverse? ::: 3 (ID/EX, EX/MEM, MEM/WB). Does a store instruction still carry a WB bundle? ::: Yes — fixed-width hardware; it carries RegWrite=0. Clock period if each stage is 2.0 ns and register overhead is 0.1 ns? ::: 2.1 ns.


Connections