Operand Forwarding

Can anyone please explain,how the stages marked in green gets the value ? The EX stage should produce the result before 'RD' reads the value. So how is this possible, in this case with operand forwarding? Shouldn't there be a single stage 'stall', because the result prooduced by EX stage, then it will be used by 'RD'?

Image icon operandforwarding.jpg

vishal @vishal92 27 Jan 2015 03:01 pm

operading forwarding means there are buffres in between stages from there you can take the result  before actually reflecting in the memory

hope it clears your doubt 

Arul @innovwelt 27 Jan 2015 03:10 pm

In my point of view:

Operand forwarding is a concept to overcome the Data dependency hazards in Pipelining.

In simple words, if the operands of next instruction is depending on the previous instruction result, after execution (EX) of previous instruction, the result will be directly written (copied) to Register location expected in Next instruction.

So that, the next instruction could execute without stall.

Here in the picture:

RD of SUB will not care about the operand which is result of ADD (since, operand forwarding is supported) , but will try to fetch the remaining operands, if needed.

At the end of ADD EX, the other operand will automatically be available in the expected location.

vishal @vishal92 27 Jan 2015 03:19 pm

hey karn the result in the intermediate buffer will be fetched  and take no time ,say a clock

Saurav Das @sauravdas 29 Jan 2015 12:41 pm

Ok , but what about the fact that SUB uses the value produced by ADD , how can it produce the results, even before adding?