Electronic – In which CPUs will write-after-write and write-after-read dependencies cause a hazard

computer-architecturedigital-logicmips

I've been studying the MIPS single cycle architecture for pipeline. I noticed that read-after-write dependency causes a data hazard but two other write-after-write and write-after-read dependencies won't cause any hazards.

So i was wondering if there exists processors with hazards because of this WAW and WAR dependency?

If there are, please can you name some of them. Thank you! (I searched google but found nothing useful)

Best Answer

All pipelined processors are susceptible to this. There's a particularly good technote on resolving this on the SPARC due to the pipeline and local register windowing with functions.

1: add $1, $2, $3 ;writes to $1
2: mul $4, $1, $5 ;reads from $1

In the code above, the Read-After-Write hazard exists as 2 reads $1 before the writeback. If you have pipeline of any depth.

Write-After-Read and Write-After-Write dependencies do not cause pipeline hazards.