Control Unit Computer Organization and Architecture by Ravinder Nath Rajotiya - May 17, 2021December 18, 20220 Share on Facebook Share Send email Mail Print Print Table of Contents Toggle IntroductionBasic Function of the control logic :Types of the Control Logic1. Hardwired control unitExample of a Hardwired control UnitTiming and Control Signals generated:2. Micro-programmed control unit:Difference between Hardwired control and Micro-programmed control unitsSummary: Introduction A general purpose computer consist of Input-output units, processing unit and a memory unit. Input-output permits interaction with the physical world whereas the memory unit stores user program and the binary information. The functional part of a general purpose digital computer, its functional units, the interaction between the control and the processor and the types of the control logic. Figure-1 on top left shows the function parts of a general purpose digital computer as CPU, input-output devices and the memory unit. Functional unit of a CPU is shown in figure 2 top right as ALU, set of registers and the timing and the control logic. Basic Function of the control logic : to generate timing sequences. to take input from the external sources and initiates the sequence of micro-operations for the processor to perform. figure-3 above shows the general interaction between the processor and the control logic Types of the Control Logic Figure 4 shows the types of control logic Hardwired control Logic Micro-programmed control logic Instruction from the memory are read into the IR, decoded in the control unit. Now the control unit will generate a binary control variable which is a string of 1’s and 0’s which is called a control word. Control words can be generated by logic hardware or can be programmed to perform various operations on the components of a system. 1. Hardwired control unit Figure below shows a simplified block diagram of the hardwired control unit. The control unit is built using the logic gates and is designed as a sequential state machine. Figure-2: Simplified diagram of hardwired control unit The instruction are passed to the control unit for decoding, and the control unit generates a set of microperations for each instruction. These microoperations control the internal operation of the CPU. Example of a Hardwired control Unit Hardwired control logic is shown in figure-3. It consists of: Instruction registers 3×8 instruction decoder Flag I to store the addressing mode bit Control logic 4×16 Sequence decoder 4-bit sequence counter Figure-3: Basic computer Control Unit; ref: Computer System Architecture by M. Morris Mano When an instruction is fetched from the memory, it is transferred into the instruction register(IR). The opcode part of the instruction is decoded using a 3×8 decoder which generates D7 – D0 signals to mean unique operations. IR(15), decoded(D7-D0), IR(11-0) and the timing signal (T15 – T0) are all fed to the control logic for generation of the control signals Timing and Control Signals generated: The figure which is referenced from CSA book by M. Morris Mano describes the timing diagram for varios micro-operations. The sequence counter generates the precisely controlled T0-to-T15 a total of 16 timing pulses. As an operation say memory operation completes in 4T states, it is required to clear the sequence counter so that another operation can be initiated. The logic for clearing the SC : D3.T4 : SC <– 0 The timing diagram shows this micro-operation. D3 becomes active at the end of T2 pulse D3.T4 is ANDed to produce a low CLRSC at the and of T4. clears SC <– 0 at the end of T4 2. Micro-programmed control unit: A control word can be programmed to perform various operations on components of the system. A control unit whose control word is stored in the control memory which is usually a ROM is called as microprogram control unit. Each control word in the control memory contains within it a microinstruction. Every microinstruction specifies one or more micro-operations. A microprogram is written for every instruction supported by the CPU. Each instruction of a program causes the corresponding micro-program to be fetched and its contol information extracted in a manner that resembles the fetching and execution of a program from the main memory. Since the control signals are embedded into a kind of low-level software -this is also referred as firmware. The general features of MCU is: One time Programmable, programmed during manufacture We can change its functionality, but generally not required once designed Reusability-code Difference between Hardwired control and Micro-programmed control units Attributes Hardwired Control Micro-programmed Control No. of Instructions Uses Fixed Instruction Uses Variable or large instruction set Design Logic Binary control word is generated using fixed logic blocks – Logic gates, MUX, decoders, FF etc. Binary control word are stored in a control memory. Speed High Speed of Operation Comparatively Slow Cost Expensive Inexpensive Flexibility Not Flexible for adding new features New features can easily be incorporated Design Complexity Relatively complex design if more functions are to be controlled Design Complexity is less when compared with hardwired control Chip Area Small Large Applications Used in RISC Processors suc as ARM, PA-RISC, Power Architecture, Alpha, AVR, ARC and the SPARC. Used in CISC Processors such as : Examples of CISC: VAX, Motorola 68000 family, System/360, AMD and the Intel x86 CPUs. Summary: A control function that specifies a micro-operation is a binary variable. When in one particular state a corresponding micro-operation is executed. Control Word- A binary control variable at any given time can be represented as a series of 1’s and 0’s and is called as a control word. A control unit whose control word is generated using a dedicated hardware is called hardwired control unit A control unit whose control words are stored in a control memory usually ROM is called micro-programmed control unit. Each word in a Control Memory contains within it a microinstructions. A microinstruction specifies one or more micro-operations. A sequence of microinstructions constitutes a microprogram Share on Facebook Share Send email Mail Print Print