Microprogram Control
Microprogram Control
Topics to cover
• Control memory
• Address sequencing
• Micro program example
• Design of control unit
Control Memory
• Control Unit
Function: To initiate sequences of micro operations
Control signal specifies micro operations
Two major types of control unit:
1) Hardware control:
When these control signals are generated by hardware, the control unit is hardwired
The control logic is implemented with gates, flip flops, decoder, multiplexer and other
digital circuits.
Fast operation
Wiring change is difficult.
2) Micro programmed control:
When these control signals originate in data stored in a special unit and constitute a program on the
small scale, the control unit is micro programmed .
The control memory is programmed to initiate the require sequence of micro operation for an
instruction.
Update can be easy
Slow micro operation.
Control Word
The control function specifying a microoperation is a binary variable whose active state could be
either 1 or 0.
In the variable ’s active state, the microoperation is executed.
The string of control variables which control the sequence of microoperations is called a control
word.
Micro instruction
The micro operations specified in a control word is called a microinstruction.
It specifies one or more micro operation for the system.
Micro Program
It is sequence of micro instruction just like as program is a sequence of program. It is of two type
which are as follows:
Dynamic microprogramming(RAM)
Ram can be used for writing
Static micro programming(ROM)
Control word in rom are made permanent during hardware production.
Micro programmed control organization
• In a micro programmed processor, the control unit consists of:
Microinstruction Format
3 3 3 2 2 7
F1 F2 F3 CD BR AD
F1 Microoperation Symbol
000 None NOP F2 Microoperation Symbol
001 AC AC + DR ADD 000 None NOP
010 AC 0 CLRAC 001 AC AC - DR SUB
011 AC AC + 1 INCAC 010 AC AC DR OR
100 AC DR DRTAC 011 AC AC DR AND
101 AR DR(0-10) DRTAR 100 DR M[AR] READ
110 AR PC PCTAR 101 DR AC ACTDR
111 M[AR] DR WRITE 110 DR DR + 1 INCDR
111 DR(0-10) PC PCTDR
F3 Microoperation Symbol
000 None NOP
001 AC AC DR XOR
010 AC AC’ COM
011 AC shl AC SHL
100 AC shr AC SHR
101 PC PC + 1 INCPC
110 PC AR ARTPC
111 Reserved
MICROINSTRUCTION FIELD DESCRIPTIONS - CD, BR
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
SYMBOLIC MICROINSTRUCTIONS
Symbols are used in microinstructions as in assembly language
A symbolic microprogram can be translated into its binary equivalent by a
microprogram assembler.
Sample Format
five fields:label; micro-ops; CD; BR; AD
1) Label: may be empty or may specify a symbolic address terminated with a colon
2) Micro-ops: consists of one, two, or three symbols separated by commas
3) CD: one of {U, I, S, Z}, where U: Unconditional Branch
I: Indirect address bit
S: Sign of AC
Z: Zero value in AC
4) BR: one of {JMP, CALL, RET, MAP}
5) AD: one of {Symbolic address, NEXT, empty}
SYMBOLIC MICROPROGRAM - FETCH ROUTINE