15.1 Tomasulo’s

The following video illustrates Tomasulo’s OoO-Execution Algorithm very well:
https://www.youtube.com/watch?v=zS9ngvUQPNM

Tomasulo’s creates Reservation Stations which buffer instructions for the various arithmetic-subunits of the ALU, in order to increase the concurrency.

  • they gate the “traffic” to the functional units
    • the calculations are then actually done when all input values are ready
    • they set the tags they are waiting for

These tag the different values and then broadcast the result out to all subscribers, which saves a cycle of register access.

  • this happens over the common data bus

15.2 Hazards

There are multiple different types of dependencies between instructions:

  • Read after Write (RaW)
  • Write after Write (WaW)
  • Write after Read (WaR)

The only “true dependency” is a RaW dependency, as we actually need the “updated” value.
There are also architectural dependencies WaW and WaR. These can be fixed by renaming the registers accessed.

15.3 Tomasulo Addition (ROB, RAT)

15.3.1 Reorder Buffer (ROB)

The reorder buffer works by allowing out of order execution of statements, which then commit their results into memory in program order.

15.3.2 Register Alias Table (RAT)

The RAT allows us to reduce the duplication of values. Without it the ROB and register files would each store the value.

With the RAT as a global value store, we can ensure that each component only has a pointer to a value within the RAT.

The RAT eliminates RaW by the tag capture. Tags are handled in-order and only at dispatch.
Example Imagine the following program

I1:  MUL R1 <- R2, R2      -> RS tag A
I2:  ADD R1 <- R1, R3      -> RS tag B
I3:  ADD R1 <- R1, R4      -> RS tag C
I4:  MUL R5 <- R1, R1      -> RS tag D
  • I1 is dispatched RAT R1 has tag A.
  • I2 is dispatched. It has R1 as a dependency
    • reads the RAT replaces R1 by A
    • this creates a point-to-point link between Reservation station A and I2 source register
    • after this we can rename the R1 entry in the RAT again becomes B
  • I3 reads B as a dependency, etc…

This means that the RAT contains an in-order record of which RS gives out which value. Overwriting is fine.