Computer Architecture & Organization
CONTROL UNIT
Introduction
• A processor is composed of Datapath and control unit.
• Datapath of a processor is the execution unit such as ALU, shifter,
registers and their interconnects.
• Control unit is considered to be the most complex part of a processor.
• Its function is to control various units in the Datapath.
• Control unit realizes the behavior of a processor as specified by its
micro operations.
• The performance of control unit is crucial as it determines the clock
cycle of the processor.
Introduction
Control Unit is the part of the computer’s central processing unit (CPU), which directs the
operation of the processor.
It is the responsibility of the Control Unit to tell the computer’s memory, arithmetic/logic
unit and input and output devices how to respond to the instructions that have been sent to
the processor.
The functions that a control unit performs are dependent on the type of CPU because the
architecture of CPU varies from manufacturer to manufacturer. Examples of devices that
require a CU are:
- Control Processing Units(CPUs)
- Graphics Processing Units(GPUs)
Components of a Control Unit
The components of this unit are instruction , control signals within the CPU, control signals
to/from the bus, control bus, input flags, and clock signals.
The components of the Hardwired control unit are instruction register (contains opcode and
address field), timing unit, control state , control signal generation matrix, and instruction
decoder.
The components of the Micro programmed control unit are the next address generator, a
control address register, control memory, and control data register.
Components of a Control Unit
How Does Control Unit work?
• A control unit receives data from the user and translates it into
control signals that are subsequently delivered to the central
processor.
• The processor of the computer then instructs the associated
hardware on what operations to do.
• Because CPU architecture differs from manufacturer to
manufacturer, the functions performed by a control unit in a
computer are dependent on the CPU type.
Functions of the Control Unit
1. It coordinates the sequence of data movements into, out of, and between a processor’s many sub-units.
2. It interprets instructions.
3. It controls data flow inside the processor.
4. It receives external instructions or commands to which it converts to sequence of control signals.
5. It controls many execution units (i.e. ALU, data buffers and registers) contained within a CPU.
6. It also handles multiple tasks, such as fetching, decoding, execution handling and storing results.
Types of the Control Unit
There are two types of control units:
1) Hardwired control unit
2)Micro programmable control unit.
1. Hardwired Control Unit
• The control signals are generated by specially designed hardware logical
circuits.
• we cannot modify the signal generation method without physical change of
the circuit structure.
• The operation code of an instruction contains the basic data for control signal
generation.
• In the instruction decoder, the operation code is decoded.
• The instruction decoder constitutes a set of many decoders that decode
different fields of the instruction opcode.
1. Hardwired Control Unit
1. Hardwired Control Unit
Hard‐wired Control Unit‐advantages
[Link] the average number of clock cycles needed per instruction
[Link] a relatively small area (typically 10%) of the CPU chip area
[Link] efficiency in terms of operation speed
[Link] to minimize cost of the circuit
Problems With Hard Wired Control Unit Designs
[Link] sequencing & micro‐operation logic
[Link] to design and test •Inflexible design
[Link] design turn around time for complex design
[Link] to add new instructions
2. Micro programmable control unit
• The fundamental difference between these unit structures and the structure of the
hardwired control unit is the existence of the control store.
• the control store is used for storing words containing encoded control signals
mandatory for instruction execution.
• The Microprogrammed Control organization is implemented by using the
programming approach.
• In Microprogrammed Control, the micro-operations are performed by executing a
program consisting of micro-instructions.
2. Micro programmable control unit
2. Micro programmable control unit
Micro‐programmed Control Unit Advantages
1. Flexible and allows designers to incorporate new and more powerful instructions
2. allows any design errors discovered during the prototyping stage to be removed
Microprogrammed Control Unit Disadvantages
1. requires several clock cycles to execute each instruction, due to the access time of
the microprogram memory
2. Occupies a large portion (typically 55%) of the CPU chip area
Comparison between CU Structures
Hardwired Control Unit Microprogrammed Control Unit
generates control signals using logic circuits Generates control signals using micro instructions
Faster Slower
Difficult to modify Easy to modify
More costlier Less costlier
It cannot handle complex instructions It can handle complex instructions
Only limited number of instructions are used Control signals for many instructions can be generated
Used in computer that uses Reduced Instruction Set (RISC) Used in computer that uses Complex Instruction (CISC)
Conclusion
In summary:
• The CPU is a crucial component in modern computing, and its performance has
a significant impact on a computer's overall speed and efficiency.
• The development of specialized processors highlights the importance of
optimizing hardware for specific workloads and applications.