Sequential Logic Analysis

advertisement
Sequential Logic Analysis
•
Used to determine:
¾ How a sequential logic circuit works
¾ Given an initial state and and input sequence:
•
•
What will be the output sequence
What will be the final state
¾ Logic simulation cannot always do this
•
•
The opposite procedure of design
1.
2.
3.
4.
5.
C. E. Stroud
Unless initial state can be set
Start with circuit diagram
Derive output equations
Derive flip-flop input equations
Derive state table
Derive state diagram
Sequential Logic Analysis (1/06)
1
Analysis Example
• Given this sequential
logic circuit and:
X
¾An initial state of A=0 &
B=1
¾An input sequence
X=010011
• What will be the final
state?
• What will be the output
sequence?
C. E. Stroud
Sequential Logic Analysis (1/06)
A
A
B
A
B
A
A
B
B
Clk
C
2
Analysis Example
• From logic diagram
obtain logic equations:
X
¾C =X’(A+B)=AX’+BX’
¾DA= AX+BX
A
A
B
A
• A+ = DA (for D flip-flop)
¾DB= A’X
•
B+
= DB (for D flip-flop)
• Next obtain state table
then state diagram
C. E. Stroud
Sequential Logic Analysis (1/06)
B
A
A
B
B
Clk
C
3
Analysis Example (continued)
C =X’(A+B)=AX’+BX’
A+ = AX+BX
B+ = A’X
State order
AB
Current
State
Next
State
Output
X
AB
A+ B+
C
0
0 0
0 0
0
1
0 0
0 1
0
0/1
0
0 1
0 0
1
1
0 1
1 1
0
01
0
1 0
0 0
1
1
1 0
1 0
0
0
1 1
0 0
1
1
1 1
1 0
0
0/0
X=0/C=1
1/0
00
0/1
10
1/0
1/0
1/0
11
C. E. Stroud
Input
Sequential Logic Analysis (1/06)
4
Analysis Example (continued)
• Given:
¾An initial state of A=0 & B=1
¾An input sequence X=010011
• What will be the final state?
¾A=1 & B=1
0/0
• What will be the output
sequence?
¾X=010011
¾C=101000
C. E. Stroud
X=0/C=1
1/0
0/1
10
State order
AB
Sequential Logic Analysis (1/06)
00
0/1
1/0
1/0
01
1/0
11
5
Another Analysis Example
• The characteristic equation for D flip-flops makes
analysis a little easier than other flip-flops
• Consider this circuit with JK flip-flops
¾ Here we assume that A and B are the circuit outputs
X
Clk
C. E. Stroud
J
K
A
J
K
B
Equations for inputs to FFs:
JA = B
KA = BX’
JB = X’
KB = A⊕X = AX’+A’X
Sequential Logic Analysis (1/06)
6
JKFF Analysis Example
• Fill in inputs and current
state as usual
• Evaluate FF inputs based
on inputs and current state
• Use characteristic table to
obtain next state from FF
inputs
JK FF
characteristic
table
C. E. Stroud
Current A FF B FF Next
Input State inputs inputs State
X
A B JA KA JB KB A+ B+
0
0 0
0 0
1 0
0 1
1
0 0
0 0
0 1
0 0
0
0 1
1 1
1 0
1 1
1
0 1
1 0
0 1
1 0
0
1 0
0 0
1 1
1 1
J
K
Q+
1
1 0
0 0
0 0
1 0
0
0
Q
0
1 1
1 1
1 1
0 0
0
1
0
1
1 1
1 0
0 0
1 1
1
0
1
1
1
Q’
Sequential Logic Analysis (1/06)
7
JKFF Analysis Example (continued)
• Now obtain state diagram from state table
¾ Based on inputs, current state, and next state
• Now we can analyze circuit behavior
¾ Based on initial state and input sequence
State order
AB
0
1
0
0 0
0 1
00
1
0 0
0 0
0
0 1
1 1
1
0 1
1 0
0
1 0
1 1
1
1 0
1 0
0
1 1
0 0
1
1 1
1 1
X=0
0
01
1
10
11
1
0
1
C. E. Stroud
Current Next
State
Input State
X
A B A+ B+
Sequential Logic Analysis (1/06)
8
Download