CS203A Course Project : A Tomasulo Algorithm Simulation Sketch

Hand out date: Nov 4, 2004

Due date: Dec 14-15, 2004


In this project, you will need to implement the Tomasulo algorithm for an out-of-order execution pipeline architecture. It is preferred that you write this project in C or C++. You should find one or two partner(s) to form a group of two or three. Please document your source code as you develop it. On the due day, you will demonstrate your project to me on a linux machine such as eon.cs.ucr.edu.

You will implement the following 4 stages: IF, Issue, Execute, and Writeback. The tasks performed in each stage were explained in class. You can refer to the detailed actions taken for bookkeeping from the textbook (Figure 3.5 on page 193). Those will help you greatly in coding the dynamic scheduler. You will implement only the FP pipeline. We will consider the following FUs:

The hardware configuration should be fully parameterizable, i.e., the number of reservation stations for each FU, and the number of execution cycles for each FU should all be the inputs to your simulator. You will need to simulate a "memory" which could be as simple as a data array. I'll leave the implementation details to you as long as you have your own way of initializing the memory and printing it out finally. During the demo, I will let you initialize your own memory at the addresses and values I defined. Your simulator should be able to read and write to your own memory correctly.

The input to your simulator is a text file containing assembly instructions specified in the above format. Read the input file and proceed your simulation with reading the file line by line as if you are fetching binary instructions from an instruction memory. The ID stage is also simplified to parsing the assembly instruction as opposed to decoding the binary.

Other inputs are: FU execution cycles as well as their allocated reservation station numbers. I will leave it to you on how to define the input format.

The output from your program should contain messages about the final instruction status table including the cycle information in each stage. It is possible that during the demo, I ask you to print out the status of the reservation status table and register result status table at any cycle.

The program execution results should be reflected in the integer register file, floating point register file, and the memory. You should provide clear output information of those.