1. Consider the following code segment: Listing 1 1. sll St0, $s3, 2 2. add $t0, $t0, $s6 3.1w $to , oSt0) 4. S11 $t1, $s4, 2 5. add St1, Stl, Ss6 6. 1w St1, 0(St1) 7. add St0, St1, St0 8. addi St3, $s7, 32 a. Identify all hazards (structure, data, and control) that exist in this code. Identify the instruction with the line number. State whether or not the hazard can be resolved (e.g using forwarding), and whether or not a stall is required. How many cycles does this code take to execute on a 5 stage MIPS pipeline? Example: line X, control hazard, forwarding required, 1 stall cycle b. Optimize the code by rescheduling the instructions to avoid stalls. How many cycles c. Assume a single cycle processor has a cycle time of 10 ns. How many cycles will the d. Assume each stage of a 5 stage MIPS pipeline takes 3 ns. How many cycles would it take e. Compute the speedup factor for the optimized code in the multicycle implementation vs does your optimized code require to execute in a 5 stage MIPS pipeline? unoptimized code (Listing 1) take? How long would your optimized code take? to execute the unoptimized code? What about the optimized code? the single cycle implementation. 1. Consider the following code segment: Listing 1 1. sll St0, $s3, 2 2. add $t0, $t0, $s6 3.1w $to , oSt0) 4. S11 $t1, $s4, 2 5. add St1, Stl, Ss6 6. 1w St1, 0(St1) 7. add St0, St1, St0 8. addi St3, $s7, 32 a. Identify all hazards (structure, data, and control) that exist in this code. Identify the instruction with the line number. State whether or not the hazard can be resolved (e.g using forwarding), and whether or not a stall is required. How many cycles does this code take to execute on a 5 stage MIPS pipeline? Example: line X, control hazard, forwarding required, 1 stall cycle b. Optimize the code by rescheduling the instructions to avoid stalls. How many cycles c. Assume a single cycle processor has a cycle time of 10 ns. How many cycles will the d. Assume each stage of a 5 stage MIPS pipeline takes 3 ns. How many cycles would it take e. Compute the speedup factor for the optimized code in the multicycle implementation vs does your optimized code require to execute in a 5 stage MIPS pipeline? unoptimized code (Listing 1) take? How long would your optimized code take? to execute the unoptimized code? What about the optimized code? the single cycle implementation