Tomasolu s s Algorithm

Similar documents
EECS 470. Tomasulo s Algorithm. Lecture 4 Winter 2018

U. Wisconsin CS/ECE 752 Advanced Computer Architecture I

Instruction Level Parallelism III: Dynamic Scheduling

EECS 470 Lecture 5. Intro to Dynamic Scheduling (Scoreboarding) Fall 2018 Jon Beaumont

Out-of-Order Execution. Register Renaming. Nima Honarmand

CSE502: Computer Architecture CSE 502: Computer Architecture

CSE502: Computer Architecture CSE 502: Computer Architecture

EECS 470. Lecture 9. MIPS R10000 Case Study. Fall 2018 Jon Beaumont

EECS 470 Lecture 8. P6 µarchitecture. Fall 2018 Jon Beaumont Core 2 Microarchitecture

Dynamic Scheduling I

Issue. Execute. Finish

OOO Execution & Precise State MIPS R10000 (R10K)

CSE502: Computer Architecture CSE 502: Computer Architecture

Dynamic Scheduling II

Precise State Recovery. Out-of-Order Pipelines

COSC4201. Scoreboard

Computer Science 246. Advanced Computer Architecture. Spring 2010 Harvard University. Instructor: Prof. David Brooks

CS521 CSE IITG 11/23/2012

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

Instruction Level Parallelism Part II - Scoreboard

Tomasulo s Algorithm. Tomasulo s Algorithm

EECS 470 Lecture 4. Pipelining & Hazards II. Winter Prof. Ronald Dreslinski h8p://

EN164: Design of Computing Systems Lecture 22: Processor / ILP 3

CSE502: Computer Architecture CSE 502: Computer Architecture

CMP 301B Computer Architecture. Appendix C

Project 5: Optimizer Jason Ansel

Parallel architectures Electronic Computers LM

Problem: hazards delay instruction completion & increase the CPI. Compiler scheduling (static scheduling) reduces impact of hazards

CISC 662 Graduate Computer Architecture. Lecture 9 - Scoreboard

Chapter 16 - Instruction-Level Parallelism and Superscalar Processors

Asanovic/Devadas Spring Pipeline Hazards. Krste Asanovic Laboratory for Computer Science M.I.T.

7/11/2012. Single Cycle (Review) CSE 2021: Computer Organization. Multi-Cycle Implementation. Single Cycle with Jump. Pipelining Analogy

Chapter 4. Pipelining Analogy. The Processor. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop:

Lecture 4: Introduction to Pipelining

ECE 4750 Computer Architecture, Fall 2016 T09 Advanced Processors: Superscalar Execution

Instruction Level Parallelism. Data Dependence Static Scheduling

Lecture Topics. Announcements. Today: Pipelined Processors (P&H ) Next: continued. Milestone #4 (due 2/23) Milestone #5 (due 3/2)

DAT105: Computer Architecture

7/19/2012. IF for Load (Review) CSE 2021: Computer Organization. EX for Load (Review) ID for Load (Review) WB for Load (Review) MEM for Load (Review)

CSE 2021: Computer Organization

Architectural Core Salvaging in a Multi-Core Processor for Hard-Error Tolerance

A B C D. Ann, Brian, Cathy, & Dave each have one load of clothes to wash, dry, and fold. Time

Pipelining A B C D. Readings: Example: Doing the laundry. Ann, Brian, Cathy, & Dave. each have one load of clothes to wash, dry, and fold

Lecture 8-1 Vector Processors 2 A. Sohn

Pipelined Processor Design

Compiler Optimisation

CS 110 Computer Architecture Lecture 11: Pipelining

EE382V-ICS: System-on-a-Chip (SoC) Design

ECE473 Computer Architecture and Organization. Pipeline: Introduction

Introduction to CMOS VLSI Design (E158) Lecture 5: Logic

Digital Integrated CircuitDesign

6.S084 Tutorial Problems L19 Control Hazards in Pipelined Processors

