Question: Let us assume that we cannot afford to have three-input Muxes that are needed for full forwarding. We have to decide if it is better

Let us assume that we cannot afford to have three-input Muxes that are needed for full forwarding. We have to decide if it is better to forward only from the EX/MEM pipeline register (next-cycle forwarding) or only from the MEM/WB pipeline register (two-cycle forwarding). Which of the two options results in fewer data stall cycles?


This exercise is intended to help you understand the cost/complexity/performance trade-offs of forwarding in a pipelined processor. Problems in this exercise refer to pipelined datapaths from Figure 4.45. These problems assume that, of all the instructions executed in a processor, the following fraction of these instructions have a particular type of RAW data dependence. The type of RAW data dependence is identified by the stage that produces the result (EX or MEM) and the instruction that consumes the result (1st instruction that follows the one that produces the result, 2nd instruction that follows, or both). We assume that the register write is done in the first half of the clock cycle and that register reads are done in the second half of the cycle, so "EX to 3rd" and "MEM to 3rd" dependences are not counted because they cannot result in data hazards. Also, assume that the CPI of the processor is 1 if there are no data hazards.a. b. EX to 1st Only 5% 20% MEM to 1st Only 20% 10% EX to 2nd only 5% 15% MEM to 2nd Only 10% 10% EX to 1st

Figure 4.45add $14, $5, $6 Instruction fetch PC Address Add Instruction memory lw $13, 24 ($1) Instruction decode IF/ID

a. b. EX to 1st Only 5% 20% MEM to 1st Only 20% 10% EX to 2nd only 5% 15% MEM to 2nd Only 10% 10% EX to 1st and MEM to 2nd 10% 5% Other RAW Dependences 10% 0%

Step by Step Solution

3.37 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To determine which option results in fewer data stall cycles we need to evaluate the forwarding scen... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Organization Design Questions!