Pipeline : Processor and Memory/cache Communication
Pipeline : Processor and Memory/cache Communication
Pipeline : Processor and Memory/cache Communication
Cloc 1 2 3 4 5
k
F1 E1
F2 E2
F3 E3
F4 E4
F5
The overall, the above scheme completes the processing of one instruction in each clock cycle.
It means that the rate of instruction processing is twice of sequential operation.
The rate can be improved four time of the sequential operation by further decomposing the E
stage into other stages like follow
F E
(E)xecute (W)rite
(D)ecode
F D E W
One better approach is to decompose the instruction into five stages so that the rate becomes
five times of the sequential operation.
F D OF E W
Further decomposing the instruction into more stages will produce a scheme called
superpipelined architecture; this, however, still completes processing of one instruction in one
clock cycle.
1 2 3 4 5 6
F1 D1 E1 W1
F2 D2 E2 W2
F3 D3 E3 W3
F4 D4 E4
F5 D5
F6
Another approach is completing processing of more than one instruction in one clock cycle.. This
is called superscalar.
1 2 3 4 5 6 7 8
F1 D1 E1 W1
F2 D2 E2 W2
F3 D3 E3 W3
F4 D4 E4 W4
F5 D5 E5 W5
F6 D6 E6 W6
F7 D7 E7 W7
F8 D8 E8 W8
F9 D9 E9 W9
F10 D10 E10 W10
Pipeline Hazard
Condition that leads to unexpected/incorrect behavior
Three types of hazard
o Structural
Two instructions or more require the use of a given H/W resource at the same time.
o Data
Condition in which operands (input or output) of an instruction are not available at the time
expected.
o Control/Instruction
Condition in which an instruction is not available (miss operation) or an instruction affects
which next instruction is (branch instruction)
.
Solution?
o Stall
o Pipeline Interlock Logic that detects hazard
o Partial Stall