KINDLY DO IT IN PROPER WAY TOMMOROW IS MY FINAL
Q#1: Identify the Hazards in the code given below and remove them using
add $t0, $t1, $t2
add $t3, $t4, $t0
add $t5, $t6, $t0
Also write the forwarding equations which you used to remove hazards.
a) Only forwarding :-
No Hazards
Instruction | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
add $t0,$t1,$t2 | IF | ID | EX | MEM | Wb | ||
add $t3,$t4,$t0 | IF | ID | EX | MEM | Wb | ||
add $t5,$t6,$t0 | IF | ID | EX | MEM | WB |
b) Only stalling :-
Hazards raw :-
Instructions 0 and 1 . Register $t0
Instructions 0 and 2 . Register $t0
Instruction | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
add $t0,$t1,$t2 | IF | ID | EX | MEM | Wb | ||||
add $t3,$t4,$t0 | IF | ID | NOP | NOP | EX | MEM | WB | ||
add $t5,$t6,$t0 | IF | NOP | NOP | ID | EX | MEM | WB |
KINDLY DO IT IN PROPER WAY TOMMOROW IS MY FINAL Q#1: Identify the Hazards in the code given below and remove them using Only Forwarding (Show Forwarding using Graphical represent...