《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 08 Instruction Fetch and Branch Predictioin

高级计算机体系结构设计及其在数据中心和云计算的应用Lecture 8Instruction Fetch and Branch Prediction
高级计算机体系结构设计及其在数据中心和云计算的应用 Lecture 8 Instruction Fetch and Branch Prediction

高级计算机体系结构设计及其在数据中心和云计算的应用Fetch Rate is an ILP Upper BoundInstruction fetch limits performance- To sustain IPC of N, must sustain a fetch rate of N per cycle·If you consume 1500 calories per day,but burn2000 calories per day,then you will eventually starve.- Need to fetch N on average, not on every cycleN-wide superscalar ideally fetches N insns.per cycle.This doesn't happen in practice due to:-Instructioncacheorganization-Branches-...andinteractionbetweenthetwo
高级计算机体系结构设计及其在数据中心和云计算的应用 Fetch Rate is an ILP Upper Bound • Instruction fetch limits performance – To sustain IPC of N, must sustain a fetch rate of N per cycle • If you consume 1500 calories per day, but burn 2000 calories per day, then you will eventually starve. – Need to fetch N on average, not on every cycle • N-wide superscalar ideally fetches N insns. per cycle • This doesn’t happen in practice due to: – Instruction cache organization – Branches – . and interaction between the two

