1
4.0kviews
A program having 10 instructions (without Branch and Call instructions) is executed on non-pipeline and pipeline processors.

All instructions are of same length and having 4 pipeline stages and time required to each stage is 1nsec.

i) Calculate time required to execute the program on Non-pipeline and Pipeline processor.

ii) Calculate Speedup

1 Answer
0
376views

Given:

Total number of instructions to be executed = n = 10 instructions

Architecture consisting of Numbers of stages = k = 4 stages

Clock Cycles = t = 1 nsec

i. Time required to execute the program on Non-pipeline and Pipeline processor.

Pipelined Execution Time

= Time taken to execute first instruction + Time taken to execute remaining instructions

= 1 x k clock cycles + (n -1) x 1 clock cycle

= (k + n – 1) clock cycles

= (4 + 10 - 1) * t

= (4 + 9) * 1

= 13 nsec

Non-pipelined Execution Time

= Total number of instructions x Time taken to execute one instruction

= n x k clock cycles

= (n * k) * t

= (10 * 4) * 1

= 40 nsec

ii. Speedup

Speedup

= Non-pipelined Execution Time / Pipelined Execution Time

= 40/13 = 3.07 times

Please log in to add an answer.