Wed, 13 Feb 2013, 20:50

A student writes:

> Dear Prof Patt,
> In the example of data forwarding we discussed in class today. The
> following was the scenario.
> Cycle 16   |   Cycle 17  |   Cycle 18
> -
>    En      |     R11     |                 <- ADD R7, R10, R11
> -
>            |             |     E1          <- ADD R5, R11, R5
> -
> En - Last cycle of execution.
> E1 - First cycle of execution.
> You said that E1 can move to Cycle 16. But during cycle 16 the computation
> is not yet complete. As per my understanding , only at the end of cycle 16
> the addition operation will be complete and its result can be used by the
> next instruction i.e. how En and E1 are in the same cycle in a flow
> dependent (RAW) case.
> Regards
> <<name withheld to protect the student who mis-heard what I *meant*>>

Thanks for the question.  If I said that, I misspoke, since you are
absolutely right, the first ADD does not finish until the end of cycle 16,
so data forwarding would enable the second ADD to start in cycle 17.
You save one cycle by having the microarchitecture send the data to where
it is needed, rather than have the microarchitecture write it to a register
and after that have the second ADD source the data from the register.

Good luck with the rest of the course.

Yale Patt