Microprogramming language each line describes a set of micro-operations occurring at one time and is known as a microinstruction. A sequence of instructions is known as microprogram, or firmware. A microprogram is midway between hardware and software.
1. Execute an instruction, the sequencing logic unit issues a READ command to the control memory.
2. The word whose address is specified in the control address register is read into the control buffer register.
3. The content of the control buffer register generates control signals and next address information for the sequencing logic unit.
4. The sequencing logic unit loads a new address into the control address register based ion the next-address information from the control buffer register and the ALU flags.
All this happens during one clock pulse.
Depending on the value of the ALU flags and the control buffer register, one of three decisions is made:
Get the next instruction: Add 1 to the control address register.
Jump to a new routine based on a jump microinstruction: Load the address field of the control buffer register into the control address register.
Jump to a machine instruction routine: Load the control address register based on the opcode in the IR.
The upper decoder translates the opcode of the IR into a control memory address. The lower decoder is not used for horizontal microinstructions but is used for vertical microinstructions. As was mentioned, in a horizontal microinstruction every bit in the control field attaches to a control line. In a vertical microinstruction, a code is used for each action to be performed, and the decoder translates this code into individual control signals. The advantage of vertical microinstructions is that they are more compact(fewer bits) than horizontal microinstructions, at the expense of a small additional amount of logic and time delay.
Advantages and Disadvantages
The principal advantage of the use of microprogramming to implement a control unit is that it simplifies the design of the control unit. Thus, it is both cheaper and less error prone to implement. On the other hand, the decoders and sequencing logic unit of a microprogrammed control unit are very simple pieces of logic.
The principal disadvantage of a microprogrammed unit is that it will be somewhat slower than a hardwired unit of comparable technology.
Despite this, microprogramming is the dominant technique for implementing control units in pure CISC architectures, due to its ease of implementation. RISC processors, with their simpler instruction format, typically use hardwired control units.
The two basic tasks performed by a microprogrammed control unit are
- Microinstruction sequencing: Get the next microinstruction from the control memory.
- Microinstruction execution: Generate the control signals needed to execute the microinstruction.
Two concerns are involved in the design of a microinstruction sequencing technique: the size of the microinstruction and teh address-generation time.
In executing a microprogram, the address of the next microinstruction to be executed is in one of these categories:
Determined by instruction register; Next sequential address; Branch.