On the current exercise sheet, we need to fill out the state of a reservation station of size 5 after specific clock cycles (2, 5, 14, 16) for the given program code:
1 addi r1, r0, 5
2 muli r2, r1, 5
3 addi r3, r2, 1
4 add r4, r2, r2
5 div r5, r4, r3
According to the task, there's a decode, execution and writeback phase. Decode and writeback phase take 1 clock cycle each. The execution phase can be performed on two functional units (the first providing SUB and ADD in 2 clock cycles and the second one providing all ALU operations in 10 clock cycles).
For filling out the table we're not sure, whether the decode stage happens completely before any instruction is passed to the execution stage (i.e. the table is being filled completely within the 5 clock cycles) or wether the first instruction can be executed directly after it is written to the reservation station?