The following will be discussed in this chapter: Combinational vs. sequential, synchronous vs. asynchronous, general models for sequential circuits, sequential logic (why)? analysis of clocked sequential circuits, the current “state”, sequential circuit analysis,...
Trang 1Sequential Circuits Analysis
Trang 2 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
Uses Flip-Flops to implement memory.
Trang 3 Synchronous Sequential Logic Circuit
All Flip-Flops use the same clock and
change state on the same triggering edge.
Asynchronous Sequential Logic Circuit
Can change state at any instance in
time.
Trang 4A 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.
Trang 5° 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 can’t be
accommodated by combinational logic
Trang 6° 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.
Trang 7° 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
Trang 8° 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 circuit’s 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).
Trang 9° In a digital circuit, state variables have binary
values.
° A circuit with n binary state variables has 2 n
possible states.
° 2 n is always finite, so sequential circuits are
sometimes called finite-state machines.
Trang 12° 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(t+1) 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
Trang 13° Example (using D flip-flop)
State equation
Output Function
Trang 14° 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 => 2 m+n line
Trang 15State table for circuit in Example 1
° 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 => 2 m+n line
State equation Output function
Trang 16Other method
Trang 17° 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-flop=> until 2 m state.
Trang 18° 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
Trang 20° 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= (A+B)x’
° Circuit part that generate input to flip-flop is
represented by using Boolean equation and is known
as flip-flop input’s function
° Flip-flop input function determine next state
° From flop input function and criteria table for
flip-flop, next state of the flip-flop is obtained
Trang 21° 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
Trang 22namely A, B and one input x
° Flip-flop input function obtained from the circuit is
Trang 23° Input flip-flop function
° Fill the state table with the above function using criteria
table for the used flip-flop
Trang 2424
Trang 25Analysis 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
Trang 26between current state and next state to determine flop input
Trang 27flip-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
Trang 28° Given state diagram as follows, get the sequential
circuit using JK flip-flop
Trang 29° State/excitation table using JK flip-flop
For example, in the first row of Table (bottom right), we have a transition for flop A from 0 in the present state to 0 in the next state In Table (excitation table),
flip-we find that a transition of states from 0 to 0 requires that input J= 0 and input K
= X
Trang 30° Block diagram
Trang 31° From state table, get input flip-flop function
Trang 32° Logic Diagram
Trang 34table below.
Trang 35° Determine input expression for flip-flop and y
output
Trang 3636
Trang 37° How if using JK flip-flop (Homework)
Trang 39° 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 2 n -1.
° Example: 3-bit binary counter (using T flip-flop)
Trang 4040
Trang 41° 3-bit binary counter
Trang 43° 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
Trang 45° 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
Trang 4646
Trang 48• Compare this design with the synchronous counter
design
Trang 49Thanks