Docsity

Dynamic Scheduling Using Tomasulo's Approach | CS 4504, Study notes of Computer Architecture and Organization

Toggle sidebar
bg1
Dynamic Scheduling Using Tomasulo’s
Approach
•A big picture
–Focus on FP and load/store, can be easily extended (for example,
integer, branch, etc)
–4 Steps: Fetch, Issue, Execute, Write Result
•Each steps can take more than one cycles
–Reservation stations
•Associated with functional units
•Hold issued instructions awaiting executions at that unit
•Provide the values for the insts or the name of other reservations stations
that will provide the values
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d

Partial preview of the text

Download Dynamic Scheduling Using Tomasulo's Approach | CS 4504 and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Dynamic Scheduling Using Tomasulo’s

Approach

  • A big picture
    • Focus on FP and load/store, can be easily extended (for example,

integer, branch, etc)

  • 4 Steps: Fetch, Issue, Execute, Write Result
    • Each steps can take more than one cycles
  • Reservation stations
    • Associated with functional units
    • Hold issued instructions awaiting executions at that unit
    • Provide the values for the insts or the name of other reservations stations

that will provide the values

The Basic Structure

How the instruction goes through (Cont’d)

  • Execute
    • Monitoring the common data bus (CDB) for the operands
    • Placing the available value in the reservation station
    • Executing inst when the operands are available

How the instruction goes through (Cont’d)

  • Write result
    • Write the result on the CDB and into the registers or reservation

stations

  • Store the data into memory

Register Field

• Qi: which reservation station has the operations whose result

should be stored into this register

Example

L.D F6, 34(R2)

L.D F2, 45(R3)

Mul.D F0, F2, F

Sub.D F8, F2, F

Div.D F10, F0, F

Add.D F6, F8, F

Assume Execution Cycles: load 2 cycle, add 3 cycles, mul 11 cycles, div 41

cycles

Assume Execution Cycles: load 2 cycle, add 3 cycles, mul 11 cycles, div 41 cycles

Instruction status: Exec Write

Instruction j k Issue^ Comp Result^ Busy^ Address

LD F6 34+ R2 1 Load1 Yes 34+R LD F2 45+ R3 Load2 No MULTD F0 F2 F4 Load3 No SUBD F8 F6 F DIVD F10 F0 F ADDD F6 F8 F

Reservation Stations: S1 S2 RS RS

Time Name Busy^ Op^ Vj^ Vk^ Qj^ Qk

Add1 No Add2 No Add3 No Mult1 No Mult2 No

Register result status:

Clock F0 F2 F4 F6 F8 F10 F12 ... F

1 FU Load

Load=2 Add=3 Mult=11 Div=

Instruction status: Exec Write

Instruction j k Issue^ Comp Result^ Busy^ Address

LD F6 34+ R2 1 Load1 Yes 34+R LD F2 45+ R3 2 Load2 Yes 45+R MULTD F0 F2 F4 Load3 No SUBD F8 F6 F DIVD F10 F0 F ADDD F6 F8 F

Reservation Stations: S1 S2 RS RS

Time Name Busy^ Op^ Vj^ Vk^ Qj^ Qk

Add1 No Add2 No Add3 No Mult1 No Mult2 No

Register result status:

Clock F0 F2 F4 F6 F8 F10 F12 ... F

2 FU Load2 Load

Load=2 Add=3 Mult=11 Div=

Instruction status: Exec Write

Instruction j k Issue^ Comp Result^ Busy^ Address

LD F6 34+ R2 1 3 4 Load1 No LD F2 45+ R3 2 4 Load2 Yes 45+R MULTD F0 F2 F4 3 Load3 No SUBD F8 F6 F2 4 DIVD F10 F0 F ADDD F6 F8 F

Reservation Stations: S1 S2 RS RS

Time Name Busy^ Op^ Vj^ Vk^ Qj^ Qk

Add1 Yes SUBD M(A1) Load Add2 No Add3 No Mult1 Yes MULTD R(F4) Load Mult2 No

Register result status:

Clock F0 F2 F4 F6 F8 F10 F12 ... F

4 FU Mult1 Load2 M(A1) Add

Load=2 Add=3 Mult=11 Div=

Instruction status: Exec Write

Instruction j k Issue^ Comp Result^ Busy^ Address

