The datapath and the pipeline
How the control unit drives the datapath, how a five-stage pipeline overlaps instructions, and what data, control and structural hazards cost.
About 2 hours of study
Learning objectives
- Set the control signals for common instructions
- Count pipeline cycles and the effect of the clock period
- Count the stalls of data hazards with and without forwarding
Lessons
- 1
The datapath and the control unit Intermediate
How the parts of a processor are wired together for each instruction, and how the control unit drives them with control signals, hardwired or microprogrammed.
- 2
Pipelining Intermediate
How a pipeline overlaps the stages of many instructions: the five classic stages, the k + n − 1 cycle count, throughput against latency, and unbalanced stages.
- 3
Pipeline hazards Intermediate
What stops a pipeline from running at full speed: data hazards and forwarding, control hazards and branch prediction, and structural hazards.
Module practice
- Control signals for an instructionEasy
- Single-cycle clock periodMedium
- A tiny processorHard
- Pipeline cycle countEasy
- Pipeline clock period and speedupMedium
- Pipeline diagram with branch bubblesHard
- Find read-after-write dependencesEasy
- Two-bit branch predictorMedium
- Count the pipeline stallsHard