Professional Documents
Culture Documents
DEFINITION
DESIGN OF CONTROL UNIT
HARDWIRED CONTROL UNIT
MICROPROGRAMMED CONTROL UNIT
DEFINITION
• 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 to 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 CPU varies from manufacturer to manufacturer.
FUNCTIONS OF CONTROL UNIT
• Execution
• Causing the performance of each micro-op
• It coordinates the sequence of data movements into, out of, and between a
processor’s many sub-units.
• It interprets instructions.
• It controls data flow inside the processor.
• It receives external instructions or commands to which it converts to sequence of
control signals.
• It controls many execution units(i.e. ALU, data buffers and registers) contained
within a CPU.
• It also handles multiple tasks, such as fetching, decoding, execution handling and
storing results.
DESIGN OF CONTROL UNIT
• HARDWIRED CONTROL UNIT
• MICROPROGRAMMED CONTROL UNIT
HARDWIRED CONTROL UNIT
• 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.
• Design is based on a fixed architecture.
• It is implemented with the help of gates, flip flops, decoders etc. in the hardware.
• The inputs to control unit are the instruction register, flags, timing signals etc.
• This organization can be very complicated if we have to make the control unit large.
• If the design has to be modified or changed, all the combinational circuits have to be modified which is
a very difficult task.
• This is preferred in a reduced instruction set computing (RISC) architecture, which only has a small
number of instructions.
Control unit organization
8
Control signals
HARDWIRED CONTROL (CONTD..)
10
PROBLEMS WITH HARD WIRED DESIGNS
• In this organization any modifications or changes can be done by updating the micro program in the
control memory by the programmer.
• Micro-programmed control unit is slower in speed because of the time it takes to fetch microinstructions
from the control memory.
• It can handle complex instructions
• Less costlier than hardwired control as only micro instructions are used for generating control signals
• Control signals for many instructions can be generated
• Used in computer that makes use of Complex Instruction Set Computers(CISC)
BLOCK DIAGRAM OF OF MICROPROGRAMMED
CONTROL UNIT
Basic organization of a microprogrammed control unit.
Starting
address
Starting •Microprogram counter (mPC) is used to
IR generator
address read CWs from control store sequentially.
generator •When a new instruction is loaded into IR,
Starting address generator generates the
starting address of the microroutine.
•This address is loaded into the mPC.
mPC is automatically incremented by the
Clock mPC clock, so successive microinstructions are
read from the control store.
Control
store CW
14
ADVANTAGES AND DISADVANTAGES OF
MICROPROGRAMMING
• Simplifies design of control unit
• Cheaper
• Less error-prone
• Slower
DIFFERENCE B/W HARDWIRED CU & MICROPROGRAMMED CU
Hardwired cu Microprog cu
• Hardwired control unit generates the control signals
• Micrprogrammed control unit generates the control
needed for the processor using logic circuits.
signals with the help of micro instructions stored in control
• Hardwired control unit is faster when compared to memory
microprogrammed control unit as the required
• This is slower than the other as micro instructions are used
control signals are generated with the help of
for generating signals here.
hardwares.
• Easy to modify as the modification need to be done only at
• Difficult to modify as the control signals that need to
the instruction level.
be generated are hard wired
• Less costlier than hardwired control as only micro
• More costlier as everything has to be realized in
instructions are used for generating control signals.
terms of logic gates.
• It can handle complex instructions.
• It cannot handle complex instructions as the circuit
design for it becomes complex. • Control signals for many instructions can be generated.
• Only limited number of instructions are used due to • Used in computer that makes use of Complex Instruction
the hardware implementation. Set Computers(CISC)
• Control Word : A control word is a word whose individual bits represent various
control signals.
• Micro-routine : A sequence of control words corresponding to the control sequence
of a machine instruction constitutes the micro-routine for that instruction.
• Micro-instruction : Individual control words in this micro-routine are referred to as
microinstructions.
• Micro-program : A sequence of micro-instructions is called a micro-program, which
is stored in a ROM or RAM called a Control Memory (CM).
• Control Store : the micro-routines for all instructions in the instruction set of a
computer are stored in a special memory called the Control Store.
• Control Memory:
• The set of microinstruction is stored in control Memory (CM) also called as control store.
• 6) Control Address Register (CAR):
• It contains the address of next microinstruction to be read. This is similar to the program
counter(PC) which stores the address of the next instruction.
• 7) Control Buffer Register(CBR):
• When microinstruction is read from the control memory, it is transferred to a control Buffer
Register (CBR), which is similar to the instruction Register (IR) that stores the opcode of the
instruction read from the memory.
• 8) Sequencing:
• It loads the control Address register with the address of the next instruction to be read and
issues a read command to control memory.
Inputs:
Clock
IR
Control signals
Instruction Register (IR)
within CPU
Flags
Flags •
• Control signals
• Control from system bus
Control Signals from Control Bus Unit
Clock
Control signals
Outputs: to system bus
Control Memory is the storage in the microprogrammed control unit to store the
microprogram.
Writeable Control Memory: Control Storage whose contents can be modified, allow
the change in microprogram and Instruction set can be changed or modified is
referred as Writeable Control Memory.
Control Word: The control variables at any given time can be represented by a control
word string of 1 's and 0's called a control word.