From Multi-Cycle to Pipelining

The last lecture introduced the multi-cycle design to fix the inefficiency of the single-cycle model. Instead of one long clock cycle for all instructions, it uses multiple short cycles and lets each instruction take only as many as it needs.

image.png

Major benefits of using Multi-Cycle Design is

The major downside of the multi-cycle approach is that

Pipelining is the fundamental technique to solve this problem. It works like an assembly line for instructions, allowing the processor to work on different stages of multiple instructions at the same time, which dramatically increases throughput, the number of instructions completed per unit of time.

The Core Idea of Pipelining

An instruction is broken down into a sequence of steps or "stages" (e.g., Fetch, Decode, Execute, Memory access, Write back).

In a pipelined processor, each stage has its own dedicated hardware. As one instruction moves from the Fetch stage to the Decode stage, the next instruction in the program can enter the now-vacant Fetch stage.

In an ideal scenario, once the pipeline is full, one instruction finishes every single clock cycle.

Why Pipelining Isn't Perfectly Efficient: The "Need to Know" Problems