Section 4.3

Section 4.3 -...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 12-112-1ThisSetMaterialfromSection4.3Thissetunderconstruction.OutlineBranchPredictionOverviewOne-LevelPredictorTwo-LevelCorrelatingPredictorOthertopicstobeadded.SampleProblems12-1EE4720LectureTransparency.Formatted10:24,11November2002fromlsli12.12-112-212-2BranchandTargetPredictionMotivationBranchesoccurfrequentlyincode.Atbest,onecycleofbranchdelay;morewithdependencies.Therefore,impactonCPIislarge.TechniquesBranchPrediction:Predictoutcomeofbranch.(Takenornottaken.)BranchTargetPrediction:PredictbranchorotherCTIstargetaddress.BranchFolding:ReplacebranchorotherCTIwithtargetinstruction.12-2EE4720LectureTransparency.Formatted10:24,11November2002fromlsli12.12-212-312-3BranchPredictionMethodsCoveredOne-levelpredictor,a.k.a.bimodal.Two-LevelPredictorsGAg,a.k.a.GlobalHistory.gshare.LocalHistory,a.k.a.PAg.12-3EE4720LectureTransparency.Formatted10:24,11November2002fromlsli12.12-312-412-4BranchPredictionIdeaIdea:Predictusingpastbehavior.Example:LOOP:lwr1,0(r2)!Readrandomnumber,either0or1.addir2,r2,#4sltr6,r2,r7beqzr1,SKIPaddir3,r3,#1SKIP:bneqr6,LOOP!Loopexecutes100iterations.nopSecondbranch,bneq,taken99outof100executions.Patternforbneq:TTT...NTTTTFirstbranchshowsnopattern.12-4EE4720LectureTransparency.Formatted10:24,11November2002fromlsli12.12-412-512-5PredictionAccuracySPEC89benchmarksonIBMPOWER(predecessortoPowerPC).18%tomcatvspiceSPEC89benchmarksgccli2%4%6%8%10%12%14%16%0%1%5%9%9%12%5%10%18%nasa7matrix300doducfppppespressoeqntott1%0%Frequency of mispredictionsFIGURE 4.14 Prediction accuracy of a 4096-entry two-bit prediction buffer for the SPEC89 benchmarks.12-5EE4720LectureTransparency.Formatted10:24,11November2002fromlsli12.12-512-612-6nasa71%0%matrix3000%0%tomcatv1%0%doducspiceSPEC89benchmarksfppppgccespressoeqntottli0%2%4%6%8%10% 12% 14%16%18%4096 entries:2 bits per entryUnlimited entries:2 bits per entryFrequency of mispredictions5%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.12-6EE4720LectureTransparency.Formatted10:24,11November2002fromlsli12.12-612-712-7BranchPredictionTerminologyOutcome:[ofabranchinstructionexecution].Theoutcomeoftheexecutionofabranchinstruction.T:Atakenbranch.NT:orNAbranchthatisnottaken.Prediction:[madebybranchpredictionhardware].Thepredictedoutcomeofabranch.Misprediction:Anincorrectlypredictedoutcome.PredictionAccuracy:[ofabranchpredictionscheme].Thenumberofcorrectpredictionsdividedbythenumberofpredictions.12-7EE4720LectureTransparency.Formatted10:24,11November2002fromlsli12.12-712-812-8BranchPredictionTerminology(Continued)SpeculativeExecution:Theexecutionofinstructionsfollowingapredictedbranch.MispredictionRecovery:Undoingtheeffectofspeculativelyexecutedinstructions......andre-startinginstructionfetchatthecorrectaddress.12-8EE4720LectureTransparency.Formatted10:24,11November2002fromlsli12.12-812-912-9One-LevelBranchPredictorIdea:maintainabranchhistoryforeachbranchinstruction.BranchHistory:Informationaboutpastbehaviorofthebranch.Informationaboutpastbehaviorofthebranch....
View Full Document

Page1 / 37

Section 4.3 -...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online