You are on page 1of 13

3140707

Computer Organization & Architecture

Unit – 4
Microprogrammed Control
Definition…
Microoperations:
 In computer central processing units, micro-operations (also known as a
micro-ops or μops) are detailed low-level instructions used in some designs
to implement complex machine instructions (sometimes termed macro-
instructions in this context).

Micro instruction:
 A symbolic microprogram can be translated into its binary equivalent by
means of an assembler.
 Each line of the assembly language microprogram defines a symbolic
microinstruction.
 Each symbolic microinstruction is divided into five fields: label,
microoperations, CD, BR, and AD.
Definition…
Micro program:
 A sequence of microinstructions constitutes a microprogram.
 Since alterations of the microprogram are not needed once the control unit
is in operation, the control memory can be a read-only memory (ROM).
 ROM words are made permanent during the hardware production of the
unit.
 The use of a micro program involves placing all control variables in words of
ROM for use by the control unit through successive read operations.
 The content of the word in ROM at a given address specifies a
microinstruction.
Microcode:
 Microinstructions can be saved by employing subroutines that use common
sections of microcode.
 For example, the sequence of micro operations 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.
4.1 Microprogrammed Control Organization

External Control
input word
Next- Control
Control Control
address data
address memory
generator register
register (ROM)
(Sequencer)

Next-address information
Control Memory
 A computer that employs a microprogrammed control unit will
have two separate memories: a main memory and a control
memory.
 The control memory holds a fixed microprogram that can not
be altered by the occasional user.
 The microprogram consists of microinstructions that specify
various internal control signals for execution of register
microoperation.
 Microinstructions generates the microoperations to fetch
instruction from main memory; to evaluate the effective
address, to execute the operation specified by the instruction,
and to return control to the fetch of next instruction.
4.2 Address Sequencing
 Microinstructions are stored in control memory in groups, with
each group specifying a routine.
 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.
 The 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.
Address Sequencing
Instruction code

Mapping
logic

Status Branch Mux


bits Multiplexer
logic select
Subroutine
register
(SBR)
Clock
Control address register
(CAR)
Incrementer

Control memory

Select a status bit


Branch address
Microoperations
4.3 Microinstruction Code Format (20 bits)

3 3 3 2 2 7
F1 F2 F3 CD BR AD

 F1, F2, F3: Microoperation fields


 CD: Condition for branching
 BR: Branch field
 AD: Address field
Microinstruction Code Format (20 bits)
Microinstruction are divided into four functional parts as follows:
 The three fields F1, F2, and F3 specify microoperations for the
computer.
 The microoperations are subdivided into three fields of three
bits each. The three bits in each field are encoded to specify
seven distinct microoperations. This gives a total of 21
microoperations.
 The CD field selects status bit conditions.
 The BR field specifies the type of branch to be used.
 The AD field contains a branch address. The address field is
seven bits wide, since the control memory has 128 = 27 words
Symbols & Binary Code for Microinstruction Fields

F1 Microoperation Symbol F2 Microoperation Symbol


000 None NOP 000 None NOP
001 AC AC + DR ADD 001 AC AC - DR SUB
010 AC 0 CLRAC 010 AC AC DR OR
011 AC AC + 1 INCAC 011 AC AC DR AND
100 AC DR DRTAC 100 DR M[AR] READ
101 AR DR(0-10) DRTAR 101 DR AC ACTDR
110 AR PC PCTAR 110 DR DR + 1 INCDR
111 M[AR] DR WRITE 111 DR(0-10) PC PCTDR
Symbols & Binary Code for Microinstruction Fields
F3 Microoperation Symbol
000 None NOP
001 AC AC + DR XOR CD Symbol Comments
010 AC AC’ COM 00 U-1 Unconditional branch
011 AC shl AC SHL 01 I - DR(15) Indirect address bit
100 AC shr AC SHR 10 S - AC(15) Sign bit of AC
101 PC PC + 1 INCPC 11 Z - AC = 0 Zero value in AC
110 PC AR ARTPC
111 Reserved

BR Symbol Function
00 JMP CAR AD if condition = 1, CAR CAR+1 if condition = 0
01 CALL CAR AD, SBR CAR+1 if condition=1, CAR CAR+1 if condition=0
10 RET CAR SBR (Return from subroutine)
11 MAP CAR(2-5) DR(11-14), CAR(0,1,6) 0
4.4 Hardwired control vs Micro programmed control architecture

HARDWIRED CONTROL UNIT MICROPROGRAMMED CONTROL UNIT

Hardwired control unit generates the control Micro Programmed control unit generates the
signals needed for the processor using logic control signals with the help of micro instructions
circuits stored in control memory
Hardwired control unit is faster when compared
to microprogrammed control unit as the This is slower than the other as micro instructions
required control signals are generated with the are used for generating signals here
help of hardware's
Difficult to modify as the control signals that Easy to modify as the modification need to be done
need to be generated are hard wired only at the instruction level

More costlier as everything has to be realized in Less costlier than hardwired control as only micro
terms of logic gates instructions are used for generating control signals

It cannot handle complex instructions as the


It can handle complex instructions
circuit design for it becomes complex

Only limited number of instructions are used due Control signals for many instructions can be
to the hardware implementation generated

Used in computer that makes use of Reduced Used in computer that makes use of Complex
Instruction Set Computers(RISC) Instruction Set Computers(CISC)
Questions asked in GTU exam

You might also like