Control Unit

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Control Unit:

A control unit drives the corresponding processing hardware by generating a set of signals that are in sync with
the master clock. The two major operations performed by the control unit are instruction interpretation and
instruction sequencing.
The control unit is a part of the Central Processing Unit (CPU). The CPU is divided into the arithmetic logic unit
and the control unit. The control unit generates the appropriate timing and control signals to all the operations
involved with a computer. The flow of data between the processor, memory, and other peripherals is controlled
using the timing signals of the control unit.
The main function of a control unit is to fetch the data from the main memory, determine the devices and the
operations involved with it, and produce control signals to execute the operations.
The functions of the control unit are as follows −
 It helps the computer system in the process of carrying out the stored program instructions.
 It interacts with both the main memory and arithmetic logic unit.
 It performs arithmetic or logical operations.
 It coordinates with all the activities related to the other units and the peripherals.
The processor contains several registers and special function registers for temporary storage purposes, in
addition to the arithmetic logic unit and control unit. Program Counters (PC), Instruction Registers (IR), Memory
Address Registers (MAR), and Memory Data Register (MDR) are special function registers.
The figure shows these special function registers. PC is one of the main registers in the CPU. The instructions in a
program must be executed in the right order to obtain the correct results. The sequence of instructions to be
executed is maintained by the PC.

The IR holds the instruction that is presently being executed. The timing signals generated by the control unit
are based on the content of IR. The signals help in controlling the various processing elements that are
necessary to execute the instruction.
The function of the other registers MAR and MDR is to transfer data. The address of the main memory to/from
which data is transferred is stored in MAR. The data that is to be read/written from the specified address to the
main memory is stored in MDR.
Types of Control Unit:
There are two types of control units as follows.

 Hardwired control unit


 Micro-programmed control unit
Hardwired control unit:
A hardwired control is a mechanism of producing control signals using Finite State Machines (FSM)
appropriately. 
It is implemented as logical circuit (gates, flip-flops, decoders etc.) in the hardware. This organization is very
complicated if we have a large control unit. 
In this organization, if the design has to be modified or changed, requires changes in the wiring among the
various components. Thus, the modification of all the combinational circuits may be very difficult. 
To interpret the instructions & generate control signals for them, this control unit uses fixed logic circuits. To
generate signals, the fixed logic circuits use the contents of the control step counter, Instruction Register (IR) &
code flag, and some external input signals such as interrupt signals. The figure below shows the architecture
view of the Hardwired control unit as follows.

Typical Hardwired Control Unit


The fixed logic circuit in the diagram is a combinational circuit made from decoders & encoders. It generates the
output based on the state of its input(s). The decoder decodes the instruction loaded in IR (Instruction Register)
& generates the signal that serves as an input to the encoder. Also, external input & conditional codes act as an
input to the encoder. The encoder then accordingly generates the control signals based on the inputs. After the
execution of each instruction, another signal: the end signal is generated which resets the state of control step
counter & makes it ready for the next instruction.
The major goal of implementing the hardwired control is to minimize the cost of the circuit and to achieve
greater efficiency in the operation speed. Some of the methods that have come up for designing the hardwired
control logic are as follows −
 Sequence Counter Method − This is the most convenient method employed to design the controller of
moderate complexity.
 Delay Element Method − This method is dependent on the use of clocked delay elements for generating
the sequence of control signals.
 State Table Method − This method involves the traditional algorithmic approach to design the Notes
controller using the classical state table method.
Advantages of Hardwired Control Unit:

 Because of the use of combinational circuits to generate signals, Hardwired Control Unit is fast.
 It depends on number of gates; how much delay can occur in generation of control signals.
 It can be optimized to produce the fast mode of operation.
 Faster than micro- programmed control unit.
Disadvantages of Hardwired Control Unit:

 The complexity of the design increases as we require more control signals to be generated (need of more
encoders & decoders)
 Modifications in the control signals are very difficult because it requires rearranging of wires in the
hardware circuit.
 Adding a new feature is difficult & complex.
 Difficult to test & correct mistakes in the original design.
 It is Expensive.
Microprogrammed Control Unit: 
A microprogrammed control unit is implemented using programming approach. A sequence of micro-
operations is carried out by executing a program consisting of micro-instructions. 
Micro-program, consisting of micro-instructions is stored in the control memory of the control unit. Execution
of a micro-instruction is responsible for generation of a set of control signals. 
The microprogrammed control stores its control data in the control memory. It can start the important set of
micro-operations; the control memory is programmed. The changes and modifications in a micro-
programmed control can be completed by upgrading the microprogram in the control memory.
The figure displays the general configuration of a microprogrammed control organization.

The control is pretended to be a Read-Only Memory (ROM), where all the control data is saved permanently.
ROM supports the address of the microinstruction. The other register is the control data register that stores
the microinstruction that is read from the memory. It includes a control word that holds one or more
microoperations for the data processor.
The next address should be evaluated during this operation is done. It is evaluated in the next address
generator. Therefore, it is transferred to the control address register to be read. The next address generator is
referred to as the microprogram sequencer. It depends on the inputs to a sequencer, it decides the address of
the next microinstruction. The microinstructions can be determined in different approaches.
Difference between Hardwired and Microprogrammed Control Unit: 
ATTRIBUTES HARDWIRED CONTROL UNIT MICROPROGRAMMED CONTROL UNIT

1. Speed Speed is fast Speed is slow

2. Cost of Implementation More costlier. Cheaper.

Not flexible to accommodate new More flexible to accommodate


system specification or new new system specification or new
3. Flexibility instruction redesign is required. instruction sets.

4. Ability to Handle Complex Difficult to handle complex Easier to handle complex


Instructions instruction sets. instruction sets.

Complex decoding and Easier decoding and sequencing


5. Decoding sequencing logic. logic.

6. Applications RISC Microprocessor CISC Microprocessor

7. Instruction set of Size Small Large

8. Control Memory Absent Present

9. Chip Area Required Less More

10. Occurrence Occurrence of error is more Occurrence of error is less

You might also like