GATE CSE
First time here? Checkout the FAQ!
x
0 votes
82 views

asked in CO & Architecture by Active (1.8k points)   | 82 views
Which instruction is branch condition? The question is not clear.

1 Answer

+1 vote
Best answer

in this question  instruction is :  I1-->I2--->I3-->I4-->I5-->I6-->I12-->I13-->I14--->I15--->I16

and its 5 stage pipeline so K=5 and n=  11

here branch penality =  target address available - 1

 execution time of pipeline =  (K+n-1)* tP + (branch penality)* tp

                                       =  (5+11-1)*10 +(3-1)*10

                                       =  15*10 + 2*10

                                      =  170 ns

  option A is correct

answered by Boss (6.4k points)  
selected by

another way to look into this problem w/o formula is

1st instn. is going to take 50ns and after that till I6 every instn will take 10ns so till completion of 100ns.

now when I5 is in its mem. stage , I6 is in its execute stage and after execution stage as ques. describes we have address of the next inst.

so I12 can proceed with the 4th clock cycle of I6 so (here 2 cycles wasted and 2 cycles can be overlapped by I12  which will make I12  to take 30 more ns to execute itself. now after that each inst. can be done in 10ns (from I13 to I16 ) which will be 4*10 = 40

so in total 50 + 5*10( because I6) will also be executed next. + 30(due to overlapping after execute inst.) + 4*10 =  170ns.

correct me if am wrong!

It should be like this, right?

exactly @sushant

Related questions

+2 votes
1 answer
1
asked in CO & Architecture by prathams Active (1.5k points)   | 141 views
+1 vote
1 answer
2
+1 vote
2 answers
3


Top Users May 2017
  1. akash.dinkar12

    3548 Points

  2. pawan kumarln

    2126 Points

  3. Bikram

    1922 Points

  4. sh!va

    1682 Points

  5. Arjun

    1622 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1270 Points

  8. Angkit

    1056 Points

  9. LeenSharma

    1028 Points

  10. Arnab Bhadra

    812 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    1008 Points

  2. pawan kumarln

    752 Points

  3. Arnab Bhadra

    726 Points

  4. akash.dinkar12

    428 Points

  5. Arjun

    350 Points


22,896 questions
29,206 answers
65,329 comments
27,708 users