Control Unit
Computer Architecture & Organization
Instructor: Ahmad Tijjani Garba
Control Unit
• The control unit (CU) is a fundamental component of a computer’s
central processing unit (CPU). Its main function is to manage and
coordinate the operations of the CPU. It also controls the flow of data
and instructions between the CPU and other parts of the computer
system.
• The control unit is responsible for
interpreting and
executing instructions fetched from
the computer’s memory (RAM). It
fetches instructions from the main
memory RAM and decodes them,
determining the specific operations
that need to be performed. It then
directs the appropriate components
Control Unit
• The control unit and its functions is an important topic
in computer organization and architecture. The control unit is
a vital component of the processor architecture. The control
unit handles many crucial functions performed by the CPU.
• The processor internally consist of three functional units. The
CPU functional units include control unit (CU) , arithmetic
logic unit (ALU) and the memory unit (MU).
• In computer architecture, the main function of the central
processing unit ( CPU ) is to execute the program
instructions. The processor ( CPU ) is also responsible to
control all the operations performed by the computer system.
Control Unit
• It is the control unit that generates the
necessary control signals that directs the
various hardware components connected to the
system.
• These control signals are essential part of the
computer architecture to synchronize the
operations of the various hardware system
components and external peripheral devices
connected to the system.
• The control unit internally contains
a decoder unit . The main function of this
decoder unit is to decode the machine
instructions. The CU after decoding the
instructions, directs the processor to perform
Control Unit Components
• The control unit ( CU ) internally has four important
components :
1) Timing And Control Logic.
2) Program Counter.
3) Instruction Register.
4) Instruction Decoder.
1. Timing and Control Logic
• The central processing unit is driven by a
stream of clock signals generated by
the timing unit of the control unit. The timing
unit internally consist of quartz oscillating
crystal that generates the analog signals.
These analog signals are converted into digital
sign wave by a analog to digital converter.
• A clock circuit converts the analog pulse
generated by crystal oscillator to a steady
stream of digital clock signals represented by
a square wave.
• For each clock signal , a CPU completes part of
the instruction execution. And for this reason
the CPU clock speed controls the processor
2. Program Counter (PC) Register
• The CPU internally makes use
of high speed internal memory
called CPU register. The CPU
memory unit consist of
number of registers.
• The CPU initiates the program
execution by placing the
address of the first instruction
into the program
counter
• The register
program to be
counter fetched
register is automatically incremented each
fromthe
time thecurrent
main memory (RAM).
instruction is fetched. And therefore, the program
counter always contains the address of the next instruction to be
2. Program Counter (PC) Register
• The Program Counter (PC) register is a vital component CPU architecture. It
is a specialized register (small high speed memory) within the CPU
responsible for keeping track of the memory address of the next instruction
to be fetched and executed.
• As the CPU processes instructions, the PC register increments to point to
the next instruction that is to be fetched from the memory, allowing for the
sequential execution of program code. The PC register plays a critical role in
the fetch-execute cycle, a fundamental operation in computer processing.
• During the fetch phase, the CPU retrieves the instruction from memory
using the memory address stored in the PC register. Subsequently, during
the execute phase, the instruction is decoded (By CU) and executed
(By ALU), and the PC register is updated to point to the next instruction in
memory.
3. Instruction Register (IR)
• In computer architecture , the instruction
register ( IR ) is also alternately referred
to as current instruction register ( CIR ).
The instruction register is a part of the
control unit. The instruction register
actually holds the current instruction that
is being decoded and executed by the
processor.
• During the program execution , the
instruction register is used to store the
instruction word. The IR is used to
temporarily store the instruction that is
3. Instruction Register (IR)
• The instruction is a binary word or
code that defines a specific
operation to be performed. The
instruction code is also called as
operation code denoted
by OPCODE in the machine
instruction format.
• The CPU decodes the OPCODE from
the instruction format and then
executes the desired operation as
per the instruction set architecture (
4. Instruction Decoder
• The control unit internally consist of
instruction decoder circuit that
decodes the machine instruction
format.
• The main function of the instruction
decoder unit is to translate the
operation code part of the machine
instruction and direct the ALU. The
ALU operates on the data as per the
operation code ( Opcode ) specified
and the instruction set
architecture ( ISA ) supported by the
processor.
Example
• Let us consider example of the 3
X 8 Decoder used in the 8085
architecture .The 3-to-8
Decoder accepts three inputs
and decodes into eight outputs
.
• This decoder has three inputs as
A, B, and C and eight output
from Y0 through Y7. Based on
the combinations of the three
inputs, only one of
Functions of Control Unit
In computer architecture, The control unit is an important component of
the CPU architecture and performs following functions.
1. The control unit controls the movement of data, memory read and
write operations between the processor and the main memory RAM.
2. The control unit generates the steady stream of clock pulses that
regulates speed of the instruction cycle. The instruction cycle is
performed by the CPU to execute the program instructions.
3. The control unit generates the control signals for all hardware
system components to regulate their activities.
4. The control unit also decodes the machine instruction format and
directs the ALU to perform the desired operation. The ALU operates
on the data fetched into the CPU registers
Types of Control Unit
In computer architecture , The control unit
architecture can be of two types. Each type is
fundamentally differs in terms of its hardware
implantation.
[Link] Control Unit.
[Link] Control Units
Hardware Controlled Unit
• The Hardwired control unit design is
based on the fixed architecture. In
this type of CU, the control signals
required to execute the program
instructions are generated by the
special hardware timing unit and
logical circuits.
• Since these CU implement the fixed
hardwired design that does not allow
any modification in the mechanism to
the generate the control signals
without incorporating the change in
Hardware Controlled Unit
• The operation code part of the instruction format
contains the basic data required to generate the control
signals. The instruction decoder circuit decodes the
operation code part of the instruction. The instruction
decoder internally consists of set of many decoders that
decode different fields of the instruction operation code
(Opcode).
• This type of CU architecture is preferred in case of a
reduced instruction set computing (RISC) architecture,
which has limited small number of instructions.
Microprogrammed Control Unit
• The Microprogrammed Control Unit
fundamentally differs in hardware
implementation. This type of CU
architecture is based on the special
control memory that is used for storing
the words containing the encoded control
signals required to execute the
instruction.
• In microprogrammed control units, the
instruction words are fetched into the
instruction register similar to normal
execution sequence. However, the
• operation
The Opcode code
partpart of instruction
of the the instruction is the initial address of a
contains
not directly decoded
microprogram containedby in
the
thedecoder to
control store which is responsible to execute
generate the control signal generation.
the instruction.
Comparison of Hardwired vs. Microprogrammed Designs
Aspect Hardwired Microprogrammed
Speed Fast (combinational) Slower (memory fetch)
Flexibility Low (rewire hardware) High (reprogram ROM)
Complexity High for large ISAs Low (logic in software)
Cost Low initial, high redesign High ROM, low redesign
Power Low Higher due to fetches
Scalability Poor (O(2^n) gates) Good (add ROM words)
Examples Early RISC (MIPS R2000 datapath) CISC (IBM 360, VAX)