0% found this document useful (0 votes)
6 views

Control Unit

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Control Unit

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

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…)

If (XR > 0) = 0, while


loop get skipped and
Transition is made from
S0 to S3
gcd process ( continued…)
If (XR > 0) = 1, while loop is
entered and Transition is
made from S1 to perform
swap if (XR ≥ YR) = 0,
otherwise S2 to perform
subtraction
gcd process ( continued…)
If (XR > 0) (XR ≥ YR) = 11,
Perform third entry in the
Table S3
Classical Method (Major Steps)
• Construct a P-row table that defines the
desired input-output behavior
• Select minimum number p of D-type f/f and
assign p-bit binary code to each design
• Design combinational circuit C that generates
primary output signal {zi} and seconday
output Di that must be applie d to the f/fs
Classical Method (continued…)

• Assign binary pattern for four states using two


D-f/f
• S0 – 0 0
• S1 – 0 1
• S2 – 1 0
• S3 – 1 1
• Using two D f/f write excitation table
Classical Method (continued…)

Di+ (t+1) = Di(t)


Logical Equation
Classic Design for Control Unit
One-hot Method
• Classical design minimizes a control unit
memory elements
• Makes design debugging and maintenance of
the circuit difficult
• In one-hot method binary state assignments is
done.
One-hot Method
• The state assignment for four state machine
are for gcd process
• S0 = 0001
• S1 = 0010
• S2 = 0100
• S3 = 1000
• In general P f/f are needed to represent P
states
• So the one-hot method is restricted to fairly
small value P
One-hot Method
• Because binary pattern assigned to each state
is different so stat can be easily identified
• In classical approach it is necessary to check
all state variables.
• Suppose that
• State Si in one-hot design has hot variable Di.
• Suppose Ij,1,Ij,2….. Ii,nj denotes all input
combinations that cause a state transition
from Sj to Si
• So Dj.Ijk must make Di = 1
One-hot Method (continued…)

• Considering all such combinations that cause


transition to Si

• Hence SOP form is

• Hence considering the state table


One-hot Method (continued…)
One-hot Method (continued…)
One-hot Method (continued…)

You might also like