Question: 2. (6 pts) Consider executing the following code on the pipelined datapath that we discussed in class. a). During the 5th cycle, which registers

2. (6 pts) Consider executing the following code on the pipelined datapath 

2. (6 pts) Consider executing the following code on the pipelined datapath that we discussed in class. a). During the 5th cycle, which registers are being read and which register(s) will be written (using the register file)? sub $t7, $t9, St8 add $t3, St4, $t9 sub $t6, St5, St4 sub $t5, St2, St6 add $12, $13, $12 b). Explain what the forwarding unit is doing during the 5th cycle of execution. Which registers are being compared? List all pairs of registers that are compared during the 5th cycle for the forwarding unit. (First, you need to determine which instruction's values are in the EX/MEM, which instruction's values are in the MEM/WB register, and which instruction's values are read from the ID/EX register during the 5th cycle. Then check the conditions for forwarding.) c). Explain what the hazard detection unit is doing during the 5th cycle of execution. Which registers are being compared? List all pairs of registers that are compared during the 5th cycle for the hazard detection unit. (You need to determine which instruction's values are in the IF/ID and which instruction's values are in the ID/EX register during the 5th cycle. Then check the conditions for the hazard detection.)

Step by Step Solution

3.50 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Register Read and Write During Cycle 5 Read t8 and St4 for the sub t7 St9 t8 instruction in the EX ... View full answer

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 Programming Questions!