Micro Programed Control Unit
Micro Programed Control Unit
Micro-programmed control
Types of Control
Micro-
Hardwired
programmed
• When the control signals are generated • A control unit whose binary
by hardware using conventional logic control variables are stored in
design techniques, the control unit is memory is called a micro
said to be hardwired. programmed control unit.
• Control logic is implemented with • Control information is stored in a
gates, flip-flops, decoders and other control memory, which is
digital circuits. programmed to implement
• It has the advantage that it can be instructions (to initiate the
optimized to produced a fast mode of sequence of micro-operations).
operation. • It requires changes in the wiring
among the various components if
the design has to be modified (By
updating the micro-program in
the control memory).
1
10/6/2023
2
10/6/2023
Components
Micro-program Sequencer (Next address generator)
• Used to generate the address of the next microinstruction to be read from the control
memory. It also increments the CAR by one, loading into the CAR an address from Control
Memory, transferring an external address, or loading an initial address to start the control
operations.
Control address register
• (CAR) Holds the address generated by the sequence; provides address inputs to the control
memory
Control memory
• CM Usually a ROM; holds the control words which make up the micro-program for the MCU
Control data register
• (CDR) holds the control word (present mico-instruction) being read; used to
generate/propogate control function values to the MCU. Because the CAR and CDR are
registers, they can be used and modified in parallel. Thus, the CDR can be causing the
execution of a collection of micro-ops at the same time that it's being used to generate the
next address (via the sequencer) for the CAR.
• The data register is sometimes called a pipeline register.
• It allows the execution of the micro-operations specified by the control word
simultaneously with the generation of the next microinstruction.
Microinstruction format
3
10/6/2023
Sequencing
• Each machine instruction is executed through the application of a sequence of
microinstructions. Clearly, we must be able to sequence these; the collection of
microinstructions which implements a particular machine instruction is called a routine.
• The MCU typically determines the address of the first microinstruction which implements a
machine instruction based on that instruction's op-code. Upon machine power-up, the CAR
should contain the address of the first microinstruction to be executed.
• The MCU must be able to execute microinstructions sequentially (e.g., within routines), but
must also be able to ``branch'' to other microinstructions as required; hence, the need for a
sequencer.
• The microinstructions executed in sequence can be found sequentially in the CM, or can be
found by branching to another location within the CM. Sequential retrieval of
microinstructions can be done by simply incrementing the current CAR contents; branching
requires determining the desired CW address, and loading that into the CAR.
Mapping of Instruction
4
10/6/2023
Mapping of Instruction
Example:
• Mapping of 4-bit Operation Code into 7 bit address.
• Each Computer /machine instruction has a micro-program routine
with a capacity of four microinstructions.
5
10/6/2023
Fetch Routine
6
10/6/2023