Write in each answer sheet your name, signature, id-number, course name, and page nr/total nr of pages.
[18 p] Dependencies. Assume that RISC architecture ALU instructions have
three register operands and that the result is stored into the first
(left-most) register. The architecture is implemented in ordinary (not
superscalar) pipelined fashion so that, in best case, one instruction can be
completed in each cycle. The pipeline has 5 phases (instruction fetch, instruction decode, register read, ALU, write back).
Observe the following set of instructions generated by the compiler (instruction number on left):
1 Load R2, VarX ; Regs(2) <- Mem(VarX) 2 Add R5, R5, R2 ; Regs(5) <- Regs(5) + Regs(2) 3 Loop Move R2, R6 ; Regs(2) <- Regs(6) 4 Add R3, R3, R2 5 Add R2, R3, R5 6 Jnzer R3, Loop 7 Move R1, R2Many aspects in the preceding code segment may reduce the execution speed from the maximum possible.
Make all needed assumptions and write them down.