I wanted to make sure I was tracking with the fetch-execute cycle.
Slide 35:
https://docs.wixstatic.com/ugd/56440f_96cbb9c6b8b84760a04c369453b62908.pdfIn the proposed partial implementation of the CPU, the instruction input is fed into one of the Mux16 inputs (the "b" input); ALU output is fed into the other Mux16 input (the "a" input).
It looks as if the "a" input should come from instruction and the "b" input should come from the ALU output - opposite of what is shown.
My reasoning:
I have the Mux16 sel bit coming from instruction[15].
When an A-instruction is coming in instruction[15]=0; and I want the value stored in the A register to come from the instruction.
When a C-instruction is coming in instruction[15]=1; and I want the value stored in the A register to come from ALU output.
The Mux16 spec says if sel=0 then a, else b.
Therefore the CPU implementation looks backward.
Maybe the "a" and "b" inputs on the Mux16 have nothing to do with top-bottom, up-down?