Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Optimum Pipeline Depth for a Microprocessor Fang Pang Oct/01/02.

Similar presentations


Presentation on theme: "The Optimum Pipeline Depth for a Microprocessor Fang Pang Oct/01/02."— Presentation transcript:

1 The Optimum Pipeline Depth for a Microprocessor Fang Pang Oct/01/02

2 The choice of the structure of the pipeline is fundamental in the design of a microprocessor. Is there an optimum pipeline depth for a microprocessor that gives the best performance?

3 There is a tradeoff between the greater throughput of a deeper pipeline and the larger penalty for hazards in the deeper pipeline. This tradeoff leads to an optimum design point.

4 Two intuitive ways to see that performance will be optimal for a specific pipeline depth : CPI (Cycles / Instruction) Cycle time of a processor

5 The true measure of performance in the processor is the average time it takes to execute an instruction. This is the time / Instruction (TPI), the inverse of the MIPs ( Million Instructions per second ) number. The TPI is just the product of the cycle time and the CPI.

6 How a Processor spend its time? T = T BZ + T NBZ (T BZ : the time that the execution unit is doing useful work ; T NBZ : the time that the execution is stalled by any of pipeline hazards. )

7 Processor’s busy time (T BZ ) T BZ = N I * t s (N I: the number of instructions ; t s : the time for an instruction to pass each stage of the pipeline ) t s = t o + t p / p (t o: the latch overhead for the technology used; t p: the total logic delay of the processor ; p: the number of pipeline stages in the design ) T BZ = N I * ( t o + t p / p)

8 For a superscalar processor, multiple instructions may be executed at the same time. T BZ = ( N I /a ) * ( t o + t p / p) ( a: measure of the average degree of superscalar processing whenever the e-unit is busy)

9 Processor’s not-busy time (T NBZ ) Considering each pipeline hazard causes a full pipeline stall T NBZ = N H * t pipe (N H: the number of pipeline hazards ; t pipe: the total pipeline delay ) t pipe = t s * p = ( t o + t p / p)* p = t o * p + t p The total pipeline delay is just the product of each pipeline stage delay, ts, and the number of pipeline stages in the processor. T NBZ = N H * ( t o * p + t p )

10 Considering each pipeline hazard has its own not-busy time T NBZ = N H * ( t o * p + t p )* γ (t hazard : each hazard’s not-busy time ;  h: the fraction of the total pipeline delay encountered by each particular hazard, between 0 and 1 ) (γ : the fraction of the total pipeline delay averaged over all hazards )

11 T = T BZ + T NBZ = (N I /a)*( t o + t p / p)+ N H *(t o * p + t p )* γ Processor time N H / N I: depend on the workload being executed and microarchitecture (EX: branch prediction accuracy ) a, γ : depend on microarchitecture and the workload t o: depends on technology t p : depends on technology and microarchitecture

12 Optimum pipeline depth P opt 2 = ( N I t p ) / ( a N H γ t o ) When we can have deeper pipeline ? N H decreases, workloads have fewer hazards. t o decreases, technology reduces the latch overhead, relative to the total logic path, t p. γ decreases, the fraction of the pipeline that hazards stall decreases.

13 Simulator result

14 Optimum pipeline depth’s various dependencies

15 Dependence on the degree of superscalar processing (a)

16 Dependence on the degree of pipeline hazard (N H, γ)

17 Summary A theory has been presented of the optimum pipeline depth for a microprocessor. The theory has been tested by simulating a variable depth pipeline model, and the two are found to be in excellent agreement. It is found that the competition between "storing" instructions in a deeper pipeline to increase throughput and limiting the number of pipeline stalls from various pipeline hazards, results in an optimum pipeline depth.

18 Discussion


Download ppt "The Optimum Pipeline Depth for a Microprocessor Fang Pang Oct/01/02."

Similar presentations


Ads by Google