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

Assignment Help:

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.


Related Discussions:- Read after write and write after write - data hazards

Representation in prolog - logic programs, Representation in Prolog - Logic...

Representation in Prolog - Logic Programs: If we justimpose some additional constraints on first-order logic, so than we get to a representation language knowing as logic prog

What is the use of unions in c ?, Unions allow the same area of memory to b...

Unions allow the same area of memory to be accessed as different data types. The insurance example above would not work. Unions are useful (often in embedded programming) when i

Methods for organising the associative memory, There are two methods for or...

There are two methods for organising the associative memory based on bit slices: Bit parallel organisation: In this organisation every bit slices which are not masked off,

Write C++ for following question., We are planning an orienteering game. Th...

We are planning an orienteering game. The aim of this game is to arrive at the goal (G) from the start (S) with the shortest distance. However, the players have to pass all the che

Btree, What should the size of ''t'' in btree be depending on the hard disk...

What should the size of ''t'' in btree be depending on the hard disk size

Delete a user from a category, Execute the following functionality using Ja...

Execute the following functionality using Java & SQL with simple GUI interface: 1.  Insert/delete/update an XML document.  2.  Insert/delete/update a category.  3.  Alloca

Describe the external users of system, Q. Describe the External Users of sy...

Q. Describe the External Users of system? External Users: Modern information systems are now reaching beyond the boundaries of traditional business to involve customers and o

What is the function of cu, What is the function of CU? The control uni...

What is the function of CU? The control unit works as the nerve center that coordinates all the computer operations. It issues timing signals that governs the data transfer.

Advantages of e-commerce, One of the resources we used was Ajeet Khurana's ...

One of the resources we used was Ajeet Khurana's article that talks about the advantages of e-commerce. It was helpful to gain some background on the variety of benefits the electr

Difference between perl and mod_perl, Perl is a language and MOD_PERL is a ...

Perl is a language and MOD_PERL is a module of Apache used to increase the performance of the application.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd