Forwarding control outputs for pipeline stages of given MIPS assembly

Sonar87

n00b
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.

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

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.

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.

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

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.

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.

Yea, it was. Meant to put it from the first EX to the second.

Which MUX exactly?

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.