Consider a 5-stage pipelined processor with Instruction Fetch (IF),…
2024
Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the following statements about forwarding is/are CORRECT?
- A.
In a pipelined execution, forwarding means the result from a source stage of an earlier instruction is passed on to the destination stage of a later instruction
- B.
In forwarding, data from the output of the MEM stage can be passed on to the input of the EX stage of the next instruction
- C.
Forwarding cannot prevent all pipeline stalls
- D.
Forwarding does not require any extra hardware to retrieve the data from the pipeline stages
Attempted by 132 students.
Show answer & explanation
Correct answer: A, C
Final answer: The following statements are correct and explanations are given below.
"In a pipelined execution, forwarding means the result from a source stage of an earlier instruction is passed on to the destination stage of a later instruction" — This correctly describes forwarding (also called bypassing): values produced by an earlier instruction are routed directly to the stage that needs them in a later instruction (typically to the EX stage), avoiding a wait for register writeback and reducing RAW hazards.
"In forwarding, data from the output of the MEM stage can be passed on to the input of the EX stage of the next instruction" — This is a common bypass path: data produced or read in MEM can be forwarded to the EX inputs of the following instruction so it can be used immediately without waiting for WB.
"Forwarding cannot prevent all pipeline stalls" — Forwarding reduces many data hazards but cannot eliminate every stall. For example, a load-use hazard or structural/control hazards may still require inserting one or more stall cycles.
Incorrect statement: "Forwarding does not require any extra hardware to retrieve the data from the pipeline stages" — This is false because forwarding needs additional hardware such as bypass multiplexers, dedicated bypass wires, and a forwarding control unit to detect hazards and select the correct forwarded value.
Summary: The correct statements are the ones describing the forwarding concept, the MEM-to-EX bypass path, and the limitation that forwarding cannot prevent all stalls. The statement denying extra hardware is incorrect.
A video solution is available for this question — log in and enroll to watch it.