Assignment Solution Week11
Assignment Solution Week11
Assignment Solution Week11
1. Consider an instruction pipeline with four stages with the stage delays 5
nsec, 6 nsec, 11 nsec, and 8 nsec respectively. The delay of an inter-stage
register stage of the pipeline is 1 nsec. What is the approximate speedup of
the pipeline in the steady state under ideal conditions as compared to the
corresponding non-pipelined implementation?
a. 4.0
b. 2.5
c. 1.1
d. 3.0
Correct answer is (b).
Time taken to execute N instructions in non-pipelined implementation will
be (5 + 6 + 11 + 8)N = 30N
Clock period for pipelined implementation = max{5,6,11,8} + 1 = 12.
Time taken for the pipelined implementation = (3 + N)12 = 12N (approx.)
Speedup = 30N / 12N = 2.5
2. Consider an instruction pipeline with five stages without any branch
prediction: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch
(OF), Execute (EX) and Operand Write (OW). The stage delays for IF, ID,
OF, EX and OW are 5 nsec, 7 nsec, 10 nsec, 8 nsec and 6 nsec, respectively.
There are intermediate storage buffers after each stage and the delay of
each buffer is 1 nsec. A program consisting of 12 instructions I1, I2, …, I12
is executed in the pipelined processor. Instruction I4 is the only branch
instruction and its branch target is I9. If the branch is taken during the
execution of this program, the time needed to complete the program is:
a. 132 nsec
b. 154nsec
c. 176 nsec
d. 328 nsec