Dynamic
Scheduling Using Tomasulo’s Approach :
Tomasulo's
algorithm implements register renaming through the use of what are called reservation
stations. Reservation stations are buffers which fetch and store
instruction operands as soon as they are available
In
addition, pending instructions designate the reservation station that will
provide their input. Finally, when successive writes to a register overlap in
execution, only the last one is actually used to update the register. As
instructions are issued, the register specifies for pending operands are
renamed to the names of the reservation station, which provides register
renaming.
the
basic structure of a Tomasulo-based MIPS processor, including both the
floating-point unit and the load/store unit.
Instructions
are sent from the instruction unit into the instruction queue from which they
are issued in FIFO order.
The
reservation stations include the operation and the actual operands, as well as
information used for detecting and resolving hazards. Load buffers have three
functions: hold the components of the effective address until it is computed,
track outstanding loads that are waiting on the memory, and hold the results of
completed loads that are waiting for the CDB.
Similarly,
store buffers have three functions: hold the components of the effective addr
ess until it is computed, hold the destination memory addresses of outstanding
stores that are waiting for the data value to store, and hold the address and
value to store until the memory unit is available.
All
results from either the FP units or the load unit are put on the CDB, which
goes to the FP register file as well as to the reservation stations and store
buffers. The FP adders implement addition and subtraction, and the FP
multipliers do multiplication and division.
There
are only three steps in Tomasulo’s Aprroach :
1.
Issue—Get the next instruction from the head of the instruction queue.
If there is a matching reservation station that is empty, issue the instruction
to the station with the operand values (renames registers)
2.
Execute(EX)— When all the operands are available, place into the
corresponding
reservation
stations for execution. If operands are not yet available, monitor the common
data bus (CDB) while waiting for it to be computed.
3.
Write result (WB)—When the result is available, write it on the CDB and
from there into the registers and into any reservation stations (including
store buffers) waiting for this result. Stores also write data to memory during
this step: When both the address and data value are available, they are sent to
the memory unit and the store completes.
Each
reservation station has six fields:
•
Op—The operation to perform on source operands S1 and S2.
•
Qj, Qk—The reservation stations that will produce the corresponding source
operand; a value of zero indicates that the source operand is already available
in Vj or Vk, or is unnecessary.
•
Vj, Vk—The value of the source operands. Note that only one of the V field or
the Q field is valid for each operand. For loads, the Vk field is used to the
offset from the instruction.
•
A–used to hold information for the memory address calculation for a load or
store.
•
Busy—Indicates that this reservation station and its accompanying functional unit
are occupied.
No comments:
Post a Comment