Question: 1. Given the following MIPS code snippet (note that instruction #6 could be anything): loop: 1 addi t, to, 4 3 v, 20 (sto) 4

 1. Given the following MIPS code snippet (note that instruction #6

1. Given the following MIPS code snippet (note that instruction #6 could be anything): loop: 1 addi t, to, 4 3 v, 20 (sto) 4 lw$90,60($to) 6 bne * 7 ## The following instruction could be anything! a) Detect hazards and insert no-ops to insure correct operation. Assume no delayed branch, no forwarding units and no interlocked pipeline stages. Your answer on the right should take the form of pairs) of numbers: num@location - indicating num no-ops should be placed at location. E.g, if you wanted to place 6 noops between lines 2 and 3 fi.e., location 2.5) and 8 noops between lines 5 and 6 (i.e. location-5.5), you would write: "5@2.5, 8@5.5 b) Now, reorder/rewrite the program to maximize performance. Assume delayed branch and forwarding units, but no interlocked pipeline stages. For unknown reasons, the first instruction after the loop label must be the addi. Feel free to insert no-ops where needed. You should be able to do it using 6 instructions per loop (10 pts) or only 5 instructions (hard, 15 pts) ##Extra instruction before loop (if any) ##Extra instruction before loop (if any) loop: 1 addi sco, sto, 4 4 6 ## The following instruction could be anything! 1. Given the following MIPS code snippet (note that instruction #6 could be anything): loop: 1 addi t, to, 4 3 v, 20 (sto) 4 lw$90,60($to) 6 bne * 7 ## The following instruction could be anything! a) Detect hazards and insert no-ops to insure correct operation. Assume no delayed branch, no forwarding units and no interlocked pipeline stages. Your answer on the right should take the form of pairs) of numbers: num@location - indicating num no-ops should be placed at location. E.g, if you wanted to place 6 noops between lines 2 and 3 fi.e., location 2.5) and 8 noops between lines 5 and 6 (i.e. location-5.5), you would write: "5@2.5, 8@5.5 b) Now, reorder/rewrite the program to maximize performance. Assume delayed branch and forwarding units, but no interlocked pipeline stages. For unknown reasons, the first instruction after the loop label must be the addi. Feel free to insert no-ops where needed. You should be able to do it using 6 instructions per loop (10 pts) or only 5 instructions (hard, 15 pts) ##Extra instruction before loop (if any) ##Extra instruction before loop (if any) loop: 1 addi sco, sto, 4 4 6 ## The following instruction could be anything

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!