There will be a quiz in this recitation.
It will be a closed book exam. You may not use a computer.
The quiz will consist of three questions and each problem is worth 3 points:
- 1 point for turning in the paper
- 2 points for getting it partially correct
- 3 points for getting it completely correct
The quiz this week will cover identifying dependencies.
You will be given a code segment and asked to list all data dependencies, all antidependencies, and all output dependencies.
After turning in the quiz, start on the problems below.
- Fill in the following table to illustrate how Tomasulo's algorithm works.
Assume the following:
- There are sufficient reservation stations.
- There is only one functional unit that does both floating point add and subtract.
- There is only one functional unit that does multiply and divide.
- Execution times are as follow: load: 1, fadd: 2, fsub: 2, fmul:5, fdiv: 10
- The L.D execution is the address calculation that uses dedicated hardware that can do the calculation in one cycle.
- Floating point units (fadd and fmul) are busy during execution and can be reused the cycle after execution completes.
This is different from the assumption we made in lecture.
- If two reservation stations are both ready and competing for the same functional unit, the one that
issued first has priority.
Instruction | Reservation Station | Execution Unit |
Issue Cycle | Ex Start Cycle | Ex End Cycle |
Memory Cycle | CDB cycle | Write dest |
L.D | F2,8(R1) | | | | | | | | |
ADD.D | F4,F2,F2 | | | | | | | | |
SUB.D | F6,F8,F8 | | | | | | | | |
MUL.D | F10,F4,F2 | | | | | | | | |
ADD.D | F12,F2,F6 | | | | | | | | |
SUB.D | F14,F6,F8 | | | | | | | | |
- Redo problem 1 assuming that there are 2 functional units that can add and subtract.
- Redo problem 1 assuming that there is only one function unit for floating point and it does add, subtract,
multiply, and divide.
- Redo problem 1 assuming that the first instruction has a cache miss and stalls for 6 cycles before accessing memory.