De Unit4 Notes
De Unit4 Notes
De Unit4 Notes
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Basic structure of Synchronous Sequential Networks
o/p is a function of
Mealy the present state as
well as the i/p
Analysis of synchronous
sequential network
o/p is a function of
Moore only the present
state
DIGITAL ELECTRONICS
Basic structure of Synchronous Sequential Networks
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Next State Tables/Characteristic Equations of F/Fs
CLK D Qn Q n+1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
DIGITAL ELECTRONICS
Next State Tables/Characteristic Equations of F/Fs
D
The Next State Equation is Q n+1 = D
DIGITAL ELECTRONICS
Next State Tables/Characteristic Equations of F/Fs
4. Toggle Flip-Flop Characteristic Equation:
The Next State table is given by;
CLK T Qn Q n+1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
DIGITAL ELECTRONICS
Next State Tables/Characteristic Equations of F/Fs
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Excitation Table, Transition Table, State Table, State Diagram
Excitation Table:
❖ An excitation table is a tabular representation of X and Q at
the FFs and of Y as per Fo for the combination circuit at the
output stages.
❖ For example, if (Q1, Q2) are the Qs of two FFs, then (Q1, Q2)
= (0, 0), (0, 1), (1, 0) and (1, 1) are the four combinations
possible for the four different states of the memory-section
present outputs.
❖ For example, if (X1, X2) are the external input to the memory
section then (X1, X2) = (0, 0), (0, 1), (1, 0) and (1, 1) are the
four combinations possible for the four different states of the
memory section present outputs.
Transition Table:
State Table
❖ For example, if (Q1, Q2) are the Qs of two FFs, then let us
assume the followings: S(Q1, Q2)= S (0, 0) = S0 for (0, 0)
values of (Q1, Q2), S(Q1, Q2)= S (0, 1) = S1 for (0, 1) values of
(Q1, Q2), S(Q1, Q2)= S (1, 0) = S2 for (1, 0) values of (Q1, Q2),
and S(Q1, Q2)= S (1, 1) = S3 for (1, 1) values of (Q1, Q2).
State Diagram:
❖ There are z (= 2m) maximum possible states S0, S1, ..., Sz−1
in a sequential circuit with m-FFs.
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Analysis of Synchronous Sequential Networks
ANALYSIS PROCEDURE :
3. Find the expressions for the excitations from the flip flop
characteristics equations as per the excitations and make an
excitation table. In other words, find Q′ = FQ (X, Q) and Y
DIGITAL ELECTRONICS
Analysis of Synchronous Sequential Networks
❖ Now, the steps for finding the transition equation are the
followings using the input variables for the excitations of the
FFs.
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Analysis of Synchronous Sequential Networks
Step 3: Finding the expressions for the excitations from the flip
flop characteristics equations as per the excitations and make an
excitation table: Therefore the excitation expressions are as
follows:
Q1′ = D
DIGITAL ELECTRONICS
Analysis of Synchronous Sequential Networks
❖ Now, the steps for finding the transition equations are the
followings using the input variables for the excitations of the
FFs.
Therefore, the next state after the state transition equations are as
per the excitation expression and are given by ,
From the state table the state diagram is drawn. Since the
circuit is a Mealy model sequential circuit, the nodes S0, S1, S 2
and S 3 are labeled at the center of a circle. The directed arc
represents a transition. It is labeled with present input and the
output after the transition. It is clarified in the following for a
state present at each row.
Consider row 1 of state table in Table
1. Transition is from S0 to S0 itself when input X = 0 and output
is Y = 0. Hence a directed circular arc is shown for the node S0 .
It is labeled 0/0. 2. Transition is from S0 to S2 when input X = 1
and output is Y = 0. Hence the directed arc is from S0 to S2 and
is also labeled 1/0.
DIGITAL ELECTRONICS
Analysis of Synchronous Sequential Networks
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Analysis of Synchronous Sequential Networks
Step 3: Finding the expressions for the excitations from the flip
flop characteristics equations as per the excitations and make an
excitation table: Therefore the excitation expressions are as
follows:
Q1′ = D
DIGITAL ELECTRONICS
Analysis of Synchronous Sequential Networks
❖ Now, the steps for finding the transition equations are the
followings using the input variables for the excitations of the
FFs.
Therefore, the next state after the state transition equations are as
per the excitation expression and are given by ,
From the state table the state diagram is drawn. Since the
circuit is a Mealy model sequential circuit, the nodes S0, S1, S 2
and S 3 are labeled at the center of a circle. The directed arc
represents a transition. It is labeled with present input and the
output after the transition. It is clarified in the following for a
state present at each row.
Consider row 1 of state table in Table
1. Transition is from S0 to S0 itself when input X = 0 and output
is Y = 0. Hence a directed circular arc is shown for the node S0 .
It is labeled 0/0. 2. Transition is from S0 to S2 when input X = 1
and output is Y = 0. Hence the directed arc is from S0 to S2 and
is also labeled 1/0.
DIGITAL ELECTRONICS
Analysis of Synchronous Sequential Networks
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Modeling of Synchronous Sequential Networks-Mealy as
Serial Adder
❖ In the serial adders we know that only one bit addition takes
place at a time and hence it takes processing time.
❖ The output is the sum and the carry is in the memory. Carry
can only be of two forms, either 1 or 0 so accordingly we
have two states, S0 where carry is 0 and S1 where carry is 1.
DIGITAL ELECTRONICS
Mealy as Serial Adder
Step 3: Write equation for sum and equation for input of D-f/f.
We can obtain this using the 8 cells k-map.
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
MOORE as serial adder
o/p is a function of
Mealy the present state as
well as the i/p
Analysis of synchronous
sequential network
o/p is a function of
Moore only the present
state
Unit delay : Since the output doesn’t depend upon the input, the
correct sum bit from the adder is not established until the next
clock period, i.e., until the next state is reached. This in effect
imposes unit delay on the output
• In a Moore sequential network, the first output is ignored and
subsequent outputs are taken as the output sequence.
• Each state is associated with both output as well as information
regarding how the past history of inputs was responsible for that
output. Hence we need 4 states as the sum bit 0 or 1 can be
generated with or without carry from the previous order
addition.
• There are 4 possible combinations of inputs x and y in every
state, hence there are 16 transitions overall.
DIGITAL ELECTRONICS
MOORE as serial adder
1
sum
0
x y Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 1 1
DIGITAL ELECTRONICS
MOORE as serial adder
For state S0, previous carry pc =0, if sum
00
x+y+pc is 0, it stays in S0, else moves to
S0 01 S1 other states.
00 10 01
1. x=y=0, sum=carry=0, stays in the same
11 state.
2. x=0, y=1, sum=1, carry=0, goes to S1
S2 S3
10 11 3. x=1, y=0, sum=1, carry=0, goes to S1
4. x=y=1, sum=0, carry=1, goes to S
DIGITAL ELECTRONICS
MOORE as serial adder
Summary
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
Synchronous Sequential Circuit Review
1
Steps
2
Derivation of JK Excitation Table
JK Excitation
JK Characteristic Table
Table
J K Q Q+
Q Q+ J K
0 0 0 0
0 0 1 1 0 0 0 X
0 1 0 0 0 1 1 X
0 1 1 0 1 0 X 1
1 0 0 1 1 1 X 0
1 0 1 1
1 1 0 1
1 1 1 0
4/3/2009 Page 3
Flip-Flop Excitation Tables
Q Q+ J K S R T D
0 0 0 X 0 X 0 0
0 1 1 X 1 0 1 1
1 0 X 1 0 1 1 0
1 1 X 0 X 0 0 1
4/3/2009 Page 4
Sequence recognizer (Mealy)
Inputs: 1 1 1 0 01 1 0 1 00 1 00 1 1 0 …
Outputs: 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 …
5
Step 1: Making a state table
• The first we derive a state table based on the problem statement. The
table should show the present states, inputs, next states and outputs
– Sometimes it is easier to first find a state diagram and then
convert that to a table
This is often the most challenging step.
• Once you have the state table,
the rest of the design procedure is the same for all sequential circuits
6
A basic Mealy state diagram
State Meaning
A Arbitrary starting state; Circuit sees a ―1‖, it progresses towards B.
Output is ―0‖
B Circuit sees a ―0‖, it progresses towards C. Output is ―0‖
C Circuit sees a ―0‖, it progresses towards D. Output is ―0‖
D See next page
7
Overlapping occurrences of the pattern
• What happens if we’re in state D (the last three inputs were 100), and
the current input is 1?
1/1
State Meaning
A None of the desired pattern (1001) has been input yet.
B We’ve already seen the first bit (1) of the desired pattern.
C We’ve already seen the first two bits (10) of the desired pattern.
D We’ve already seen the first three bits (100) of the desired pattern.
8
Filling in the other arrows
• Two outgoing arrows for each node, to account for the possibilities of
X=0 and X=1
• The remaining arrows we need are shown in blue. They also allow for
the correct detection of overlapping occurrences of 1001.
0/0
1/0
0/0 1/1
State Meaning
A None of the desired pattern (1001) has been input yet.
B We’ve already seen the first bit (1) of the desired pattern.
C We’ve already seen the first two bits (10) of the desired pattern.
D We’ve already seen the first three bits (100) of the desired pattern.
9
Mealy state diagram & table
0/0
1/0
0/0 1/1
Present Next
State Input State Output
A 0 A 0
A 1 B 0
B 0 C 0
B 1 B 0
C 0 D 0
C 1 B 0
D 0 A 0
D 1 B 1
10
Step 2: Assigning binary codes to states
• We have four states ABCD, so we need at least two flip-flops Q1Q0
• The easiest thing to do is represent state A with Q1Q0 = 00, B with 01, C
with 10, and D with 11
• The state assignment can have a big impact on circuit complexity, but we
won’t worry about that too much in this class
Present Next
Present Next State Input State Output
State Input State Output Q1 Q0 X Q 1 Q0 Z
A 0 A 0 0 0 0 0 0 0
A 1 B 0 0 0 1 0 1 0
B 0 C 0 0 1 0 1 0 0
B 1 B 0 0 1 1 0 1 0
C 0 D 0 1 0 0 1 1 0
C 1 B 0 1 0 1 0 1 0
D 0 A 0 1 1 0 0 0 0
D 1 B 1 1 1 1 0 1 1
11
Step 3: Finding flip-flop input values
• Next we have to figure out how to actually make the flip-flops change
from their present state into the desired next state
• We’ll use two JKs. For each flip-flip Qi, look at its present and next states,
and determine what the inputs Ji and Ki should be in order to make that
state change.
Present Next
State Input State Flip flop inputs Output
Q1 Q0 X Q1 Q0 J1 K1 J0 K0 Z
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 1 0 0
0 1 1 0 1 0
1 0 0 1 1 0
1 0 1 0 1 0
1 1 0 0 0 0
1 1 1 0 1 1
12
Back to the example
Q(t) Q(t+1) J K
• Use the JK excitation table on the right to
0 0 0 x
find the correct values for each flip-flop’s
0 1 1 x
inputs, based on its present and next states 1 0 x 1
1 1 x 0
Present Next
State Input State Flip flop inputs Output
Q1 Q0 X Q1 Q0 J1 K1 J0 K0 Z
0 0 0 0 0 0 x 0 x 0
0 0 1 0 1 0 x 1 x 0
0 1 0 1 0 1 x x 1 0
0 1 1 0 1 0 x x 0 0
1 0 0 1 1 x 0 1 x 0
1 0 1 0 1 x 1 1 x 0
1 1 0 0 0 x 1 x 1 0
1 1 1 0 1 x 1 x 0 1
13
Step 4: Find equations for the FF inputs and output
• Now you can make K-maps and find equations for each of the four flip-
flop inputs, as well as for the output Z
• These equations are in terms of the present state and the inputs
• The advantage of using JK flip-flops is that there are many don’t care
conditions, which can result in simpler MSP equations
Present Next
State Input State Flip flop inputs Output
Q1 Q0 X Q1 Q0 J1 K1 J0 K0 Z
0 0 0 0 0 0 x 0 x 0
0 0 1 0 1 0 x 1 x 0
0 1 0 1 0 1 x x 1 0
0 1 1 0 1 0 x x 0 0
1 0 0 1 1 x 0 1 x 0
1 0 1 0 1 x 1 1 x 0
1 1 0 0 0 x 1 x 1 0
1 1 1 0 1 x 1 x 0 1
14
FF input equations
Present Next
State Input State Flip flop inputs Output
Q1 Q0 X Q1 Q0 J1 K1 J0 K0 Z
0 0 0 0 0 0 x 0 x 0
0 0 1 0 1 0 x 1 x 0
0 1 0 1 0 1 x x 1 0
0 1 1 0 1 0 x x 0 0
1 0 0 1 1 x 0 1 x 0
1 0 1 0 1 x 1 1 x 0
1 1 0 0 0 x 1 x 1 0
1 1 1 0 1 x 1 x 0 1
J1 Q1 Q0 K1 Q1 Q0
00 01 11 10 00 01 11 10
0 0 1 x x 0 x x 1 0
X X
1 0 0 x x 1 x x 1 1
J1 = X’ Q0 K1 = X + Q0
15
FF input equations
Present Next
State Input State Flip flop inputs Output
Q1 Q0 X Q1 Q0 J1 K1 J0 K0 Z
0 0 0 0 0 0 x 0 x 0
0 0 1 0 1 0 x 1 x 0
0 1 0 1 0 1 x x 1 0
0 1 1 0 1 0 x x 0 0
1 0 0 1 1 x 0 1 x 0
1 0 1 0 1 x 1 1 x 0
1 1 0 0 0 x 1 x 1 0
1 1 1 0 1 x 1 x 0 1
J0 Q1 Q0 K0 Q1 Q0
00 01 11 10 00 01 11 10
0 0 x x 1 0 x 1 1 x
X X
1 1 x x 1 1 x 0 0 x
J0 = X + Q1 K0 = X’
16
Output equation
Present Next
State Input State Flip flop inputs Output
Q1 Q0 X Q1 Q0 J1 K1 J0 K0 Z
0 0 0 0 0 0 x 0 x 0
0 0 1 0 1 0 x 1 x 0
0 1 0 1 0 1 x x 1 0
0 1 1 0 1 0 x x 0 0
1 0 0 1 1 x 0 1 x 0
1 0 1 0 1 x 1 1 x 0
1 1 0 0 0 x 1 x 1 0
1 1 1 0 1 x 1 x 0 1
Z Q1 Q0
00 01 11 10
0
X
1 1
Z = X Q1 Q0
17
Step 5: The circuit
J1 = X’ Q0
K1 = X + Q0
J0 = X + Q1
K0 = X’
Z = Q1Q0X
18
Building the same circuit with D flip-flops
• What if you want to build the circuit using D flip-flops instead?
• We already have the state table and state assignments, so we can just
start from Step 3, finding the flip-flop input values
• D flip-flops have only one input, so our table only needs two columns for
D1 and D0
D1 Q1 Q0 D0 Q1 Q0 Z Q1 Q0
00 01 11 10 00 01 11 10 00 01 11 10
0 1 1 0 1 0
X X X
1 1 1 1 1 1 1 1
22
Mixed Flip Flops
Present Next
State Input State Flip flop inputs Output
Q1 Q0 X Q1 Q0 J1 K1 T0 Z
0 0 0 0 0 0 x 0 0
0 0 1 0 1 0 x 1 0
0 1 0 1 0 1 x 1 0
0 1 1 0 1 0 x 0 0
1 0 0 1 1 x 0 1 0
1 0 1 0 1 x 1 1 0
1 1 0 0 0 x 1 0 0
1 1 1 0 1 x 1 0 1
T0 Q1 Q0
00 01 11 10
0 0 1 0 1
X
1 1 0 0 1
23
Sequence recognizer (Moore)
Inputs: 1 1 1 0 01 1 0 1 00 1 00 1 1 0 …
Outputs: 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 …
24
Moore state diagram & table
0
1
1 0 0 1
A/0 B/0 C/0 D/0 E/1
1
0
0
1
Present Next
State Input State Output Z Q 2 Q1
A 0 A 0 00 01 11 10
A 1 B 0 A: 000 D: 100
B 0 C 0 0
B: 001 E: 101 Q0
B 1 B 0 1 1
C: 010
C 0 D 0
C 1 B 0
Z= Q2 Q1’ Q0
D 0 A 0
D 1 E 0
E 0 C 1
E 1 B 1
25