Out- -of of- -Order Order Out Superscalar CPU Superscalar CPU - - PowerPoint PPT Presentation

out of of order order out superscalar cpu superscalar cpu
SMART_READER_LITE
LIVE PREVIEW

Out- -of of- -Order Order Out Superscalar CPU Superscalar CPU - - PowerPoint PPT Presentation

Out- -of of- -Order Order Out Superscalar CPU Superscalar CPU Cliff Frey and Vicky Liu May 6 th , 2005 May 6 th , 2005 6.884 Final Project Presentation The Basis of Our Design Tomasulos Algorithm - Allows out-of-order execution -


slide-1
SLIDE 1

Out Out-

  • of
  • f-
  • Order

Order Superscalar CPU Superscalar CPU

May 6th, 2005

Cliff Frey and Vicky Liu

6.884 Final Project Presentation May 6th, 2005

slide-2
SLIDE 2

6.884 Final Project Presentation May 6th, 2005

The Basis of Our Design

  • Allows out-of-order execution
  • Instructions wait in Reservation Stations
  • Execute instructions once operands have been computed
  • Can reorder WAW and WAR

Tomasulo’s Algorithm

slide-3
SLIDE 3

6.884 Final Project Presentation May 6th, 2005

The Basis of Our Design

  • In Decode stage, each instruction result is assigned a Tag
  • Each register maps to a Value or to a Tag
  • When a result is computed, result and tag are broadcast
  • All instances of the Tag are updated with the computed value
  • Updates RegFile and Reservation Stations

Tomasulo’s Algorithm

slide-4
SLIDE 4

6.884 Final Project Presentation May 6th, 2005

High Level Design

Fetch Unit Decode Renaming Register File

The major components

Reservation Stations Functional Units Common Data Bus

slide-5
SLIDE 5

6.884 Final Project Presentation May 6th, 2005

High Level Design

Fetch Decode Execute Write Back (CDB)

slide-6
SLIDE 6

6.884 Final Project Presentation May 6th, 2005

BlueSpec Rule & Module Design

slide-7
SLIDE 7

6.884 Final Project Presentation May 6th, 2005

  • Unresolved branches stall decode stage
  • Memory operations need to be in order
  • Back to back dependent adds take 2 cycles

High Level Design Issues

slide-8
SLIDE 8

6.884 Final Project Presentation May 6th, 2005

Design Exploration: Supporting Precise Exceptions

  • Register File contents can be lost
  • external changes need to ordered

Short-comings of Tomasulo’s algorithm

slide-9
SLIDE 9

6.884 Final Project Presentation May 6th, 2005

Design Exploration: Supporting Precise Exceptions

… instructions before the excepting instruction, execute normally … instructions after and including the excepting instruction do not change any programmer visible state

  • f the processor

A Processor Supports Precise Exceptions If…

slide-10
SLIDE 10

6.884 Final Project Presentation May 6th, 2005

Design Exploration: Supporting Precise Exceptions

… instructions before the excepting instruction, execute normally … instructions after and including the excepting instruction do not change any programmer visible state

  • f the processor

A Processor Supports Precise Exceptions If…

  • Register File contents can be lost
  • external changes need to ordered

Short-comings of Tomasulo’s algorithm

slide-11
SLIDE 11

6.884 Final Project Presentation May 6th, 2005

Original High Level Design

slide-12
SLIDE 12

6.884 Final Project Presentation May 6th, 2005

Updated High Level Design

Our Solution

  • Minimal changes to original design
  • Reorder Buffer (ROB) and Commit stage
  • Architectural Register File
  • External changes made at commit time
slide-13
SLIDE 13

6.884 Final Project Presentation May 6th, 2005

Updated High Level Design

slide-14
SLIDE 14

6.884 Final Project Presentation May 6th, 2005

Handling Exceptions

ROB Undo

Set PC to interrupt vector (0x1100) Exception PC stored in coprocessor register EPC Correct speculative results in Rename Register File Clear cached information in Functional Units

slide-15
SLIDE 15

6.884 Final Project Presentation May 6th, 2005

Other Features to Get High Performance

  • Speculative fetch
  • external changes need to ordered
  • memory unit can handle many requests at a time

Implemented Features Unimplemented Features

  • Branch prediction and target buffering
  • Speculative execution
slide-16
SLIDE 16

6.884 Final Project Presentation May 6th, 2005

A Closer Look at the Load/Store Unit

result.get()

Mem

slide-17
SLIDE 17

6.884 Final Project Presentation May 6th, 2005

BlueSpec Stories: Conflicting Rules

slide-18
SLIDE 18

BlueSpec Stories: The Fix

Possible Solutions

  • One rule for every possible data path

6.884 Final Project Presentation May 6th, 2005

  • Use config regs everywhere
  • Be slow and blame BlueSpec =P
slide-19
SLIDE 19

BlueSpec Stories: The Fix

Possible Solutions Our Solutions

  • Homemade completion buffer
  • Make methods write to RWires
  • Write “magic” rule to handle all combination of cases

6.884 Final Project Presentation May 6th, 2005

  • One rule for every possible data path
  • Use config regs everywhere
  • Be slow and blame BlueSpec =P
slide-20
SLIDE 20

Bypassing from writeback to decode

6.884 Final Project Presentation May 6th, 2005

slide-21
SLIDE 21

6.884 Final Project Presentation May 6th, 2005

An Excerpt from our Trace Output

Back to back, nondependent adds

Fetch Decode Execute Writeback Commit F | [ ] -

  • |

F |00001000=0 ADD [ ] -

  • |

F |00001004=1 ADD [ 0] -

  • |

F |00001008=2 ADD [ 1] A-0 -00000001 | |0000100c=3 ADD [ 2] A-1 -00000001 | 0 | [ 3] A-2 -00000002 | 1 | [ ] A-3 -00000002 | 2 | [ ] -

  • | 3
slide-22
SLIDE 22

6.884 Final Project Presentation May 6th, 2005

An Excerpt from our Trace Output

Decode add mem BR WB commit 001398 LW r1, r10 [ |M | ] | 00139c ADDI r2, r2, -4 [ |M LW | ] | 0013a0 SLT r1, r11, r1 [ADDI |M | ] | 0013a4 BEQZ r1, 0x13d8 [ |M | ]ADDI | 0013a8 SUBI r3, r12, -1 [ |M LW| ] | [SUBI |M | ]LW | [SLT |M | ]SUBI |LW [ |M | ]SLT |ADDI [ |M |BEQZ] |SLT [ |M | ]BEQZ | [ |M | ] |BEQZ *taken! [ |M | ] |SUBI

Instruction stream with reordering

slide-23
SLIDE 23

6.884 Final Project Presentation May 6th, 2005

Synthesis Results

Clock speed = 4ns Area = .38 mm2

slide-24
SLIDE 24

6.884 Final Project Presentation May 6th, 2005

Design Choices and Performance

Configurable Parameters

Resizing reservation stations Number of slots in ROB and the Fetch Unit buffer Different functional unit setup Easily support multicycle functional units

slide-25
SLIDE 25

6.884 Final Project Presentation May 6th, 2005

Design Choices and Performance

Resizing reservation stations Number of slots in ROB and the Fetch Unit buffer Different functional unit setup Easily support multicycle functional units

Configurable Parameters

Branches and stores really hurt performance Achieved IPC ≈ .5 on vector-add and quicksort

Performance