superscalar processors - bohr.wlu.ca superscalar processors.pdfpreserving the sequential consistency...

40
Superscalar Processors 1. Introduction 2. Parallel decoding 3. Superscalar instruction issue 4. Shelving 5. Register renaming 6. Parallel execution 7. Preserving the sequential consistency of instruction execution 8. Preserving the sequential consistency of exception processing 9. Case studies of superscalar processors

Upload: others

Post on 04-May-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Superscalar Processors

1. Introduction2. Parallel decoding3. Superscalar instruction issue4. Shelving5. Register renaming6. Parallel execution7. Preserving the sequential consistency of

instruction execution8. Preserving the sequential consistency of

exception processing9. Case studies of superscalar processors

Page 2: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Specific tasks of superscalar processing

Preserving sequential consistencyof exceptionprocessing

Preservingsequential

consistencyof execution

Parallelinstructionexecution

Superscalarinstruction

issue

Paralleldecoding

Specific tasks of superscalar processing

Page 3: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Parallel Decoding

Scalar (pipelined)

Superscalar

Page 4: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Specific tasks of superscalar processing

Preserving sequential consistencyof exceptionprocessing

Preservingsequential

consistencyof execution

Parallelinstructionexecution

6432

Issuerate

Issuepolicy

Superscalarinstruction

issue

Paralleldecoding

Specific tasks of superscalar processing

How and when to send the instruction(s) to EU(s)

Page 5: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Design Space: Issue Policy

Unalignedissue

Alignedissue

Alignment of

instruction issue

Out-of-orderissue

In-orderissue

Preserveissueorder

Handling of issue

blockages

Shelved issue

Blocking issue

Use of shelving

Speculativebranch

processing

Waiting for

resolution

Unresolved control

dependency

Registerrenaming

No extraprovision

False data

dependency

Issue policy

Page 6: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Design Space: Register Renaming

presumes three-operand format

Renamerate

Dispatch bound

operand fetch

Renamebound

Operandfetchpolicy

Accessmechanism

NumberType

Layoutof the

rename buffers

Fullrenaming

Partial renaming

Scope of register

renaming

Register renaming

Page 7: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Scope of RegisterRenaming

Page 8: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Type of Rename Buffers

ROB = Reorder Buffer

DRIS =

Deferred scheduling,

Register renaming,

Instruction Shelf

Page 9: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Numberof Rename Buffers

Page 10: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Rename Buffers: Access Mechanism

Page 11: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Basic Implementation Alternatives

Rename

Renaming implementation alternatives

Page 12: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Design Space: Issue Policy

Unalignedissue

Alignedissue

Alignment of

instruction issue

Out-of-orderissue

In-orderissue

Preserveissueorder

Handling of issue

blockages

Shelved issue

Blocking issue

Use of shelving

Speculativebranch

processing

Waiting for

resolution

Unresolved control

dependency

Registerrenaming

No extraprovision

False data

dependency

Issue policy

Page 13: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Branch Prediction

Static prediction

conditional jump would not be taken

backward branches will be taken, and forward-pointing branches will not be taken

Dynamic prediction

-> requires h/w to maintain history

2 bit saturating counter (good for loops)

2-level adaptive predictor (good for recurring patterns)

Predication (if structures)

-> change the control dependency to a data dependency

Page 14: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Design Space: Shelving

Treatmentof an

emptyreservation

station

Schemefor

checkingavailability

of operands

Dispatchrate

Dispatch policy

Instructiondispatchscheme

Dispatchboundfetch

Issueboundfetch

Operand fetchpolicy

Number of read

and writeports

Number of

shelvingbufferentries

Combined:shelving,

renaming,reordering

(ROB, DRIS)

Standalone

(Reservationstations)

Type

Layout

Fullshelving

Partialshelving

Scope of shelving

Shelving

Page 15: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Principle of Shelving

Page 16: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Scope of Shelving

Page 17: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Type of Shelving Buffer

Type of shelving buffer

standalone(reservation station)

combined:shelving, renaming,reordering

DRIS (deferred scheduling,register renaming,instruction shelf)

individual RS group RS central RS

RS RSRS RS…

EU EU EU EU EU EU EU

Power 1AM2900

Power 2R1000Sparc64

Pentium Pro

Page 18: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Number of shelving buffer entries

Page 19: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

OperandFetch Policy

Page 20: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Operand Fetch during Instruction Issue

Page 21: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Operand Fetch during Instruction Dispatch

Page 22: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Operand Fetch duringInstruction Issue

Page 23: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Operand Fetch duringInstruction Dispatch

Page 24: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Basic Implementation Alternatives

Rename

Renaming implementation alternatives

Page 25: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Most frequently used combinations

Page 26: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Instruction Dispatch

Page 27: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Checking availability of operands

Page 28: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Checking availability of operands

dispatch

issue

Page 29: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Design Space: Issue Policy

Unalignedissue

Alignedissue

Alignment of

instruction issue

Out-of-orderissue

In-orderissue

Preserveissueorder

Handling of issue

blockages

Shelved issue

Blocking issue

Use of shelving

Speculativebranch

processing

Waiting for

resolution

Unresolved control

dependency

Registerrenaming

No extraprovision

False data

dependency

Issue policy

Page 30: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Issue order of instructions

Page 31: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Alignment of Instruction Issue

* example assumes “in order” issue

Page 32: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Alignment of

Instruction Issue

Page 33: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Specific tasks of superscalar processing

Preserving sequential consistencyof exceptionprocessing

Preservingsequential

consistencyof execution

Parallelinstructionexecution

6432

Issuerate

Issuepolicy

Superscalarinstruction

issue

Paralleldecoding

Specific tasks of superscalar processing

Page 34: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Parallel Execution Executing several instructions in parallel

instructions will generally finish in out-of-program order

to finish operation of the instruction is accomplished,

except for writing back the result into the architectural register or memory location specified, and/or updating the status bits

to completewrite back the results

to retire (ROB)write back the results, and delete the completed instruction from the last

ROB entry

Page 35: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Preserving Sequential Consistency of Instruction Execution

For multiple EUs operating in parallel, the overall instruction execution should mimic sequential execution

the order in which instructions are completed

the order in which memory is accessed

Page 36: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,
Page 37: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Preserving the Sequential Consistency of Exception Processing

When instructions are executed in parallel, interrupt requests, which are caused by exceptions

arising from instruction execution, are also generated out of order.

If the requests are acted upon immediately, the requests are handled in different order than in a

sequential operation processor and you have imprecise interrupts

Precise interrupts: handling the interrupts is consistent with the state of a sequential processor

Page 38: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,

Sequential Consistency of Exception Processing

Page 39: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,
Page 40: Superscalar Processors - bohr.wlu.ca Superscalar Processors.pdfPreserving the Sequential Consistency of Exception Processing When instructions are executed in parallel, interrupt requests,