ROB Example We will go through an example of the use of reorder buffers in two scenarios— Completion without exceptions One instruction raises an exception.

Slides:



Advertisements
Similar presentations
Tomasulo without Re-order Buffer Opcode Operand1 Operand2 Reservation station MUL1 RS MUL2RS Store1 Multiply unit 1 Mul unit 2 Store unit 1 RS Store2 Store.
Advertisements

Hardware-Based Speculation. Exploiting More ILP Branch prediction reduces stalls but may not be sufficient to generate the desired amount of ILP One way.
Lec18.1 Step by step for Dynamic Scheduling by reorder buffer Copyright by John Kubiatowicz (http.cs.berkeley.edu/~kubitron)
Lec ECE 463/521, Profs. Conte, Rotenberg and Gehringer, Dept. of ECE, NC State University Static Scheduling Techniques m Local scheduling (within.
EECS 470 Lecture 8 RS/ROB examples True Physical Registers? Project.
1 Lecture: Out-of-order Processors Topics: out-of-order implementations with issue queue, register renaming, and reorder buffer, timing, LSQ.
CS6290 Tomasulo’s Algorithm. Implementing Dynamic Scheduling Tomasulo’s Algorithm –Used in IBM 360/91 (in the 60s) –Tracks when operands are available.
ECE 2162 Tomasulo’s Algorithm. Implementing Dynamic Scheduling Tomasulo’s Algorithm –Used in IBM 360/91 (in the 60s) –Tracks when operands are available.
Microprocessor Microarchitecture Dependency and OOO Execution Lynn Choi Dept. Of Computer and Electronics Engineering.
Copyright 2001 UCB & Morgan Kaufmann ECE668.1 Adapted from Patterson, Katz and Kubiatowicz © UCB Csaba Andras Moritz UNIVERSITY OF MASSACHUSETTS Dept.
Spring 2003CSE P5481 Reorder Buffer Implementation (Pentium Pro) Hardware data structures retirement register file (RRF) (~ IBM 360/91 physical registers)
Tomasulo With Reorder buffer:
CPE 731 Advanced Computer Architecture ILP: Part IV – Speculative Execution Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University.
1 Quiz 3, Answers 1,3 The CPI is: 0.22* * * *12 = = 5.42 In the 2nd case the CPI is 1.0. Every instruction.
1 Lecture 18: Core Design Today: basics of implementing a correct ooo core: register renaming, commit, LSQ, issue queue.
1 Zvika Guz Slides modified from Prof. Dave Patterson, Prof. John Kubiatowicz, and Prof. Nancy Warter-Perez Out Of Order Execution.
CS 152 Computer Architecture and Engineering Lecture 15 - Advanced Superscalars Krste Asanovic Electrical Engineering and Computer Sciences University.
March 9, 2011CS152, Spring 2011 CS 152 Computer Architecture and Engineering Lecture 12 - Advanced Out-of-Order Superscalars Krste Asanovic Electrical.
A Configurable Simulator for OOO Speculative Execution Design & Implementation By Mustafa Imran Ali ID#
EECS 470 Dynamic Scheduling – Part II Lecture 10 Coverage: Chapter 3.
1 Lecture 7: Speculative Execution and Recovery using Reorder Buffer Branch prediction and speculative execution, precise interrupt, reorder buffer.
© Wen-mei Hwu and S. J. Patel, 2005 ECE 412, University of Illinois Lecture Instruction Execution: Dynamic Scheduling.
1 Lecture 7: Speculative Execution and Recovery Branch prediction and speculative execution, precise interrupt, reorder buffer.
Anshul Kumar, CSE IITD CSL718 : Superscalar Processors Speculative Execution 2nd Feb, 2006.
1 Lecture 10: Memory Dependence Detection and Speculation Memory correctness, dynamic memory disambiguation, speculative disambiguation, Alpha Example.
CS203 – Advanced Computer Architecture ILP and Speculation.
Ch2. Instruction-Level Parallelism & Its Exploitation 2. Dynamic Scheduling ECE562/468 Advanced Computer Architecture Prof. Honggang Wang ECE Department.
CSL718 : Superscalar Processors
CS 152 Computer Architecture and Engineering Lecture 11 - Out-of-Order Issue, Register Renaming, & Branch Prediction John Wawrzynek Electrical Engineering.
/ Computer Architecture and Design
Smruti R. Sarangi IIT Delhi
Tomasulo’s Algorithm Born of necessity
Out of Order Processors
Dynamic Scheduling and Speculation
Step by step for Tomasulo Scheme
Tomasulo Loop Example Loop: LD F0 0 R1 MULTD F4 F0 F2 SD F4 0 R1
CS5100 Advanced Computer Architecture Hardware-Based Speculation
Smruti R. Sarangi Computer Science and Engineering, IIT Delhi
Microprocessor Microarchitecture Dynamic Pipeline
Sequential Execution Semantics
High-level view Out-of-order pipeline
Tomasulo With Reorder buffer:
CMSC 611: Advanced Computer Architecture
Lecture 16: Core Design Today: basics of implementing a correct ooo core: register renaming, commit, LSQ, issue queue.
Lecture 18: Core Design Today: basics of implementing a correct ooo core: register renaming, commit, LSQ, issue queue.
Smruti R. Sarangi IIT Delhi
ECE 2162 Reorder Buffer.
ROB Example We will go through an example of the use of reorder buffers in two scenarios— Completion without exceptions One instruction raises an exception.
Lecture 11: Memory Data Flow Techniques
Lecture: Out-of-order Processors
Adapted from the slides of Prof
Krste Asanovic Electrical Engineering and Computer Sciences
Adapted from the slides of Prof
Instruction-Level Parallelism (ILP)
Virtual Memory Prof. Eric Rotenberg
Overview Prof. Eric Rotenberg
September 20, 2000 Prof. John Kubiatowicz
Caches: reducing miss penalty Prof. Eric Rotenberg
pipelining: data hazards Prof. Eric Rotenberg
High-level view Out-of-order pipeline
A Configurable Simulator for OOO Speculative Execution
Conceptual execution on a processor which exploits ILP
Spring 2019 Prof. Eric Rotenberg
ECE 721, Spring 2019 Prof. Eric Rotenberg.
ECE 721 Alternatives to ROB-based Retirement
Handling Stores and Loads
Sizing Structures Fixed relations Empirical (simulation-based)
ECE 721 Modern Superscalar Microarchitecture
Dynamic Scheduling Physical Register File ready bits Issue Queue (IQ)
Presentation transcript:

ROB Example We will go through an example of the use of reorder buffers in two scenarios— Completion without exceptions One instruction raises an exception First, let’s consider the data structures in use for the example. ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

All values now in reg. file Reservation stations and ROB are empty RF In RF tag value  - 54 76 -5 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2 Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

Code for the example A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 At each step, we will show the changes by coloring the cell backgrounds pink. ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF A LW R2, 4(R0) In RF tag value  - 54 76 -5 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2 Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF A LW R2, 4(R0) In RF tag value  - 54 76 -5 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2  54 Imm=4 Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF B MULT R3, R1, R2 In RF tag value  - 54 76 -5 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2  54 Imm=4 Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF B MULT R3, R1, R2 In RF tag value  - 54 76 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 3 4 5 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2 1  76 Reservation Stations FUs 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF C LW R2, 8(R0) In RF tag value  - 54 76 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 3 4 5 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2 1  76 Reservation Stations FUs 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF C LW R2, 8(R0) In RF tag value  - 54 76 2 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 C 3 4 5 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2 2  54 Imm=8 1 76 Reservation Stations FUs 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF D ADD R1, R1, R2 In RF tag value  - 54 76 2 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 C 3 4 5 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2 2  54 Imm=8 1 76 Reservation Stations FUs 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF D ADD R1, R1, R2 In RF tag value  - 54 3 76 2 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 C 3 R1 D 4 5 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 3  76 2 1 TAIL Reservation Stations FUs 0 (cache miss) 2 (cache hit) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF E SUB R2, R0, R1 In RF tag value  - 54 3 76 2 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 C 3 R1 D 4 5 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 3  76 2 1 TAIL Reservation Stations FUs 0 (cache miss) 2 (cache hit) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF E SUB R2, R0, R1 In RF tag value  - 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 C 3 R1 D 4 E 5 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 4  54 3 76 2 1 TAIL Reservation Stations FUs 0 (cache miss) 2 (cache hit) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value  - 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 667 no  C 3 R1 D 4 E 5 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 4  54 3 76 667 1 TAIL Reservation Stations FUs 0 (cache miss) 2, 667, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value  - 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 667 no  C 3 R1 D 4 E 5 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 4  54 3 1 76 TAIL Reservation Stations FUs 0 (cache miss) 3 ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value  - 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 667 no  C 3 R1 743 D 4 E 5 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 4  54 743 1 76 TAIL Reservation Stations FUs 0 (cache miss) 3, 743, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value  - 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 667 No  C 3 R1 743 D 4 –689 E 5 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 1  76 TAIL Reservation Stations FUs 0 (cache miss) 4, –689, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF F ADD R0, R1, R2 In RF tag value  - 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 667 No  C 3 R1 743 D 4 –689 E 5 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 1  76 TAIL Reservation Stations FUs 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF F ADD R0, R1, R2 In RF tag value 5 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 667 No  C 3 R1 743 D 4 –689 E 5 R0 F 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 5  743 –689 1 76 TAIL Reservation Stations FUs 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 A 1 R3 B 2 667 No  C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 1  76 TAIL Reservation Stations FUs 0 (cache miss) 5, 54, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54 3 76 4 -5 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 1  76 650000 TAIL Reservation Stations FUs 0, 650000, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54 3 76 4 650000 1 -99 Reg=R2, Tag=0, Val=650000 R0 Note: Tag doesn’t match RF tag, don’t set “In RF” Note: Commit value to register- file state R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 TAIL Reservation Stations FUs 1 (multiply) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

Two scenarios next… Multiply Scenario #1: Completes without exception Scenario #2: Raises exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54 3 76 4 650000 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 49400000 B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 TAIL Reservation Stations FUs 1, 49400000, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54 3 76 4 650000  - 49400000 Reg=R3, Tag=1, Val=49400000 R0 Note: Tag matches RF tag, so set “In RF” Note: Commit value to register-file state R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 49400000 B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 TAIL Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54 3 76 4 667  - 49400000 Reg=R2, Tag=2, Val=667 R0 Note: Tag does not match RF tag, don’t set “In RF” Note: Commit value to register-file state R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 49400000 B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 TAIL Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54  - 743 4 667 49400000 Reg=R1, Tag=3, Val=743 R0 Note: Tag matches RF tag, so set “In RF” Note: Commit value to register-file state R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 49400000 B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 my tag src1 ready tag/value src2 HEAD TAIL Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54  - 743 – 689 49400000 Reg=R2, Tag=4, Val=–689 R0 Note: Tag matches RF tag, so set “In RF” Note: Commit value to register-file state R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 49400000 B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 my tag src1 ready tag/value src2 HEAD TAIL Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value  - 54 743 –689 49400000 Reg=R0, Tag=5, Val=54 R0 Note: Tag matches RF tag, so set “In RF” Note: Commit value to register file state R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 49400000 B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 my tag src1 ready tag/value src2 HEAD TAIL Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

Now do scenario #2 Multiply raises exception. ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value 5 54 3 76 4 650000 1 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 - Yes B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 HEAD my tag src1 ready tag/value src2 TAIL Reservation Stations FUs 1, exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 RF In RF tag value  - 54 76 650000 -99 R0 R1 R2 ROB R3 Entry Dest Result Exception Completed PC R2 650000 No  A 1 R3 - Yes B 2 667 C 3 R1 743 D 4 –689 E 5 R0 54 F 6 7 8 9 10 11 12 13 14 15 HEAD TAIL my tag src1 ready tag/value src2 Reservation Stations FUs ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University

Other animations Another good animation of reorder buffers is the one by John Kubiatowicz. See www.cs.ccu.edu.tw/~chen/arch/reorder-step.ppt or www.cs.uit.no/studier/kurs/d241/info/2002h/notes/Berkeley/ Kubiatowicz-2001f/files/lectures/lec19-memory.ppt. A higher-level visualization of the process is at http://www.ece.lsu.edu/koppel/see/ ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State University