Additional ILP Topics Prof. Eric Rotenberg

Slides:



Advertisements
Similar presentations
1 Lecture 11: Modern Superscalar Processor Models Generic Superscalar Models, Issue Queue-based Pipeline, Multiple-Issue Design.
Advertisements

Computer Structure 2014 – Out-Of-Order Execution 1 Computer Structure Out-Of-Order Execution Lihu Rappoport and Adi Yoaz.
1 Lecture: Out-of-order Processors Topics: out-of-order implementations with issue queue, register renaming, and reorder buffer, timing, LSQ.
THE MIPS R10000 SUPERSCALAR MICROPROCESSOR Kenneth C. Yeager IEEE Micro in April 1996 Presented by Nitin Gupta.
Spring 2003CSE P5481 Reorder Buffer Implementation (Pentium Pro) Hardware data structures retirement register file (RRF) (~ IBM 360/91 physical registers)
Computer Architecture 2011 – Out-Of-Order Execution 1 Computer Architecture Out-Of-Order Execution Lihu Rappoport and Adi Yoaz.
1 Lecture 18: Core Design Today: basics of implementing a correct ooo core: register renaming, commit, LSQ, issue queue.
1 Lecture 7: Out-of-Order Processors Today: out-of-order pipeline, memory disambiguation, basic branch prediction (Sections 3.4, 3.5, 3.7)
Chapter 12 Pipelining Strategies Performance Hazards.
Trace Caches J. Nelson Amaral. Difficulties to Instruction Fetching Where to fetch the next instruction from? – Use branch prediction Sometimes there.
Pipeline Exceptions & ControlCSCE430/830 Pipeline: Exceptions & Control CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng.
1 Lecture 10: ILP Innovations Today: handling memory dependences with the LSQ and innovations for each pipeline stage (Section 3.5)
1 Lecture 9: Dynamic ILP Topics: out-of-order processors (Sections )
Computer Architecture 2010 – Out-Of-Order Execution 1 Computer Architecture Out-Of-Order Execution Lihu Rappoport and Adi Yoaz.
Ch2. Instruction-Level Parallelism & Its Exploitation 2. Dynamic Scheduling ECE562/468 Advanced Computer Architecture Prof. Honggang Wang ECE Department.
OOO Pipelines - II Smruti R. Sarangi IIT Delhi 1.
CS 352H: Computer Systems Architecture
Dynamic Scheduling Why go out of style?
Computer Organization CS224
/ Computer Architecture and Design
Smruti R. Sarangi IIT Delhi
CSC 4250 Computer Architectures
PowerPC 604 Superscalar Microprocessor
CSE 502: Computer Architecture
Lecture: Out-of-order Processors
Module: Handling Exceptions
Flow Path Model of Superscalars
Pipelining: Advanced ILP
Morgan Kaufmann Publishers The Processor
Lecture 6: Advanced Pipelines
Lecture 16: Core Design Today: basics of implementing a correct ooo core: register renaming, commit, LSQ, issue queue.
Lecture 10: Out-of-order Processors
Lecture 11: Out-of-order Processors
Lecture: Out-of-order Processors
The processor: Pipelining and Branching
Lecture 18: Core Design Today: basics of implementing a correct ooo core: register renaming, commit, LSQ, issue queue.
Lecture 8: ILP and Speculation Contd. Chapter 2, Sections 2. 6, 2
Smruti R. Sarangi IIT Delhi
Lecture 11: Memory Data Flow Techniques
Lecture 17: Core Design Today: implementing core structures – rename, issue queue, bypass networks; innovations for high ILP and clock speed.
Lecture: Out-of-order Processors
Lecture 8: Dynamic ILP Topics: out-of-order processors
15-740/ Computer Architecture Lecture 5: Precise Exceptions
Control unit extension for data hazards
Lecture 20: OOO, Memory Hierarchy
Translation Buffers (TLB’s)
Lecture 19: Core Design Today: implementing core structures – rename, issue queue, bypass networks; innovations for high ILP and clock speed.
* From AMD 1996 Publication #18522 Revision E
Instruction Execution Cycle
Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 9/30/2011
Instruction-Level Parallelism (ILP)
Overview Prof. Eric Rotenberg
Translation Buffers (TLB’s)
Control Hazards Branches (conditional, unconditional, call-return)
Control unit extension for data hazards
Control unit extension for data hazards
Lecture 10: ILP Innovations
Lecture 9: ILP Innovations
Translation Buffers (TLBs)
Lecture 9: Dynamic ILP Topics: out-of-order processors
Conceptual execution on a processor which exploits ILP
Review What are the advantages/disadvantages of pages versus segments?
CMSC 611: Advanced Computer Architecture
Spring 2019 Prof. Eric Rotenberg
ECE 721, Spring 2019 Prof. Eric Rotenberg.
Handling Stores and Loads
Sizing Structures Fixed relations Empirical (simulation-based)
ECE 721 Modern Superscalar Microarchitecture
Spring 2019 Prof. Eric Rotenberg
Presentation transcript:

