Control Unit
Control Unit
Introduction
• Digital System consists of
– A datapath ( data processing ) unit
– Control unit
• Datapath – is capable of performing certain
operations on data words
• Control unit- to issue control signal to datpath.
• Control unit logical reconfigurers the datapath
to implement some specified instruction or
program
• RF for temporary
storage of operands
• Two functional units
F1 and F2 for data
processing
• Allows the data to
be steered through
DP.
• CU receives external
instructions, to
implement
sequence of register
transfer operations
A:= A + B
RF permits to be read
and written into .
RF is configured to
one input and two
output
CU activate the
control signal
Function select: Add
Storage control: Read
A,B and Write A
Data routing: select
p-t, u-w and v-x
• Consider double precision addition
– ADD AL, AH
– ADDC AH, BH
• Requires two consecutive clock cycles.
Control Unit Design
• Two approaches
• One approach views the controller as a
sequence logic circuit of Finite state machine.
• Designed with minimizing the number of
components used and maximizing the speed
of operation.
• To change the operation redesign the control
unit.
• So it is Hardwired.
Hardwired
Control Unit Design ( continued)
• Programmable control
• Built around a storage unit ( control memory)
• Control memory stores a set of microprograms
designed to implement or emulate the behavior
of the instruction set.
• Each instruction causes the corresponding
microprogram to be fetched and its control
information extracted in a manner that
resembles the fetching and execution.
• Hence Micr
• Hence Microprogrammed Control Unit
Microprogrammed Control Unit
Microprogrammed Control Unit
• Trade of between the amount of hardware and
the speed of operation, cost of the design
process itself.
• Method-1:- The Classical method of sequential
circuit design. It attempt to minimize the
amount of hardware by using only f/f to realize a
P-state circuit
• Method-2:- Uses one f/f per state and known as
one hot method
Hardwired Control
Classical and One-Hot Approach
• To Compute Greatest Common Divisor of
positive integer of X & Y
• gcd (X,Y) is defined as the largest that divides
exactly into both X and Y
• e.g gcd(12,18) is 6
Basic Concept
gcd example
gcd process
•DP contain XR and YR
register to store variables
•One or more function
units to perform
subtraction & comparison
•MUX for data routing
•For swap operation no
register is required.
•i.e X:= Y , Y:=X performed
in one cycle
•load XR and load YR
signals to load input data
X&Y
gcd process ( continued…)
•swap control the swap
operation X:= Y , Y:=X is
done through routing
•subtract is XR:= XR-YR
done through function
and routing
•Two comparison signal
XR ≥ YR and XR > 0
generated by DP
•These two control signals
perform four operation
gcd process ( continued…)
• State S0 – Begin
• State S1 – Swap
• State S2 – Subtract
• State S3 – End
gcd process ( continued…)