Title: Lecture 22 Sequential Circuits Analysis
1Lecture 22Sequential Circuits Analysis
2Combinational vs. Sequential
- Combinational Logic Circuit
- Output is a function only of the present inputs.
- Does not have state information.
- Does not require memory.
- Sequential Logic Circuit (Finite State Machine)
- Output is a function of the present state and at
times present state and input. - Has state information
- Requires memory.
- Uses Flip-Flops to implement memory.
3Synchronous vs. Asynchronous
- Synchronous Sequential Logic Circuit
- Clocked
- All Flip-Flops use the same clock and change
state on the same triggering edge. - Asynchronous Sequential Logic Circuit
- No clock
- Can change state at any instance in time.
- Faster but more complex than synchronous
sequential circuits.
4General Models for Sequential Circuits
A sequential circuit can be divided conveniently
into two parts -- the flip-flops which serve as
memory for the circuit and the combinational
logic which realizes the input functions for the
flip-flops and the output functions. The
combinational logic may be implemented with
gates, with a ROM, or with a PLA.
5Sequential Logic (Why) ?
- Sequential circuit has additional dimension which
is time - Combinational logic only depends on current input
- Sequential circuit output depends on previous
input other than current input - More powerful than combinational logic
- Able to model condition that cant be
accommodated by combinational logic
6 Analysis of Clocked Sequential Circuits
- Analysis of a sequential circuit consists of
obtaining a table or a diagram for the time
sequence of inputs, outputs, and internal states. - Sequential circuit behavior is determined from
the inputs, the outputs, and the state of its
flip-flops - Boolean expressions that describe the behavior of
the sequential circuit - Outputs and the next state are both a function of
the inputs and the present state - A logic diagram is recognized as a clocked
sequential circuit if it includes flip-flops. - Logic diagram may or may not include
combinational circuit gates.
7The Current State
- It is inconvenient, and often impossible, to
describe the behaviour of a sequential circuit by
means of a table that lists outputs as a function
of the input sequence that has been received up
until the current time. - To know where you are going next, you need to
know where you are now. - With the TV channel selector, it is impossible to
determine what channel is currently selected by
looking only at the preceding sequence of
presses, whether we look at the preceding 10
presses or the preceding 1000. - More information, the current state of the
channel selector, is needed.
8State
- The state of a sequential circuit is a
collection of state variables whose values at any
particular time contain all the information about
the past necessary to account for the circuits
future behaviour. - In the channel-selector example, the current
channel number is the current state. - Inside the TV, this state might be stored as
seven binary state variables representing a
decimal number between 1 and 9. - Given the current state (channel number), we can
always predict the next state as a function of
the inputs (up/down pushes).
9Finite-State Machines
- In a digital circuit, state variables have binary
values. - A circuit with n binary state variables has 2n
possible states. - 2n is always finite, so sequential circuits are
sometimes called finite-state machines.
10D Flip-Flop with Clock input
- Q(t1) Q?.D Q.D D.(Q? Q) D.1 D
11Boolean equation for D Flip-Flop
12Sequential Circuit Analysis
- Given sequential circuit diagram, behavioral
analysis from state table and also state diagram - Need state equations to get flip-flop input and
output functions for circuit output other than
flip-flop (if any) - A(t) and A(t1) are used to represent current
state and the next state for flip-flop. - A and A can also be used in order to represent
current state and the following state
13Sequential Circuit Analysis
- Example (using D flip-flop)
- State equation
- Output Function
14Sequential Circuit Analysis
- From the state equations and output function,
state table can be derived that contains all
combined binary combination for the current
condition (present state) and input - State table
- The same as Truth Table
- Input and condition pad on the left
- Output and next condition on the right
- Combined binary combination available for current
state and input - M flip-flop and n input gt 2mn line
15Sequential Circuit Analysis
- From the state equations and output function,
state table can be derived that contains all
combined binary combination for the current
condition (present state) and input - State table
- The same as Truth Table
- Input and condition pad on the left
- Output and next condition on the right
- combined binary combination available for current
state and input - M flip-flop and n input gt 2mn line
State table for circuit in Example 1
State equation Output function
16Sequential Circuit Analysis
17Sequential Circuit Analysis
- From the truth table, we can draw state diagram
- State diagram
- Each state is represented by circle
- Each arrow (between two circle) represent
transfer for sequential logic (i.e. line
transition in truth table) - a/b label for each arrow where a represent inputs
and b represent output for circuit in transition - Each flip-flop value combination represent state.
Therefore, m flip-flopgt until 2m state.
18Sequential Circuit Analysis
- State diagram for circuit in previous example
- Each state is represented by circle
- Each arrow (between two circle) represent
transfer for sequential logic (i.e. line
transition in truth table) - a/b label for each arrow where a represent inputs
and b represent output for circuit in transition
19(No Transcript)
20Flip-flop Input Function
- Output of sequential circuit is a function of the
current state of the flip-flop and the input.
This is explained using algebra by circuit output
function - In previous example y (AB)x
- Circuit part that generate input to flip-flop is
represented by using Boolean equation and is
known as flip-flop inputs function - Flip-flop input function determine next state
- From flip-flop input function and criteria table
for flip-flop, next state of the flip-flop is
obtained
21Flip-flop Input Function
- Example circuit with JK flip flop
- 2 characters are used in order to represent
flip-flop input first character represents the
flip-flop input (J or K for JK flip-flop, S or R
for SR flip-flop, D for D flip-flop, T for T
flip-flop respectively) and the second character
represents the name of the flip-flop
22Analysis Example
- Given a sequential circuit with two JK flip-flop,
namely A, B and one input x - Flip-flop input function obtained from the
circuit is
23Analysis Example
- Input flip-flop function
- Fill the state table with the above function
using criteria table for the used flip-flop
24Analysis Example
- Draw state diagram from the state table
25Flip-flop Excitation Tables
- Analysis Vs Design
- Analysis Start from circuit diagram, build state
table or state diagram - Design Start from specification set (i.e. in
state equation form, state table or state
diagram) build logic circuit. - Criteria table is used in analysis
- Excitation tables is used in design
26Flip-flop Excitation Tables
- Excitation tables it give transition
characteristic between current state and next
state to determine flip-flop input
27Designing Sequential Circuit
- Design steps
- Start with circuit specification characteristic
of circuit - Build state table
- Perform state reduction if required
- State assignment
- Determine number of flip-flop ( that has to be
used) - Build circuit excitation and output table from
state table - Build circuit output function and flip-flop input
function - Draw logic diagram
28Design Example
- Given state diagram as follows, get the
sequential circuit using JK flip-flop
29Design Example
- State/excitation table using JK flip-flop
For example, in the first row of Table (bottom
right), we have a transition for flip-flop A from
0 in the present state to 0 in the next state. In
Table (excitation table), we find that a
transition of states from 0 to 0 requires that
input J 0 and input K X
30Design Example
31Design Example
- From state table, get input flip-flop function
32Design Example
- Input flip-flop function
- Logic Diagram
33(No Transcript)
34Design Example
- Design, using D flip-flop, circuit is based on
state table below.
35Design Example
- Determine input expression for flip-flop and y
output
36Design Example
- From Boolean expressions built, draw logic diagram
37Design Example
- How if using JK flip-flop (Homework)
38(No Transcript)
39Design a Synchronous Counter
- Counter sequential circuit cycle through state
sequence - Binary counter follow binary sequence. n-bit
binary counter (with n flip-flop) able to count
from 0 to 2n-1. - Example 3-bit binary counter (using T flip-flop)
40Design a Synchronous Counter
- 3-bit binary counter (cont)
41Design a Synchronous Counter
42(No Transcript)
43Sequential Circuit Design
- Sequential circuit consists of
- A combinational circuit that produces output
- A feedback circuit
- We use JK flip-flops for the feedback circuit
- Simple counter examples using JK flip-flops
- Provides alternative counter designs
- We know the output
- Need to know the input combination that produces
this output - Use an excitation table
- Built from the truth table
44Sequential Circuit Design (contd)
45Sequential Circuit Design (contd)
- Build a design table that consists of
- Current state output
- Next state output
- JK inputs for each flip-flop
- Binary counter example
- 3-bit binary counter
- 3 JK flip-flops are needed
- Current state and next state outputs are 3 bits
each - 3 pairs of JK inputs
46Sequential Circuit Design (contd)
Design table for the binary counter example
47Sequential Circuit Design (contd)
Use K-maps to simplify expressions for JK inputs
48Sequential Circuit Design (contd)
- Final circuit for the binary counter example
- Compare this design with the synchronous counter
design
49