In This Article
What is Control Unit?
A control unit or CU refers to the circuitry responsible for controlling or directing the operations performed within the processor of a computer.
It basically tells the memory, logic unit, and the input and output devices how exactly they should respond to the instructions given and required by a program.
- The control unit works only with synchronizing the inner parts of a processor in order to interpret one instruction at a time.
- The CU performs a few important tasks such as fetching instructions, decoding, integrating operations, regulating the functional elements, handling program execution and storing interim results.
- Typically, the CPUs and GPUs of a computer use the control unit while executing any specific program to be directed by it with the control and timing signals while executing a program.
- There are two types of control units such as hardwired control units and micro programmed control units.
- In the modern hardwired control units, the combinational and sequential circuits are replaced by a Wilkes control unit which has a storage unit for storing the instruction sequences of a micro-program.
Understanding Control Unit
The control unit is one of the major parts of a CPU with the others being the Arithmetic Logic Unit, registers, buses, cache and clock.
However, it does not process any data but simply controls the operation of the Central Processing Unit by generating and sending proper signals that are necessary for the overall operation of the system.
The timing signals generated by the CU helps in managing the flow and sequence of data between the CPU and the memory as well as other peripheral devices connected to it.
The CU is basically the Integrated Circuit in the CPU. The entire scheduling of the operation and decoding are done by using special electronic circuits.
This makes up the major part of the circuit’s complexity.
The main components of a control unit are:
- Control signals within the CPU
- Instruction registers
- Control signals to and from the bus
- Input flags
- Control bus and
- Clock signals.
The control unit basically works as follows:
- It first receives the input information
- It then converts this information into control signals
- These are then sent to the CPU.
In turn, the processor, after receiving the control signals, tells the related and attached hardware device the type of operation that it needs to carry out.
It also sets the op codes and multiplexers so that the right type and amount of data is received and sent from and to the right area.
This ensures that the correct operations are performed in time with the other different parts of the system.
What is Control Unit Function?
The most important function of the control unit is to fetch instructions given by the memory of the computer and to execute them.
Typically, the functions performed by the control unit are heavily dependent on the type of CPU.
This is because there is a significant difference in the architecture between different manufacturers.
Some of the important functions performed by the control unit are:
- Controlling the flow of data in the CPU
- Directing the data flow sequence between the CPU and other related devices
- Interpreting the instructions
- Generating a control signal sequence from the commands and instructions received from the instruction register
- Controlling the operations of the Arithmetic Logic Unit or ALU, registers and data buffers and
- Fetching, decoding, handling and storing execution results.
Therefore, the functions of the control unit revolve around regulating and integrating the operations of the computer system and activating all of the other functional elements involved in it in a proper sequence, as and when required.
However, the control unit cannot handle data, store data or process data by itself. For transferring data, it has to communicate with the input and output devices.
Several modern computers also come with special additional control units that perform additional functions such as minimizing power usage, noise and even enhancing cooling.
These are usually found in battery operated, small computers such as cellphones, where battery life is crucial.
Apart from the basic operations, there are a few specific types of control units that can also do branch prediction.
These units are especially used in a pipelined computer.
The CU maintains an electronic list of the branches taken most recently in the form of encoded addresses using a few bits of each branch.
In these specific computers, the control unit may also perform speculative execution to determine the directions of the branch and discard the calculations of the one that is not used.
What Are the Types of Control Unit?
There are basically two types of control units namely, hardwired control unit and micro programmed control unit.
The hardwired control units consist of the following components:
- Instruction register that contains the address field and op code
- Instruction decoder
- Control state generator
- Timing unit and
- Control signal generation matrix, and instruction decoder.
The basic design of this CU consists of a unique hardware logic circuit. It normally does not allow modifying general signals for execution in the CPU.
The basic data of the instruction operation code is sent to the instruction decoder.
This decodes all the different data in the opcode to produce output signals containing active signal values for the matrix generator.
This generates the control signals to execute the program finally by the CPU of the computer.
The micro programmed control unit, on the other hand, consists of the following components:
- Control memory
- A control address generator
- The next address generator and
- Control data register.
This stores the control signals that are encoded while executing a program. The entire process happens on a single level and the signals are not generated and decoded immediately.
This is because the microprogram stores the address field in the control store.
The instruction is received from the control memory address register in binary control values or control word.
For data processing, one or more micro operations must be performed.
The sequence of the operations is regulated by the next address generator to send the sequence address or the read from the control memory.
It is then sent to the control address register, which reads the micro instruction.
The micro programmed control unit is classified into two further types based on the type of control word stored in the memory namely, horizontal micro-programmed control unit and vertical micro-programmed control unit where control signals are represented in decoded and encoded binary formats, respectively.
Is the Control Unit a Bus?
Typically, a control unit should not be considered as a control bus because both perform different functions though the purpose of both is the same – to help the CPU in executing a program.
A control bus is used by the CPU to transfer data and communicate with other devices within the system.
It is done through a set of physical connections such as printed circuits and cables.
It carries the command signals from the Central Processing Unit and response signals from hardware.
On the other hand, in modern computers, the control unit is usually a bus controller. This special circuitry may control the bus directly while an instruction reads or writes memory and directs operations.
As said earlier, the control unit also instructs memory and logic units and is used by both the CPU and the GPU of a computer system.
Therefore, the control unit is the nerve center of a computer system that provides timing and control signals and manages most of the resources of the system by regulating the flow of data.
It also helps in fetching data from the main memory and allowing the system to process the required data to carry out the instructions of a stored program.
Is Control Unit Hardware or Software?
The control unit is certainly a piece of hardware, being a special circuitry that helps in the data flow and instruction execution by instruction sequencing and interpretation.
It is responsible for driving all corresponding hardware for processing an instruction by producing a synchronized set of signals with the master clock.
It is not any type of system software like the operating system, which manages the global resources of a computer, peripherals, RAM processes and more.
Where is the Control Unit Located?
The control Unit is typically located in the Central Processing Unit or CPU of the computer, being a part of it.
The control unit is one of the most vital functional parts of the Central Processing Unit of a computer system.
It manages the data flow and helps the processor to execute a program instruction.
Available in two basic types, this piece of hardware acts as the nerve center of a computer.