Control Unit Design
Control Unit Design Approaches Hardwired: - The control logic is wired into logic circuits Microprogrammed - Here the control logic is coded in to a low level program
Hardwired Control Unit CLK Control Step Counter Reset Clock Step Decoder T0 T1 T2 Tn IR Instruction Decoder INS1 Encoder Interrupts INS2 Condition Codes INS3 EOI Control Signals
Hardwired Control Unit The Control Signals issued by the Control Unit are generated by an Encoder module which is a combinational circuit. The instructions, addressing modes, clock cycle no. during the instruction cycle etc. given as inputs to the Encoder module. Each control signal is modeled as a Boolean function of the inputs to the encoder unit. Each of the Boolean functions representing the control signals is implemented using a combinational logic circuit.
Control Signal Generation Example Boolean Functions for Control Signals: Zin = T0 + add. (T3 + T6 + T9) + mov. T3 + . . . . . . . MDRout = T2 + add. ( T4 + T8 + T9) + mov. T5 + . . . . . . add (R0)+, @(R1)+ T0: PCout, MARin, Read, Select1, Add, Zin T1: Zout, PCin, WMFC T2: MDRout, IRin T3: R0out, MARin, Read, Select1, Add, Zin T4: Zout, R0in, WMFC T5: MDRout, Yin T6: R1out, MARin, Read, Select1, Add, Zin T7: Zout, R1in, WMFC T8: MDRout, MARin, Read, WMFC T9: MDRout, Add, Zin T10: Zout, MDRin, Write, WMFC Example Control Signal word Sequences: mov R0, @(R1)+ T0: PCout, MARin, Read, Select1, Add, Zin T1: Zout, PCin, WMFC T2: MDRout, IRin T3: R1out, MARin, Read, Select1, Add, Zin T4: Zout, R1in, WMFC T5: MDRout, MARin T6: R0out, MDRin, Write, WMFC
Microprogramming Micro-order: A control signal issued by the control unit. e.g. PCin, PCout, WMFC etc. Micro-operation: The micro level operations carried out through issuing of one or more micro-orders. e.g. transfer of data between a pair of registers, a memory read operation etc. Micro-instruction: Set of one or more micro-operations carried out within one clock step in a processor. Micro-routine: A sequence of micro-instructions to carryout a task in a processor. Micro-program: A collection of micro-routines to achieve an Instruction set architecture.
Microprogram Control Word Each control word represents a micro-instruction Consists of a bit string with one bit for each micro-order in a micro-programmed processor. The bit value for a micro-order in a micro-instruction is set to ‘1’ if the corresponding micro-order is required to be issued in that micro-instruction. Otherwise it is set to ‘0’. 1 1 1 1
Microprogrammed Control Unit IR Starting and Branch Address Generator Interrupts Condition Codes EOF, EOS, EOD Micro-program Counter Clock EOI Control Store Control Word
Reducing Microinstruction Length IR Starting and Branch Address Generator Interrupts Condition Codes EOF, EOS, EOD Micro-program Counter Clock EOI Decoder Group Mutually exclusive Micro-Orders and encode them into fields in the Microinstruction. e.g. ALU micro-orders, EOX, Rnout etc. Decode them while issuing. Decoder Control Store Decoder Decoder