Note: 1G=$10^9$
The problem asks for the speed-up obtained by a pipelined design compared to a non-pipelined design, considering different clock rates, cycles per instruction (CPI), and pipeline stalls.
First, calculate the execution characteristics of the non-pipelined unit.
The execution time for a program with N instructions on the non-pipelined unit can be represented as:
$ T_{NP} = \frac{N \times CPI_{NP}}{R_{NP}} = \frac{N \times 5}{1.6 \times 10^9} \text{ seconds} $
Next, analyze the pipelined unit. The goal is 1 instruction per clock cycle, but practical limitations exist.
Calculate the actual average CPI for the pipelined design:
Stall cycles per instruction = (Percentage of stalled instructions) $\times$ (Stall cycles per stalled instruction)
$ \text{Stall cycles per instruction} = 0.30 \times 2 = 0.6 \text{ cycles/instruction} $
Actual Average CPI ($CPI_{P}$) = Ideal CPI + Stall cycles per instruction
$ CPI_{P} = 1 + 0.6 = 1.6 \text{ cycles/instruction} $
The execution time for the same program with N instructions on the pipelined unit is:
$ T_{P} = \frac{N \times CPI_{P}}{R_{P}} = \frac{N \times 1.6}{1.2 \times 10^9} \text{ seconds} $
Speed-up is defined as the ratio of the execution time of the non-pipelined design to the execution time of the pipelined design.
$ \text{Speed-up} = \frac{T_{NP}}{T_{P}} $
Substitute the expressions for $T_{NP}$ and $T_{P}$:
$ \text{Speed-up} = \frac{\frac{N \times 5}{1.6 \times 10^9}}{\frac{N \times 1.6}{1.2 \times 10^9}} $
The number of instructions (N) and the base factor $10^9$ cancel out:
$ \text{Speed-up} = \frac{5 / 1.6}{1.6 / 1.2} = \frac{5}{1.6} \times \frac{1.2}{1.6} $
$ \text{Speed-up} = \frac{5 \times 1.2}{1.6 \times 1.6} = \frac{6}{2.56} $
$ \text{Speed-up} \approx 2.34375 $
Rounding the speed-up to two decimal places gives 2.34.
| Instruction | $t_{EX}$ in nanoseconds | $M$ |
|---|---|---|
| LOAD | 1.8 | 15 |
| IMUL | 1.5 | 10 |
| IDIV | 2.5 | 5 |
| FADD | 1.7 | 10 |
| FSUB | 1.7 | 5 |
| FMUL | 2.8 | 15 |
| FDIV | 3.2 | 5 |
| All other instructions | Less than 1.0 | 35 |