L11 DS PDF
L11 DS PDF
L11 DS PDF
CS422-Spring 2018
Biswa@CSE-IITK
How to Make CPI closer to One
• Let’s assume full pipelining:
– If we have a 4-cycle latency, then we need 3 instructions between a producing
instruction and its use:
multf $F0,$F2,$F4
delay-1
delay-2
delay-3
addf $F6,$F10,$F0 Earliest forwarding for
4-cycle instructions
CDC 6600 scoreboard would stall SUBD until ADDD reads operands
• Functional unit status:—Indicates the state of the functional unit (FU). 9 fields for each
functional unit
Busy: Indicates whether the unit is busy or not
Op: Operation to perform in the unit (e.g., + or –)
Fi: Destination register
Fj,Fk: Source-register numbers
Qj,Qk: Functional units producing source registers Fj, Fk
Rj,Rk: Flags indicating when Fj, Fk are ready
• Register result status—Indicates which functional unit will write each register, if one
exists. Blank when no pending instructions will write that register
Functional Units
Registers
FP Divide
FP Add
Integer
SCOREBOARD Memory
• No register renaming
• Need to have multiple instructions in execution phase => multiple execution units or
pipelined execution units
• Scoreboard keeps track of dependencies between instructions that have already issued
• Scoreboard replaces ID, EX, WB with 4 stages
DIVD issues. MULT and SUBD. Both waiting for F2. LD #2 writes F2.
CS422: Spring 2018 Biswabandan Panda, CSE@IITK 24
Cycle 8 (2nd Half)
Instruction status: Read Exec Write
Instruction j k Issue Oper Comp Result
LD F6 34+ R2 1 2 3 4
LD F2 45+ R3 5 6 7 8
MULTD F0 F2 F4 6
SUBD F8 F6 F2 7
DIVD F10 F0 F6 8
ADDD F6 F8 F2