Professional Documents
Culture Documents
Lecture22 23 DLD
Lecture22 23 DLD
Webpage: http://home.iitj.ac.in/~sptiwari/
Course related documents will be uploaded on
http://home.iitj.ac.in/~sptiwari/DLD/
Note: The information provided in the slides are taken form text books Digital Electronics
(including Mano & Ciletti), and various other resources from internet, for teaching/academic
use only 1
Combinational vs. Sequential
° Representations of state:
• State equations
• State table
• State diagram
Clk
y(t) = x(t)Q1(t)Q0(t)
Q0(t+1) = D0(t) = x(t)Q1(t)
Q1(t+1) = D1(t) = x(t) + Q0(t)
Output and State Equations
x D0
Q1 Q0
Q
D
Q’
y
Q
D Q1
Q0 D1 Q’
Clk
Output equation
y(t) = x(t)Q1(t)Q0(t)
State equations Q0(t+1) = D0(t) = x(t)Q1(t)
Q1(t+1) = D1(t) = x(t) + Q0(t)
State Table
° Sequence of outputs, inputs, and flip flop states
enumerated in state table
° Present state indicates current value of flip flops
° Next state indicates state after next rising clock
edge
° Output is output value on current clock edge
1/1
0/0 0/0
0/0 1/0
s0 s1 s2 s3
1/0
1/0 0/0
Flip Flop Input Equations
x D0
Q1 Q0
Q
D
Q’
y
Q
D Q1
Q0 D1 Q’
Clk
DQ0 = xQ1
DQ1 = x + Q0 Format implies type of flop used
Mealy Machine
• Output based on state and present input
Q(t+1) Flip
Comb.
next Flops
Logic Q(t)
state present Y(t)
X(t) Comb.
state
present Logic
input
clk
Moore Machine
Q(t+1) Y(t)
Comb. Flip Comb.
Logic next Flops Q(t) Logic
state present
X(t)
state
present
input
clk
Mealy versus Moore
Mealy Model
Inputs
Input Output Outputs
Logic Logic
Combina- Memory Combina-
tional Element tional
Moore Model
S4 S2
0/0
0/0
0/0
1/0 S3 1/0
FSM: State Diagram (Moore)
Output
State
A
Input
C B
FSM Analysis: Procedure, simplified
• Determine the Flip-Flop input equations
In terms of the present state and input
variables
• Determine the FSM output equation(s)
• Determine the next state values in the state
table
Assume binary encoding
Use Flip-Flop Characteristic Equation
• Construct the state table
Assign a state to each binary state
assignment
• Draw the corresponding state diagram
• Determine the behavior of the FSM
Clocked Synchronous State-machine Analysis
input
state
output
What type of
FSM is this?
A(t+1) = A.x + B.x
B(t+1) = A’.x
Y = (A+B).x’
FSM Analysis: Example (D FF)
° A time sequence of inputs, outputs and multiple flip-
flop states can be enumerated in a state table or
transition table
Another State Table for the Circuit
° A time sequence of inputs, outputs and multiple flip-
flop states can be enumerated in a state table or
transition table
State diagram of the circuit
° A graphical representation of the time sequence of
inputs, outputs and flip-flop states is state diagram
° State diagram follows directly from the state table
Analysis with D Flip-Flops
° Identify flip flop input equations
° Identify output equation
DA = A ⊕ x ⊕ y
A(t+1) = A ⊕ x ⊕ y
° Understand specifications
° Derive state diagram
° Create state table
° Perform state minimization (if necessary)
° Encode states (state assignment)
° Create state-assigned table
° Select type of Flip-Flop to use
° Determine Flip-Flop input equations and FSM
output equation(s)
° Draw logic diagram
32
What next……
° FSM Design