The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+18 votes
2.7k views

Consider an instruction pipeline with four stages $\text{(S1, S2, S3 and S4)}$ each with combinational circuit only. The pipeline registers are required between each stage and at the end of the last stage. Delays for the stages and for the pipeline registers are as given in the figure.

What is the approximate speed up of the pipeline in steady state under ideal conditions when compared to the corresponding non-pipeline implementation?

  1. $4.0$
  2. $2.5$
  3. $1.1$
  4. $3.0$
asked in CO & Architecture by Veteran (101k points)
edited by | 2.7k views

2 Answers

+37 votes
Best answer

Answer is (B) 2.5

In pipeline system, Time taken is determined by the max delay at any stage i.e., $11$ $\text{ns}$ plus the delay incurred by pipeline stages i.e., $1$ $\text{ns}$ = $12$ $\text{ns}$. In non-pipeline system,

Delay = $5$ $\text{ns}$ $+$ $6$ $\text{ns}$ $+$ $11$ $\text{ns}$ $+$ $8$ $\text{ns}$ $=$ $30$ $\text{ns}$.

$\therefore$ $\text{The speedup is}$ $\frac{30}{12} = 2.5$ $\text{ns}$.

 

answered by Active (4.2k points)
edited by
+20
In a pipeline system, we must make the delay of all stages equal and in a non-pipeline system there is no need of using pipeline registers. So, 2.5 is the correct answer.
0
how is tp = 12 for one instruction, how could not it be 12*4 ?!

 

do it has to do with ideal conditions CPI = 1 ?
0
what is the meaning combinational circuit only?

sir what would be the answer when stages are synchronized?
0
Sir , i gt the correct answer . but wanted to make sure that ideal condition mean instrcution are coming right ? i mean there are many no of instruction not just a single instruction

if a single instruction need to be exuted then time taken in a non pipleined is less than time taken in pipeline (when stages are not balanced ) .am i correct @arjun sir ?
+4
Not only that - no hazards. And yes, for a single instruction, pipeline makes no sense but that has no practical significance either.
0
@Arjun Sir

"steady state under ideal conditions"

means it is for synchronous pipeline?
0
Do the register delay are not taken into account for non pipelined system?
+1
@Nit9 yes ideally every instruction need CPI=1 i.e why we write tp=12.
0
@nit9

CPI=1 and time needed  to complete one cycle (cycle time)both are different thing .

CPI (cycle per instruction) Ideal CPI =1 ,means to perform 1 stage ideally i instruction needs only 1 cycle .

When all stages are perfectly balanced then time taken by all stages in 1 cycle will be same . For ex: ID stage and WB stages both will  take same  cycle time if there is no stall cycle  and all stages have same delay, unlike this question .

here all stages are not perfectly balanced, different stages are taking different time delay for completion of 1 cycle .
0
What if the buffer delays were different? Would we add the highest one to the highest stage delay?
0
@saurabh, I think yes.we have to also consider the max buffer delay.
0
@ reena_kandari

Even if the buffer with the max delay is not placed in front of the pipeline stage with the max delay , would we add the highest stage delay to the highest buffer delay to get the net delay of the pipeline?
+15 votes

A better way to solve would be

For non pipeline implementation, time to complete each instruction t = 5+6+11+8 = 30ns

For pipeline implementation, max duration for each stage T = 11+1 =12ns

For k instructions,

Total cycles for non-pipeline implementation = k*t

Total cycles for non-pipeline implementation = (k + n - 1)*T, where n = #stages

Consider 100 instructions

i) for non pipeline: C1 = 100 * 30 = 3000ns

ii) for pipeline: C2 = (100 + 4 -1)*12 = 103*12 = 1236ns

iii) Speedup = C1/C2 = 3000/1236 = 2.5 (approx)

Same holds true for 1000 instructions,

Hence answer is B

answered by Active (3.5k points)
+1
here for pipelining, k is the number of stages and n is the number of instructions. 1st instruction takes k cycles and rest n-1 takes 1 cycle. hence the formula is (k+n-1)*Tp. Please correct it in the answer. Your answer is correct but data setting isn't. It will confuse the reader.

It should be ii) for pipleine: C2 = (4 + 100-1)*12 = 103*12 =1236.
Answer:

Related questions



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

39,440 questions
46,623 answers
139,377 comments
57,024 users