Sat, 17 Oct 2020, 16:08
A student writes:> Hello Dr. Patt and TAs, > > I'm looking at the appC handout, specifically the control structure, and > I'm a little puzzled by something. I'm seeing an SR2MUX in the data path > that chooses between SR2 and SEXT[IR[4:0]], however I've been looking for > the corresponding control signal and I can't seem to find a mention of it > anywhere. I'm not sure if I'm missing something obvious, but I was > wondering if one of y'all could help me out with this. > > Sincerely, > <<name withheld to protect the student looking for SR2MUX's control signal>>
I agree that the Data Path does not explicitly identify what inside the finite state control is controlling the SR2MUX. Let's see what it could be. The SR2MUX is either sourcing SR2 (a register specified by the instruction) or SEXT(IR[4:0]), the low five bits of the instruction AFTER sign-extending to 16 bits. ...and the output of that MUX is one of the two inputs to the ALU. So, you have an ALU operation that is using either a register (SR2) or the SEXT of IR[4:0] as one of its two source operands. Do you know what determines which of the two the ALU uses? The answer is what controls the SR2MUX. Hint: You do not have to worry about it. As you have correctly said, you do not see it in any list of control signals. It is not one of the 35 control signals shown in Figure C1. It is taken care of, independent of you. So, my question for you: If you do not specify that control signal, and certainly the MUX needs a control signal, where does it come from? Answer (if you haven't got it yet): IR[5], which is specified in the instruction, so as I said, you do not need to worry about it. Good luck getting the lab in by tomorrow night. Yale Patt