0% found this document useful (0 votes)
144 views

Unit No: III: Micro Programmed Control

The document discusses microprogrammed control in a computer system. It defines key concepts like control memory, microinstructions, and address sequencing. It then provides an example microprogram for a simple computer configuration to illustrate how microcode is generated. Finally, it compares hardwired control and microprogrammed control, noting that microprogrammed control uses software stored in control memory rather than dedicated logic circuits.

Uploaded by

bhargavi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views

Unit No: III: Micro Programmed Control

The document discusses microprogrammed control in a computer system. It defines key concepts like control memory, microinstructions, and address sequencing. It then provides an example microprogram for a simple computer configuration to illustrate how microcode is generated. Finally, it compares hardwired control and microprogrammed control, noting that microprogrammed control uses software stored in control memory rather than dedicated logic circuits.

Uploaded by

bhargavi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

VISWANADHA INSTITUTE OF TECHNOLOGY AND MANAGEMENT, VSP

LECTURE NOTES
SUBJECT: CAO BRANCH/YR/SEM: TEACHER:
ECE/4/I –SEM Dr, A.V.N.C.SEKAHR

UNIT :3 CHAPTER NAME: MICRO PROGRAMMED CONTROL LESSON PLAN PERIODS:

Unit No: III


Syllabus: MICRO PROGRAMMED CONTROL: Control memory, Address sequencing, micro program
example, Design of control unit-Hard wired control. Micro programmed control
Objectives define a Control memory, Address Sequencing;
· define micro program example;
· define Design of control unit-Hard wired control. Micro programmed controlrol;
Book
Lecture Teaching
Main Topic Topics Discussed No.
No. /Date Aids
(T , R)
Control memory is a type of RAM (Random Access
Memory) which contains addressable storage registers.
Data is temporarily store in control memory. Control
memory can be accessed quicker than main memory
which speeds up CPU (Central Processing Unit)
operations.
Hardwired control – control signals are generated by
conventional logic circuits
Microprogrammed control – control signals are
generated by binary control variables stored in control
memory
Control memory – memory that is part of control unit
Control
Microinstruction – every word in control memory is a
memory
microinstruction
Control MAR – specifies the address of the
microinstruction
Control DR – holds the microinstruction read from
memory
Microprogram sequencer – determines the address
sequence that is read from control memory
Pipeline register – same as CDR
Advantages of Microprogrammed Control
Application of hardwired control in RISC architecture

Routine – group of microinstructions stored in control


memory
An initial address is loaded into the CAR during system
start‐up
Fetch routine – fetches the initial address
Address
Next step is to generate the microoperations that
sequencing
execute the instruction fetched from memory
Mapping process – rule that transforms the instruction
code into a control memory address
Address sequencing diagram shows four different paths
from which the CAR receives the address

1
When the configuration and the microprogrammed
control unit of the computer are established, the
designer's task is to generate the microcode for the
control memory. This code generation is called
microprogramming.
Computer Configuration
To explain the microprogramming process, we present a
simple digital computer similar but not identical to the
basic computer introduced.
This computer consists of:
1. A main memory ( 2048 × 16 ) for storing instructions
and data.
2. A control memory (128 × 20 ) for storing the
microprogram.
3. Four registers associated with the processor unit;
there function is similar to the corresponding registers
in the basic computer introduced in chapter 6. These
registers are :
micro
a. The Accumulator Register (AC).
program
b. The Program Counter Register (PC).
example
c. The Address Register (AR).
d. The Data Register (DR).
4. Two registers associated with control unit:
a. The Subroutine Register (SBR).
b. The Control Address Register (CAR).
5. The Arithmetic Logic and Shift Unit.
6. Two multiplexers for transfer of information among
the registers and the registers and main memory.
From the diagram, it's clear that DR can receive
information from AC, PC, or main memory. AR can
receive information either from PC or DR.
PC receives information from AR only. The arithmetic,
logic, and shift unit performs microoperations with data
from AC and DR and places the result in AC. The
memory receives its address from AR. Data written to
memory comes from DR, while DR receives the data read
from memory.

2
Instruction Format
Figure presents the instruction format for the assumed
computer.
The instruction format consists of three fields:
1. The 1-bit field specified for addressing mode
symbolized by I.
2. The 4-bit field specified for operation code (Opcode).
3. The 11-bit field specified for the address.

Each microoperation field requires a decoder to produce


the corresponding control signals
Design of A max. of three microoperations can be specified in a mi
control croinstruction
unit Basic components of a microprogrammed control unit ar
e the control memory and the circuits that select the
next address

3
The address selection part is called the micro program
sequencer

