Eliminating data hazards - computer architecture, Computer Engineering

Eliminating data hazards:

Forwarding

NOTE: In the following instance, computed values are in bold, whereas Register numbers are not.

Forwarding involves adding output data into a previous stage of the pipeline. For example, let's assume we desire to write the value 3 to register 1, (which already contains a six), and then add 7 to register 1 and hold the result in register 2, for instance

Instruction 0: Register 1 = 6

Instruction 1: Register 1 = 3

Instruction 2: Register 2 = Register 1 + 7 = 10

Following execution, register 2 would contain the value 10. Though, if Instruction 1 (write 3 to register 1) does not fully exit the pipeline before Instruction 2 begins execution, it means that Register 1 does not contain the value 3 when Instruction 2 performs its addition operation. In such type of event, Instruction 2 adds 7 to the old value of register 1 (6), and so register 2 would contain 13 instead for example Instruction 0: Register 1 = 6

Instruction 1: Register 1 = 3

Instruction 2: Register 2 = Register 1 + 7 = 13

This error takes place because before Instruction 1 has committed/stored Instruction 2 reads1 Register the result of its write operation to Register 1. Thus when Instruction 2 is reading the contents of Register 1, register 1 still contains 6, not 3.

Forwarding (described below) helps right such errors by depending on the fact that the output of Instruction 1 (which is 3) may be utilized by subsequent instructions before the value 3 is committed to/stored in Register 1.

Forwarding is implemented by putting back the output of an instruction into the previous stage(s) of the pipeline as soon as the output of that instruction is available.  Forwarding applied to our instance means that we do not wait to commit/store the output of Instruction 1 in Register 1 (in this instance, the output is 3) before making that output accessible to the subsequent instruction (in this particular case, Instruction 2). The effect is that Instruction 2 uses the right (the more recent) value of Register

1: the commit/store was made instantly and not pipelined.

With forwarding enabled, the ID/EX[clarification needed] stage of the pipeline now has 2 inputs: the value read from the register mention (in this instance, the value 6 from Register 1), and the new value of Register 1 (in this instance, this value is 3) which is sent from the next stage (EX/MEM)[clarification needed]. Additional control logic is utilized to determine which input to use.

813_Eliminating data hazards.png

Posted Date: 10/13/2012 4:29:09 AM | Location : United States







Related Discussions:- Eliminating data hazards - computer architecture, Assignment Help, Ask Question on Eliminating data hazards - computer architecture, Get Answer, Expert's Help, Eliminating data hazards - computer architecture Discussions

Write discussion on Eliminating data hazards - computer architecture
Your posts are moderated
Related Questions
, an HTML 4.0 element supported by Netscape6 and MSIE, defines a set of text which is associated with a specific form element. For illustration, code belo

What are the differences between struts and units?  A warm up question. Units are static objects that exist from the start of the simulation right up to its end, whereas struts

Q. What is Message Passing Libraries? In this part we will consider about message passing libraries. Traditionally a range of message passing libraries have been available ever

Explain about the Voice recognition device Blind and partially-sighted people can communicate with a computer using microphone and software (keyboard and touch screens can't be

COMPUTER ORGANIZATION & ARCHITECTURE 1. What do you mean by digital computer? Explain the block diagram of a digital computer. 2. What do you mean by Difference Engine? Expl

Two-dimensional array is represented in memory in following two ways: 1.  Row major representation: To attain this linear representation, the first row of the array is kept in

Q. What is Compact Disk Recordable? To accommodate applications in which just one or a small number of copies of a set data is required write-once read-many CD called as CD Rec

What is race around condition? Ans: Race Around Condition:- Jn Kn Q(n+1) output   0 1 0 1   0 0

explain parallel database system

Prepare at least 3 sets of input data (Test data) along with expected output for testing your program.