高级计算机体系结构设计及其在数据中心和云计算的应用Instruction Cache Organization.To fetch N instructions per cycle...- L1-l line must be wide enough for N instructionsPCregisterselectsL1-l line. A fetch group is the set of insns. starting at PC- For N-wide machine, [PC,PC+N-1]PCInstInstInstCacheLineTagInstTagInstInstInstInstTagInstInstInstInstDecoder.TagInstInstInstInstTagInstInstInstInst
高级计算机体系结构设计及其在数据中心和云计算的应用 Instruction Cache Organization • To fetch N instructions per cycle. – L1-I line must be wide enough for N instructions • PC register selects L1-I line • A fetch group is the set of insns. starting at PC – For N-wide machine, [PC,PC+N wide machine, [PC,PC+N-1] Decoder Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Cache Line PC

高级计算机体系结构设计及其在数据中心和云计算的应用Fetch Misalignment (1/2)IfPC=xxx01001,N=4- ldeal fetch group is xxx01001 through xxx01100 (inclusive)o1PC:xxx01007100011000TagInstInstInstInst001TagInstInstInstInst010TagInstInstInstInstDecoderol1InstTagInstInstInst...?TagInstInstInstInstLinewidthFetchgroupMisalignment reducesfetchwidth
高级计算机体系结构设计及其在数据中心和云计算的应用 Fetch Misalignment (1/2) • If PC = xxx01001, N=4: – Ideal fetch group is xxx01001 through xxx01100 (inclusive) Tag Inst Inst Inst Inst 000 001 PC: xxx01001 00 01 10 11 Decoder Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst 001 010 011 111 Line width Fetch group Misalignment reduces fetch width

高级计算机体系结构设计及其在数据中心和云计算的应用Fetch Misalignment (2/2)NowtakestwocyclestofetchNinstructions一Yfetchbandwidth!PC:xXx01001000TaginstInstInstInst001Tagnstnstnstnst010Tar福instInstInstInst011ecoTagnstInstInstnsi...JerTagInstInstInstInstPC:xxx01100000TarnstInstinstInst001InstInstInstTagInstInstInstInstCycleI010TagInstnstinstInst0TagInstnstinstinstTagInstInstInstInstInstInstInstInstMightnotbeYbycombiningwiththenextfetch
高级计算机体系结构设计及其在数据中心和云计算的应用 Fetch Misalignment (2/2) • Now takes two cycles to fetch N instructions – ½ fetch bandwidth! Decoder Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst 000 001 010 011 PC: xxx01001 00 01 10 11 Decoder Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst 010 011 111 Decoder Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst 000 001 010 011 111 PC: xxx01100 00 01 10 11 Inst Inst Inst Inst Cycle 1 Cycle 2 Inst Inst Inst Might not be ½ by combining with the next fetch

高级计算机体系结构设计及其在数据中心和云计算的应用Reducing Fetch Fragmentation (1/2)· Make |Fetch Group| N fromend of line
高级计算机体系结构设计及其在数据中心和云计算的应用 Reducing Fetch Fragmentation (1/2) • Make |Fetch Group| N from end of line

高级计算机体系结构设计及其在数据中心和云计算的应用Reducing Fetch Fragmentation (2/2) Needs a “rotator"to decode insns.in correct orderPCInstInstInstInstTagInstInstInstInstInstInstInstInstDecoderTagInstInstInistInstInstInstInstInstTagInistInistInstInistRoxaterInstInstInstInstAligned fetch group
高级计算机体系结构设计及其在数据中心和云计算的应用 Reducing Fetch Fragmentation (2/2) • Needs a “rotator” to decode insns. in correct order Decoder Tag Inst Inst Inst Inst Inst Inst Inst Inst Tag Inst Inst Inst Inst Inst Inst Inst Inst PC Decoder Tag Inst Inst Inst Inst Inst Inst Inst Inst Rotator Inst Inst Inst Inst Aligned fetch group

高级计算机体系结构设计及其在数据中心和云计算的应用Fragmentation due to Branches Fetch group is aligned, cache line size > fetch group- Taken branches still limit fetch widthTagInstInstInstInstTagInstBranchInstInstTagInstInstInistInstDecoderTagInistInstInstInstTagInlstInstIn'stInstxx
高级计算机体系结构设计及其在数据中心和云计算的应用 Fragmentation due to Branches • Fetch group is aligned, cache line size > fetch group – Taken branches still limit fetch width Decoder Tag Inst Inst Inst Inst Tag Inst Branch Inst Tag Inst Inst Inst Inst Inst Decoder Tag Inst Inst Inst Inst Tag Inst Inst Inst Inst X X

高级计算机体系结构设计及其在数据中心和云计算的应用Types of BranchesDirection:-Conditionalvs.UnconditionalTarget:-PC-encoded·PC-relative.Absolute offset-Computed(targetderivedfromregister)Need direction and target to find next fetch group
高级计算机体系结构设计及其在数据中心和云计算的应用 Types of Branches • Direction: – Conditional vs. Unconditional • Target: – PC-encoded • PC-relative • Absolute offset – Computed (target derived from register) Need direction and target to find next fetch group

高级计算机体系结构设计及其在数据中心和云计算的应用Branch Prediction OverviewUsetwohardwarepredictors-Directionpredictorguesses if branchistaken or not-taken Target predictor guesses the destination PCPredictions are based on history-Usepreviousbehaviorasindicationoffuturebehavior-Use historical context to disambiguate predictions
高级计算机体系结构设计及其在数据中心和云计算的应用 Branch Prediction Overview • Use two hardware predictors – Direction predictor guesses if branch is taken or not-taken – Target predictor guesses the destination PC • Predictions are based on history – Use previous behavior as indication of future behavior – Use historical context to disambiguate predictions
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 07 Instruction Decode.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 09 Case Study- Jave Branch Prediction Optimization.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 13 An Introduction to Cloud Data Centers.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 10 Out of Order and Speculative Execution.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 11 Multi-core and Multi-threading.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 14 Towards Renewable Energy Powered Sustainable and Green Cloud Datacenters.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 15 GPGPU Architecture and Programming Paradigm.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 12 Shared Memory Multiprocessor.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 1 Instruction Set Architecture(Introduction).pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 0 Introduction and Performance Evaluation.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 3 Pipelining.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 2 Instruction Set Architecture(Microarchitecture Implementation).pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 7 Multiprocessors.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 4 Spectualtive Execution.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 6 Memory Hierarchy and Cache.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 5 Out of Order Execution.pdf
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第4章 基于统计决策的概率分类法.ppt
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第1章 绪论、第2章 聚类分析.ppt
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第3章 判别函数及几何分类法.ppt
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第7章 模糊模式识别法.ppt
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 06 Scoreboarding and Tomasulo.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 04 Memory Data Prefetching.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 05 Core Pipelining.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 02 Memory Hierarchy and Caches.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 03 Main Memory and DRAM.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 01 Introduction and Performance Evaluation-new.pdf
- 东北大学:某学院计算机科学与技术专业《智能信息系统开发》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《软件工程综合实践》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《创新创业设计基础》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《工程领导力》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《高等数学建模》课程教学大纲(二).pdf
- 东北大学:某学院计算机科学与技术专业《数据库原理》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《物理建模》课程教学大纲 A.pdf
- 东北大学:某学院计算机科学与技术专业《Java程序设计基础》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《算法设计与分析》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《Linux操作系统与内核分析》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《计算机体系结构》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《计算机网络组网技术》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《离散数学》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《Web开发与应用》课程教学大纲.pdf