The type of CPU that we will be study is "micro-programmed" where the CPU executes a "micro-program" (or a very tiny program) to process a computer assembler instruction.
The non-micro-programmed CPU is even simpler and execute the computer assembler instruction directly.
The micro-programmed CPU has the advantage that the hardware can be extremely simple and yet the CPU can execute quite complex instructions by "breaking down" the complex instructions in a number of simple steps - these simple steps are encoded in a "micro-program".
The heart of the CPU is the datapath.
That is because most operations performed by the CPU takes:
The ALU and shifter also operates on 16 bit inputs and produces 16 bit outputs.
By now, you should be very familiar with the ALU and the Shifter, as you have created them yourself in Project 3.
(As you should know, you can use (a large number of) multiplexors to make the connection between registers and ALU. A register can be selected and the selection is under the control of the SRC1 and SRC2 operand fields in the assembler instruction.)
(As you should know, you use (a large number of) decoder to select the register that you wish to update. The register is selected under the control of the DESTINATION operand field in the assembler instruction.)
Thus, multiplexors and various control signals are embedded into the datapath to allow the CPU to move data between various important sources and destinations.
The operands are always fetched from registers within the CPU (but you must take the term "registers" more widely, they not only include the general purpose registers (such as D0, D1, etc in M68000), but also special purpose registers (such as Program Counter, Instruction Registers, Memory Address Register (MAR), Memory Buffer Register (MBR) and other scratch registers hidden away from the assembler programmer.)
The following figure shows the primary dataflow through the datapath when the CPU executes an instruction:
There are other "secondary" (less often used) paths available that enable the CPU to fetch operands from memory or write operands to memory.
Your obvious question will be:
The answer is: yes, ofcourse, but only at first:
Only after the CPU has fecthed the data into the MBR, the CPU can then operate on the data.
As you may notice in the figure above, the MBR is a special purpose register inside the CPU (it is tied to the datapath):
So the operand is still fetched from a register within the CPU...