Professional Documents
Culture Documents
Finite State Machines
Finite State Machines
KEC302
Unit-3
Synchronous Sequential
Circuits
Deepak Sigroha
Electronics Engineering Department
Rajkiya Engineering College Sonbhadra
deepak.sigroha@recsonbhadra.ac.in
+91-9478856526
Outline
Looping
• Synchronous Sequential Circuits
• Analysis of Sequential Circuits
• Finite State Machine Model
• Mealy and Moore FSM
• State Reduction and Assignment
• Design Procedure
Combinational Circuits
Solution
We need two copies of a state variable A— present-state variable representing the present value of and
next-state variable representing the value of one clock-edge later
Specify output variables and next-state variables as function of input variables and present-state variables.
Unit 3 – Synchronous Sequential Circuits and Systems (FSM) 8
Analysis of Sequential Circuits
The behavior of a clocked sequential circuit is determined from
The inputs
The outputs
The state of its flip-flops
The outputs and the next state are both a function of the inputs and the present state
1
1/0 0/1
0/
1/0
interpretation
01 11
1/0
Unit 3 – Synchronous Sequential Circuits and Systems (FSM) 13
Clocked Sequential Circuits: Input Equations
To draw the logic diagram of a sequential circuit, we need
The type of flip-flops
A list of Boolean expressions of the combinational circuits
The Boolean functions for the circuit that generates external outputs is called output equations.
The Boolean functions for the circuit that generates the inputs to flip-flops is flip-flop input
equations.
Sometimes called excitation equations.
The flip-flop input equations provide a convenient form for specifying the logic diagram of a
sequential circuit.
0 0 0 0
State Equation
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
(b) State table
Method 2
The next-state values can also be obtained by evaluating the state equations from the
characteristic equation. This is done by using the following procedure:
1. Determine the flip-flop input equations in terms of the present state and input variables.
2. Substitute the input equations into the flip-flop characteristic equation to obtain the state equations.
3. Use the corresponding state equations to determine the next-state values in the state table.
Moore model:
The output is a function
of the present state only.
The output are
synchronized with the
clock.
State a a b c d e f f g f g a
Input 0 1 0 1 0 1 1 0 1 0 0
Output 0 0 0 0 0 1 1 0 1 0 0
delete state g and replaced with delete state f and replaced with state d
state e
State a a b c d e f f g f g a
Input 0 1 0 1 0 1 1 0 1 0 0
Output 0 0 0 0 0 1 1 0 1 0 0
For a circuit with m states, the codes must a 000 000 00001
Table2:
Table1: Reduced State Table with
Reduced State Table Binary Assignment 1
PS Next State Output PS Next State Output
x=0 x=1 x=0 x=1 x=0 x=1 x=0 x=1
a a b 0 0 000 000 010 0 0
b c d 0 0 001 010 011 0 0
c a d 0 0 010 000 011 0 0
d e d 0 1 011 100 011 0 1 Reduced state
diagram
e a d 0 1 100 000 011 0 1
Unit 3 – Synchronous Sequential Circuits and Systems (FSM) 33
Synthesis of Sequential Circuits
The procedure for designing synchronous sequential circuits:
1. From the word description and specification of the desired operation, derive a state diagram for the
circuit.
2. Reduce the number of states if necessary.
3. Assign binary values to the states.
4. Obtain the binary-coded state table.
5. Choose the type of flip-flops to be used.
6. Derive the simplified flip-flop input equations and output equations.
7. Draw the logic diagram.
Step 4 to 7 can be automated
Use HDL synthesis tools
0/0 0/0
1/0
S0 S1
0
1/0
0/
S2
1/1
a) Mealy Machine
0
1/0 1/0
0/
0/
10 100
1/1 1/1
a) Mealy machine with Binary Assignment c) Mealy machine with One-Hot Assignment
Logic diagram of a
Moore-type sequence
detector
y =AB
Unit 3 – Synchronous Sequential Circuits and Systems (FSM) 43
Example-2 (MOD-8 UP Counter) using T Flip-Flop
Derive the state table with the excitation inputs.
Other design procedures are the same.
0/1
Present State Next State, Output (z)
x=0 x=1
A A, 0 B, 0
B C, 0 B, 0
C A, 0 D, 0
D A, 1 B, 0
A A B 0
B C B 0
C A D 0
D E B 0
E A B 1