CSCE 614, Homework 4

Due at the beginning of class, April 7, 2020

Assume we have a MIPS machine that uses the speculative version of Tomasulo's algorithm. It can issue up to four instructions per clock cycle, but branches must always issue alone. You should make the following assumptions about the machine:

  1. There is one branch unit (BU) that does branch target address calculation and conditional evaluation in one cycle, and it has one reservation station (BR1)
  2. FP addition and subtraction execute in 3 cycles
  3. FP multiplication executes in 5 cycles
  4. FP division executes in 8 cycles, uses a floating point multiply unit, and is unpipelined
  5. Integer operations and effective address addition execute in 1 cycle
  6. Data can be accessed in the data cache in 1 cycle
  7. The FPUs are fully pipelined (except for division!), and there are 2 FP adders (FA1,FA2), 1 FP multiplier (FM1)
  8. There are two ALUs (A1,A2), which handle effective address calculation along with all other integer operations.
  9. There are 8 entries in the reorder buffer
  10. The Issue and Commit columns of the table can handle up to four instructions (each) per cycle
  11. The CDB can handle up to two instructions per clock cycle
  12. At most one instruction may be accessing the data cache in each clock cycle
  13. The remaining FUs all have two reservation stations are, named: FMUL[1,2], FAD[1,2], ALU[1,2], ST[1,2], LD[1,2]
Copy and fill in the following table indicating the cycles in which each instruction performs each step. Note that this table has been augmented to allow you to track the funtional unit, reservation station and ROB entry being used, which should ease your job of finding hazards. Notice that the FU/EX entry indicates what functional unit is performing computation for the instruction, and what cycles it begins on and ends on. Thus we see that the first instruction uses the first FM1 to perform the floating point multiply, and that the functional unit becomes busy at the beginning of cycle 2 and finishes at the end of cycle 6.
Tomasulo Worksheet
Instruction
Issue
ROB/ResStat
FU/EX
MEM
CDB
Commit
MUL.D F1,F2,F3
1
#1/FMUL1
FM1/2-6
--
7
8
L.D F2,8(R1)       
S.D F2,32(R2)       
LW R3,48(R1)       
L.D F3,0(R1)       
ADD.D F4,F3,F1       
DIV.D F5,F2,F11       
DADDIU R1,R1,#8       
LW R5,0(R2)       
BNE R1,R5,LAB1      
SUB.D F6,F1,F2       
MUL.D F7,F2,F6       
S.D F7,0(R8)       

Hint: This table is a hint to get you started:

Tomasulo Hint
Instruction
Issue
ROB/ResStat
FU/EX
MEM
CDB
Commit
MUL.D F1,F2,F3
1
#1/FMUL1
FM1/2-6
--
7
8
L.D F2,8(R1)
1
#2/LD1
A1/2-2
3
4
8
S.D F2,32(R2)
1
#3/ST1
A2/2-2
--
--
8
LW R3,48(R1)
1
#4/LD2
A1/3-3
4
5
8
L.D F3,0(R1)
5
#5/LD1
A1/6-6
7
8
9
ADD.D F4,F3,F1       
DIV.D F5,F2,F11       
DADDIU R1,R1,#8       
LW R5,0(R2)       
BNE R1,R5,LAB1      
SUB.D F6,F1,F2       
MUL.D F7,F2,F6       
S.D F7,0(R8)       

About the hint:

You may not work together on this assignment with other classmates or receive assistance from any person other than your professor. Use only your book and resources provided by your instructor as a resource for assistance. Do not use solutions you find on the Internet or from any other source.

Your assignment should be nicely typed or word-processed. Turn in this assignment before the beginning of class on the due date as a PDF file.

Late assignments will not be accepted.