Suggested Readings! Lecture 12" Introduction to Pipelining! Example: We have to build x cars...! ...Each car takes 6 steps to build...! ! Readings!

RISC Central Processing Unit

EECS 427 Lecture 13: Leakage Power Reduction Readings: 6.4.2, CBF Ch.3. EECS 427 F09 Lecture Reminders

Final Report: DBmbench

SATSim: A Superscalar Architecture Trace Simulator Using Interactive Animation

CS429: Computer Organization and Architecture

Quantifying the Complexity of Superscalar Processors

Department Computer Science and Engineering IIT Kanpur

A Static Power Model for Architects

Pipelined Beta. Handouts: Lecture Slides. Where are the registers? Spring /10/01. L16 Pipelined Beta 1

Performance Evaluation of Recently Proposed Cache Replacement Policies

LECTURE 8. Pipelining: Datapath and Control

EECE 321: Computer Organiza5on

Improving GPU Performance via Large Warps and Two-Level Warp Scheduling

CS61c: Introduction to Synchronous Digital Systems

Instructor: Dr. Mainak Chaudhuri. Instructor: Dr. S. K. Aggarwal. Instructor: Dr. Rajat Moona

Firas Hassan and Joan Carletta The University of Akron

ECE 2300 Digital Logic & Computer Organization. More Pipelined Microprocessor

EECS 270 Schedule and Syllabus for Fall 2011 Designed by Prof. Pinaki Mazumder

Architecture ISCA 16 Luis Ceze, Tom Wenisch

Interpolation Error in Waveform Table Lookup

SCALCORE: DESIGNING A CORE

A LOW POWER DESIGN FOR ARITHMETIC AND LOGIC UNIT

Computer Elements and Datapath. Microarchitecture Implementation of an ISA

Overview. 1 Trends in Microprocessor Architecture. Computer architecture. Computer architecture

Freeway: Maximizing MLP for Slice-Out-of-Order Execution

Chapter 3 Digital Logic Structures

Design of ALU and Cache Memory for an 8 bit ALU

ATA Memo No. 40 Processing Architectures For Complex Gain Tracking. Larry R. D Addario 2001 October 25

On the Rules of Low-Power Design

Evolution of DSP Processors. Kartik Kariya EE, IIT Bombay

Lecture #20 Analog Inputs Embedded System Engineering Philip Koopman Wednesday, 30-March-2016

How a processor can permute n bits in O(1) cycles

Pipelined Architecture (2A) Young Won Lim 4/7/18

Pipelined Architecture (2A) Young Won Lim 4/10/18

Lecture 14: Datapath Functional Units Adders

CS4617 Computer Architecture

The book has excellent descrip/ons of this topic. Please read the book before watching this lecture. The reading assignment is on the website.

EECS 427 Lecture 22: Low and Multiple-Vdd Design

Combined Circuit and Microarchitecture Techniques for Effective Soft Error Robustness in SMT Processors

SOFTWARE IMPLEMENTATION OF THE

CMSC 611: Advanced Computer Architecture

Fall 2015 COMP Operating Systems. Lab #7

Working Party 5B DRAFT NEW RECOMMENDATION ITU-R M.[500KHZ]

CMSC 611: Advanced Computer Architecture

Performance Metrics, Amdahl s Law

IF ID EX MEM WB 400 ps 225 ps 350 ps 450 ps 300 ps

Relocatable Fleet Code

Transcription:

