CS355 Sylabus


Examples of execution of mirco instructions


Register-to-register operation: R5 = R1 + R2


Write operation: MOV R1, (R2)


Read operation: MOV (R2), R5

  • Let use now consider the case in a realistic system when the memory take some time to return the data requested. The main difference is that the CPU cannot perform the MBR update right away and must wait. But the CPU must maintain the READ system and the address (in MAR) constant (so that the memory will not be confused about the CPU's intension).

    1. The first instruction is changed a bit, in that we cannot update MBR during phase 4. The following is the first micro-instruction in a read operating using a "realistic" memory:

    2. The CPU can wait by executing a "do no harm" instruction while maintaining the READ signal active:

      Notice that the MAR, MBR amd ENC bits in the micro-instructions are all ZERO ("do no harm"), and the READ bit is ONE (signal reading)

      Depending on how fast the memory is, one or more of this "do no harm while reading" micro-instructions can be inserted.

      Note that there is no danger in executing too many of these "do no harm while reading" micro-instructions, the only effect is that you slow dowm the CPU (which is not a good thing to do...)

    3. When the data is ready on the databus, the CPU will execute the following instruction to "clock in" (jargon for write) the data into the MBR:

    4. And finally, the data in the MBR is transfered to its final destination (= R5) by using the same micro-instruction that you saw in the first case above ( click here):

    5. Obvious conclusions from these examples is:

      • Micro-instructions can make the datapath do different things.

      • The amount of work that can be performed under the direction of one micro-instruction is very little.

      • A sequence of micro-instructions can be used to perform a more complex task.

      • A sequence of micro-instructions is called a micro-program