{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lect 04

# lect 04 - 12-1 This Set 12-1 Material from Section 4.3 This...

This preview shows pages 1–9. Sign up to view the full content.

This Set Material from Section 4.3 This set under construction. Outline Branch Prediction Overview One-Level Predictor Two-Level Correlating Predictor Other topics to be added. Sample Problems EE 4720 Lecture Transparency. Formatted 13:27, 28 April 2004 from lsli12.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Branch and Target Prediction Motivation Branches occur frequently in code. At best, one cycle of branch delay; more with dependencies. Therefore, impact on CPI is large. Techniques Branch Prediction: Predict outcome of branch. (Taken or not taken.) Branch Target Prediction: Predict branch or other CTI’s target address. Branch Folding: Replace branch or other CTI with target instruction. EE 4720 Lecture Transparency. Formatted 13:27, 28 April 2004 from lsli12.
Branch Prediction Methods Covered One-level predictor , a.k.a. bimodal . Two-Level Predictors GAg , a.k.a. Global History . gshare . Local History , a.k.a. PAg . EE 4720 Lecture Transparency. Formatted 13:27, 28 April 2004 from lsli12.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Branch Prediction Idea Idea: Predict using past behavior. Example: LOOP: lw r1, 0(r2) # Read random number, either 0 or 1. addi r2, r2, 4 slt r6, r2, r7 beq r1, r0 SKIP nop addi r3, r3, 1 SKIP: bneq r6, r0 LOOP # Loop executes 100 iterations. nop Second branch, bneq , taken 99 out of 100 executions. Pattern for bneq : T T T ... NT T T T First branch shows no pattern. EE 4720 Lecture Transparency. Formatted 13:27, 28 April 2004 from lsli12.
Prediction Accuracy SPEC89 benchmarks on IBM POWER (predecessor to PowerPC). 18% tomcatv spice SPEC89 benchmarks gcc li 2% 4% 6% 8% 10% 12% 14% 16% 0% 1% 5% 9% 9% 12% 5% 10% 18% nasa7 matrix300 doduc fpppp espresso eqntott 1% 0% Frequency of mispredictions FIGURE 4.14 Prediction accuracy of a 4096-entry two-bit prediction buffer for the SPEC89 benchmarks. EE 4720 Lecture Transparency. Formatted 13:27, 28 April 2004 from lsli12.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
nasa7 1% 0% matrix300 0% 0% tomcatv 1% 0% doduc spice SPEC89 benchmarks fpppp gcc espresso eqntott li 0% 2% 4% 6% 8% 10% 12% 14% 16% 18% 4096 entries: 2 bits per entry Unlimited entries: 2 bits per entry Frequency of mispredictions 5% 5% 9% 9% 9% 9% 12% 11% 5% 5% 18% 18% 10% 10% FIGURE 4.15 Prediction accuracy of a 4096-entry two-bit prediction buffer versus an infinite buffer for the SPEC89 benchmarks. EE 4720 Lecture Transparency. Formatted 13:27, 28 April 2004 from lsli12.
Branch Prediction Terminology Outcome: [of a branch instruction execution]. The outcome of the execution of a branch instruction. T: A taken branch. NT: or N A branch that is not taken. Prediction: [made by branch prediction hardware]. The predicted outcome of a branch. Misprediction: An incorrectly predicted outcome. Prediction Accuracy: [of a branch prediction scheme]. The number of correct predictions divided by the number of predictions. EE 4720 Lecture Transparency. Formatted 13:27, 28 April 2004 from lsli12.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Branch Prediction Terminology (Continued) Speculative Execution: The execution of instructions following a predicted branch. Misprediction Recovery: Undoing the effect of speculatively executed instructions ...
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 37

lect 04 - 12-1 This Set 12-1 Material from Section 4.3 This...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online