170 likes | 249 Views
Pipelining (3). e1 e2 and e2 e1. More on Data Hazard. : happens before relation. Two events e1 and e2 are said to be concurrent if and only if. e1 e2 and e2 e1. Memory-based systems. if and only if. R e1 W e2 = Ø and
E N D
e1 e2 and e2 e1 More on Data Hazard : happens before relation Two events e1 and e2 are said to be concurrent if and only if
e1 e2 and e2 e1 Memory-based systems if and only if Re1 We2 = Ø and Re2 We1 = Ø and We1 We2 = Ø
Dynamic Scheduling: The Idea DIVD F0, F2, F4 ADDD F10, F0, F8 SUBD F12, F8, F14
CDC-6600 Solution (Scoreboard) EX FU1 ID IF Issue Read operands EX FU2 Write results EX FUn Structural hazard: delaying the issue WAW data hazard: delaying the issue RAW data hazard: wait until the values of the source registers are available in the registers WAR data hazard: delaying the write if a WAR hazard exists
Hardware Renaming of Registers physical registers logical (architecturally visible) registers 0 1 2 0 1 4 3 2 3 5 7 6 Code after renaming ADDF PF1, PF5, PF7 ADDF PF6, PF1, PF5 SUBF PF2, PF7, PF5 Original code ADDF F0, F1, F2 ADDF F3, F0, F1 SUBF F0, F2, F1
Ideal Model of Hardware Register Renaming • Data structures maintained for each physical register • Data structures maintained for each logical register available freeable count value(V) source FU(Q) current mapping
Approximation by IBM 360/91 Reservation Station • Data structures maintained for each physical register • Data structures maintained for each logical register value(V) source FU(Q) busy source FU(Q)
Reservation Station in IBM 360/91 busy function(Fm) Physical register 1 Physical register 2
Tomasulo Solution reservation station 1 EX FU1 reservation station 2 reservation station 3 IF Issue Write results reservation station 1 EX FUn reservation station 2 Structural hazard: delaying the issue until there is an empty reservation station RAW data hazard: wait at the reservation station until the values of the source registers are available