0% found this document useful (0 votes)
36 views38 pages

DLCO Module 4 Sem 3

Uploaded by

Bhumika Barse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views38 pages

DLCO Module 4 Sem 3

Uploaded by

Bhumika Barse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Digital Logic & Computer Organization &

Architecture(DLCOA) – SEM 3

Prof. Sunil Nagare : 9619015411


M.Tech (VJTI) & B.Tech (SPIT) @nagare.sunil95
Module 4. Control Unit Design

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Register Organization in CPU
• In Computer Organization, the
register is utilized to acknowledge,
store, move information and
directions that are being utilized
quickly by the CPU.
• There are different kinds of registers
utilized for different reasons.
• Some of the commonly used
registers are shown in table

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Register Organization in CPU
• When we perform some operations, the CPU utilizes these registers to perform the
operations.
• When we provide input to the system for a certain operation, the provided information
or the input gets stored in the registers.
• Once the ALU arithmetic and logical unit process the output, the processed data is
again provided to us by the registers.
• The sole reason for having a register is the quick recovery of information that the CPU
will later process.
• The CPU can use RAM over the hard disk to retrieve the memory, which is
comparatively a much faster option, but speed retrieved from RAM is still not enough.
• Therefore, we have catch memory, which is faster than registers.
• These registers work with CPU memory like catch & RAM to complete the task quickly.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Register Organization in CPU
Operation Performed by Registers
Fetch:
• It is utilized for taking the directions by
the client.
• The instructions that are stored away
into the main memory for later
processing are fetched by registers.
Decode:
• This operation is utilized for deciphering
the instructions implies the instructions
are decoded the CPU will discover which
operation is to be performed on the
instructions.
Prof. Sunil Nagare : 9619015411 @nagare.sunil95
Register Organization in CPU
Execute:
• The CPU performs this operation.
• Also, results delivered by the CPU are
then stored in the memory, and after
that, they are shown on the client
Screen.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Microprogramming
• Microprogramming is the process of writing microcode for a microprocessor.
• Microcode is low-level code that defines how a microprocessor should function
when it executes machine-language instructions.
• Typically, one machine language instruction translates into several microcode
instructions, on some computers, the microcode is stored in ROM and cannot be
modified.
• Micro program for following operations.
i) ADD R1, M : Register R1 and Memory location M are added and result store at
Register R1.
ii) MUL R1, R2 : Register R1 and Register R2 are multiplied and result store at
Register R1.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Micro Program to ADD R1, M

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Micro Program to MUL R1, R2

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Microinstruction Sequencing & Execution
• A micro-program control unit can be viewed as consisting of two parts:
1. The control memory that stores the microinstructions.
2. Sequencing circuit that controls the generation of the next address.
• A micro-program sequencer attached to a control memory inputs certain bits of the
microinstruction, from which it determines the next address for control memory.
• A typical sequencer provides the following address-sequencing capabilities:
A. Increment the present address for control memory.
B. Branches to an address as specified by the address field of the micro instruction.
C. Branches to a given address if a specified status bit is equal to 1.
D. Transfer control to new address as specified by external source (Instruction Register).
E. Has a facility for subroutine calls and returns.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Microinstruction Sequencing & Execution
• Depending on the current microinstruction condition flags, and the contents of the
instruction register, a control memory address must be generated for the next micro
instruction.
• There are three general techniques based on the format of the address information in
the microinstruction:
1. Two Address Field.
2. Single Address Field.
3. Variable Format

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Microinstruction Sequencing & Execution
Two (Dual) Address Field.
• The simplest approach is to provide two
address field in each microinstruction and
multiplexer is provided to select:
• Address from the second address field.
• Starting address based on the OPcode field
in the current instruction.
• The address selection signals are provided
by a branch logic module whose input
consists of control unit flags plus bits from
the control partition of the micro
instruction.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Microinstruction Sequencing & Execution
Single Address Field.
• Two-address approach is simple but it
requires more bits in the microinstruction.
• With a simpler approach, we can have a
single address field in the micro instruction
with the following options for the next
address.
• Address Field.
• Based on OPcode in instruction register.
• Next Sequential Address.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Microinstruction Sequencing & Execution
Variable Address Field.
• In this approach, there are two entirely
different microinstruction formats.
• One bit designates which format is being used.
• In this first format, the remaining bits are used
to activate control signals.
• In the second format, some bits drive the
branch logic module, and the remaining bits
provide the address.
• With the first format, the next address is
either the next sequential address or an
address derived from the instruction register..

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Applications of Microprogramming
1. In Realization of control unit:
• Microprogramming is used widely now for implementing the control unit of
computers
2. In Operating system:
• Microprograms can be used to implement some of the primitives of operating
system. This simplifies operation system implementation and also improves the
performance of the operating system.
3. In High-Level Language support:
• In High-Level language various sub functions and data types can be implemented
using microprogramming.
• This makes compilation into an efficient machine language form possible.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Applications of Microprogramming
8. In Microdiagnostics:
• Microprogramming can be used for detection isolation monitoring and repair of
system errors. This is known as microdiagnostics and they significantly enhance
system maintenance.
7. In User Tailoring:
• By using RAM for implementing control memory (CM), it is possible to tailor the
machine to different applications.
6. In Emulation:
• Emulation refers to the use of a microprogram on one machine to execute
programs originally written for another machine. This is used widely as an aid for
users in migrating from one computer to another.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Hardware Control Unit
• A hardwired control unit is a
control unit designed using
hardware components such as
logic gates, flip-flops, decoders etc
• The hardwired control unit fetches
the instructions, decodes them
and generates the corresponding
control signals that make the
processor’s hardware take
appropriate actions in the correct
sequence as well as at the right
time for the execution of the
fetched instruction.
Prof. Sunil Nagare : 9619015411 @nagare.sunil95
Hardware
Instruction Register:
Control Unit
• The instruction fetched from the main memory is placed in the instruction
register and the instruction remains there till its execution is completed.
• The instruction register outputs the opcode bits that is the machine code
representation of instructions mnemonics.
• These opcode bits are fed to the instruction decoder.
Instruction Decoder:
• The instruction decoder interprets the opcode and the addressing mode
from the instruction register and determines what actions have to be taken.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Hardware
Step Counter:
Control Unit
• The step counter is used to track the progress in the execution of the
instruction.
• The step counter indicates which step among the five i.e. instruction fetch,
decode, operand fetch, execute, operand store steps is being carried out.

