Control Unit Design
Control Unit Design
CONTROL UNIT
DESIGN
Manish Kumar Bajpai
Datapath of Basic Processing element
Micro Instruction
• MDR Bus.IN
• MDR1 MDR1+MDR2
• IR PC
CPU as State Machine
• LA Load accumulator
• LD Load Data
• LM Load Memory Address
• EI Enable IR
• EA Enable Accumulator
• LM Load MAR
• R Memory read
• W Memory Write
• ED Enable MDR
CPU as State machine
• Next state from current state – • prior state & condition
• State 0 -> State1 • S4, S5, S7, S8, S9, S11 -> State0
• State 1 -> S2, S6, S8, S10 _________________ -> State1
• State 2 -> S5 or … _________________ -> State2
_________________ -> State3
• State 3 -> S9 or … _________________ -> State4
• State 4 ->State 0
• State 5 -> State 0 • State2 & op = SW -> State 5
• State 6 -> State 7 _________________ -> State6
• State 7 -> State 0
• State 8 -> State 0 • State 6 -> State 7
• State 9-> State 0 _________________ -> State8
• State 10 -> State 11
• State 11 -> State 0 • State3 & op = JMP -> State 9
_________________ -> State 10
• State 10 -> State 11
Control Unit Design
Control
unit
Micro
Hardwired
programmed
RISC CISC
Hardwired Control Unit
Ring Counters
Hardwired Logic Equations
• IP = T2
W = T5*STA
LP = T3*JMP + T3*NF*JN
LD = T4*STA
LA = T5*LDA + T4*ADD + T4*SUB
EA = T4*STA + T3*MBA
EP = T0
S = T3*SUB
A = T3*ADD
LI = T2
LM = T0 + T3*LDA + T3*STA
ED = T2 + T5*LDA
R = T1 + T4*LA
EU = T3*ADD+T3*SUB
EI = T3*LDA + T3*STA + T3*JMP + T3*NF*JN
LB = T3*MBA
Control Matrix Circuit
Hardwired Control Unit
Micro-Programmed Control Unit
• Micro -programmed control unit •
• The logic of the control unit is specified by a
microprogram
• Also known as firmware
• Also Known as Control Word
• A microprogram consists of a sequence of Micro -
operations.
Micro-Programmed Control Unit
• Micro instructions are in control memory to produce
control signal
• Uses read only memory to store control words
• Easy to implement
• Slow in nature
• Needs frequent memory access
• Can handle complex instruction
• Update is only needed in Read only memory
• Less costly
• Mostly used in CISC architectures
Micro-Programmed Control Unit
• In a micro-programmed processor, the control unit
consists of:
• Control address register – contains the address of the
next microinstruction to be executed.
• Control data register – contains the microinstruction to
be executed.
The sequencer – determines the next address from within
control memory
• Control memory – where microinstructions are stored.