Introduction

  • A control unit is a complex circuitry structure within a computer’s processor that directs, dictates, and coordinates the overall operations of the computer to run it smoothly and successfully. 

Definition

  • The Control Unit(CU) is one of the basic/major components of the processor/CPU which controls and coordinates the various operations with the execution of instructions by initiating the appropriate sequence of micro-operations for each task.

Characteristics/Feature

  • The control unit selects and interprets program instructions and then finally executes.
  • A control unit first, must know about the: (a) Basic components of the CPU and (b) the Micro-operation this CPU performs; to do any operation successfully.
  • The control unit is like a black box with certain inputs and outputs.
  • CPUs and GPUs(Graphics Processing Units) are devices that use control units.
  • A control unit must know how all the instructions will be executed. All this is achieved with the help of flags, op-codes, a clock, and some control signals to itself.

Function

  • The basic function of the control unit is to guide the various components of the CPU to perform a specific sequence of micro-operations to achieve the execution of an instruction successfully and finally, the job completed. To achieve the tasks, the control unit generates related control signals, which are responsible for achieving the tasks.
  • In other words, the basic function of the control unit is to control: –
a) Data exchange between CPU and memory or I/O modules
b) Internal operations in the CPU such as :
      • Moving data between registers (register transfer operations)
      • Making ALU to perform a particular operation on the data
      • Regulating other internal operations
  • The CU controls the execution of instructions by decoding the instruction and generating micro-operations to be performed for executing that instruction. 
  • They are responsible for all the operations to happen in the CPU.
  • The Control Unit (CU) is the unit that manages and coordinates the entire operation of a computer system. It also controls the operation of the other components of a computer system.
  • The Control Unit (CU) acts like the supervisor and monitors whether the operations are done in a proper systematic fashion or not.
  • The control unit is responsible for overall control and coordination of instruction execution i.e. it is responsible for defining and controlling the instruction cycle.
  • It issues control signals external to the processor to cause data exchange with memory and I/O modules.
  • It also issues control signals internal to the processor to move data between registers, to cause the ALU to perform a specified function, and to regulate other internal operations.
  • It generates timing signals and initiates the Fetch cycle of instruction execution. When the instruction is fetched, it generates the sequence of micro-operations that need to be executed to execute the instruction.
  • The control unit determines the sequence in which computer programs and instructions are executed.
  • The control unit first fetches the user’s program instructions from the main memory to the processor instruction register, and then it generates a related control signal based on the contents of the instruction register to supervise the execution of these instructions.

Architecture/Structure 

  • A control unit has a set of input values on the basis of which it produces an output control signal, which in turn performs micro-operations or the execution of instructions. These output signals control the execution of a program.
  • A typical model of a control unit is shown below –
    The inputs to the control unit are: –
    • The Master Clock Signal:
      • This signal causes micro-operations to be performed in a square.
      • In a single clock cycle, either a single or a set of simultaneous micro-operations can be performed.
      • The time taken to perform a single micro-operation is also termed processor cycle time or the clock cycle time in some machines.
    • The Instruction Register:
      • It contains the operation code (opcode) and addressing mode bits of the instruction.
      • It helps in determining the various cycles to be performed and hence determines the related micro-operations, which are needed to be performed.
    • Flags:
      • Flags are used by the control unit for determining the status of the CPU & the outcomes of a previous ALU operation.
      • For example, a zero flag if set conveys to the control unit that for instruction ISZ (skip the next instruction if zero flag is set) the next instruction is to be skipped. For such a case control unit causes an increment of PC by program instruction length, thus skipping the next instruction.
    • Control Signals from Control Bus:
      • Some of the control signals are provided to the control unit through the control bus.
      • These signals are issued from outside the CPU.
      • Some of these signals are interrupt signals and acknowledgment signals.

