263 views
2 votes
2 votes
The only instruction in the 5-stage pipelined MIPS that needs all 5 stages is Load. It has been suggested to design a 4-stage pipeline where the 4th stage will allow either a memory (read or write) operation, or a Register File write. The Load instruction will then be replaced by two instructions: Load-A (read from memory) and Load-B (write into the register file). The instruction mix that the processor executes contains 46% ALU instructions, 22% Load, 12% Store and 20% Branch. Ignoring all hazards and assuming that the two pipelines will have the same cycle time, what is the speedup of the 5-stage pipeline over the 4-stage one?

please someone tell how to approach this question.

1 Answer

Best answer
1 votes
1 votes

Here the salient feature of the question is :

Speedup is asked between the two pipelined system instead of a non pipelined and a pipelined system..

We know :

Speedup  =   CPInon pipeline * Cycle timenon pipeline / (CPIpipeline * Cycle timepipeline)

As cycle time is same for both pipelined and non pipelined environment , the expression reduces to :

Speedup  =  CPInon pipeline /  CPIpipeline

As CPIpipeline = 1 as the pipeline is without any stalls as mentioned in the question , hence

Speedup =  CPInon pipeline

So we need to find Speedup1 and Speedup2 and then find their ratio accordingly..Thus we need to find CPI1 and CPI2 separately in non pipelined environment.

So the key thing is when we replace LOAD instruction in 2nd pipeline in order to find CPI in non pipelined system we need to take cycles of LOAD -A and LOAD - B instructions separately..Hence if a instruction is LOAD in 1st pipeline , for that we need 8 cycles in 2nd equivalent system..

Thus 

CPInon pipeline for 1st case    =    5    [ As no modification is done here ]

CPInon pipeline for 2nd case   =    (0.46 + 0.12 + 0.20) * 4 +  0.22 * 8

                                      =    4.88

Hence 

Speeduppipeline 1  /  Speeduppipeline 2   =    CPInon pipeline for 1st case /  CPInon pipeline for 2nd case

                                                                           =    5 / 4.88

                                                        =    1.025 (correct to three decimal places)

Hence speedup of pipeline 1 is 1.025 times more than that of pipeline 2..

selected by

Related questions

1 votes
1 votes
1 answer
1
Hirak asked May 23, 2019
571 views
Is pipeline hazards there in the syllabus? And are there any previous year questions from there?
0 votes
0 votes
1 answer
2
Magma asked Jan 8, 2019
354 views
Certain CPU uses expanding op-code . It has 16 bit instructions with 6-bit addresses . It has maximum 192 one-address Instructions.Then number of 2-addresses instructions...
0 votes
0 votes
0 answers
3
iarnav asked Oct 3, 2018
403 views
Say the processor runs at 600 MHz then what is CPU clock time?