Chapter 4
Chapter 4
Microprogrammed Control
BCA 2nd semester
Rolisha Sthapit
CONTENTS
• Basic Design of Accumulator: Control of AC
register, ALU organization
• Control Memory, Address Sequencing:
Conditional Branching, Mapping of
Instruction, Subroutines, Microprogram:
Symbolic Microprogram, Binary
Microprogram, Design of Control Unit, Basic
requirement of Control Unit, Structure of
Control Unit, Microprogram Sequencer.
Questions:
1. Explain the Design procedure of Accumulator Logic.
2. Explain the Gate structure for controlling the LD, INR, and CLR of Accumulator.
3. Explain the components of ALU with their functions.
4. Define the Control Unit. Explain the organization of Microprogrammed Control unit.
5. Differentiate between Hardwired and Microprogrammed Control Design.
6. Explain the address sequencing procedure.
7. Explain the conditional branching mechanism.
8. What do you mean by mapping of instructions? Explain the procedure for mapping from instruction
code to microinstruction address.
9. Define Microprogram. Differentiate between Symbolic and Binary microprogram with example.
10. Explain the basic requirements for designing control unit.
11. Explain the structure of Control Unit.
12. Write the role of microprogram sequencer in microprogrammed control unit.
13. Define following terminologies : Control Memory, Control Word, Microoperations, Microcode
and Microinstructions
Microprogrammed vs Hardwired Control
Terminologies
• Hardwired Control Unit:
When the control signals are generated by hardware using
conventional logic design techniques, the control unit is said to be
hardwired.
• Micro programmed control unit:
A control unit whose binary control variables are stored in
memory is called a microprogrammed control unit.
• Control Memory:
Control Memory is the storage in the microprogrammed
control unit to store the microprogram.
• Control Word:
The control variables at any given time can be represented
by a control word string of 1 's and 0's called a control word.
• Microoperations:
Micro-operations perform basic operations on data stored in
one or more registers, including transferring data between registers or
between registers and external buses of the central processing unit
(CPU), and performing arithmetic or logical operations on registers.
• Microcode:
A very low-level instruction set which is stored permanently in
a computer or peripheral controller and controls the operation of the
device.
• Microinstruction:
A single instruction in microcode. It is the most elementary
instruction in the computer, such as moving the contents of a register to
the arithmetic logic unit (ALU).
• Microprogram:
A set or sequence of microinstructions.
Design of Basic Computer
The basic computer consists of the following hardware components:
➢ A memory unit with 4096 words of 16 bits each.
➢ Nine registers: AR(Address Reg.), PC (Program Counter), DR(Data
Reg.), AC (Accumulator), IR (Instruction Reg.), TR (Temp. Reg.),
➢ OUTR (Output Reg.), INPR (Input Reg.), and SC (Sequence
Counter).
➢ Flip-flops: lEN (Interrupt Enable), FGI (Input Flag), and FGO
(Output Flag).
➢ Two decoders: a 3 x 8 operation decoder and a 4 x 16 timing
decoder
➢ A 16-bit common bus.
➢ Control logic gates.
➢ Adder and logic circuit connected to the input of AC.
Control Functions and Microoperations of Basic Computer
Design of Accumulator Logic
• The circuits associated with the
AC register are shown in Fig. The
adder and logic circuit has three
sets of inputs.
• One set of 16 inputs comes from
the outputs of AC.
• Another set of 16 inputs comes
from the data register DR.
• A third set of eight inputs comes
from the input register INPR.
• The outputs of the adder and logic
circuit provide the data inputs for
the register. In addition, it is
necessary to include logic gates for
controlling the LD, INR, and CLR
in the register and for controlling
the operation of the adder and
logic circuit.
Control of AC Register – Gate Structure
• The gate structure that controls the
LD, INR, and CLR inputs of AC is
shown in Fig.
• The output of the AND gate that
generates this control function is
connected to the CLR input of the
register.
• Similarly, the output of the gate that
implements the increment micro
operation is connected to the INR
input of the register.
• The other seven micro operations
are generated in the adder and logic
circuit and are loaded into AC at the
proper time.
• The outputs of the gates for each
control function is marked with a
symbolic name. These outputs are
used in the design of the adder and
logic circuit.
Adder and Logic Circuit
The fetch routine needs three microinstructions, which are placed in control
memory at address 64, 65 and 66.
Symbolic microprogram for the fetch
cycle:
lisha Sthapit Binary
Microprogram
Symbolic Vs Binary Microprogram
Design of Control Unit/Structure of CU
• Control unit generates timing
and control signals for the
operations of the computer.
The control unit
communicates with ALU and
main memory. It also controls
the transmission between
processor, memory and the
various peripherals. It also
instructs the ALU which
operation has to be performed
on data.
• Control unit can be designed
by two methods:
1. Hardwired control Unit
2. Micro programmed Control
Unit
Basic Requirement of Control Unit
• The functional requirements of control unit are those functions
that the control unit must perform and these are the basis for
the design and implementation of the control unit.
• A three step process that lead to the characterization of the
Control Unit:
1. Define the basis elements of the processor
2. Describe the micro-operations that the processor performs
3. Determine the functions that the control unit must perform to
cause the microoperations to be performed.
1. Basic Elements of Processor:
The following are the basic functional elements of a CPU:
• ALU: is the functional essence of the computer.
• Registers: are used to store data internal to the CPU.
2. Types of Micro-operation:
These operations consist of a sequence of micro operations. All micro
instructions fall into one of the following categories:
• Transfer data between registers
• Transfer data from register to external
• Transfer data from external to register
• Perform arithmetic or logical operations
3. Functions of Control Unit:
The control unit perform two tasks:
• Sequencing: The control unit causes the CPU to step through a series of
microoperations in proper sequence based on the program being executed.
• Execution: The control unit causes each micro-operation to be performed.
Decoding of Microoperation fields