LD F6 34+ R2 1 3 4 Load1 No LD F2 45+ R3 2 4 5 Load2 No MULTD F0 F2 F4 3 Load3 No SUBD F8 F6 F2 4 DIVD F10 F0 F6 5 ADDD F6 F8 F

Reservation Stations: S1 S2 RS RS

Time Name Busy^ Op^ Vj^ Vk^ Qj^ Qk

2 Add1 Yes SUBD M(A1) M(A2) Add2 No Add3 No 10 Mult1 Yes MULTD M(A2) R(F4) Mult2 Yes DIVD M(A1) Mult

Register result status:

Clock F0 F2 F4 F6 F8 F10 F12 ... F

5 FU Mult1 M(A2) M(A1) Add1 Mult

Load=2 Add=3 Mult=11 Div=

Instruction status: Exec Write

Instruction j k Issue^ Comp Result^ Busy^ Address

LD F6 34+ R2 1 3 4 Load1 No LD F2 45+ R3 2 4 5 Load2 No MULTD F0 F2 F4 3 Load3 No SUBD F8 F6 F2 4 7 DIVD F10 F0 F6 5 ADDD F6 F8 F2 6

Reservation Stations: S1 S2 RS RS

Time Name Busy^ Op^ Vj^ Vk^ Qj^ Qk

0 Add1 Yes SUBD M(A1) M(A2) Add2 Yes ADDD M(A2) Add Add3 No 8 Mult1 Yes MULTD M(A2) R(F4) Mult2 Yes DIVD M(A1) Mult

Register result status:

Clock F0 F2 F4 F6 F8 F10 F12 ... F

7 FU Mult1 M(A2) Add2 Add1 Mult

Load=2 Add=3 Mult=11 Div=

Instruction status: Exec Write

Instruction j k Issue^ Comp Result^ Busy^ Address

LD F6 34+ R2 1 3 4 Load1 No LD F2 45+ R3 2 4 5 Load2 No MULTD F0 F2 F4 3 Load3 No SUBD F8 F6 F2 4 7 8 DIVD F10 F0 F6 5 ADDD F6 F8 F2 6

Reservation Stations: S1 S2 RS RS

Time Name Busy^ Op^ Vj^ Vk^ Qj^ Qk

Add1 No 2 Add2 Yes ADDD (M-M) M(A2) Add3 No 7 Mult1 Yes MULTD M(A2) R(F4) Mult2 Yes DIVD M(A1) Mult

Register result status:

Clock F0 F2 F4 F6 F8 F10 F12 ... F

8 FU Mult1 M(A2) Add2 (M-M) Mult

Load=2 Add=3 Mult=11 Div=

Instruction status: Exec Write

Instruction j k Issue^ Comp Result^ Busy^ Address

LD F6 34+ R2 1 3 4 Load1 No LD F2 45+ R3 2 4 5 Load2 No MULTD F0 F2 F4 3 Load3 No SUBD F8 F6 F2 4 7 8 DIVD F10 F0 F6 5 ADDD F6 F8 F2 6 10

Reservation Stations: S1 S2 RS RS

Time Name Busy^ Op^ Vj^ Vk^ Qj^ Qk

Add1 No 0 Add2 Yes ADDD (M-M) M(A2) Add3 No 5 Mult1 Yes MULTD M(A2) R(F4) Mult2 Yes DIVD M(A1) Mult

Register result status:

Clock F0 F2 F4 F6 F8 F10 F12 ... F

10 FU Mult1 M(A2) Add2 (M-M) Mult

Load=2 Add=3 Mult=11 Div=

Instruction status: Exec Write

Instruction j k Issue^ Comp Result^ Busy^ Address

LD F6 34+ R2 1 3 4 Load1 No LD F2 45+ R3 2 4 5 Load2 No MULTD F0 F2 F4 3 Load3 No SUBD F8 F6 F2 4 7 8 DIVD F10 F0 F6 5 ADDD F6 F8 F2 6 10 11

Reservation Stations: S1 S2 RS RS

Time Name Busy^ Op^ Vj^ Vk^ Qj^ Qk

Add1 No Add2 No Add3 No 4 Mult1 Yes MULTD M(A2) R(F4) Mult2 Yes DIVD M(A1) Mult

Register result status:

Clock F0 F2 F4 F6 F8 F10 F12 ... F

11 FU Mult1 M(A2) (M-M+M)(M-M) Mult

Load=2 Add=3 Mult=11 Div=