Skip to content
Official PYQ · 2014

GATE CS 2014 Set 3 Q9 — Instruction Pipelining

Explain with AI

Consider the following processors (ns stands for nanoseconds). Assume that the pipeline registers have zero latency. 

  • P1:\text{P1:} Four-stage pipeline with stage latencies 1 ns, 2 ns, 2 ns, 1 ns\text{1 ns, 2 ns, 2 ns, 1 ns}. 
  • P2:\text{P2:} Four-stage pipeline with stage latencies 1 ns, 1.5 ns, 1.5 ns, 1.5 ns\text{1 ns, 1.5 ns, 1.5 ns, 1.5 ns}. 
  • P3:\text{P3:} Five-stage pipeline with stage latencies 0.5 ns, 1 ns, 1 ns, 0.6 ns, 1 ns\text{0.5 ns, 1 ns, 1 ns, 0.6 ns, 1 ns}. 
  • P4:\text{P4:} Five-stage pipeline with stage latencies 0.5 ns, 0.5 ns, 1 ns, 1 ns, 1.1 ns\text{0.5 ns, 0.5 ns, 1 ns, 1 ns, 1.1 ns}. 

Which processor has the highest peak clock frequency?

Choose one option
View worked solution

Answer: C

The clock cycle time (TclkT_{\text{clk}}) of a pipelined processor is determined by the latency of its slowest stage plus any pipeline register overhead. Since the pipeline registers have zero latency, the clock cycle time is simply the maximum stage latency of the pipeline:

Tclk=max⁡(stage latencies)T_{\text{clk}} = \max(\text{stage latencies})

The peak clock frequency (ff) is the reciprocal of the clock cycle time:

f=1Tclkf = \frac{1}{T_{\text{clk}}}

To find the processor with the highest peak clock frequency, we must find the processor with the minimum clock cycle time (TclkT_{\text{clk}}):

  • Processor P1: Tclk(P1)=max⁡(1,2,2,1)=2 ns  ⟹  f(P1)=12 ns=0.5 GHzT_{\text{clk}}(\text{P1}) = \max(1, 2, 2, 1) = 2\text{ ns} \implies f(\text{P1}) = \frac{1}{2\text{ ns}} = 0.5\text{ GHz}
  • Processor P2: Tclk(P2)=max⁡(1,1.5,1.5,1.5)=1.5 ns  ⟹  f(P2)=11.5 ns≈0.67 GHzT_{\text{clk}}(\text{P2}) = \max(1, 1.5, 1.5, 1.5) = 1.5\text{ ns} \implies f(\text{P2}) = \frac{1}{1.5\text{ ns}} \approx 0.67\text{ GHz}
  • Processor P3: Tclk(P3)=max⁡(0.5,1,1,0.6,1)=1 ns  ⟹  f(P3)=11 ns=1 GHzT_{\text{clk}}(\text{P3}) = \max(0.5, 1, 1, 0.6, 1) = 1\text{ ns} \implies f(\text{P3}) = \frac{1}{1\text{ ns}} = 1\text{ GHz}
  • Processor P4: Tclk(P4)=max⁡(0.5,0.5,1,1,1.1)=1.1 ns  ⟹  f(P4)=11.1 ns≈0.91 GHzT_{\text{clk}}(\text{P4}) = \max(0.5, 0.5, 1, 1, 1.1) = 1.1\text{ ns} \implies f(\text{P4}) = \frac{1}{1.1\text{ ns}} \approx 0.91\text{ GHz}

Comparing the peak frequencies, P3 has the shortest clock cycle time (1 ns1\text{ ns}) and consequently the highest peak clock frequency (1 GHz1\text{ GHz}).

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Instruction Pipelining questions