omasolu s s Algorithm Fall 2007 Prof. homas Wenisch http://www.eecs.umich.edu/courses/eecs4 70 Floating Point Buffers (FLB) ag ag ag Storage Bus Floating Point 4 3 Buffers FLB 6 5 5 4 Control 2 1 1 Result Control Sink ag SourceCtrl. Sink ag SourceCtrl. Sink ag SourceCtrl. Adder Instruction Unit Floating Floating Point Operand Stack Stack FLOS Operand (FLOS) Decoder Decoder FLB Bus FLR Bus CDB ags Busy Bits Common Data Bus (CDB) Floating Point 4 Registers FLR 8 4 Floating Point 2 Registers (FLR) 2 0 ag Sink ag SourceCtrl. ag Sink ag SourceCtrl. 0 Multiply/Divide Many thanks to Prof. Martin and Roth of University of Pennsylvania for most of these slides. Portions developed in part by Profs. Austin, Brehob, Falsafi, Hill, Hoe, Lipasti, Shen, Smith, Sohi, yson, Vijaykumar, and Wenisch of Carnegie Mellon University, Purdue University, University of Michigan, and University of Wisconsin. Result ags 3 Store Control 2 Control Data 2 1 Buffers SDB 1 Store Data Buffers (SDB) Slide 1

Announcements HW # 2 due Wednesday 9/26 Programming assignment #2 due today Hand in printed synthesis results by 6pm at CSE 4620 Electronic submission of integer square root by 6pm Slide 2

Readings For oday: H & P Chapter 2.4 2.6 D. Sima Design Space of Register Renaming echniques For Wednesday: Smith & Pleszkun Implementing Precise Interrupts Slide 3

Scoreboard Redux he good + Cheap hardware InsnStatus + FuStatus + RegStatus ~ 1 FP unit in area + Pretty good performance 1.7X for FORRAN (scientific array) programs he less good No bypassing Is this a fundamental problem? Limited scheduling scope Structural/WAW hazards delay dispatch Slow issue of truly-dependent (RAW) insns WAR hazards delay writeback Fix with hardware register renaming Slide 4

Register Renaming Register renaming (in hardware) Change register names to eliminate WAR/WAW hazards One of most the beautiful things in computer architecture Key: think of registers (r1,f0 ) as names, not storage locations + Can have more locations than names + Can have multiple active versions of same name How does it work? Map-table: maps names to most recent locations SRAM indexed by name On a write: allocate new location, note in map-table On a read: find location of most recent write via map-table lookup Small detail: must de-allocate locations at some point Slide 5

Register Renaming Example Parameters Names: r1,r2,r3 Locations: p1,p2,p3,p4,p5,p6,p7 Original mapping: r1 p1, r2 p2, r3 p3, p4 p7 are free Mapable FreeList Raw insns Renamed insns r1 r2 r3 p1 p2 p3 p4,p5,p6,p7 add r2,r3,r1 add p2,p3,p4 p4 p2 p3 p5,p6,p7p6 p7 sub r2,r1,r3r1 r3 sub p2,p4,p5p4 p5 p4 p2 p5 p6,p7 mul r2,r3,r3 mul p2,p5,p6 p4 p2 p6 p7 div r1,4,r1 div p4,4,p7 Renaming + Removes WAW and WAR dependences + Leaves RAW intact! Slide 6

Scheduling Algorithm II: omasulo omasulo s algorithm Reservation stations (RS): instruction buffer Common data bus (CDB): broadcasts results to RS Register renaming: removes WAR/WAW hazards First implementation: IBM 360/91 [1967] Dynamic scheduling for FP units only Bypassing Our example: Simple omasulo Dynamic scheduling for everything, including load/store No bypassing (for comparison with Scoreboard) 5 RS: 1 ALU, 1 load, 1 store, 2 FP (3-cycle, pipelined) Slide 7