Control Signal Generator:


• It is a combinational circuit that generates the control signals depending
upon their input.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Clock:
Hardware Control Unit
• The clock implement in the control circuitry is such that it completes one
clock cycle for each step of instruction execution.
External Inputs:
• The external input component acknowledges the control circuitry about the
external signal such as interrupts.
Conditional Signals:
• These components help the control unit in generating the control signals for
branching instructions.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Hardware
Advantages
Control Unit
• The hardwired control unit generates the control signals faster as compared
to the micro programmed control unit.
• It is used while implementing the RISC processors which are popular for their
speed.
• It works great for simple instructions.
Disadvantages
• The hardwired control unit cannot be modified easily as it would take efforts
to make changes in the hardware components.
• The hardwired control unit does not work well with complex instructions.
• It is costly to implement or modify the hardwired control unit.
Prof. Sunil Nagare : 9619015411 @nagare.sunil95
Methods used to design hardwired control unit
1. Stable table method
• Classical method of sequential circuit design.
• Attempts to minimize the amount of hardware.
• It starts with the construction of state transition table
2. Delay-element Method
• There is a specific time delay between activation of two consecutive control
signals or groups of control signal
3. Sequence counter Method
• A Hard-wired Control consists of two decoders, a sequence counter, and a
number of logic gates
4. PLA Method(Uses programmable logic array)
Prof. Sunil Nagare : 9619015411 @nagare.sunil95
Methods used to design hardwired control unit
1. Stable table method
• Here the behavior of control unit is
represented in the form of a table, which is
known as the state table.
• Here, each row represents the T-states and the
columns represent the instructions.
• Every intersection of the specific column to
each row indicates which control signal will be
produced in the corresponding T- state of an
instruction.
• Here the hardware circuitry is designed for
each column(i.e. for a specific instruction) for
producing control signals in different T-states.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Methods used to design hardwired control unit
Advantage
• It is the simplest method.
• This method is mainly used for small instruction set processors(i.e. in RISC
processors).
Disadvantages
• In modern processors ,there is a very large number of instruction set. Therefore, the
circuit becomes complicated to design, difficult to debug,
• If we make any modifications to the state table then the large parts of the circuit
need to be changed. Therefore ,this is not widely used for these kinds of processors.
• There are many redundancies in circuit design like the control signals are required for
fetching the instruction is common and which is repeated for N number of
instruction. So the cost of circuitry design may increase.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Methods used to design hardwired control unit
2. Delay element method
• Here the control unit behavior is represented in the
form of a flowchart.
• Each step in the flowchart represents a control
signal that needs to be produced for processing the
instructions.
• If all the steps of the instructions are performed,
this means the instruction is executed completely.
• Control signals perform micro-operations and each
micro-operation requires one T-state.
• For the micro-operations which are independent,
they are required to be performed in different T-
state. Therefore, for every consecutive control
signal an exactly 1-state delay is required, which
can be produced with the help of D FF.
• Therefore. D Flip-Flops are inserted between every
two consecutive control signals.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Methods used to design hardwired control unit
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 –
• As the number of instructions increases , the number of D FF for generating delay
is increased, so overall circuit complexity and cost increases.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Soft wired (Micro Programmed) Control Unit
• A micro-programmed control unit can be
described as a simple logic circuit.
• It can use it in two ways, i.e., it is able to
execute each instruction with the help of
generating control signals, and it is also able
to do sequencing through
microinstructions.
• It will generate the control signals with the
help of programs.
• At the time of evolution of CISC architecture
in the past, this approach was very famous.
• The program which is used to create control
signals is known as the "Micro-program".

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Soft wired (Micro Programmed) Control Unit
• The micro-program is placed on the
processor chip, which is a type of
fast memory.
• This memory is also known as the
control store or control memory.
• A micro-program is used to contain
a set of microinstructions.
• Each microinstruction or control
word contains different bit
patterns.
• The n bit words are contained by
each microinstruction.

Prof. Sunil Nagare : 9619015411 @nagare.sunil95


Prof. Sunil Nagare : 9619015411 @nagare.sunil95
Prof. Sunil Nagare : 9619015411 @nagare.sunil95

You might also like