15IF11 Multicore E PDF
15IF11 Multicore E PDF
15IF11 Multicore E PDF
Session-5
Hence A on P1 is faster.
Problem-3: Pipeline Hazards
A program has 2000 instructions in the sequence L.D, ADD.D, L.D, ADD.D,..... L.D,
ADD.D. The ADD.D instruction depends on the L.D instruction right before it. The L.D
instruction depends on the ADD.D instruction right before it. If the program is
executed on the 5-stage pipeline what would be the actual CPI with and without
operand forwarding technique?
Without operand forwarding.
ID of nth instruction can be only after WB of n-1th instruction.
3 stalls in each instruction.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
L.D IF ID EX ME WB
ADD IF * * * ID EX ME WB
L.D IF * * * ID EX ME WB
ADD IF * * * ID
1 2 3 4 5 6 7 8 9 10 11 12 13 14
L.D IF ID EX ME WB
ADD IF * ID EX ME WB
L.D IF ID EX ME WB
ADD IF * ID EX ME WB
AMAT2<AMAT1
15 + 0.03x MP < 10 +0.05xMP
P2 3 7 12 E W W
P3 1 5 0 L W *
P4 2 4 9 W N *
Problem-10 : Router – Switch Arbitration
Pkt Age S D IP OP- OP-
need act
P1 3 1 13 S N N
P2 3 7 12 E W W
P3 1 5 0 L W *
P4 2 4 9 W N *