0% found this document useful (0 votes)
47 views21 pages

CAO3

The document discusses microprogrammed control units in digital computers, highlighting their role in initiating microoperations through control memory and microinstructions. It explains the advantages of microprogramming over hardwired control, including flexibility in changing control sequences without hardware modifications. Additionally, it covers address sequencing, branching, and the use of subroutines within microprograms to optimize code efficiency.

Uploaded by

shubham17mittal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views21 pages

CAO3

The document discusses microprogrammed control units in digital computers, highlighting their role in initiating microoperations through control memory and microinstructions. It explains the advantages of microprogramming over hardwired control, including flexibility in changing control sequences without hardware modifications. Additionally, it covers address sequencing, branching, and the use of subroutines within microprograms to optimize code efficiency.

Uploaded by

shubham17mittal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Microprogrammed control-Control

Memory,address sequencing
• The function of the control unit in a digital computer is
to initiate sequences of microoperations.
• The complexity of the digital system is derived from
the number of sequences of microoperations that are
performed.
• When the control signals are generated by hardware
using conventional logic design techniques, the control
unit is said to be hardwired.
• Microprogramming is a second alternative for
designing the control unit of a digital computer.
• The principle of microprogramming is an elegant and
systematic method for controlling the microoperation
sequences in a digital computer.
• The control function that specifies a
microoperation is a binary variable.
• When it is in one binary state, the corresponding
microoperation is executed.
• The active state of a control variable may be
either the 1 state or the 0 state, depending on
the application.
• In a bus-organized system,the control signals that
specify microoperations are groups of bits that
select the paths in multiplexers, decoders, and
arithmetic logic units.
• The control unit initiates a series of sequential steps of
microoperations.
• During any given time, certain microoperations are to be
initiated, while others remain idle.
• The control variables at any given time can be represented
by a string of l's and O's called a control word.
• control words can be programmed to perform various
operations on the components of the system.
• A control unit whose binary control variables are stored in
memory is called a microprogrammed control unit .
• Each word in control memory contains within it a
microinstruction .
• The microinstruction specifies one or more
microoperations for the system.
• A sequence of microinstructions constitutes a
microprogram.
• 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.
Control memory
• A memory that is part of a control unit is referred to as
a control memory.
• A computer that employs a microprogrammed control
unit will have two separate memories: a main memory
and a control memory.
• The main memory is available to the user for storing
the programs.
• the control memory holds a fixed microprogram that
cannot be altered by the occasional user.
• The microprogram consists of microinstructions that
specify various internal control signals for execution of
register microoperations.
• Each machine instruction initiates a series of
microinstructions in control memory.
• These microinstructions generate the
microoperations
→to fetch the instruction from main memory;
→to evaluate the effective address,
→to execute the operation specified by the
instruction,
→and to return control to the fetch phase in
order to repeat the cycle for the next
instruction
• The general configuration of a microprogrammed control
unit is demonstrated in the block diagram of Fig. 7-1
• The control memory is assumed to be a ROM, within which
all control information is permanently stored.
• The control memory address register specifies the address
o f 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 located somewhere else in
the control memory.
• 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.
• Thus a microinstruction contains bits for
initiating microoperations in the data
processor part and bits that determine the
address sequence for the control memory.
• 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 in 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 control data register holds the present
microinstruction while the next address is
computed and read from memory.
• The data register is sometimes called a pipeline
register.
• It allows the execution of the microoperations
specified by the control word simultaneously with
the generation of the next microinstruction.
• This configuration requires a two-phase clock,
with one clock applied to the address register and
the other to the data register.
• The main advantage of the microprogrammed control is 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 a different control sequence for the
system, all we need to do is specify a different set of
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.
• most computers based on the reduced instruction
• set computer (RISC) architecture concept use hardwired
• control rather than a control memory with a microprogram.
Address Sequencing
• Microinstructions are stored in control memory
in groups, with each group specifying a routine.
• Each computer instruction has its own
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 able to branch from one
routine to another.
steps that the control must undergo during the execution
of a single computer instruction are
step1
• An initial address is loaded into the control address
register when power is turned on in the computer.
• This address is usually the address of the first
microinstruction that activates the instruction fetch
routine.
• The fetch routine may be sequenced by incrementing
the control address register through the rest of its
microinstructions.
• At the end of the fetch routine, the instruction is in the
instruction register of the computer.
step2
• The control memory next must go through the routine
that determines the effective address of the operand.
• A machine instruction may have bits that specify
various addressing modes, such as indirect address and
index registers.
• The effective address computation routine in control
memory can be reached through a branch
microinstruction, which is conditioned on the status of
the mode bits of the instruction.
• When the effective address computation routine is
completed, the address of the operand is available in
the memory address register.
step3
• The next step is to generate the microoperations that
execute the instruction fetched from memory.
• The microoperation steps to be generated in processor
registers depend on the operation code part of the
instruction.
• Each instruction has its own microprogram routine
stored in a given location of control memory.
• The transformation from the instruction code bits to an
address in control memory where the routine is
located is referred to as a mapping process.
• A mapping procedure is a rule that transforms the
instruction code into a control memory address.
• Once the required routine is reached, the
microinstructions that execute the instruction
may be sequenced by incrementing the control
address register,
• but sometimes the sequence of microoperations
will depend on values of certain status bits in
processor registers .
• When the execution of the instruction is
completed, control must return to the fetch
routine.
• This is accomplished by executing an
unconditional branch microinstruction to the first
address of the fetch routine.
• address sequencing capabilities required in a
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.
• 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.
• Subroutines
• Subroutines are programs that are used by other
routines to accomplish a particular task.
• A subroutine can be called from any point within the
main body of the microprogram.
• many microprograms contain identical sections of
code. Microinstructions can be saved by employing
subroutines that use common sections of microcode.
• For example, the sequence of microoperations needed
to generate the effective address of the operand for an
instruction is common to all memory reference
instructions.
• This sequence could be a subroutine that is called from
within many other routines to execute the effective
address computation.

You might also like