Title: CS 140 Lecture 10 Sequential Networks: Implementation
1CS 140 Lecture 10Sequential Networks
Implementation
- Professor CK Cheng
- CSE Dept.
- UC San Diego
2Implementation
- Format and Tool
- Procedure
- Excitation Tables
- Example
3Canonical Form Mealy and Moore Machines
x(t)
y(t)
Combinational Logic
CLK
C2
x(t)
y(t)
x(t)
C1
C2
y(t)
C1
CLK
CLK
4Canonical Form Mealy and Moore Machines
Mealy Machine yi(t) fi(X(t), S(t)) Moore
Machine yi(t) fi(S(t)) si(t1) gi(X(t),
S(t))
x(t)
x(t)
C1
C2
y(t)
C1
C2
y(t)
CLK
CLK
s(t)
s(t)
Moore Machine
Mealy Machine
5Sequential Network ImplementationFormat and Tool
Canonical Form Mealy Moore machines State
Table ? Netlist Tool Excitation Table
x(t)
C1
C2
y(t)
CLK
s(t)
D(t) h(x(t), S(t)) y(t) f(x(t), S(t))
6Implementation Procedure
- State Table gt Excitation Table
Given a state table
we have NS Q(t1) h(x(t),Q(t)) Output y(t)
f(x(t),Q(t)). We want to express D(t), T(t),
S(t), R(t), J(t), K(t) as a funciton of inputs
X(t) and current state Q(t). We derive the
implementation of D, T, S, R, J, K as
combinational logic.
7Implementation Procedure
- State Table y(t) f(Q(t), x(t)) Q(t1)
h(x(t),Q(t)) - Excitation Table
- D(t) eD(Q(t1), Q(t))
- T(t) eT(Q(t1), Q(t))
- S, R, J, K
- From 1 2, we derive
- D(t) gD(Q(t), x(t)) eD(h(x(t),Q(t)), Q(t))
- T(t) gT(Q(t), x(t))eT(h(x(t),Q(t)),Q(t))
- S,R,J,K.
- Use K-Map to derive optional combinational logic
implementation. - T(t) gT(Q(t), x(t))
- y(t) f(Q(t), x(t))
8Excitation Table
State table of a JK flip flop
Excitation table for a JK F-F
If Q(t) is 1, and Q(t1) is 0, then JK needs to
be 0-.
9Excitation Tables and State Tables
Excitation Tables
State Tables
SR
SR
Q(t1)
NS
SR
PS
PS
0 0- 01
1 10 -0
00 0 1
01 0 0
10 1 1
11 - -
0 1
0 1
Q(t)
Q(t)
Q(t1)
T
T
Q(t1)
NS
T
PS
PS
0 0 1
1 1 0
0 0 1
1 1 0
0 1
0 1
Q(t)
Q(t)
Q(t1)
10Excitation Tables and State Tables
Excitation Tables
State Tables
JK
JK
Q(t1)
NS
JK
PS
PS
0 0- -1
1 1- -0
00 0 1
01 0 0
10 1 1
11 1 0
0 1
0 1
Q(t)
Q(t)
Q(t1)
D
D
Q(t1)
NS
D
PS
PS
0 0 0
1 1 1
0 0 0
1 1 1
0 1
0 1
Q(t)
Q(t)
Q(t1)
11Implementation ExampleImplement a JK F-F with a
T F-F
Q(t1) h(J(t),K(t),Q(t)) J(t)Q(t)K(t)Q(t)
State Table
JK
JK
PS
00 0 1
01 0 0
10 1 1
11 1 0
0 1
Q(t)
12Example Implement a JK flip-flip using a T
flip-flop
Excitation Table of T flip-Flop
T(t) Q(t) XOR Q(t1)
Q(t1)
NS
PS
0 0 1
1 1 0
0 1
Q(t)
T
Excitation Table of the Design
id 0 1 2 3 4 5 6 7
J(t) 0 0 0 0 1 1 1 1
K(t) 0 0 1 1 0 0 1 1
Q(t) 0 1 0 1 0 1 0 1
Q(t1) 0 1 0 0 1 1 1 0
T(t) 0 0 0 1 1 0 1 1
T(t) Q(t) XOR ( J(t)Q(t) K(t)Q(t))
13Example Implement a JK flip-flip using a T
flip-flop
T(J,K,Q)
K
0 2
6 4
0 0 1 1
T K(t)Q(t) J(t)Q(t)
1 3
7 5
Q(t)
0 1 1 0
J
J
Q Q
T
K