{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Material from Section 4.3

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

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

View Full Document Right Arrow Icon
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 12:24, 14 November 2001 from lsli12.
Image of page 1

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

View Full Document Right Arrow Icon
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 12:24, 14 November 2001 from lsli12.
Image of page 2
Branch Prediction Methods Covered One-level predictor ( m,n ) two-level correlating predictor or ( m,n ) predictor for short. EE 4720 Lecture Transparency. Formatted 12:24, 14 November 2001 from lsli12.
Image of page 3

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

View Full Document Right Arrow Icon
Branch Prediction Idea Idea: Predict based on assumption that patterns hold. Example: LOOP: lw r1, 0(r2) ! Read random number, either 0 or 1. addi r2, r2, #4 slt r6, r2, r7 beqz r1, SKIP addi r3, r3, #1 SKIP: bneq r6, 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 12:24, 14 November 2001 from lsli12.
Image of page 4
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 12:24, 14 November 2001 from lsli12.
Image of page 5

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

View Full Document Right Arrow Icon
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 12:24, 14 November 2001 from lsli12.
Image of page 6
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 12:24, 14 November 2001 from lsli12.
Image of page 7

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern