

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















1
(A) Introduction to Sequential Circuits
(B) Latches and Flip-Flops
(C) Counter Design
Department of Electrical and Computer Engineering
University of Illinois, Chicago
Phone: (312) 355-1314: e-mail: [email protected]
URL: http://www.eecs.uic.edu/~dutt
2
(A) Introduction to Sequential Circuits
seen by the circuit.
Where the relevant past history should be representable by a finite
number of classes or states
No Red
Red Light
State
Reset
Encode as state=
Light = Red
O/P = 0
Light = Green
O/P = 1
Light = Not green
O/P = 0
Light = Not red
O/P = 0
Encode as
state = 1
State Transition Diagram
Design Problem: Output of the circuit is 1 only if it has seen a red
light in the past and currently light is green.
4
Components to store bits ( latches or flip flops )
Problem: can’t store
new data
Cascade of inverter
0
I/P 1/0 O/P
A
A
LD
LD
LD
LD
Will conduct when
A=1, and open when
(B) Latches and Flip-Flops
5
Another storage element:
R=
0
Q
1
S=
0
Q
Q
R
Q
S
Q
(Set)
(Reset)
NOR gates ( R-S latch )
Property of a NOR gate
A=
B
B
A B B
When one I/P of NOR is 0, it acts like an inverter.
When one I/P is 1, then O/P=0.
Different I/P conditions for R-S latch:
i) R=S=0, current I/P is stored indefinitely
( becomes cascade of inverters)
Hold
7
Cross-coupled NOR
R
Q
S
Q
Cross-coupled NAND
R
S
Q
Q
Hold State R=S=
Hold State R=S=
Q
Q
Forbidden I/Ps
From R, S = 1, 1 transit to R=0, S=
then Q, transit to 1, 0 ( correctly )
From R, S = 1, 1 transit to R=1, S=
then Q, correctly transit to 0, 1
Q
Q
Two implementations for R-S latch:
8
Latch
D
S
R
R 1
S 1
Q
enb
Q
Clocked Latch
(level-sensitive clock latch)
— see terminology defined
later.
enb=0 R 1
1
=0 (hold state)
Q 0
Q 1
enb=
enb=
10
Latch classification with respect to response to “control signal”
Terminology: Note that the terminology below applies to all types of latches:
R-S, D, J-K, T, etc., though the examples are given for the R-S latch.
i) Transparent Latch: O/P responds to latch I/Ps without any enable or clock signal.
R Q
S
Q
Clock:
Fixed frequency alternating 1 and 0 signal
ii) Clocked or Level-Sensitive Latch:
Q
Q
S
Clock
or
enb
R O/P responds to I/Ps only when enb or
clock is at a pre-determined level (high
or low — In this example, it is High)
R
S
Q
Q
Symbol:
R
S
Q
Q
CLK
(high enable)
Symbol: or
R
S
Q
Q
CLK (low enable)
11
iii) Edge-Triggered Flip-Flop (FF) or simply Flip-Flop
O/P will respond to I/Ps only at either:
(a) the positive or rising edge of the enb/clock signal (positive
edge-triggered FF), or
(b) the negative or falling edge of the enb/clock signal (negative
edge-triggered FF).
Clock:
O/P response
period for a
positive
edge-
triggered
FF.
O/P response
period for a
negative
edge-triggered
FF
O/P response
period for a
HIGH-enable/clock
level-sensitive
latch
O/P resp. period for
a low-enable/clock
level sensitive latch
Symbol:
R
S
Q
Q
CLK
Symbol:
R
S
Q
Q
CLK
13
Solutions to Race Condition Problem with Level Sensitive Latches
Solution 1: Master-Slave FF:
Master-Slave J-K is a solution to race-condition problem: Any change in Q,
during CLK=0 is not propagated to P, and hence back to Q, during the
same CLK=0. Any change to Q, will occur in next CLK=0 period.
J
K
Q
Q
(O/P responds when CLK goes
From 1 to 0)
Master-Slave J-K works similar
to a J-K latch: E.g. Let
J=1, K=1, CLK=
Q=1, =0 =1 , P=
When CLK=
Q=0, =
Q
Q
Q
Latch
CLK
K
J
Q
R
S
Q m
m
Q R
S
s
Q
Q s
1
0
1
0
P
P
1
0
1
0
Master R-S is level sensitive. Slave R-S is level sensitive.
Q
Q
P (^) Q
Q
14
Solution 2: Edge-Triggered FF:
Q
Q
R
S
D
Clk=
D
D
0
0
Holds D when
clock goes low
Holds when
clock goes low
D
Q =D
Q D
R
S
D
Clk=
D
D
D
Assume D=
D=1=S
Q=1,
D 0 R
Q 0
CLK
Q
Q
R
S
D
Clk=
D
D
0
0
Q responds to
internal S signal;
responds to
internal R signal.
Q
When CLK is 1 D I/P is
internally sampled but
does not appear at the O/P.
O/P is held (changing D does not
cause any change in internal
signals in the FF or in its output)
O/P appears (Q=D)
D
D
D
D
16
Similarly: Characteristic Equations of
= Q + J.
= D
= T + Q
or T-FF / Latch
Q
Q
Whenever I/P T is high,
the FF will toggle, i.e., Q
=.
When T=0, Q
=Q.
Q
Of course, these characteristic equations come into play only
when the FF/Latch is enabled.
Q
Q
T
Symbol:
17
Excitation Table
— Reversed Truth Table
— What the inputs to FFs should be for given output
transitions (Q Q
)
R S J K T D
0 0 x 0 0 x 0 0
0 1 0 1 1 x 1 1
1 0 1 0 x 1 1 0
1 1 0 x x 0 0 1
19
Example 2: D J-K
Excitation Table for D
Q Q
D
0 0 0
0 1 1
1 0 0
1 1 1
J K Q Q
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
Q
Q
D J
K
CLK
TT for J-K
JK
Q
0
1
00 01 11 10
0 0 1 1
1 0 0 1
Function is
Q
Q
D
CLK
J
K
Q
Q
J-K FF/Latch
D JQ KQ
J Q
K Q
Logic
should work like a J-K
20
(C) Counter Design
on receiving triggering clock pluses.
A
B
C
D
Reset E
000
001
010
011
100
FFs
Logic
Counter O/P
Next State
bits
n n
CLK
No external I/Ps