For each instruction, the control unit causes the CPU to execute
a sequence of steps correctly. In reality, there must be control
signals to assert lines on various digital components to make
things happen. For example, when we perform an Add
instruction in assembly language, we assume the addition takes
place because the control signals for the ALU are set to "add"
and the result is put into the AC. The ALU has various control
lines that determine which operation to perform. The question
we need to answer is, "How do these control lines actually
become asserted?" We can take one of two approaches to
Hardwired ensure control lines are set properly. The first approach is to
and
physically connect all of the control lines to the actual machine
Microprogr
instructions. The instructions are divided up into fields, and
ammed
Control different bits in the instruction are combined through various
digital logic components to drive the control lines. This is
called hardwired control, and is illustrated in figure (1) The
control unit is implemented using hardware (for example:
NAND gates, flip-flops, and counters).We need a special
digital circuit that uses , as inputs, the bits from the Opcode
field in our instructions, bits from the flag (or status) register,
signals from the bus, and signals from the clock. It should
produce, as outputs, the control signals to drive the various
components in the computer.
The advantage of hardwired control is that is very fast. The
4
disadvantage is that the instruction set and the control logic are
directly tied together by special circuits that are complex and
difficult to design or modify. If someone designs a hardwired
computer and later decides to extend the instruction set, the
physical components in the computer must be changed. This is
prohibitively expensive, because not only must new chips be
fabricated but also the old ones must be located and replaced.

Micro Microprogramming is a second alternative for designing


programme control unit of digital computer (uses software for
d control control). A control unit whose binary control variables
are stored in memory is called a micro programmed
control unit. The control variables at any given time can
be represented by a string of 1's and 0's called a control
word (which can be programmed to perform various
operations on the component of the system). Each word
in control memory contains within it a microinstruction.
The microinstruction specifies one or more
microoperatiotins for the system. A sequence of
microinstructions constitutes a microprogram. A
memory that is part of a control unit is referred to as a
control memory.
A more advanced development known as dynamic
microprogramming permits a microprogram to be loaded
initially from an auxiliary memory such as a magnetic
disk.
Control units that use dynamic microprogramming
employ a writable control memory;
this type of memory can be used for writing (to change
the microprogram) but is used mostly for reading.
The general configuration of a microprogrammed control
unit is demonstrated in the block diagram of Figure (2).
The control memory is assumed to be a ROM, within
which all control information is permanently stored.

5
The control memory address register specifies the
address of the microinstruction and the control data
register holds the microinstruction read from memory
the microinstruction contains a control word that
specifies one or more microoperations for the data
processor. Once these operations are executed, the
control must determine the next address. The location of
the next microinstruction may be the one next in
sequence, or it may be locate somewhere else in the
control memory. For this reason it is necessary to use
some bits of the present microinstruction to control the
generation of the address of the next microinstruction.
The next address may also be a function of external
input conditions. While the microoperations are being
executed, the next address is computed in the next
address generator circuit and then transferred into the
control address register to read the next
microinstruction.
The next address generator is sometimes called a
microprogram sequencer, as it determines the address
sequence that is read from control memory, the address
of the next microinstruction can be specified several
ways, depending on the sequencer inputs. Typical
functions of a microprogram sequencer are incrementing
the control address register by one, loading into the
control address register an address from control
memory, transferring an external address or loading an
initial address to start the control operations.
The main advantages of the microprogrammed control
are the fact that once the hardware configuration is
established; there should be no need for further
hardware or wiring changes. If we want to establish are
different control sequence for the system, all we need to
do is specify different set microinstructions for control
memory. The hardware configuration should not be
changed for different operations; the only thing that
must be changed is the microprogram residing in control
memory.
Microinstructions are stored in control memory in
groups, with each group specifying routine. Each
computer instruction has microprogram routine in
control memory to generate the microoperations that
execute the instruction. The hardware that controls the
address sequencing of the control memory must be
capable of sequencing the microinstructions within a
routine and be to branch from one routine to another.
The address sequencing capabilities required in a

6
control memory are:
1. Incrementing of the control address register.
2. Unconditional branch or conditional branch,
depending on status bit conditions.
3. A mapping process from the bits of the instruction to
an address for control memory.
4. A facility for subroutine call and return.
Figure (3) shows a block diagram of control memory and
the associated hardware
needed for selecting the next microinstruction address.
The microinstruction in control memory contains a set
of bits to initiate microoperations in computer registers
and other bits to specify the method by which the
address is obtained. The diagram shows four different
paths from which the control address register (CAR)
receives the address. The incrementer increments the
content of the control address register by one, to select
the next microinstruction in sequence. Branching is
achieved by specifying the branch address in one of the
fields of the microinstruction. Conditional branching is
obtained by using part of the microinstruction to select
a specific status bit in order to determine its condition.
An external address is transferred into control memory
via a mapping logic circuit. The return address for a
subroutine is stored in a special register whose value is
then used when the microprogram wishes to return from
the subroutine.

Figure (3) Selection address for control memory

Question posed to stimulate students learning:

You might also like