While fetching, 1 word will be fetched which take two cycles and while decoding phase remaining instruction is fetched which all will take 2cycle.
for ex:
I1 :
IF : 1 word is fetch which require 2 cycle
ID: remaining 2 words are fetched which require 2cycle each =2*2=4
EX: Move instruction , nothing to execute = 0 cycle
WB: requires 2 cycle in every instruction
do similarly for other also.
Instruction |
IF |
ID |
EX |
WB |
I1 |
2 |
4 |
0 |
2 |
I2 |
2 |
0 |
2 |
2 |
I3 |
2 |
4 |
0 |
2 |
I4 |
2 |
4 |
0 |
2 |
Total cycle required to execute the program is 31 cycles.