The output control signals are:

    • Control signals, which are required within the CPU:
      • These control signals cause two types of micro-operations, viz., for data transfer from one register to another and for performing an arithmetic, logic, and shift operation using ALU.
      • Control signals to control bus: These control signals transfer data from or to the CPU register to or from memory or the I/O interface. These control signals are issued on the control bus to activate a data path on the data/address bus etc.
  • A control unit contains a clock portion that provides clock pulses. This clock signal is used for measuring the timing of the micro-operations. In general, the timing signals from the control unit are kept sufficiently long to accommodate the proportional delays of signals within the CPU along various data paths. Thus, the clock to the control unit must provide counted timing signals. 
  • The control signals are applied directly to achieve the particular operation as the binary inputs to the logic gates of the logic circuits. All these inputs are the control signals, which are applied to select a circuit (for example, select or enable input) or a path (for example, multiplexers) or any other operation in the logic circuits.

Control Unit Organisation Techniques

  • There are a variety of techniques have been used today to organize a control unit but most of them fall into two major categories: –
    • Hardwired control organization
    • Microprogrammed control organization.

Hardwired control unit organization :

    • In the hardwired organization, the control unit is designed as a combinational circuit i.e., the control unit is implemented by logic gates, flip-flops, decoder, and other digital circuits.
    • In this organization, each signal is directly generated by the hardware based on the current state of the system and the opcode of the instruction being executed.
    • Hardwired control units can be optimized for fast operations.
    • In this control unit, the major inputs to the circuit are the instruction register, the clock, and the flags. Here, the control unit uses the opcode of instruction stored in the IR register to perform different actions for different instructions.
    • The control unit logic has a unique logic input for each opcode. This simplifies the control logic. This control line selection can be performed by a decoder.
    • A decoder will have n binary inputs and 2n binary outputs. Each of these 2n different input patterns will activate a single unique output line.
    • The clock portion of the control unit issues a repetitive sequence of pulses for the SS(Synchronization Signal) duration of micro-operation(s). These timing signals control the sequence of execution of instructions and determine what control signal needs to be applied at what time for instruction execution.
Wilkes Control Unit
    • Wilkes Control Unit is a type of Hardwired Control Unit.
    • This control unit is named after Prof. M. V. Wilkes of the Cambridge University Mathematical Laboratory who also coined the term microprogramming in 1951.
    • In Wilkes CU, microinstruction has two major components:-
      a) Control field which indicates the control lines that are to be activated and
      b) Address field, which provides the address of the next microinstruction to be executed.
    • Wilkes provided a systematic alternative procedure for designing the control unit of a digital computer.
    • In this CU, during instruction executing a machine instruction, a sequence of transformations and transfer of information from one register in the processor to another takes place. These were also called the micro-operations. 
    • The Wilkes control unit replaces the sequential and combinational circuits of a hardwired control unit with a simple control unit in conjunction with a storage unit that stores the sequence of steps of instruction that is a micro-program.
    • The control memory in Wilkes control is organized, as a PLA’s like matrix made of diodes. This is a partial matrix and consists of two components, the control signals and the address of the next micro-instruction. 

Microprogrammed control unit organization:

    • It is an alternative and advanced way of control unit manufacturing.
    • In a Microprogrammed control unit, the logic of the control unit is specified by a micro-program. A micro-program is also called firmware (midway between the hardware and the software).
    • Most of the modern CISC processors use micro-program control units.
    • A Microprogrammed control unit consists of:
      (a) One or more micro-operations to be executed and
      (b) The information about the micro-instruction to be executed next.
    • The following functions are performed by the micro-programmed control unit: –
      • The sequence of logic unit specifies the address of the control memory word that is to be read, in the Address Register of the Control Memory. It also issues the READ signal.
      • The desired control memory word is read into the control memory Buffer Register.
      • The content of the control memory buffer register is decoded to create control signals and next-address information for the sequencing logic unit.
      • The sequencing logic unit finds the address of the next control word based on the next-address information from the decoder and the ALU flags.

Loading


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.