A hazard is created whenever there is a dependence between instructions, and they are close enough that the overlap caused by pipelining would change the order of access to an operand.
Consider two instructions i and j, with i occurring before j. The possible data hazards are:
RAW (read after write) - j tries to read a source before i writes it, so j incorrectly gets the old value. This is the most common type of hazard and the kind that we use forwarding to overcome.数据相关
WAW (write after write) - j tries to write an operand before it is written by i. The writes end up being performed in the wrong order, leaving the value written by i rather than the value written by j in the destination.输出相关
WAR (write after read) - j tries to write a destination before it is read by i , so i incorrectly gets the new value.反相关