E N D
The Problem • Given the following sequence of instructions, sub $2, $1, $3and $12, $2, $5or $13, $6, $2add $14, $2, $2beq $13, $13, L1lw $3, 100($2)sub $2, $2, $3 (1) show the incurred hazards, (20%) (2) show how to detect these hazards, and (28%) (3) show how to resolve these hazards. (32%) (4) What is structure hazard? Give an example for illustration. (20%)
The Solution of Test-6 • Given the following sequence of instructions, 1. sub $2, $1, $32. and $12, $2, $5 /* DH-1(1,2), See pp. 407, stall or forwarding from EX/MEM*/ 3. or $13, $6, $2 /* DH-2(1,3), See pp. 410, stall or forwarding from the MUX after MEM/WB*/ 4. add $14, $2, $25. beq $13, $13, L1 /* DH-4(3,5), BH(5), beq, moving branch decision to ID stage + (one stall or branch prediction) */6. lw $3, 100($2) 7. sub $2, $2, $3 /* DH-3(6,7), See pp. 413, stall one cycle */ (1) show the incurred hazards, (20%) each 5%(2) show how to detect these hazards, and (28%) each 7% (3) show how to resolve these hazards. (32%) each 8%(4) What is structure hazard? Give an example for illustration. (20%) /* Refer to pp. 375 */