HOME

TheInfoList



OR:

Operand forwarding (or data forwarding) is an optimization in pipelined CPUs to limit performance deficits which occur due to
pipeline stall In the design of instruction pipeline, pipelined computer processors, a pipeline stall is a delay in execution of an instruction set, instruction in order to resolve a hazard (computer architecture), hazard. Details In a standard classic RISC pip ...
s. A data hazard can lead to a
pipeline stall In the design of instruction pipeline, pipelined computer processors, a pipeline stall is a delay in execution of an instruction set, instruction in order to resolve a hazard (computer architecture), hazard. Details In a standard classic RISC pip ...
when the current operation has to wait for the results of an earlier operation which has not yet finished.


Example

ADD A B C #A=B+C SUB D C A #D=C-A If these two assembly pseudocode instructions run in a pipeline, after fetching and decoding the second instruction, the pipeline stalls, waiting until the result of the addition is written and read. In some cases all stalls from such read-after-write data hazards can be completely eliminated by operand forwarding: Larry Snyder
"Pipeline Review"


Technical realization

The CPU
control unit The control unit (CU) is a component of a computer's central processing unit (CPU) that directs the operation of the processor. A CU typically uses a binary decoder to convert coded instructions into timing and control signals that direct the op ...
must implement logic to detect dependencies where operand forwarding makes sense. A
multiplexer In electronics, a multiplexer (or mux; spelled sometimes as multiplexor), also known as a data selector, is a device that selects between several Analog signal, analog or Digital signal (electronics), digital input signals and forwards the sel ...
can then be used to select the proper
register Register or registration may refer to: Arts, entertainment, and media Music * Register (music), the relative "height" or range of a note, melody, part, instrument, etc. * ''Register'', a 2017 album by Travis Miller * Registration (organ), ...
or flip-flop to read the operand from.


See also

*
Feed forward (control) A feed forward (sometimes written feedforward) is an element or pathway within a control system that passes a controlling signal from a source in its external environment to a load elsewhere in its external environment. This is often a command ...


References


External links


Introduction to Pipelining
Instruction processing {{Comp-eng-stub