Explain each answer please. Im having a hard time understanding this material :(
ID: 3830464 • Letter: E
Question
Explain each answer please. Im having a hard time understanding this material :(
Consider the following sequence for instructions. or $s1, $s2, #s3 add $s2, $s1, $s4 1w $s1, 0($s2) sub $s1, $s1, $s1 List all RAW hazard for code shown above. Be sure to clearly specify the two instructions and register involved for each hazard. For the datapath shown above, add a minimum number of nops to the given code so that it will operate correctly. No forwarding. Assume that full forwarding was dded to the shown datapath. Add a minimum number of nops to the five coden sod that it will operate correctly. Add nop intructions to the given code to eliminate hazards if ALU-ALU forwarding.Explanation / Answer
1)
RAW HAZARDS:-
$s1 ---- in add $s2,$s1,$s4
$s2------in lw $s1,0($s2)
2)
or $s1,$s2,$s3
NOP
NOP
NOP
add $s2,$s1,$s4
NOP
NOP
NOP
lw $s1,0($s2)
sub $s1,$s1,$s1
3)
or $s1,$s2,$s3
NOP
add $s2,$s1,$s4
NOP
lw $s1,0($s2)
sub $s1,$s1,$s1
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.