Data Hazards
Data Hazards
UNIT-III
Dynamic Scheduling Using Tomasulo’s Approach
• Issue
– Get the instruction from the head of the instruction queue,
which is maintained in FIFO order.
– If there is a matching reservation station that is empty, issue
the instruction to the station with the operand values, if they
are currently in registers
– If there is not an empty reservation station, then there is a
structural hazard and the instruction stalls until a station or
buffer is freed. If the operands are not in the registers, keep
track of the functional units that will produce the operands
– REGISTERS RENAMED, WAR AND WAW HAZARDS
ELIMINATED
• (2) Execute
– If not all operands available, monitor the common data bus
while waiting for the instruction to be completed. When
operand becomes available, it is placed into the corresponding
reservation station.
– When all operands are available, operation can be executed at
the corresponding functional unit.
– Delaying execution until all operands available, RAW hazards
eliminated
– Several instructions could become ready in the same clock
cycle for the same functional unit – unit will have to choose
– For floating point unit reservation stations, choice can be
arbitrary (we are producing register results here)
RS[r].Busy ← no;