The Tomasulo algorithm is really not tied to any particular equipment, and in fact, on real machines, register renaming usually happens before instructions are inserted into the command queue. Let me get a couple of highlights. First, the registers expressed in your program are logical registers. Secondly, real hardware registers are called physical registers. The Tomasulo algorithm is just a mechanism for mapping logical registers to physical registers. In real machines, there are usually two tables displaying logical registers for physical registers. One at the rename stage and one at the commit stage. There should also be more physical registers than logical ones. It works essentially like this:
- For each logical input, find the renaming calendar mapping table to find out which physical register currently has this logical register value.
- For each logical output, find the unused physical register and map it to it. Refresh the renaming scene display table. If the physical register is not available, wait until it becomes available.
- At the fixing stage, when the command is completed, rewrite the old logical ones into physical mappings of the logical outputs of the command with new mappings. Free physical registers that were part of old mappings.
- If there is an incorrect prediction in the pipeline (or any kind of squash), the table at the fixing stage overwrites the table at the renaming stage and everything in the intermediate pipeline is reset.
The part about booking stations is really a concrete implementation of a non-standard conveyor and, in essence, comes with a physical register. There are many cars that do not really have a concept of a booking station.
Hennessy and Patterson's books on computer architecture are a standard textbook on similar materials. I tried to explain this as simply as possible, but there are literally thousands of suggestions for optimizing this material.
source share