S equential circuit design and analysis
Steps in the design process for sequential circuits
State Diagrams and State Tables
Examples
Steps in Design of a Sequential Circuit
1. Specification – A description of the sequential circuit. Should include a detailing of the inputs,
the outputs, and the operation. Possibly assumes that you have knowledge of digital system basics.
2. Formulation: Generate a state diagram and/or a state table from the statement of the problem.
3. State Assignment: From a state table assign binary codes to the states.
4. Flip-flop Input Equation Generation: Select the type of flip-flop for the circuit and generate
the needed input for the required state transitions
5. Output Equation Generation: Derive output logic equations for generation of the output from
the inputs and current state.
6. Optimization: Optimize the input and output equations. Today, CAD systems are typically
used for this in real systems.
7. Technology Mapping: Generate a logic diagram of the circuit using ANDs, ORs, Inverters,
and F/Fs.
8. Verification: Use a HDL to verify the design.
Mealy and Moore
Sequential machines are typically classified as either a Mealy machine or a Moore
machine implementation.
Moore machine: The outputs of the circuit depend only upon the current state of the
circuit.
Mealy machine: The outputs of the circuit depend upon both the current state of the
circuit and the inputs.
An example to go through the steps
The specification: The circuit will have one input, X, and one output, Z. The output Z will be 0
except when the input sequence 1101 are the last 4 inputs received on X. In that case it will be a
1
Generation of a state diagram
Create states and meaning for them.
State A – the last input was a 0 and previous inputs unknown. Can also be the reset state.
State B – the last input was a 1 and the previous input was a 0. The start of a new sequence
possibly.
Capture this in a state diagram
Capture this in a state diagram
Circles represent the states
Lines and arcs represent the transition between states.
The notation Input/output on the line or arc specifies the input that causes this transition
and the output for this change of state.
Add a state C – Have detected the input sequence 11 which is the start of the sequence
Add a state D
State D – have detected the 3rd input in the start of a sequence, a 0, now having
110. From State D, if the next input is a 1 the sequence has been detected and a 1
is output.
The previous diagram was incomplete.
In each state the next input could be a 0 or a 1. This must be included
The state table
This can be done directly from the state diagram
Now need to do a state assignment
Select a state assignment
Will select a gray encoding
For this state A will be encoded 00, state B 01, state C 11 and state D 10
Flip-flop input equations
Generate the equations for the flip-flop inputs
Generate the D0 equation
Generate the D1 equation
The output equation
The next step is to generate the equation for the output Z and what is needed to generate
it.
Create a K-map from the truth table.
Now map to a circuit
The circuit has 2 D type F/Fs