Tomasulo's Algorithm programmer's guide


Data structure for Tomasulo's algorithm


From above, we can understand the relationship between those data structure.
The file tomasulo.c contains all functions about DLXtomasulo(except interface part), I let write result stage be first, then execute stage. The last one is issue stage. The reason is we can make sure which stage is going to finish. It's easier to design a simulator using pipeline concept.

To see all data structures of this simulator, please check file dlx.h

The following situation can confuse people

                      TOMASULO's         5 th clock cycle
  Instruction         Issue          Execute       Write Result  
+============================================================================+
         ld f0,A(r1)    V               V               V 
      multf f4,f0,f2    V                                 
         sd A(r1),f4    V                                 
         ld f6,A(r1)    V                                 
     multf f10,f6,f0    V                                 
+============================================================================+

     Name   Busy     Op         Vj         Vk        Qj       Qk  
+=======================================================================+
    add1     NO    (null)                                           
    add2     NO    (null)                                           
    add3     NO    (null)                                           
    mul1     YES    multf     (load1)     (f2)                      
    mul2     YES    multf                 (f0)      load1           
+=======================================================================+

      F0      F2      F4      F6      F8      F10      F12     F14  
+----------------------------------------------------------------------+
Qi                   mul1    load1            mul2                   
Busy  NO      NO      YES     YES     NO      YES      NO      NO  
+======================================================================+
     F16     F18     F20     F22     F24     F26     F28     F30
+----------------------------------------------------------------------+
                                                                   
Busy  NO      NO      NO      NO      NO      NO      NO      NO  
+======================================================================+

Please notice that mult1's (load1) is different from mult2's load1.
(load1) is the result of ld f0,A(r1)
load1 is from instruction ld f6,A(r1)
I know it confuses people, but it doesn't affect the result (since mult1's got the value already).

There are more under construction

Last Updated: 1995.5.20