《高性能处理器体系结构》课件PPT5 推测执行-分支预测技术2.ppt

《高性能处理器体系结构》课件PPT5 推测执行-分支预测技术2.ppt

  1. 1、本文档共33页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
CS of USTC AN Hong CS258 S99 Lecture on High Performance Processor Architecture (CS05162) Dynamic Prediction(1): 利用单个分支自身历史(基于模式的预测) Dynamic Prediction :Use run-time information to make prediction example: Branch Prediction Buffer(1-位预测器) Dynamic Prediction: 1-bit BHT Branch History Table Lower bits of PC address index table of 1-bit values Says whether or not branch taken last time No address check Problem: in a loop, 1-bit BHT will cause two mispredictions : End of loop case, when it exits instead of looping as before First time through loop on next time through code, when it predicts exit instead of looping Dynamic Prediction: 1-bit BHT (Branch Prediction Buffer) Pros: Small. 1 bit per entry can fit lots of entries Always returns a prediction Cons: aliasing between branches one bit of state mispredicts many branches for (I =0; I10; I++) { a = a + 1; } Two mispredictions per loop invocation Dynamic Prediction(2):Bimodal Branch Prediction Scheme(2bits BHT, 2-位饱和预测器) Solution: 2-bit predictor where change prediction only if get misprediction twice: Use extra state to reduce mispredictions at loop ends Red: stop, not taken Green: go, taken Adds hysteresis to decision making process Bimodal Branch Prediction Scheme Strategy: Based on the direction the branch went the last few times it was executed. Based on a little self-history pattern Based on a counter Works well: when each branch is strongly biased in a particular direction. For scientific/engineering applications where program execution is dominated by inner-loops. Bimodal Branch Prediction Scheme 例1:…NNNTNNN… 1-位预测器,出现2次预测错 2-位预测器,出现1次预测错 例2:TNTNTN…., 初始状态为01的2-位预测器,出现100%预测错 BHT方法准确度 Mispredict because either: Wrong guess for that branch Got branch history of wrong branch when index the table 4096 entry table programs vary from 1% misprediction (nasa7, tomcatv) to 18% (eqntott), with spice at 9% and gcc at 12% 4096 about as good as infinite table (in Alpha 21164) 2-bit已经足够, n-bit (n2)与2-bit效果

文档评论(0)

xingyuxiaxiang + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档