Forwarding control outputs for pipeline stages of given MIPS assembly

Discussion in 'Webmastering & Programming' started by Sonar87, Dec 6, 2017 at 10:31 PM.

  1. Sonar87

    Sonar87 n00bie

    Messages:
    7
    Joined:
    Sep 22, 2017
    I've just finished trying this problem from my book but there's no answer key and I'm not fully sure and would like to know if I've done it correctly, or am overlooking something.

    forwarding my attempt.png
    forwarding figure.PNG

    I'm assuming MUX is for determining the rt value and the other rs? Is that correct?
     
  2. Absalom

    Absalom Limp Gawd

    Messages:
    371
    Joined:
    Oct 3, 2007
    I think you've correctly identified the potential hazards, so I think you're on the right track. I'm assuming your forwarding notation of the r3 (red line) is a placement goof. I think I know what you really meant to mark there.

    Which Mux exactly?

    The Mux control chart in blue is evidently referring to the Mux pair at the inputs of the ALU. The "Mux control" values (from table) reflecting the select lines on their respective Mux units.

    The Mux with Rt/Rd inputs looks like the forwarding lines from the ID to the MEM stage, although the select lines aren't drawn. In fact, all other Muxes in the drawing have their select lines not drawn. This implies that the drawing itself is incomplete. I'm guessing that was done on purpose as the focus was on the forwarding lines into the ALU.

    Don't read too much into the drawing as it's incomplete. The Forwarding Unit in the drawing is a black box with many inputs. The blue lines going out of the Forwarding Unit are defined clearly though. Regardless, that should be enough information to answer the given problem.
     
    Sonar87 likes this.
  3. Sonar87

    Sonar87 n00bie

    Messages:
    7
    Joined:
    Sep 22, 2017
    Yea, it was. Meant to put it from the first EX to the second.


    I just meant... there's two MUX going into the same ALU, each with a blue line in from the forwarding control unit. So I assumed that one was for controlling if the value came from the rt register or was forwarded instead if needed, and the same for the other MUX only with rs, but wasn't fully sure of that was correct.



    And yea, I figure it was incomplete and just focusing on the parts needed for the question.