MIPs Datapath Im referring to Lets say we have MIPs Assembly program here with 5 stage pipelining IF/ID/EXE/MEM/WB without forwarding, and assume all instructions go through every stage even though it may produce no meaningful results:
...
add $t0, $s1, $s0
sw $t0, 0($s2)
...
Is there a RAW data hazard?
My current thought process is that since:
$t0 <- $s1 + $s0
mem[0 + $s2] <- $t0
Then it is a Read After Write because we first write to $t0 (at add) then we read $t0 to put it into memory. Furthermore, when SW is at ID, ADD is performing addition at the ALU/EXE stage. So the ID phase of SW regurgitates the value of $t0 before ADD can write-back the result.
I know there is a similar question:
Is there an execute-store data hazard in MIPS?
but my case is very specific, and that didn't help me much because he assumed the instructions can execute without using some stages.