Question:

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?

Show Hint

Forwarding is an effective mechanism to handle data hazards but cannot resolve all stalls. Load-use hazards often require pipeline stalls.
Updated On: Jan 22, 2025
  • 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
  • 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
  • Forwarding cannot prevent all pipeline stalls
  • Forwarding does not require any extra hardware to retrieve the data from the pipeline stages
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Define forwarding.
Forwarding is a technique used in pipelined processors to resolve data hazards by directly passing data from one pipeline stage to another, bypassing the register file. This is TRUE for Option (1). Step 2: Forwarding in MEM and EX stages.
Forwarding can occur between the output of the MEM stage of an earlier instruction and the input of the EX stage of a later instruction if the result is required before it is written back. This is TRUE for Option (2). Step 3: Limitations of forwarding.
Forwarding cannot resolve hazards arising from load instructions where the data is not available until the MEM stage. This limitation leads to some pipeline stalls. Thus, Option (3) is TRUE. Step 4: Hardware requirements for forwarding.
Forwarding requires additional hardware, such as forwarding paths and control logic, to enable bypassing data between pipeline stages. Hence, Option (4) is FALSE. Final Answer: \[ \boxed{(1), (2), \text{ and } (3)} \]
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions