412 views
1 votes
1 votes

I am getting numerator as 6.5 in this way:

= 0.9 * (#stages for non-branch instruction) + 0.1 * (#stages for branch instructions)

= 0.9 * 6   + 0.1 * (6 + 5)

= 6.5

1 Answer

3 votes
3 votes

Simple approach :

Speedup  =  CPInon pipeline * Cycle timenon pipeline /  [ CPIpipeline * Cycle timepipeline ]

Now by default Cycle timenon pipeline  =  Cycle timepipeline

Also no of cycles required / instruction in non pipelined system  =  No of stages( Pipeline )

                                                                                             =  6 here

And by default , CPIideal pipeline  =  1

And now we find stall / instruction                                            =  Branch frequency * Branch penalty..

                                                                                             =  0.1 * 5

                                                                                             =  0.5

Hence CPIpipeline    =   1 + 0.5   =  1.5

So 

Speedup  =  CPInon pipeline * Cycle timenon pipeline /  [ CPIpipeline * Cycle timepipeline ]

               =  6 / 1.5

               =  4

Hence 4 is the correct answer..

Related questions