330 likes | 838 Views
Tomasulo Algorithm. Each functional unit has a reservation station The issue stage assigns an instruction to a free reservation station. It takes over the control of the execution. It stores the operands. The results are directly forwarded to other functional units that require the data.
E N D
Tomasulo Algorithm • Each functional unit has a reservation station • The issue stage assigns an instruction to a free reservation station. • It takes over the control of the execution. • It stores the operands. • The results are directly forwarded to other functional units that require the data. • For this purpose the result bus is used.
Tomasulo Algorithm • The reservation stations do an implicit register renaming and remove WAR and WAW hazards. • Phases • Issue: • Select free reservation station. • Copy available operands from registers into the reservation station or store the reservation station that generates a required operand (resolving RAW and WAR hazards) • Store in the register which reservation station generates the next value (handling of WAW hazards)
Tomasulo Algorithm • Phases (contd) • Execute • If operands are missing, wait. • Insert new operands in the reservation station. • If all operands are available, start operation. • Write result • As soon as the result is available, it is broadcast fo the result bus (common data bus) • The target register and the other reservations take the result from the bus.
Reservation table • Reservation station are stored in the reservation table.
Tomasulo Algorithm: Register • Each register stores besides the data • The valid bit, it indicates whether the value is valid or is currently computed. • Number of the reservation station of the operation that computes the new value.
Beispiel Tomasulo-Algorithmus Remaining cylces in FU
Beispiel Tomasulo-Algorithmus Source operands are filled in RS2
Tomasulo-Algorithmus Fazit • Implicit register renaming • Direct propagation of results • RAW and WAR are resolved via reservation stations. • WAW hazards are resolved since last write is always taken. • Simple scheme does not support speculative execution.