Page 192 - A Practical Guide from Design Planning to Manufacturing
P. 192
Microarchitecture 165
information includes an operation, in this case an add instruction and
architectural registers for two sources and destination.
Register rename
At the register rename step the register alias table (RAT) is read to
determine which physical registers hold the uops source data and which
will be used to store its result. There are actually two RAT tables. One
is a speculative table containing the most recent mappings. The other
is the retirement RAT, which ignores the mappings of any uops that have
not yet retired. If uops that have been speculatively executed need to
be discarded, this is accomplished by returning to the known good values
in the retirement RAT.
Our example uop now has physical registers for its sources and des-
tination and these mappings are held in the speculative RAT, as shown
in Fig. 5-20.
Load instruction queue
Uops are then loaded into one of two instruction queues. The memory
queue holds loads and stores and the general queue holds all other uops.
The order of uops is maintained within each queue, but there is no
ordering enforced between the queues. If progress on memory operations
is slowed by cache misses, a separate queue allows other instructions
to continue to make progress. Uops stay in the queue waiting their turn
until there is space in a scheduler.
Schedule and dispatch
When the oldest uop is read from the memory queue, it is loaded into
the memory scheduler. Uops read from the general queue are fed into
three other schedulers, depending upon their instruction type. In every
cycle, each scheduler compares the source registers of its uops with a
scoreboard showing which registers will soon have valid data. The
schedulers then dispatch for execution the oldest uops whose sources are
Microinstruction Reorder buffer Speculative RAT Retirement RAT
Uop: Add CX, BX, AX Entry Ready Arch Physical Arch Physical Arch Physical
to retire reg reg reg reg reg reg
ROB entry: 2
Oldest 1 No AX R1 AX R1 AX R8
Phys regs: R3, R2, R1
2 No CX R3 BX R2 BX R12
CX R3 CX R15
Figure 5-20 Uop at rename.