Read after write and write after write - data hazards, Computer Engineering

RAW and WAW - Data hazards:

RAW (read after write) - j tries to read a source before i writes it, hence j wrongly gets the old value .This is the most usual type of hazard and the kind that we use forwarding to solve it.

WAW (write after write) - j tries to write an operand before i. The writes end up being performed in the incorrect order, leaving the value written by  i rather than the value written by  j in the destination. This hazard is there only in pipelines that write in more than 1 pipe stage or permit an instruction to proceed even when a preceding instruction is stalled. DLX integer pipeline writes a register just in WB and ignores this class of hazards.

WAW hazards would be possible if we perform the following 2 changes to the DLX pipeline:1)move write back for an ALU operation into the MEM stage, while the data value is available by then. Assume that the data memory access took 2 pipe stages.

Here is a sequence of 2 instructions which showing the execution in this revised pipeline, importance the pipe stage that writes the consequence:

1753_Read after write and write after write - data hazards.png

 Unless this type of hazard is ignored, execution of this sequence on this revised pipeline will leave the result of the first write (the LW) in R1, before the result of the instruction ADD.

Let writes in different pipe stages introduces other problems, since 2 instructions may try to write at the similar clock cycle. DLX FP pipeline, which has both writes in different pipeline lengths and different stages and will deal with both write conflicts and WAW hazards in detail.

Posted Date: 10/13/2012 4:07:06 AM | Location : United States







Related Discussions:- Read after write and write after write - data hazards, Assignment Help, Ask Question on Read after write and write after write - data hazards, Get Answer, Expert's Help, Read after write and write after write - data hazards Discussions

Write discussion on Read after write and write after write - data hazards
Your posts are moderated
Related Questions
Depth in Cutoff search: The depth is chosen in advance to certify in which the agent does not capture much more long to choose a move: however, if it has longer, well then we

Now we will learn how to compile and run PVM programs. To compile the program change to directory pvm/lib/archname where archname is architecture name of your computer. Then the su

What is response ratio? HRRN that is Highest Response Ratio Next scheduling is a non-preemptive discipline, as same to Shortest Job First (SJF) wherein the priority of all jobs

What is the difference between wire and reg Wire Wire is used for designing combinational logic, as we all know that this type of logic cannot store a value.  As  you  can

What is application analysis? The purpose of analysis is to understand the problem so that a correct design can be constructed. The application analysis focuses on major applic

Differentiate between Batch Operating System and Time Sharing Operating System? Batch operating systems : A batch is a sequence of jobs. Such batch is submitted to batch proce

Q. Rules for calling assembly subroutines from? The rules for calling assembly subroutines from C are: (i)  Memory model: The calling program and called assembly programs sh

What are advantages and benefits to businesses by e-commerce over extranets? The advantages and benefits to businesses comprise: Less Paperwork: along with documents and bus

Define setup time and hold time, what will occur when there is setup time and hold tine violation, how to overcome it? For Synchronous flip-flops, we have particular requiremen

What are the uses of Router? Router: A router is used to transfer or route data among two or more similar networks. This determines the next network point to that a data