Question

Reschedule (i.e., re-order) the instructions within the loop to improve performance. The loop must still produce...

Reschedule (i.e., re-order) the instructions within the loop to improve performance. The loop must still produce the same results. Show timing of this MIPS instruction sequence through the pipeline, for two iterations of the loop. Show all stalls clearly, and mark with arrows all cases where forwarding takes place, as in our lectures.

loop: lw $t0, 0($s0)

lw $t1, 4($s0)

add $t0, $t1, $t0

sw $t0, 0($s1)

addi $s0, $s0, 8

addi $s1, $s1, 4

bne $s0, $s5, loop

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Reschedule (i.e., re-order) the instructions within the loop to improve performance. The loop must still produce...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Given the following instruction sequence for the MIPS processor with the standard 5 stage pipeline $10, S0. 4 addi lw S2.0(S10) add sw S2,4(510) $2, $2, $2 Show the data dependences between th...

    1. Given the following instruction sequence for the MIPS processor with the standard 5 stage pipeline $10, S0. 4 addi lw S2.0(S10) add sw S2,4(510) $2, $2, $2 Show the data dependences between the instructions above by drawing arrows between dependent instructions (only show true/data dependencies). a. Assuming forwarding support, in what cycle would the store instruction write back to memory? Show the cycle by cycle execution of the instructions as they execute in the pipeline. Also, show any stalls...

  • 4) Consider the following assembly language code: INSTRUCTIONS T01 T02 T03 T04 T05 T06 T07 T08...

    4) Consider the following assembly language code: INSTRUCTIONS T01 T02 T03 T04 T05 T06 T07 T08 T09 T10 T11 T12 T13 T14 (as a table) Loop: sll $t1, $s3, 2 add $t1, $t1, $s6 lw $t0, 0($t1) beq $t0, $s5, Exit addi $s3, $s3, 1 j Loop Exit: Use a pipeline with forwarding, hazard detection, and 1 delay slot for branches. The pipeline is the typical 5-stage IF, ID, EX, MEM, WB MIPS design. For the above code, complete the...

  • Consider the execution of the program below on a fully bypassed (i.e. both W-E and M-E...

    Consider the execution of the program below on a fully bypassed (i.e. both W-E and M-E operand forwarding), 5-stage MIPS pipeline with early branch resolution (i.e., branches resolved in D stage). i1: add $v0, $0, $0 i2: addi $t0, $0, 100 i3: lw $t1, 0($a0) i4: add $v0, $v0, $t1 i5: addi $a0, $a0, 4 i6: addi $t0, $t0, -1 i7: beq $t0, $0, end I8: beq $0, $0, i3 end: Which lines in the program would require stalls based...

  • Show all your work, I WILL RATE!! Consider the following code: li $t0, 99 li $t1,...

    Show all your work, I WILL RATE!! Consider the following code: li $t0, 99 li $t1, 44 loop: addi $t0, $t0, -1 lw $t1, 0($t1) bne $t0, $zero, loop add $v0, $t0, $zero What is the static instruction count of this code? What is the dynamic instruction count? (Assume any pseudoinstructions are counted as 1 instruction). How many times is the instruction memory accessed? How many times is the data memory (i.e. lw/sw) accessed?

  • The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem....

    The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: The architecture fully supports forwarding, Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, Register R4 is initially 100. L1:  lw    R1, 0(R4)   add   R3, R1, R2 sw   ...

  • (60 points) The following instructions are executed on the 5-stage MIPS pipelined datapath. add r...

    Computer architecture help: (60 points) The following instructions are executed on the 5-stage MIPS pipelined datapath. add r5,r2, r1 lw r3, 4(r5) lw r2, 0(r2) or r3, r5, r3 sw r3, 0(r5) (a) (20 points) List the data hazards in the above code. For each data hazard identified, clearly mark the source and the destination. For example you can say, there is a data hazard from instruction X to instruction Y on register Z. (b) (20 points) Assume there is...

  • CS - Computer Organization. Topic: Pipelining. (If you do write your solutions by hand, please write...

    CS - Computer Organization. Topic: Pipelining. (If you do write your solutions by hand, please write clearly) Thank you so much. Please pay close attention to the instructions, this is an important task, that will help me to learn the subject and finally pass the class, I will greatly appreciate the help in this regard. My question is the following: Problenm Consider the following instructions. Complete the pipeline diagram, indicating the cycle in which each instructions stages are executed. Assume...

  • help Question 11 The classic five-stage pipeline MIPS architecture is used to execute the code fragments...

    help Question 11 The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: • The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, • Register R4 is initially 200....

  • The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem....

    The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: • The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, • Register R4 is initially 200. L1: lw lw...

  • 12 po Iw add Question 11 The dassic five-stage pipeline MIPS architecture is used to execute...

    12 po Iw add Question 11 The dassic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: • The architecture fully supports forwarding • Register write is done in the first half of the clock cycles register read is performed in the second half of the clock cyde. Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism Register R4 is initially...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT