
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

due: March 3, 2009
Loop: LD R1, 0(R2) DADDI R1, R1, # SD 0(R2), R DADDI R2, R2, # DSUB R4, R3, R BNEZ R4, Loop
Assume that the initial value of R3 is R2 + 396. Assume that a memory location contains 2B. 25 pts. a. Show the timing of this instruction sequence for the MIPS64 pipeline without any forwarding or bypassing hardware but assuming a register read and a write in the same clock cycle. Assume that the branch is handled by flushing the pipeline and that the branch is resolved in the stage MEM. How many clock cycles does this loop take to execute? 25 pts. b. Show the timing of this instruction sequence with normal forwarding and bypassing hardware. Assume that the branch is handled by predicting it as not taken and that the branch is resolved in the stage ID. How many clock cycles does this loop take to execute? 25 pts. c. Show the timing of this instruction sequence with normal forwarding and bypassing hardware. Assume a single instruction delayed branch and that the branch is resolved in the stage ID. Reschedule the instructions to increase efficiency. You may modify the individual instruction operands. How many clock cycles does this loop take to execute?
25 pts. 2. Suppose the control instruction frequencies (as percentages of all instructions) are as follows: branches 15% jumps and calls 1% Assume that 60% branches are taken. Assume four-deep pipeline where the branch is resolved at the end of the second stage for jumps and calls and at the end of the third stage for branches. Assuming that only the first pipeline stage can always be done independently of whether the branch is taken or not and ignoring other pipeline stalls, how much faster would the machine be without any control instruction hazards?
Show your work.