in CO and Architecture retagged by
5,958 views
7 votes
7 votes
A five-stage pipeline has stage delays of $150, 120, 150, 160$ and $140$ nanoseconds. The registers that are used between the pipeline stages have a delay of $5$ nanoseconds each.
The total time to execute $100$ independent instructions on this pipeline, assuming there are no pipeline stalls, is _______ nanoseconds.
in CO and Architecture retagged by
by
6.0k views

4 Comments

i think we dont hv to add delay at last stage as btw is mentioned

so, 165 should come
2
2
Okk
0
0
The total time to execute 100 instructions in the given pipeline 17160 time is required.
0
0

2 Answers

15 votes
15 votes
Best answer

For the given pipelined system:

  • Total number of stages $(k)=5$
  • Total number of instructions, $(n)=100$
  • Total delay ($t_p) = \max(\text{stage delay})+\text{buffer delay}$
    • $\implies t_p = \max (150,120,150,160,140)+5\;ns$
    • $\implies t_p=160+5\;ns$
    • $\implies t_p =165\;ns$

$ET_{p} = [(k+(n-1))*t_p]$

$\implies ET_p= [(5+(100-1))*165]\;ns$

$\implies ET_p= (5+99)*165\;ns$

$\implies ET_{pipeline}=17160\;ns$

$\therefore$ To execute $100$ instructions in the given pipeline, $17160\;ns$ time is required.

edited by

4 Comments

I might be missing something here, but why are we adding pipeline delays, when in the question it’s given “assuming there are no pipeline stalls”.
1
1
Pipeline stalls are the ones that appear due to any branch conditions or if any particular unit is not yet ready they are different from the delay
0
0
Nice one
0
0
4 votes
4 votes

Five stage(k) pipeline

No of instructions n =  100

Delay pipeline Tp =160 ns (maximum delay of all stage )+Buffer delay 5 ns

Total Tp delay = 165

(k+n-1)tp = total time execute instruction

Tp = pipeline delay k= stage  n= no of instructions

(5+100-1)*165 ns 

104*165

= 17160 n​​​​​s

4 Comments

Your solution is incorrect. Assume n is 1 instead of 100. For this case, all the latch delays and the stage times should get added up. This isn't satisfied by your solution. The correct answer should be 16580.
0
0
@RockIT

If n is 1 then execution time will be k*tp

And tp still 165 ns(max delay + Buffer delay)
0
0
k*tp equals 825, but for n=1, the time should be 740.
0
0
Tp is taken as maximum of all stage delay which is 165 so for n=1 it will take 5*165 not 740
0
0
Answer:

Related questions