omasulo Data Structures (RS#) FU, busy, op, R: destination register name : destination register tag (RS# of this RS) 1,2: source register tags (RS# of RS that will produce value) V1,V2: source register values hat s new Map able : tag (RS#) that will write this register Common Data Bus (CDB) Broadcasts <RS#, value> of completed insns ags interpreted as ready-bits++ ==0 Value is ready somewhere!=0 Value is not ready, wait until CDB broadcasts Slide 8

Simple omasulo Data Structures Map able Regfile value Fetched insns R op 1 2 == == CD DB. V1 FU V2 CD DB.V Insn fields and status bits ags Values Slide 9

Simple omasulo Pipeline New pipeline structure: F, D, S, X, W D (dispatch) Structural hazard? stall : allocate RS entry S (issue) RAW hazard? wait (monitor CDB) : go to execute W (writeback) Write register, free RS entry W and RAW-dependent d S in same cycle W and structural-dependent D in same cycle Slide 10

omasulo Dispatch (D) Map able Regfile value Fetched insns R op 1 2 == == CD DB. V1 FU V2 CD DB.V Stall for structural (RS) hazards Allocate RS entry Input register ready? read value into RS : read tag into RS Set register status (i.e., rename) for ouput register Slide 11

omasulo Issue (S) Map able Regfile value Fetched insns R op 1 2 == == CD DB. V1 FU V2 CD DB.V Wait for RAW hazards Read register values from RS Slide 12

omasulo Execute (X) Map able Regfile value Fetched insns R op 1 2 == == CD DB. V1 FU V2 CD DB.V Slide 13

omasulo Writeback (W) Map able Regfile value Fetched insns R op 1 2 == == CD DB. V1 FU V2 CD DB.V Wait for structural (CDB) hazards Output Reg Status tag still matches? clear, write result to register CDB broadcast to RS: tag match? clear tag, copy value Free RS entry Slide 14

Difference Between Scoreboard S X Insn Reg Status Regfile value Fetched insns R1 R2 FU Status R op 1 2 == == FU Slide 15

And omasulo Map able Regfile value Fetched insns R op 1 2 == == CD DB. V1 FU V2 CD DB.V What in omasulo implements register renaming? Value copies in RS (V1, V2) Insn stores correct input values in its own RS entry + Future insns can overwrite master copy in regfile, doesn t matter Slide 16

Value/Copy-Based Register Renaming omasulo-style register renaming Called value-based or copy-based Names: architectural registers Storage locations: register file and reservation stations Values can and do exist in both Register file holds master (i.e., most recent) values + RS copies eliminate WAR hazards Storage locations referred to internally by RS# tags Register table translates names to tags ag == 0 value is in register file ag!= 0 value is not ready and is being computed by RS# CDB broadcasts values with tags attached So insns know what value they are looking at Slide 17

Value-Based Renaming Example ldf X(r1),f1 (allocated RS#2) M[r1] == 0 RS[2].V2 = RF[r1] M[f1] =RS#2 mulf f0,f1,f2 (allocate RS#4) M[f0] == 0 RS[4].V1 = RF[f0] M[f1] == RS#2 RS[4].2 = RS#2 M[f2] = RS#4 addf f7,f8,f0 Can write RF[f0] before mulf executes, why? ldf X(r1),f1 Can write RF[f1] before mulf executes, why? Can write RF[f1] ]before first ldf, why? h? Map able Reg f0 f1 RS#2 f2 RS#4 r1 FU busy op R 1 2 V1 V2 2 LD yes ldf f1 - - - [r1] 4 FP1 yes mulf f2 - RS#2 [f0] Slide 18

omasulo Data Structures Insn Status Insn D S X W ldf X(r1),f1 mulf f0,f1,f2 stf f2,z(r1) addi r1,4,r1 ldf X(r1),f1 mulf f0,f1,f2 stf f2,z(r1) Map able Reg f0 f1 f2 r1 CDB V FU busy op R 1 2 V1 V2 1 ALU no 2 LD no 3 S no 4 FP1 no 5 FP2 no Slide 19

omasulo: Cycle 1 Insn Status Insn D S X W ldf X(r1),f1 c1 mulf f0,f1,f2 stf f2,z(r1) addi r1,4,r1 ldf X(r1),f1 mulf f0,f1,f2 stf f2,z(r1) Map able Reg f0 f1 RS#2 f2 r1 CDB V FU busy op R 1 2 V1 V2 1 ALU no 2 LD yes ldf f1 - - - [r1] 3 S no 4 FP1 no 5 FP2 no allocate Slide 20

omasulo: Cycle 2 Insn Status Insn D S X W ldf X(r1),f1 c1 c2 mulf f0,f1,f2 c2 stf f2,z(r1) addi r1,4,r1 ldf X(r1),f1 mulf f0,f1,f2 stf f2,z(r1) Map able Reg f0 f1 RS#2 f2 RS#4 r1 CDB V FU busy op R 1 2 V1 V2 1 ALU no 2 LD yes ldf f1 - - - [r1] 3 S no 4 FP1 yes mulf f2 - RS#2 [f0] - allocate 5 FP2 no Slide 21

omasulo: Cycle 3 Insn Status Insn D S X W ldf X(r1),f1 c1 c2 c3 mulf f0,f1,f2 c2 stf f2,z(r1) c3 addi r1,4,r1 ldf X(r1),f1 mulf f0,f1,f2 stf f2,z(r1) Map able Reg f0 f1 RS#2 f2 RS#4 r1 CDB V FU busy op R 1 2 V1 V2 1 ALU no 2 LD yes ldf f1 - - - [r1] 3 S yes stf - RS#4 - - [r1] 4 FP1 yes mulf f2 - RS#2 [f0] - 5 FP2 no allocate Slide 22

omasulo: Cycle 4 Insn Status Insn D S X W Map able Reg CDB V ldf X(r1),f1 c1 c2 c3 c4 f0 RS#2 [f1] mulf f0,f1,f2 c2 c4 f1 RS#2 stf f2,z(r1) c3 f2 RS#4 addi r1,4,r1 c4 r1 RS#1 ldf X(r1),f1 mulf f0,f1,f2 ldf finished (W) stf f2,z(r1) clear f1 RegStatus CDB broadcast FU busy op R 1 2 V1 V2 1 ALU yes addi r1 - - [r1] - allocate 2 LD no free 3 S yes stf - RS#4 - - [r1] 4 FP1 yes mulf f2 - RS#2 [f0] CDB.V RS#2 ready 5 FP2 no grab CDB value Slide 23

omasulo: Cycle 5 Insn Status Insn D S X W ldf X(r1),f1 c1 c2 c3 c4 mulf f0,f1,f2 c2 c4 c5 stf f2,z(r1) c3 addi r1,4,r1 c4 c5 ldf X(r1),f1 c5 mulf f0,f1,f2 stf f2,z(r1) Map able Reg f0 f1 RS#2 f2 RS#4 r1 RS#1 CDB V FU busy op R 1 2 V1 V2 1 ALU yes addi r1 - - [r1] - 2 LD yes ldf f1 - RS#1 - - 3 S yes stf - RS#4 - - [r1] 4 FP1 yes mulf f2 - - [f0] [f1] 5 FP2 no allocate Slide 24

Insn Status Insn D S X W ldf X(r1),f1 c1 c2 c3 c4 mulf f0,f1,f2 c2 c4 c5+ stf f2,z(r1) c3 addi r1,4,r1 c4 c5 c6 ldf X(r1),f1 c5 mulf f0,f1,f2 c6 stf f2,z(r1) omasulo: Cycle 6 Map able Reg f0 f1 RS#2 f2 RS#4RS#5 r1 RS#1 CDB no D stall on WAW: scoreboard would overwrite f2 RegStatus anyone who needs old f2 tag has it FU busy op R 1 2 V1 V2 1 ALU yes addi r1 - - [r1] - 2 LD yes ldf f1 - RS#1 - - 3 S yes stf - RS#4 - - [r1] 4 FP1 yes mulf f2 - - [f0] [f1] 5 FP2 yes mulf f2 - RS#2 [f0] - allocate V Slide 25

Insn Status Insn D S X W ldf X(r1),f1 c1 c2 c3 c4 mulf f0,f1,f2 c2 c4 c5+ stf f2,z(r1) c3 addi r1,4,r1 c4 c5 c6 c7 ldf X(r1),f1 c5 c7 mulf f0,f1,f2 c6 stf f2,z(r1) omasulo: Cycle 7 FU busy op R 1 2 V1 V2 1 ALU no 2 LD yes ldf f1 - RS#1 - CDB.V 3 S yes stf - RS#4 - - [r1] 4 FP1 yes mulf f2 - - [f0] [f1] 5 FP2 yes mulf f2 - RS#2 [f0] - Map able Reg CDB V f0 RS#1 [r1] f1 RS#2 f2 RS#5 r1 RS#1 no W wait on WAR: scoreboard would anyone who needs old r1 has RS copy D stall on store RS: structural addi finished (W) clear r1 RegStatus CDB broadcast RS#1 ready grab CDB value Slide 26

omasulo: Cycle 8 Insn Status Insn D S X W Map able Reg CDB V ldf X(r1),f1 c1 c2 c3 c4 f0 RS#4 [f2] mulf f0,f1,f2 c2 c4 c5+ c8 f1 RS#2 stf f2,z(r1) c3 c8 f2 RS#5 addi r1,4,r1 c4 c5 c6 c7 r1 ldf X(r1),f1 c5 c7 c8 mulf finished (W) mulf f0,f1,f2 c6 don t clear f2 RegStatus stf f2,z(r1) already overwritten by 2nd mulf (RS#5) CDB broadcast FU busy op R 1 2 V1 V2 1 ALU no 2 LD yes ldf f1 - - - [r1] 3 S yes stf - RS#4 - CDB.V [r1] RS#4 ready 4 FP1 no grab CDB value 5 FP2 yes mulf f2 - RS#2 [f0] - Slide 27

omasulo: Cycle 9 Insn Status Insn D S X W ldf X(r1),f1 c1 c2 c3 c4 mulf f0,f1,f2 c2 c4 c5+ c8 stf f2,z(r1) c3 c8 c9 addi r1,4,r1 c4 c5 c6 c7 ldf X(r1),f1 c5 c7 c8 c9 mulf f0,f1,f2 c6 c9 stf f2,z(r1) Map able Reg f0 f1 RS#2 f2 RS#5 r1 2nd ldf finished (W) clear f1 RegStatus CDB broadcast CDB V RS#2 [f1] FU busy op R 1 2 V1 V2 1 ALU no 2 LD no 3 S yes stf - - - [f2] [r1] 4 FP1 no 5 FP2 yes mulf f2 - RS#2 [f0] CDB.V RS#2 ready grab CDB value Slide 28

omasulo: Cycle 10 Insn Status Insn D S X W ldf X(r1),f1 c1 c2 c3 c4 mulf f0,f1,f2 c2 c4 c5+ c8 stf f2,z(r1) c3 c8 c9 c10 addi r1,4,r1 c4 c5 c6 c7 ldf X(r1),f1 c5 c7 c8 c9 mulf f0,f1,f2 c6 c9 c10 stf f2,z(r1) c10 Map able Reg f0 f1 f2 RS#5 r1 CDB stf finished (W) no output register no CDB broadcast V FU busy op R 1 2 V1 V2 1 ALU no 2 LD no 3 S yes stf - RS#5 - - [r1] 4 FP1 no 5 FP2 yes mulf f2 - - [f0] [f1] free allocate Slide 29

Scoreboard vs. omasulo Scoreboard omasulo Insn D S X W D S X W ldf X(r1),f1 c1 c2 c3 c4 c1 c2 c3 c4 mulf f0,f1,f2 c2 c4 c5+ c8 c2 c4 c5+ c8 stf f2,z(r1) c3 c8 c9 c10 c3 c8 c9 c10 addi r1,4,r1 c4 c5 c6 c9 c4 c5 c6 c7 ldf X(r1),f1 c5 c9 c10 c11 c5 c7 c8 c9 mulf f0,f1,f2 c8 c11 c12+ c15 c6 c9 c10+ c13 stf f2,z(r1) c10 c15 c16 c17 c10 c13 c14 c15 Hazard Scoreboard omasulo Insn buffer stall in D stall in D FU wait in S wait in S RAW wait in S wait in S WAR wait in W none WAW stall in D none Slide 30

Scoreboard vs. omasulo II: Cache Miss Scoreboard omasulo Insn D S X W D S X W ldf X(r1),f1 c1 c2 c3+ c8 c1 c2 c3+ c8 mulf f0,f1,f2 c2 c8 c9+ c12 c2 c8 c9+ c12 stf f2,z(r1) c3 c12 c13 c14 c3 c12 c13 c14 addi r1,4,r1 c4 c5 c6 c13 c4 c5 c6 c7 ldf X(r1),f1 c8 c13 c14 c15 c5 c7 c8 c9 mulf f0,f1,f2 c12 c15 c16+ c19 c6 c9 c10+ c13 stf f2,z(r1) c13 c19 c20 c21 c7 c13 c14 c15 Assume 5 cycle cache miss on first ldf Ignore FUS and RS structural hazards + Advantage omasulo No addi WAR hazard (c7) means iterations run in parallel Slide 31

Can We Add Superscalar? Dynamic scheduling and multiple issue are orthogonal E.g., Pentium4: dynamically scheduled 5-way superscalar wo dimensions N: superscalar width (number of parallel operations) W: window size (number of reservation stations) What do we need for an N-by-W omasulo? RS: N tag/value w-ports (D), N value r-ports (S), 2N tag CAMs (W) Select logic: W N priority encoder (S) M: 2N r-ports (D), N w-ports (D) RF: 2N r-ports (D), N w-ports (W) CDB: N (W) Which h are the expensive pieces? Slide 32

Superscalar Select Logic Superscalar select logic: W N priority encoder Somewhat complicated (N 2 logw) Can simplify using different RS designs Split design Divide RS into N banks: 1 per FU? Implement N separate W/N 1 encoders + Simpler: N * logw/n Less scheduling flexibility FIFO design [Palacharla+] Can issue only head of each RS bank + Simpler: no select logic at all Less scheduling flexibility (but surprisingly not that bad) Slide 33

Can We Add Bypassing? Map able Regfile value Fetched insns R op 1 2 == == CD DB. V1 V2 CD DB.V FU Yes, but it s more complicated than you might think In fact: requires a completely new pipeline Slide 34

Why Out-of-Order Bypassing Is Hard No Bypassing Bypassing Insn D S X W D S X W ldf X(r1),f1 c1 c2 c3 c4 c1 c2 c3 c4 mulf f0,f1,f2 c2 c4 c5+ c8 c2 c3 c4+ c7 stf f2,z(r1) c3 c8 c9 c10 c3 c6 c7 c8 addi r1,4,r1 c4 c5 c6 c7 c4 c5 c6 c7 ldf X(r1),f1 c5 c7 c8 c9 c5 c7 c7 c9 mulf f0,f1,f2 c6 c9 c10+ c13 c6 c9 c8+ c13 stf f2,z(r1) c10 c13 c14 c15 c10 c13 c11 c15 Bypassing: ldf X in c3 mulf X in c4 mulf S in c3 But how can mulf S in c3 if ldf W in c4? Must change pipeline Modern scheduler Split CDB tag and value, move tag broadcast to S ldf tag broadcast now in cycle 2 mulf S in cycle 3 How do multi-cycle operations work? How do cache misses work? Slide 35

Dynamic Scheduling Summary Dynamic scheduling: out-of-order execution Higher pipeline/fu utilization, improved performance Easier and more effective in hardware than software + More storage locations than architectural registers + Dynamic handling of cache misses Instruction buffer: multiple F/D latches Implements large scheduling scope + passing functionality Split decode into in-order dispatch and out-of-order issue Stall vs. wait Dynamic scheduling algorithms Scoreboard: no register renaming, limited out-of-order omasulo: copy-based register renaming, full out-of-order Slide 36

Are we done? When can omasulo go wrong? Exceptions!! No way to figure out relative order of instructions ti in RS Next Lecture: How to make exceptions work Slide 37