retagged by
848 views
0 votes
0 votes

retagged by

2 Answers

Best answer
2 votes
2 votes

First of all in fetching the entire instruction , we need :

No of memory references  =  (4 + 2 + 1 + 1 + 4 + 1)

                                       =  13 

But each memory reference takes 4 cycles , so no of cycles = 13 * 4  =  52 

Now coming to memory reference in operand fetch and writeback , we have 3 such operands or result which are in direct addressing mode and 2 in indirect addressing mode..So 

No of references here  =  2*2 + 3  =  7

So no of cycles  =  7 * 4   =  28 cycles

So total cycles required for program execution = 52 + 28  =  80 cycles..

There is no ALU operations involved if u go by meaning of the instruction given in the question although ADD etc have been used..

So time taken   =   80 * 1 / (2 GHZ)

                       =   40 ns

Hence 40 ns should be the correct answer..So the options should be corrected..

selected by
0 votes
0 votes
im getting 23 ns
2GHz =>   0.5 ns

I1 - Memory -4 * 4 * 0.5 ns = 8 ns
I2 - Memory-2 * 4 * 0.5 ns = 4 ns
I3 -    ALU   -1 * 2 * 0.5 ns = 1 ns
I4 -    ALU   -1 * 2 * 0.5 ns = 1 ns
I5 - Memory-4 * 4 * 0.5 ns = 8 ns
I6 -    ALU   -1 * 2 * 0.5 ns = 1 ns

No related questions found