1
votes

I'm learning about data dependencies and data hazards in MIPS assembly and I'm a little unsure of which types of dependencies will cause a hazard. I have this example:

add $2, $1, $5
sub $7, $2, $3
lw $4, 8($7)
add $6, $4, $3

The dependency for $3 shouldn't cause a hazard, right? Would the dependency for $7 be resolved with forwarding, or would it require a stall?

1
What is the pipeline of your MIPS?osgx

1 Answers

0
votes

Right and no it would not, this is very simple just try them out and you'll see =) PS: my answer holds for the regular 5 stage pipeline since you said you are a beginner then I'm assuming this is what you mean