analysis of sequential circuits by dr. amin danial asham
TRANSCRIPT
ANALYSIS OF SEQUENTIAL CIRCUITS
byDr. Amin Danial Asham
References
Digital Design 5th Edition, Morris Mano
Clocked Sequential Circuits
The behavior of a clocked sequential circuit depends on the inputs , outputs and the internal state.
The outputs and the next state are both function on the applied inputs and the present state.
The Boolean expressions that describe sequential circuits must include the time sequence.
A state table and state diagram are used to describe the behavior of sequential circuits.
The analysis of a sequential circuit consists of obtaining a table, a diagram and Boolean expressions that describe the behavior of a sequential circuit.
State Equations A clocked sequential circuit can be described by algebraic equations called
state equations or transition equations. A state equation expresses the next state as a function of the present state
and inputs. Example: This circuit has an input
and an output and two FFβs and .
π΄ (π‘+1 )=π΄ (π‘ ) π₯+π΅(π‘)π₯
π΅(π‘+1)=π΄β (π‘ )π₯
By noting that the D input of a flip-flop determines the value of the next state. The state equations are:
Therefore, a state equation specifies the condition for a FF state transition.
State Equations (continue) Since the left side of the state
equation presents the next state and hence is used.
The right side presents the Boolean expression that specifies the condition of setting the next state as function of the present state and inputs.
For simplicity (t) will be omitted from the present state. Hence the state equation become:π΄ (π‘+1 )=π΄π₯+π΅π₯π΅(π‘+1)=π΄β π₯
Consequently, the output is:
π¦ (π‘)=π₯ β (π‘)(π΄(π‘)+π΅(π‘))
π¦=π₯ β (π΄+π΅) Becomes
State Table: The time sequence of the inputs, outputs and FF states are listed in a table
called state table or transition table . This table can be obtained as follows:
β’ Listing all possible combinations of
current state and inputs, then using the
using the state equations for each
combination.
β’ The output is a obtained from the
present state and inputs from the
output equation.
π΄ (π‘+1 )=π΄π₯+π΅π₯π΅(π‘+1)=π΄β π₯
π¦=π₯ β (π΄+π΅)
State Table (continue)
From the previous example we used all the possible combinations of 2 FFβs and a single input which is combinations.
Hence the state table has 8 rows.
In general, for a sequential circuit with FFβs, inputs, and outputs, the state table has:β’ rows. β’ next state columnsβ’ output columns.
State Table (continue) Another form of the state table where for each present
state, the next states and output are listed for each input value.
State Diagram State diagram is a graphical presentation of the information available in a state
table The state of the FFβs is represented by a binary number inside a circle. The clock triggered transitions are represented by labeled directed lines
connecting the circles. The labels are two numbers separated by a slash: The number before the slash is the input value during the present state. The second number after the slash is the output during the present state with
the given input .
State Diagram (continue) For example, the directed line from state 00 to 01 is
labeled 1/0, meaning that when the sequential circuit is in the present state 00 and the input is 1, the output is 0.
After the next clock cycle, the circuit goes to the next state, 01.
If the input changes to 0, then the output becomes 1. If the input remains at 1, the output stays at 0.
Equations β State table
Steps are:
Circuit diagram State diagram
FF input Equations The excitation equations are those the Boolean expressions for the inputs of FFβs in
a sequential circuit.Example, the excitation equations of the next
circuit are:
β’ Where and are the inputs for and respectively.
β’ While the state equation are:
β’ And the output equation is
π΄ (π‘+1 )=π΄π₯+π΅π₯π΅(π‘+1)=π΄β π₯
π¦=π₯ β (π΄+π΅)
FF input equations (continue)
FF input equations are used to specify the logic circuit that drive the FFβs and the type of the FFβs represented by the symbols on the left side of the equation.
The sequential circuit diagram can be drawn using the FF input equations and output equations.
Example of Analysis with D FF For a simple circuit with the following input equation is :
Where are input variables. implies that we have a FF that has an output Since Characteristic equation D FF : Therefore, No output equations implies that the output of the circuit comes from the FF
output. Therefore,
1 12345678
2 34 5
6 7
8
Steps of Driving The Next State
1. Drive the flip-flop input equations in terms of the present state and input variables.
2. Using the input equations a list of the FFβs inputs can be obtained from all the combinations of present state and inputs.
3. Use the corresponding flip-flop characteristic table or characteristic equation to determine the next-state values in the state table.
Example of Analysis with JK FF For the following circuit. The input equations are:
Then listing all possible
combinations of present states and input starting from 000 to 111. Get all the FFβs inputs
from the present state and input using input equations.
Using the characteristic table, get the next state for each FF.
,πΎ π΄=π₯β²π΅
, πΎπ΅=π₯β¨ π΄=π₯ β² π΄+π΄β² π₯
State Table
not part of the state table
Example of Analysis with JK FF (continue) Alternatively, we are going to get the state equations as follows:
o Getting the characteristic equations:
o Getting the input equations as done before:
o Substituting the input equations in characteristic equation we get the state equations.
The next state is obtained by state equations and hence the list of FFβs input table used before is not needed if state equations are used
,πΎ π΄=π₯β²π΅
, πΎπ΅=π₯β¨ π΄=π₯ β² π΄+π΄β² π₯
π΄ (π‘+1 )=π΅π΄β²+(π₯ΒΏΒΏ β² π΅) β² π΄ ΒΏΒΏπ΅π΄ β²+(π₯+π΅ β²)ΒΏ π΄β²π΅+ π΄π΅β²+π₯π΄π΅ (π‘+1 )=π₯β² π΅β²+ (π₯β¨ π΄ )β²π΅ΒΏ π₯ β²π΅ β²+ (π₯π΄+π₯ β² π΄β² )π΅
ΒΏ π₯ β²π΅ β²+π₯π΄π΅+π₯β² π΄β² π΅
Example of Analysis with JK FF (continue)
1
1
2
2
33
4
4
5
5
6
67
7
8
8
Example of Analysis with T FF Characteristic equations
Input Equations:
Therefore State equations are:
Output equation:
Example of Analysis with T FF (continue) From the state and output equations we get:
The two values inside each circle and separated by a slash are for the present state and output
Finite State Machine (FSM) There are two models of Moore Model and Mealy Model.
Finite State Machine (FSM) (continue) In Moore model the output depends only on the FF states and hence the
output is synchronized with the clock.
In Mealy model the output depends on the FF states and the inputs. The output in the Mealy model may change because of the input variation
during the clock cycle and hence the output is not synchronized with the
clock. The outputs in Mealy model may have momentary false values because of
the delay between the inputs change and the FF outputs change.
Finite State Machine (FSM) (continue) In order to synchronize the output of a Mealy-type
circuit and avoid the momentary false output:
o The inputs are changed at the inactive edge of the clock to get enough time to stabilize before the active edge of the clock occurs.
o Thus, the valid output of the Mealy machine is available immediately before the active edge of the clock.
Active edge
Inactive edge
Inputs are ChangedOutput is sampled
Examples of FSM
Moore Model Mealy Model
Thanks