The CPU can write the result of the operation to:
The following figure summarize the control signals (they are given in red:
If A-select = 0, the A-MUX multiplexor will select the register as output. And if A-select = 1, the A-MUX multiplexor will select the MBR as output.
By selecting the input from the register, the CPU will perform
operations on register data.
By selecting the input from the MBR, the CPU will perform
operations on memory data.
Note: by looking at the connections, you must conclude that the MBR can be updated with data from:
In a read operation, data from the databus is first transfered into the MBR. In this case: MBR is updated with data from the databus). After the memory data reaches the MBR, it will be further transported to its final destination through the datapath.
In a write operation, data from a register is first transfered through the datapath into the MBR. In this case: MBR is updated with data from the C-bus (shifter output). After the memory data reaches the MBR, it will be further transported to its final destination through the databus to the memory.
Note: you have see enough examples where the CPU need to pick 1 thing among N things that you need to use a multiplexor. In case you still don't have any idea how the CPU picks among the databus and C-bus input, Project 7 will spell it out for you....
The following figure shows the pathway of the data flow in a "register-to-register" operation through the simple datapath and how this type path is setup in our simple CPU:
Notice the setting of the control signals on the datapath to effectuate a register-to-register operation:
Example of such operations:
Note that the data from memory is always first fetched into the MBR and then transfered to the final (register) destination. The following 2 figures show that data from memory is transfer into a register of the CPU in our very simple datapath:
After the data from memory has been written into the MBR, the data will be moved to its final destination (which is always a register inside the CPU) through the datapath with the setting given in the following figure:
Notice the setting of the control signals on the datapath to effectuate this transfer is:
Note that the data from the CPU is always first fetched into the MBR and then transfered to the final (memory) destination. The following 2 figures show that data from register is transfer to the memory in our very simple datapath:
Notice the setting of the control signals on the datapath to effectuate this transfer is:
After the address has been written into the MAR and the data from memory has been written into the MBR, the CPU must wait until the memory has "acknowledged" that the memory location has been updated. This will be discussed later: