As a simple approach, consider subdividing instruction processing into two
stages: fetch instruction and execute instruction. There are times during the execution
of an instruction when main memory is not being accessed. This time could be
used to fetch the next instruction in parallel with the execution of the current one.
Figure 12.9a depicts this approach. The pipeline has two independent stages. The
first stage fetches an instruction and buffers it.When the second stage is free, the first
stage passes it the buffered instruction. While the second stage is executing the instruction,
the first stage takes advantage of any unused memory cycles to fetch and
buffer the next instruction. This is called instruction prefetch or fetch overlap. Note
that this approach, which involves instruction buffering, requires more registers. In
general, pipelining requires registers to store data between stages.
It should be clear that this process will speed up instruction execution. If the
fetch and execute stages were of equal duration, the instruction cycle time would be
halved. However, if we look more closely at this pipeline (Figure 12.9b), we will see
that this doubling of execution rate is unlikely for two reasons: