Processor Organization and Architecture Module III Processor Organization and Architecture
Block Diagram of Control Unit
Inputs to Control Unit Clock Instruction Register Flags One micro-operation (or set of parallel micro-operations) per clock cycle Instruction Register Op-code and addressing mode of current instruction to determine which micro-operations need to be performed Flags Status of CPU and outcome of previous ALU operations Control Signals from control bus Signals to control unit like Interrupts and Acknowledgements
Outputs from Control Unit Control Signals within CPU Cause data movement between registers Activate specific ALU functions Control Signals to control bus To memory To I/O modules
Control Signal Example
Control Signal Example It has single accumulator(AC). Data paths are shown Termination of Control signals are shown Ci and indicated by a circle With each clock cycle, CU reads all its input and emit a set of control signals
Control Unit Implementation Control unit implementations fall into one of two categories: • Hardwired implementation • Microprogrammed implementation
Hardwired implementation In this, the control unit is essentially a state machine circuit. The input logic signals are transformed into a set of output logic signals, which are the control signals It uses a fixed logic circuits to generate control signals
Hardwired Control Unit
Hardwired Control Unit Instruction Register Uses opcodes to perform different actions for different instruction Decoder There should be unique logic input for each opcode It is done by decoder (n-bits 2n outputs ,each will activate a single unique output) Decoder becomes complex for variable length opcodes
Hardwired Control Unit Clock It issues repetitive pulses to execute micro-operations. Timing generator At the end of each subcycle, the timing generator is reinitialized to generate new T1 Control Unit Logic It defines how it produces output control signals as function of input signals For each control signal , a boolean expression is derived
Control Logic Example Let us consider a single control signal C5 (It causes data to be read into MBR)
Control Logic Example Let us define two control signals P and Q as PQ = 00 Fetch PQ = 01 Indirect PQ = 10 Execute PQ = 11 Interrupt Then C5 may be defined as
Control Logic Example C5 is also needed during the execute cycle. For example, let us assume that there are only 3 instructions that read from memory: LDA,ADD, and AND. Now C5 is defined as This same process is to be done for every control signal.
Hardwired Control Unit Modern processors result in large number of boolean expressions and implementing combinatorial circuits are extremely difficult. Hence simpler microprogramming approach is used
Advantages of Hardwired Control Unit Works faster as combinational circuits generates control signals based on input status.
Disadvantages of Hardwired Control Unit Complex in design if it requires larger number of control points No flexibility : difficult to make corrections or add a new feature Uses too many logic gates.
Micro-programmed Control Unit
Micro-programmed Control Microprogramming is a method of control unit design in which the control signal selection and the sequencing information is stored in a ROM or RAM called control memory. A sequence of microinstructions designed to control a specific instruction is called a microprogram.
Micro-programmed Control For each micro-operation, control unit have to generate a set of control signals For any micro-operation any control line may be on/off which can be represented by a binary pattern. Thus a control word is constructed for each micro-operation.
Microprogrammed Control The control information is stored in a control memory, and the control memory is programmed to initiate the required sequence of microoperations Adv: Any required change can be done by updating the microprogram in control memory Disadv: Slow operation