GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
106 views

Consider a 4 stage pipeline with stages named S1,S2,S3,S4. Let I1,I2,I3,I4 be 4 instructions and the number of clock-cycles needed by each instruction in each stage is given below.

The number of clock-cycles needed to complete the instruction cycle of the 4 instructions is ___.

asked in CO & Architecture by Loyal (4.9k points) 3 35 120 | 106 views

@Bikram  sir 

can you please help ... 

lemme know if i m wrong......

i am getting this ...please verify 

@Bikram sir 

we should always assume that the buffer can store more than 1 instruction's data in a queue ??? or in that problem the examiner has assumed like that but generally we take only one instruction's data in buffer ..??? .in hamacher book it is clearly given that we should always take only one instruction's data in a buffer....

http://gateoverflow.in/?qa=blob&qa_blobid=2734551770104962171

yes, 15 cycles is correct answer . see above gate question where it asked another iteration through I1,I2,I3 and I4.

so for first iteration of I1,I2,I3 and I4 answer is 15.

when again asked for another iteration of I1,I2,I3 and I4 it came 23 cycles ! see that link ..

Bikram sir my doubt is not answer ...

actually in the link you have sent , the problem is solved assuming that a buffer between any 2 stage can hold more than 1 instruction's data at a time ... but is it true always ??? or in that question it was assumed like that ..?? ex : in the diagram

MY DOUBT is whether we should always assume like that ??? generally in books it is given that a buffer can hold only one instruction's data at a time ...

 

"whether we should assume?"

Not really. But we just need to know of that possibility and then see the options. By default I would say not to assume, but if options do not match then consider it. If options have both, then marks will be given for both at least after answer debate :)
@arjun sir

thank u sir ... its very clear now ...
@vicky

There are stage buffers.  Yes it is assumed here  that a buffer between any 2 stage can hold more than 1 instruction's data at a time .

 "This is not a normal pipeline as stage delays are different. In a classic RISC pipeline we can just do with a single output buffer. But that will cause problem for this question. So, multiple buffers can be used here." as said by @Arjun

Bikram sir 

thanks ...now got it ...

When no 2 or more instructions use the same stage in a single cycle then why do we need to store multiple results at all. At any moment only one result is required in the buffer i.e the output of that particular stage with respect to the instructions.

Saswat Swarup  

Stage buffers are used in this question.

Here we assume that  a buffer between any 2 stage can hold more than 1 instruction's data at a time .

This is our assumption to match the answer :)

Because if we take single instruction's data in a buffer then no answer matches here . Hope you get my point !

 

1 Answer

+3 votes
Best answer

According to me Ur procedure is correct.

 

answered by Active (1.5k points) 2 8
selected by
how can you do s1 of 4 th instruction in 6 th clock-cycle ??? actually in the 6 th clock-cycle 3 rd instruction is in fetch -decode buffer .. if you do s1 of I4 in 6 th clock-cycle, then I3 will be over-written by I4 as a result we will lose I3 right ???


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23324 Points

  2. Bikram

    17048 Points

  3. Habibkhan

    7808 Points

  4. srestha

    6222 Points

  5. Debashish Deka

    5430 Points

  6. jothee

    4958 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4286 Points

  9. sushmita

    3964 Points

  10. Rishi yadav

    3794 Points


Recent Badges

Nice Comment junaid ahmad
Popular Question iarnav
Notable Question makhdoom ghaya
Popular Question LavTheRawkstar
Avid Voter atul_21
Popular Question hem chandra joshi
100 Club nikhil_cs
Notable Question Sukannya
Notable Question Sourabh Kumar
Notable Question shikharV
27,287 questions
35,134 answers
83,911 comments
33,223 users