DLCA Module 4 - Control Unit Design Aeraxia - in
DLCA Module 4 - Control Unit Design Aeraxia - in
system. A control unit is a part of the CPU. A control unit controls the operations
of all parts of the computer but it does not carry out any data processing
operations.
The Control Unit is the part of the computer’s central processing unit (CPU), which
directs the operation of the processor. It was included as part of the Von Neumann
Architecture by John von Neumann. 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. It fetches internal
instructions of the programs from the main memory to the processor instruction register,
and based on this register contents, the control unit generates a control signal that
supervises the execution of these instructions. A control unit works by receiving input
information which it converts into control signals, which are then sent to the central
processor. The computer’s processor then tells the attached hardware what operations
to perform. The functions that a control unit performs are dependent on the type of CPU
because the architecture of the CPU varies from manufacturer to manufacturer.
• It coordinates the sequence of data movements into, out of, and between a
processor’s many sub-units.
• It interprets instructions.
• Hardwired
In the Hardwired control unit, the control signals that are important for instruction
execution control are generated by specially designed hardware logical circuits, in
which we can not 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.
As a result, few output lines going out from the instruction decoder obtains active signal
values. These output lines are connected to the inputs of the matrix that generates
control signals for execution units of the computer. This matrix implements logical
combinations of the decoded signals from the instruction opcode with the outputs from
the matrix that generates signals representing consecutive control unit states and with
signals coming from the outside of the processor, e.g. interrupt signals. The matrices are
built in a similar way as a programmable logic arrays.
Control signals for an instruction execution have to be generated not in a single time
point but during the entire time interval that corresponds to the instruction execution
cycle. Following the structure of this cycle, the suitable sequence of internal states is
organized in the control unit. A number of signals generated by the control signal
generator matrix are sent back to inputs of the next control state generator matrix.
This matrix combines these signals with the timing signals, which are generated by the
timing unit based on the rectangular patterns usually supplied by the quartz generator.
When a new instruction arrives at the control unit, the control units is in the initial state
of new instruction fetching. Instruction decoding allows the control unit enters the first
state relating execution of the new instruction, which lasts as long as the timing signals
and other input signals as flags and state information of the computer remain unaltered.
A change of any of the earlier mentioned signals stimulates the change of the control
unit state. This causes that a new respective input is generated for the control signal
generator matrix. When an external signal appears, (e.g. an interrupt) the control unit
takes entry into a next control state that is the state concerned with the reaction to this
external signal (e.g. interrupt processing).
The values of flags and state variables of the computer are used to select suitable states
for the instruction execution cycle. The last states in the cycle are control states that
commence fetching the next instruction of the program: sending the program counter
content to the main memory address buffer register and next, reading the instruction
word to the instruction register of computer. When the ongoing instruction is the stop
instruction that ends program execution, the control unit enters an operating system
state, in which it waits for a next user directive.
The fundamental difference between these unit structures and the structure of the
hardwired control unit is the existence of the control store that is used for storing words
containing encoded control signals mandatory for instruction execution.
In microprogrammed control units, subsequent instruction words are fetched into the
instruction register in a normal way. However, the operation code of each instruction is
not directly decoded to enable immediate control signal generation but it comprises the
initial address of a microprogram contained in the control store.
generator.
The
last mentioned field decides the addressing mode (addressing operation)
to be applied to the address embedded in the ongoing microinstruction. In
microinstructions along with conditional addressing mode, this address is
refined by using the processor condition flags that represent the status of
computations in the current program. The last microinstruction in the
instruction of the given microprogram is the microinstruction that fetches
the next instruction from the main memory to the instruction register.
• Lower cost: A well-designed control unit can reduce the cost of the CPU
by minimizing the number of components required and improving
manufacturing efficiency.
Disadvantages of a Poorly-Designed Control Unit
• The target architecture is a simplified model with a control unit (CU), arithmetic
logic unit (ALU), memory data register (MDR), and program counter (PC).
Microprogram Structure:
• Control Signals: Activate specific units like the ALU, memory, registers, and data
paths.
• Next State Address (NSA): Determines the next microinstruction to execute based
• Each instruction is broken down into the three phases: Fetch, Operand Fetch, and
Execution.
• Microinstructions within each phase activate the appropriate control signals and
determine the next state address (NSA) based on the current phase and any
• The microprogram provides a detailed roadmap for the control unit to execute the
instructions.
The control unit (CU) is the engine that runs the entire functions of a computer with the
help of control signals in the proper sequence. In the micro-programmed control unit
approach, the control signals that are associated with the operations are stored in
special memory units. It is convenient to think of sets of control signals that cause
specific micro-operations to occur as being “micro-instructions”. The sequences of
micro-instructions could be stored in an internal “control” memory.
The micro-programmed control unit can be classified into two types based on the type
of Control Word stored in the Control Memory, viz., Horizontal micro-programmed
control unit and Vertical micro-programmed control unit.
Example: Consider a hypothetical Control Unit that supports 4 k words. The Hardware
contains 64 control signals and 16 Flags. What is the size of control word used in bits
and control memory in a byte using:
a) Horizontal Programming
b) Vertical programming
Solution:
a)For Horizontal
b)For Vertical
6 bits for 64 signals i.e log264
4 bits for 16 flags i.e log216
12 bits for 4K words i.e log2(4*1024)
Control Word Size = 4 + 6 + 12 = 22 bits
Advantage –
Drawback –
Example –
Suppose the processor has two instructions add or subtract (Therefore an opcode of 1
bit is needed in which 0 opcode for add instruction and 1 for subtract is used.
Flowchart design –
Say C1,C2,C3 is the control signals for fetching the instruction. When X= 0, then
C4 control signal is produced (i.e. decoding) which is used for performing add
operation, and when x=1, then control signal C5 will be produced for performing the
subtract operation. And c6 control signal is used for storing the result and the process
ends.
Circuit design –
Between two consecutive control signals which are independent, one delay element is
introduced between them to produce a delay of 1 T state. The decision box is
converted into and complemented AND gate circuit(i.e. if x= 0 then x’= 1, so, a
c4 control signal is generated.
Advantage –
• This method has a logical approach ,therefore it helps to reduce the circuit
complexity.
• For the common control signals which need to be generated in every
instruction, for them only one circuitry can be designed .
Drawback –
• This is the most popular and most commonly used method for generating
delays between every consecutive control signal.
It’s main advantage is that it uses the logical approach of flowchart and
doesn’t use the unnecessary number of D FF.
• First, a flowchart is designed to represent the behavior of a control unit.
• It is then converted into a circuit using the same method of AND & OR
gates (as seen above in the Delay element method).
Example of 2 instructions used in the delay element method
• It is similar to the delay element method, but the only difference is that
instead of unnecessary D Flip flops there are triggering points in the
circuit. They are activated after a gap of one-one T-state.
• When the instruction ends, the control signal is generated to make End pin
= 1, and the counter is reset, so the next time, it begins from the first
count(0 0 0 ).
• If reset pin =1, then the counter will reset and after that it will again start
counting from 000 states.
Advantages :