Professional Documents
Culture Documents
SEQUENTIAL CIRCUIT
n inputs m outputs
Combinational
circuit
Memory
elements
3
4
S R Q(t+)
0 0 Q(t)
0 1 0 (reset)
1 0 1 (set)
1 1 NA
5
S (set) Q
S R Q Q
1 0 0 1
1 1 0 1 (after Q=0, Q=1)
Q 0 1 1 0
1 1 1 0 (after Q=1, Q=0)
R (reset) 0 0 1 1 Not Allowed
1 1 ? ? after Q=1, Q=1
Indeterminite, may oscillate
S R Q(t+) S R Q(t+)
0 0 NA 0 0 Q(t)
0 1 1 (set) 0 1 0 (reset)
1 0 0 (reset) 1 0 1 (set)
1 1 Q(t) 1 1 NA
6
C S R Q(t+)
S (set)
Q 0 x x No change
1 0 0 Q(t)
1 0 1 0
C
Q 1 1 0 1
1 1 1 NA
R (reset)
D (data)
Q C D Q(t+)
0 x No change
1 0 0
C Q 1 1 1
7
8
D D Q D Q Q D D Q D Q Q
master slave master slave
C Q C Q Q C Q C Q Q
C C
9
S Q S Q D Q
C C
R Q R Q C Q
D Q D Q S Q S Q
C C
C Q C Q R Q R Q
D FF D FF SR FF SR FF
( triggered) ( triggered) ( triggered) ( triggered)
10
11
Characteristic Equation, Characteristic and Excitation Tables
Characteristic Table:
D Q(t+1) Comment
Q(t+1):
0 0 clear (reset) 0 1
D FF
1 1 set Q(t) 0 1
D Q D
C Q
Characteristic Equation: Excitation Table:
Q(t+1)=D
Q(t) Q(t+1) D
0 0 0
0 1 1
1 0 0
1 1 1
12
Characteristic Equation, Characteristic and Excitation Tables
Characteristic Table:
S R Q(t+1) Q(t+1): S
SR FF 0 0 Q(t )
0 0 x 1
0 1 0
S Q 1 0 1 Q(t) 1 0 x 1
C 1 1 NA
R
R Q
Q(t+1)=S+ RQ(t)
Q(t) Q(t+1) S R
0 0 0 x
0 1 1 0
1 0 0 1
1 1 x 0
13
Characteristic Equation, Characteristic and Excitation Tables
Characteristic Table:
J K Q(t+1) J
Q(t+1):
JK FF 0 0 Q(t )
0 1 0 0 0 1 1
J Q 1 0 1 1 0 0 1
Q(t)
C 1 1 Q(t )
K Q K
Q(t+1)=JQ(t)+ KQ(t)
Q(t) Q(t+1) J K
0 0 0 x
0 1 1 x
1 0 x 1
1 1 x 0
14
Characteristic Equation, Characteristic and Excitation Tables
Characteristic Table:
T Q(t+1) Q(t+1):
0 1
T FF 0 Q(t )
1 Q(t ) Q(t) 1 0
T Q
T
C
Q(t+1)=TQ(t)+TQ(t)
Q(t) Q(t+1) T
=TQ(t)
0 0 0
0 1 1
1 0 1
1 1 0
15
X
D Q A
Input variables: x(t)
C Q A
State variables: A(t), B(t)
( of state variables = of FFs )
D Q B
Output variables: y(t)
C Q B
CLK
16
17
PS NS state:A(t)
A(t) A(t+1) 01,10
xy=00 xy=01 xy=10 xy=11 1 00,11
00,11 0
0 0 1 1 0
1 1 0 0 1 01,10
input: x(t)y(t)
(not in the form
input/output
since output=state)
19
C R Q State equations:
A(t+1)=TAA+TAA=(Bx)A+(Bx)A=AB+Ax+ABx
B(t+1)= TBB+TBB = xB+xB
CLK Reset
0 1 0
00/0 01/0
1 1
input: x
11/1 10/0
0 0
1
state/output:
AB/y
22
23
Partitioning algorithm with state reduction:
Given:
0/0 PS NS Output
1/1 x=0 x=1 x=0 x=1
b a
0/0 0/1 a b c 0 0
e 1/0 b a c 0 0
1/0 0/1 f c c d 0 0
d a f 1 1
0/1 1/0
c d 1/1 e c a 1 1
f a c 1 1
0/0
1/1
PS NS Output 1/1 A
0/1
x=0 x=1 x=0 x=1 D 1/0
A A B 0 0 1/0 0/1 E
B B C 0 0 0/1 1/0
C A E 1 1 B C 1/1
D B A 1 1
0/0
E A B 1 1 1/1
25
26
PS NS Output
x=0 x=1 x=0 x=1
a a b 0 0
b b c 0 0
c c c 0 1
28
PS NS Output
x=0 x=1 x=0 x=1
A A B 0 0
B B C 0 0
C C C 0 1
PS NS Output
Q1Q2 x=0 x=1 x=0 x=1
00 00 01 0 0
01 01 10 0 0
10 10 10 0 1
Q1 transition: Q1 Q2 transition: Q1
Q1Q2 Q1Q2
00 01 11 10 00 01 11 10
x x
00 00 x 11 00 11 x 00
x 00 01 x 11 x 01 10 x 00
Q2 Q2
30
Output: Q1
y:
0 0 x 0 (independent of FF type) y= xQ1
x 0 0 x 1
Q2
Q1 transition: Q1 Q2 transition: Q1 31
Q 1Q 2 Q 1Q 2 FF Excitation Tables
00 01 11 10 00 01 11 10
x x Q(t)Q(t+1) D S R J K T
00 00 x 11 00 11 x 00 00 0 0 x 0 x 0
x 00 01 x 11 01 10 x 00 01 1 1 0 1 x 1
x
10 0 0 1 x 1 1
11 1 x 0 x 0 0
Q2 Q2
Q2 Q2
Q1 Q1
S2: R2:
0 x x 0 x 0 x x
S2=xQ1Q2
R2= xQ2
x 1 0 x 0 x 0 1 x x
Q2 Q2
States: Q1 Q1
J 1: K1: J1= xQ2
0 0 x x x x x 0
K1= 0
x 0 1 x x x x x x 0
Q2 Q2
Q1 Q1
J 2: K2:
0 x x 0 x 0 x x J2=xQ1
K2=x
x 1 x x 0 x x 1 x x
Q2 Q2
States: Q1 Q1
T1: T2: T1= xQ2
0 0 x 0 0 0 x 0 T2= xQ1
x 0 1 x 0 x 1 1 x 0
Q2 Q2
x
y
J1 Q1 J2 Q2
C1 C2
0 K1 Q1 K2 Q2
CLK
35
36
Q2 Q2
Q2
38
Time: 8 7 6 5 4 3 2 1
Xd: 0 1 0 1 0 1 0 0
Xf: 1 0 0 0 0 0 0 0
y: 1 0 0 0 0 0 0 0
BCD PS NS
considering considering output (z)
XnXn-1Xn-2 Xn-3 Xn-1Xn-2 Xn-3 XnXn-1Xn-2
Xn=0 Xn =1 Xn=0 Xn=1 Xn=0 Xn=1
0000 1000 S0 (000) S0 (000) S4 (100) 0 0
0001 1001 S1 (001) S0 (000) S4 (100) 0 0
0010 1010 S2 (010) S1 (001) S5 (101) 0 1
0011 1011 S3 (011) S1 (001) S5 (101) 0 1
0100 1100 S4 (100) S2 (010) S6 (110) 0 1
0101 1101 S5 (101) S2 (010) S6 (110) 0 1
0110 1110 S6 (110) S3 (011) S7 (111) 0 1
0111 1111 S7 (111) S3 (011) S7 (111) 0 1
41
Example: n=8
Three inputs: xfxAxB yAyB representation Time: 1 2 3 4 5 6 7 8
Two output: yAyB: 00 no decision yet XA: 0 1 0 1 0 1 0 0
01 A<B XB: 0 1 0 0 1 1 1 1
10 A>B Xf: 0 0 0 0 0 0 0 1
11 A=B yA: 0 0 0 0 0 0 0 1
yB: 0 0 0 0 0 0 0 0
Example: (continues) 43
1--/01
xfxAxB/yAyB: SA<B
001/00 001/00
000/00
100/11,111/11, 000/00,011/000 011/00
s SA=B
101/01,110/10
010/00 010/00
SA>B 100/11,111/11,
1--/10 101/01,110/10
0--/00
2) PS NS Output (yA,yB)
000 001 010 011 100 101 110 111 000 001 010 011 100 101 110 111
S SA=B SA<B SA>B SA=B S S S S 00 00 00 00 11 01 10 11
SA<B SA<B SA<B SA<B SA<B S S S S 00 00 00 00 01 01 01 01
SA=B SA=B SA<B SA>B SA=B S S S S 00 00 00 00 11 01 10 11
SA>B SA>B SA>B SA>B SA>B S S S S 00 00 00 00 10 10 10 10
3-7) State reduction: Show that the states S and SA=B are equivalent,
and then do the rest yourself
Example: Design a serial n bit magnitude comparator same as above, except LSB
being first in time and xf is an MSB indicator (i.e. it is 1 when MSB arrives)