Microprogrammed Control Unit
Microprogrammed Control Unit
1
Microprogrammed Control Unit
• In microprogrammed control unit design, control
signals are generated by a program similar to
machine language programs.
• Control unit stores the values of signals in
memory instead of computing them.
• Every control signal is allocated a bit in memory,
and if the signal is to be 1, the bit will store a 1;
otherwise it will store a 0.
• Suppose that the control unit needs to generate
20 control signals. Then, 20 bits are allocated for
each memory address.
2
Microprogrammed Control Unit
• Each memory address will store the signal values for a
particular clock cycle. For example, memory address 0
will store the signal values for clock cycle T1.
• The word whose bits represent the various control
signals required is called Control Word (CW).
• An individual control word is also called
Microinstruction.
• A Microroutine is sequence of control words
corresponding to control sequence of machine
instruction.
• The Control Store stores microroutines for all
instructions in instruction set of a computer.
3
Microprogrammed Control Unit
• Consider the control sequence for instruction
ADD R1, [R3] (R1← R1 + [R3]) for the single-
bus CPU:
4
General Microprogrammed Control
Unit Organization
• uPC: holds the address
of next contol word to
be fetched from the
control store.
• Incrementer: to
increment the uPC.
• Control Store: to store
the microroutines for all
instructions.
• Microinstruction register
(uIR): to hold the fetched
microinstruction.
5
General Microprogrammed Control
Unit Organization
• Programmable logic array (PLA): mapping opcode field of IR
to starting address of microroutine of instruction.
• 4x1 Multiplexer: The uPC can be loaded from:
– The incremented uPC.
– The output of the PLA.
– An external source. This allows the uPC to be initialized to a
starting value to begin instruction fetch, interrupt service, or
reset.
– Branch address field from the current microinstruction. This
allows unconditional and conditional microbranches.
• Sequencer: combinational circuit to control 4x1 MUX
select lines based on microbranch control signals from
microinstruction and flags.
6
Control Word Format
• The control store contains three
kinds of fields in each control
word:
– Control signal field, C bits: used
to store the control signals such
as PCin, MARout, etc., with 1 bit
for each control signal.
– Branch address field, n bits: used
to store the microbranch
address, where n is the number
of bits in the uPC.
– Branch control field, k bits:
contains various signals to
control branching in microcoded
control unit.
7
Branching Controls
8
Wilker’s Design : Control field
9
How to decide I word length
1. The degree of parallelism required at the micro-operation level
2. How the control information is represented or encoded
3. How to specify the next I address
o Parallelism in I
If all useful combination of parallel micro-operation are specified by a single
opcode it would be enormous, and decoder will be complicated.
→ divide the micro-operation specification part into k disjoint control field, any
one of which can be performed simultaneously with other.
① In IBM 360/50: I 90 bits (21 partitioned control field).
② Wilker design: 1-bit control field for each control signal.
K0 K1 K2 Micro-operation
0 0 1 R← X0
0 1 0 R← X1
0 1 1 R← X2 5 operations
1 0 0 R← X3
0 0 0 No op
I : horizontal VS vertical
horizontal form : ① long format
② able to express a high degree of parallelism
③ little encoding for the control information.
13
14
Twos-complement Multiplication - HDL
Address Microoperations Control Signals
activated
BEGIN: A := 0, COUNT := 0, F := 0, M := INBUS; c9, c10
INPUT: Q := INBUS; c8
TEST1: If Q[0] = 0 then go to RSHIFT:
0000 00 0000 0 0 0 0 0 0 0 0 0 1 1 0 0
0001 00 0000 0 0 0 0 0 0 0 0 1 0 0 0 0
0010 01 0100 0 0 0 0 0 0 0 0 0 0 0 0 0
0011 00 0000 0 0 1 1 1 0 0 0 0 0 0 0 0
0100 10 0010 1 1 0 0 0 0 0 0 0 0 0 1 0
0101 01 0111 0 0 0 0 0 0 0 0 0 0 0 0 0
0110 00 0000 0 0 1 1 1 1 0 0 0 0 0 0 0
0111 00 0000 0 0 0 0 0 0 1 0 0 0 0 0 0
1000 00 0000 0 0 0 0 0 0 0 1 0 0 0 0 0
1001 11 1001 0 0 0 0 0 0 0 0 0 0 0 0 1
18
19
20
21
22
23
END
24
5.2 Microprogrammed Control
Instruction
: implemented by a sequence of one or more sets of concurrent micro-operations.
Microprogramming
: control-signal selection and sequencing information is stored in a ROM or RAM
called a control memory(CM), and microinstruction is fetched from CM.
25