Additional ILP Topics Prof. Eric Rotenberg ECE 463/563 Fall `18 Additional ILP Topics Prof. Eric Rotenberg Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Additional ILP topics Interrupts Types Definition of “precise interrupts” ROB enables precise interrupts in OOO pipeline Faster recovery of mispredicted branches Checkpointing and restoring the RMT Handling memory dependencies Store Queue (SQ) and Load Queue (LQ) Going from scalar to superscalar Examples of superscalar complexity Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Additional ILP topics Interrupts Types Definition of “precise interrupts” ROB enables precise interrupts in OOO pipeline Faster recovery of mispredicted branches Checkpointing and restoring the RMT Handling memory dependencies Store Queue (SQ) and Load Queue (LQ) Going from scalar to superscalar Examples of superscalar complexity Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Interrupts Interrupt Event that requires temporarily stopping program execution to service the event Synchronous vs. asynchronous interrupts Synchronous: Instruction in the program causes the interrupt Asynchronous: External request causes the interrupt Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Three types of interrupts External interrupts Asynchronous Examples I/O device request Timer interrupt Power failure interrupt Exceptions Synchronous Invalid opcode Arithmetic overflow, divide-by-0, etc. TLB miss, TLB miss + page fault Operating system (O/S) calls Initiated via an explicit instruction in ISA, e.g., “syscall” or “trap” Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Handling interrupts Stop program execution Synchronous: Stop at the instruction causing the interrupt Asynchronous: Stop at an arbitrary instruction, as soon as convenient Service the interrupt Transfer control to O/S interrupt handler Depending on the interrupt, the program may be: resumed immediately following the interrupt handler, OR context-switched out and resumed later (save architectural registers to memory and later restore them from memory) Resume program from where we left off Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Example: TLB Miss 1 2 3 4 5 6 7 8 15 9 10 11 12 13 14 O/S interrupt handler load: D-TLB miss Restart from load: D-TLB hit Search Page Table for virt.-to-phys. mapping Write mapping into D-TLB dynamic instruction stream x Instruction retired Instruction causing interrupt Instruction not retired KEY: Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Example: TLB Miss + Page Fault 1 2 3 4 5 6 7 8 15 9 10 11 12 13 14 O/S interrupt handler load: D-TLB miss Restart from load: D-TLB hit Search Page Table for virt.-to-phys. mapping Discover “page fault”: * Page is on disk * Initiate page swap between disk and DRAM * Takes a few milliseconds in the background Context-switch to keep processor busy in the meantime: (1) Save arch. registers of current program to memory (2) Restore arch. registers of some other suspended program (resume it) dynamic instruction stream work on other program Disk interrupts processor: done with DMA transfer Context-switch to resume original program: (1) Save arch. registers of other program to memory (2) Restore arch. registers of original program (resume it) Write mapping into D-TLB x Instruction retired Instruction causing interrupt Instruction not retired KEY: Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Instruction causing interrupt Instruction not retired Precise interrupts Simple interrupt handling assumes a clean break in the dynamic instruction stream Restart occurs from the PC of the interrupted instruction The restart state must reflect: All instructions before interrupted instruction have retired All instructions after have not retired Precise interrupts Processor gives appearance of having retired all instructions before the interrupting instruction, and none of the instructions after it x Instruction retired Instruction causing interrupt Instruction not retired KEY: 1 2 3 4 5 6 7 8 15 9 10 11 12 13 14 load: D-TLB miss Precise state Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Implementing precise interrupts In-order pipeline Wait until interrupted instruction reaches WB and squash all instructions after it Out-of-order pipeline The reorder buffer naturally supports precise interrupts via in-order retirement Handle an interrupted instruction similar to a mispredicted branch instruction Interrupted instruction sets exception flag in its ROB entry Wait until the interrupted instruction reaches head of ROB (therefore all prior instructions have retired) Squash the interrupted instruction (since the program will be resumed from the interrupted one) and all instructions after it Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Supporting precise interrupts in OOO pipeline 1 2 3 4 5 6 7 8 15 9 10 11 12 13 14 load: D-TLB miss reorder buffer Precise state 1 2 3 4 5 6 7 8 15 9 10 11 12 13 14 load: D-TLB miss Precise state reorder buffer x Instruction retired Instruction posted exception Instruction not yet fetched KEY: Instruction fetched, not completed Instruction completed 1 2 3 4 5 6 7 8 load: D-TLB miss Precise state reorder buffer Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Implementing precise interrupts (cont.) Next steps The interrupted instruction’s PC, exception type, and other exception information, which are readily available at the WB stage for an in-order pipeline or at the ROB head for an OOO pipeline, are saved in a special-purpose architectural register defined in the ISA (e.g., exception PC register, exception control register, etc.). Jump to a generic O/S interrupt handler. The generic O/S interrupt handler examines the exception control register and jumps to a specific O/S interrupt handler accordingly. In the case of a context-switch, context-switch handler saves all the architectural register state of the newly-suspended program (exception PC register, exception control register, general-purpose registers, etc.) to the program’s “process control block” (data structure in the O/S for each live program) in memory. It resumes a previously-suspended program by restoring its architectural register state from its process control block. A final return-from-interrupt instruction will jump to the exception PC register to restart the interrupted instruction. Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Additional ILP topics Interrupts Types Definition of “precise interrupts” ROB enables precise interrupts in OOO pipeline Faster recovery of mispredicted branches Checkpointing and restoring the RMT Handling memory dependencies Store Queue (SQ) and Load Queue (LQ) Going from scalar to superscalar Examples of superscalar complexity Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Branch misprediction recovery alternatives Wait until mispredicted branch reaches head of ROB Simple recovery mechanism ROB: Tail = Head (after retiring the branch) Pipeline: squash all instructions in pipeline (all instructions are younger than the branch) RMT: flash-clear all valid bits Delaying recovery until retirement increases the misprediction penalty Immediately initiate recovery, while branch is in middle of ROB Minimizes the misprediction penalty Complex recovery mechanism ROB: Tail = entry after branch’s ROB entry (still simple) Pipeline: Selectively squash only those instructions in the pipeline that are younger than the branch and not those that are older than the branch. RMT: Must restore RMT to what it was just after renaming the branch. One approach is to checkpoint the RMT after every branch. Restore RMT to the corresponding checkpoint when a mispredicted branch is detected. (Note that retirement unit updates not only RMT but also RMT-checkpoints.) Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

RMT Checkpoint & Recovery (1) dynamic instruction stream ROB BRANCH Head (Retire) Tail (Rename) v rob_tag Head (Retire) Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Checkpoint & Recovery (2) dynamic instruction stream ROB BRANCH Head (Retire) Tail (Rename) v rob_tag save v rob_tag CHECKPOINT Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Checkpoint & Recovery (3) dynamic instruction stream ROB BRANCH wrong path Head (Retire) Tail (Rename) v rob_tag wrong state! v rob_tag CHECKPOINT Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Checkpoint & Recovery (4) dynamic instruction stream ROB BRANCH squashed Head (Retire) Tail (Rename) v rob_tag restore v rob_tag CHECKPOINT Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Checkpoint & Recovery (5) dynamic instruction stream ROB BRANCH correct path Head (Retire) Tail (Rename) v rob_tag correct state Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Additional ILP topics Interrupts Types Definition of “precise interrupts” ROB enables precise interrupts in OOO pipeline Faster recovery of mispredicted branches Checkpointing and restoring the RMT Handling memory dependencies Store Queue (SQ) and Load Queue (LQ) Going from scalar to superscalar Examples of superscalar complexity Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Principle #1: Retire stores in-order and non-speculatively SQ holds all in-flight stores (fetched but not yet retired) in their original program order Retire a store from the SQ to D$ only when the ROB signals that the store is at ROB head and is completed Stores to same address retire in-order: correctly handle WAW hazards through memory Each store retires non-speculatively: all prior instructions have retired so there are no prior unresolved mispredictions or exceptions Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store load head tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store load A 30 head tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store A 20 load 30 head tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store A 10 20 load 30 retire D$ In-order retirement from ROB and SQ: Correct handling of WAW through memory. Correct recovery to precise memory state (mispredictions, exceptions). head tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Principle #2: A load searches both the SQ and D$ to get the most recent value corresponding to its address Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store A 10 20 load 30 D$ Store-load forwarding examples A: 10 head B: 666 load gets “30” (not “20” from older matching store in SQ or “10” from D$) tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store A 10 20 load 30 B D$ A: 10 head B: 666 load gets “666” from D$ (no SQ hit) load received “30” tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Principle #3: Need a load execution policy to handle unknown prior store addresses Loads and stores issue from IQ OOO based on their source register readiness A load’s address may be generated before prior stores’ addresses This load sees that there are prior stores in the SQ, but whether or not it conflicts with these prior stores is unknown Two options: Stall the load similar to a cache miss (even if D$ has the block): “memory disambiguation stall” Speculatively execute the load based on a prediction that these prior stores do not conflict Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store A 10 20 load (?) B D$ A: 10 head B: 666 load speculatively gets “666” from D$ (no SQ hit) tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store A 10 20 load 30 B D$ A: 10 head B: 666 load speculatively gets “666” from D$ (no SQ hit) Older store, which executes late, searches LQ for speculatively executed loads. No conflict detected so do not post a misprediction. Speculative “load B” confirmed OK. tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store A 10 20 load (?) D$ A: 10 head B: 666 load speculatively gets 20 tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

unified load/store queue (LSQ) address store value store A 10 20 load 30 D$ A: 10 head B: 666 load speculatively received “20” Older store, which executes late, searches LQ for speculatively executed loads. Conflict detected (late) so post a misprediction in the mispredicted load’s ROB entry. tail Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Load/Store Execution Lane AGEN unit for computing load and store addresses Three structures L1 D$ (and L1 D-TLB) Store Queue (SQ): contains all active stores in program order Stores are speculative until they reach head of ROB SQ commits stores to D$ non-speculatively and in-order Loads search SQ for store values on which they depend Load Queue (LQ): contains all active loads in program order Loads may execute out-of-order with respect to prior stores Executed load gets wrong value if it depends on an older store that hasn’t executed yet Stores search LQ for mispredicted loads Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Store Instruction Dispatch Stage (in-order) Store is allocated the SQ entry at tail of SQ (its SQ_index) Store also notes the current LQ tail, so it knows which loads are after it in program order (its LQ_index) Execute Stage (out-of-order) AGEN: Generate store’s address Write SQ: Write store’s address and value into its SQ entry (at its SQ_index) Read LQ: Use store’s address and LQ_index to search LQ for mispredicted loads: loads after the store in program order (between its LQ_index and LQ_tail), with the same address as the store, which already executed. Retire Stage (in-order) When a store reaches the head of the ROB, ROB signals SQ to commit its oldest store (SQ_head) to the D$ Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Load Instruction Dispatch Stage (in-order) Load is allocated the LQ entry at tail of LQ (its LQ_index) Load also notes the current SQ tail, so it knows which stores are before it in program order (its SQ_index) Execute Stage (out-of-order) AGEN: Generate load’s address Write LQ: Write load’s address into its LQ entry (at its LQ_index) Read SQ and D$: Use load’s address and SQ_index to search SQ for best estimate (some stores’ addresses still unknown) of producer store: nearest store before the load in program order (between SQ_head and its SQ_index), with the same address as the load. If SQ hit, use store value, else use D$ value. Retire Stage (in-order) When a load reaches the head of the ROB: Signal LQ to remove its oldest load (LQ_head) If load’s misprediction bit is set in ROB, initiate misprediction recovery. Fetch unit is redirected to PC of load so that the load re-executes, this time correctly since it is oldest instruction in pipeline (all prior stores have committed to D$). Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Speculative Load Handling: A Rich Design Space A load is speculative if there are prior unknown store addresses (in general) Four dimensions of speculative load handling Memory Dependence Predictor Store-load synchronization strategy Load misprediction recovery strategy Impact of store execution (split stores vs. no split stores) ECE 721 covers store and load handling in depth. Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Additional ILP topics Interrupts Types Definition of “precise interrupts” ROB enables precise interrupts in OOO pipeline Faster recovery of mispredicted branches Checkpointing and restoring the RMT Handling memory dependencies Store Queue (SQ) and Load Queue (LQ) Going from scalar to superscalar Examples of superscalar complexity Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Superscalar processing scalar = 1 instruction/cycle superscalar: N instructions/cycle Increase width of each stage of the pipeline FE DE RN RR DI IS EX WB RT Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Superscalar Complexity Achieving peak fetch width requires interleaved I$ plus fetch bundle formation logic. Predict multiple branches per cycle. Predicted-taken branches cause lower-than-peak fetch width. I$ / branch predictor performance critical for superscalar: larger I$/predictor is slower. Fetch Decode Highly-ported RMT. N-way superscalar: 2N read ports and N write ports. Must handle dependencies within rename bundle: cross-check logic + RMT bypass muxes. Rename Register Read Highly-ported register file (ARF+ROB). N-way superscalar: 2N read ports and N write ports. Dispatch N-way superscalar: (1) must locate up to N free IQ entries, (2) N write ports into IQ. Exposing more instruction-level parallelism requires larger IQ. Issue logic more complex. N-way superscalar: (1) N wakeup ports, (2) select and issue up to N ready instructions (N arbiters, N read ports). Issue Execute agen D$ Simple ALU Complex ALU Mem Bypass network is very complex. Each execution lane forwards its value to every other execution lane. N-way superscalar: (1) N bypasses, (2) bypasses are long wires (must span all execution lanes), (3) each lane has an {N+1}:1 MUX at bypass sinks to select a forwarded value from any lane or the instruction’s value from the IQ. Writeback Retire Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Navigating the IPC/frequency Trade-off Naïvely increasing superscalar complexity can increase cycle time, hence, decrease frequency How to navigate the IPC/frequency trade-off Microarchitect must balance IPC and frequency to achieve best overall performance Heroic physical design so that you can “have your cake (high IPC) and eat it too (high frequency)” Surgical pipelining of critical paths Custom cells vs. standard cells Expend more power for speed where profitable Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Case study of superscalar complexity: fetch multiple instructions in parallel Suppose I$ block size = 16 bytes = four 4-byte instr. Suppose we want a superscalar processor with a fetch width of four instructions Conventional I$ can supply 1 block at most Good: get 4 instr. if fetch bundle is aligned at a block boundary. Bad: get fewer than 4 instr. if it is not aligned. A taken branch’s target can land the fetch PC in the middle of a block, i.e., the next fetch bundle starts in the middle of a block Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg I$ misalignment Fetch 1 aligned cache block / cycle Unaligned PC: Fetch useless instructions before 1st instr. and not enough instructions after Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Dual-Ported I$ Read two blocks to get full bandwidth Two read ports are expensive Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

Inexpensive dual-porting: interleaving Realization Don’t need to read out any two blocks Just need to read out two consecutive blocks Split cache into two banks: one bank holds blocks with even block addresses, other holds blocks with odd block addresses This is called 2-way interleaving or banking Guarantees full fetch width each cycle despite misaligned PC (assuming no predicted-taken branch terminates the fetch bundle early) Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg

ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg Interleaved I$ Divide cache into two banks First bank has even blocks Second bank has odd blocks Called an interleaved cache or banked cache Fall 2018 ECE 463/563, Microprocessor Architecture, Prof. Eric Rotenberg