analysis of sequential circuits by dr. amin danial asham

24
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

Upload: virgil-montgomery

Post on 17-Jan-2016

234 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

ANALYSIS OF SEQUENTIAL CIRCUITS

byDr. Amin Danial Asham

Page 2: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

References

Digital Design 5th Edition, Morris Mano

Page 3: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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.

Page 4: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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.

Page 5: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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

Page 6: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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)=𝐴’ π‘₯

𝑦=π‘₯ ’ (𝐴+𝐡)

Page 7: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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.

Page 8: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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.

Page 9: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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 .

Page 10: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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

Page 11: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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)=𝐴’ π‘₯

𝑦=π‘₯ ’ (𝐴+𝐡)

Page 12: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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.

Page 13: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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

Page 14: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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.

Page 15: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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

Page 16: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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 )=π‘₯β€² 𝐡′+ (π‘₯⨁ 𝐴 )′𝐡¿ π‘₯ ′𝐡 β€²+ (π‘₯𝐴+π‘₯ β€² 𝐴′ )𝐡

ΒΏ π‘₯ ′𝐡 β€²+π‘₯𝐴𝐡+π‘₯β€² 𝐴′ 𝐡

Page 17: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

Example of Analysis with JK FF (continue)

1

1

2

2

33

4

4

5

5

6

67

7

8

8

Page 18: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

Example of Analysis with T FF Characteristic equations

Input Equations:

Therefore State equations are:

Output equation:

Page 19: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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

Page 20: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

Finite State Machine (FSM) There are two models of Moore Model and Mealy Model.

Page 21: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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.

Page 22: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

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

Page 23: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

Examples of FSM

Moore Model Mealy Model

Page 24: ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham

Thanks