2,151 views
1 votes
1 votes

Consider the 2 GHz clock frequency processor used execute the following program segment.

Assume the 3 clock cycles required for Register to/from memory transfer, 1 clock cycle for ADD with both operands in register, 2 clock cycle MUL with both operands in register, 3 clock cycles per word for instruction fetch and decode. What is the total time required to complete the program execution (in ns)?

Ans. 18

5 Answers

2 votes
2 votes
I1 : MOV r0,(3000) //  will require 3*2=6 cycles  (operation * size) operation : IF/D

I2:  MOV r1,(2000) //  will require 3 cycles (operation : IF/D)

I3:  ADD r0,r1   //  will require 1 cycles

I4:  MUL r0,r1   //  will require 2 cycles

I5 : MOV (3000),r0 //  will require 3*2=6 cycles  (operation  : Register to memory transfer )
I6 : no cycles(no information given for this)
Total = 18
2 votes
2 votes

IF and ID

----------------------------------------------

I1 : 3 *2 = 6 cycles

I2 : 3*1 = 3 cycles

I3 : 3*1 = 3 cycles

I4 : 3*1 = 3 cycles

I5 : 3*2 = 6 cycles

I6 : 3*1 = 3 cycles

--------------------------------

               $24\ cycles$

 

EX

------------------------------------------------

I1 : 3 cycles

I2 : 3 cycles

I3 : 1 cycles

I4 : 2 cycles

I5 : 3 cycles

I6 : No info given so we take the value as 0 cycles

-----------------------------------------------

       $12\ cycles$

 

Total = 24 + 12 = 36 cycles = 36 * 0.5 * 1 ns = 18 ns

 

0 votes
0 votes

click cycle=1/2×109 =0.5×10^-9 sec

I1=3+3+3=9   // 2 word instruction

I2=3+3=6

I3=3+1=4

I4=3+2=5

I5=3+3+3=9  // 2 word instruction

I6=3=3

Total Click cycle=9+6+4+5+9+3=36 clock

Total Time=36×0.5×10^-9=18 nsec

Related questions

1 votes
1 votes
0 answers
2
prashastinama asked Oct 3, 2021
330 views
Where are 4 Address Instructions are used and how?