in CO and Architecture
364 views
0 votes
0 votes

in CO and Architecture
364 views

4 Comments

Shouldn't the answer be 8*1 + 1*7 = 15?

The first instruction will take 8 clock cycles, since the length of pipe stage should be equal to the longest stage. Post that, in case of an ideal pipeline, every instruction takes one more clock cycle and we have 7 more instructions if we have to repeat it twice.

So, 8 clock cycles for the first and 7 for the next seven, giving 15 clock cycles.
0
0
edited by
i'm getting 21 too
1
1
yes 21 is correct answer only ...
1
1
Utkarsh sir I am also getting 21
0
0

1 Answer

0 votes
0 votes

 i don't know what approach you are following but here what i've done is , i plotted the instructions against the clock cycles,since the instructions are executed two times so i have written them again as soon as the first set finishes, and the rest you can do according to the question like (I1) requires 2 clocks for S1 and then 1 clock for S2 and so on. (the number of clocks written in column you have to assume yourself if the options are given for such questions then take the biggest one and draw the table, it's a bit lengthy procedure but the answer you get will be correct.)

if you can, then please comment your approach.

2 Comments

From I3 to I4 you r going wrong because I4 will start from 7th cycle ...in 6th cycle I3 is already in s1
1
1
21 should be the right answer
0
0