Answer: 1.50 : 1.60
To find the ratio of the execution times P/Q, we first determine the clock cycle times and average CPIs for both pipeline designs.
1. Clock Cycle Times (told and tnew)
- Old Design: The clock cycle time is determined by the slowest stage latency:
told=max(1,2.2,2,1,0.75)=2.2 ns
- New Design: The ID/RF stage is split into three stages (each 2.2/3≈0.733 ns) and the EX stage into two stages (each 1 ns). The clock cycle time is:
tnew=max(1,32.2,1,1,1,0.75)=1 ns
2. Average CPI Calculation
- For non-branch instructions (80% of the program), average CPI=1 in both designs.
- For branch instructions (20% of the program):
- Old Design: The target address is available at the end of the EX stage (3rd stage: IF, ID/RF, EX). This causes 2 stall cycles, so CPIbranch=1+2=3.
- New Design: The target address is available at the end of the EX2 stage (6th stage: IF, ID, RF1, RF2, EX1, EX2). This causes 5 stall cycles, so CPIbranch=1+5=6.
Now, we compute the average CPI for both designs:
CPIavg, old=(0.8×1)+(0.2×3)=1.4
CPIavg, new=(0.8×1)+(0.2×6)=2.0
3. Execution Time Ratio (P/Q)
Let N be the total number of instructions:
P=N×CPIavg, old×told=N×1.4×2.2=3.08N
Q=N×CPIavg, new×tnew=N×2.0×1=2.0N
QP=2.0N3.08N=1.54
The value 1.54 lies within the range of 1.50 : 1.60.