Unit 5-dld Notes (Pranalini)
Unit 5-dld Notes (Pranalini)
The most general model of a sequential circuit has inputs, outputs and internal states. A
sequential circuit is referred to as a finite state machine (FSM). A finite state machine is abstract
model that describes the synchronous sequential machine. The fig. shows the block diagram of a
finite state model. X1, X2,….., Xl, are inputs. Z1, Z2,….,Zm are outputs. Y1,Y2,….Yk are state
variables, and Y1,Y2,….Yk represent the next state.
Let a finite state machine have n states. Let a long sequence of input be given to the machine.
The machine will progress starting from its beginning state to the next states according to the
state transitions. However, after some time the input string may be longer than n, the number of
states. As there are only n states in the machine, it must come to a state it was previously been in
and from this phase if the input remains the same the machine will function in a periodically
repeating fashion. From here a conclusion that ‗for a n state machine the output will become
periodic after a number of clock pulses less than equal to n can be drawn. States are memory
elements. As for a finite state machine the number of states is finite, so finite number of memory
elements are required to design a finite state machine.
Limitations:
1. Periodic sequence and limitations of finite states: with n-state machines, we can generate
periodic sequences of n states are smaller than n states. For example, in a 6-state machine,
we can have a maximum periodic sequence as 0,1,2,3,4,5,0,1….
2. No infinite sequence: consider an infinite sequence such that the output is 1 when and
only when the number of inputs received so far is equal to P(P+1)/2 for P=1,2,3….,i.e.,
the desired input-output sequence has the following form:
Mealy model:
When the output of the sequential circuit depends on the both the present state of the flip-flops
and on the inputs, the sequential circuit is referred to as mealy circuit or mealy machine.
The fig. shows the logic diagram of the mealy model. Notice that the output depends up on the
present state as well as the present inputs. We can easily realize that changes in the input during
the clock pulse cannot affect the state of the flip-flop. They can affect the output of the circuit. If
the input variations are not synchronized with a clock, he derived output will also not be
synchronized with the clock and we get false output. The false outputs can be eliminated by
allowing input to change only at the active transition of the clock.
The behavior of a clocked sequential circuit can be described algebraically by means of state
equations. A state equation specifies the next state as a function of the present state and inputs.
The mealy model shown in fig. consists of two D flip-flops, an input x and an output z. since the
D input of a flip-flop determines the value of the next state, the state equations for the model can
be written as
Y1 (t+1)=y1(t)x(t)+y2(t)x(t)
Y2(t+1)= 𝑦1(t)x(t)
The stable table of the mealy model based on the above state equations and output equation is
shown in fig. the state diagram based on the state table is shown in fig.
In general form, the mealy circuit can be represented with its block schematic as shown in below
fig.
The state table of the Moore model based on the above state equations and output equation is
shown in fig.
Consider the state diagram of a finite state machine shown in fig. it is five-state machine with
one input variable and one output variable.
Terminal state: looking at the state diagram , we observe that no such input sequence exists
which can take the sequential machine out of state E and thus state E is said to be a terminal
state.
Strongly-connected machine: in sequential machines many times certain subsets of states may
not be reachable from other subsets of states. Even if the machine does not contain any terminal
state. If for every pair of states si, sj, of a sequential machine there exists an input sequence which
takes the machine M from si to sj, then the sequential machine is said to be strongly connected.
State equivalence theorem: it states that two states s1, and s2 are equivalent if for every possible
input sequence applied. The machine goes to the same next state and generates the same output.
That is
If S1(t+1)= s2(t+1) and z1=z2, then s1=s2
Here the outputs are different after 2-state transition and hence states A and E are 2-
distungishable. Again consider states A and C . the output sequence is as follows:
different
Here the outputs are different after 3- transition and hence states A and B are 3-distuingshable.
the concept of K- distuingshable leads directly to the definition of K-equivalence. States that are
not K-distinguishable are said to be K-equivalent.
PS NS,Z
X=0 X=1
A C,0 F,0
B D,1 F,0
C E,0 B,0
D B,1 E,0
E D,0 B,0
F D,1 B,0
State Minimization:
Completely Specified Machines
• Two states, si and sj of machine M are distinguishable if and only if there exists a finite
input sequence which when applied to M causes different output sequences depending on
whether M started in si or sj.
• Such a sequence is called a distinguishing sequence for (si, sj).
• If there exists a distinguishing sequence of length k for (si, sj), they are said to be k-
distinguishable.
EXAMPLE:
State Minimization:
Incompletely Specified Machines
Statement of the problem: given an incompletely specified machine M, find a machine M’
such that:
– on any input sequence, M’ produces the same outputs as M, whenever M is
specified.
– there does not exist a machine M’’ with fewer states than M’ which has the same
property
Machine M:
Attempt to reduce this case to usual state minimization of completely specified machines.
• Brute Force Method: Force the don‘t cares to all their possible values and choose the
smallest of the completely specified machines so obtained.
• In this example, it means to state minimize two completely specified machines obtained
from M, by setting the don‘t care to either 0 and 1.
• States s1 and s2 are equivalent if s3 and s2 are equivalent, but s3 and s2 assert different
outputs under input 0, so s1 and s2 are not equivalent.
• States s1 and s3 are not equivalent either.
Machine M’’red :
Machine M2 and M3 are formed by filling in the unspecified entry in M with 0 and 1,
respectively.
In this case we have two compatible sets: A = (s1, s2) and B = (s3, s2). A reduced machine Mred
can be built as follows.
Machine Mred
A set of compatibles that cover all states is: (s3s6), (s4s6), (s1s6), (s4s5), (s2s5).
But (s3s6) requires (s4s6),
(s4s6) requires(s4s5), (s4s5) requires (s1s5),
(s1s6) requires (s1s2), (s1s2) requires (s3s6),
(s2s5) requires (s1s2).
So, this selection of compatibles requires too many other compatibles...
When a next state is unspecified, the future behavior of the machine is unpredictable. This
suggests the definition of admissible input sequence.
Definition. An input sequence is admissible, for a starting state of a machine if no unspecified
next state is encountered, except possibly at the final step.
Definition. State si of machine M1 is said to cover, or contain, state sj of M2 provided
1. every input sequence admissible to sj is also admissible to si , and
2. its application to both M1 and M2 (initially is si and sj, respectively) results in
identical output sequences whenever the outputs of M2 are specified.
Definition. Machine M1 is said to cover machine M2 if for every state sj in M2, there is a
corresponding state si in M1 such that si covers sj.
Merger graphs:
The merger graph is a state reducing tool used to reduce states in the incompletely specified
machine. The merger graph is defined as follows.
1. Each state in the state table is represented by a vertex in the merger graph. So it contains
the same number of vertices as the state table contains states.
2. Each compatible state pair is indicated by an unbroken line draw between the two state
vertices
3. Every potentially compatible state pair with non-conflicting outputs but with different
next states is connected by a broken line. The implied states are written in theline break
between the two potentially compatible states.
4. If two states are incompatible no connecting line is drawn.
Consider a state table of an incompletely specified machine shown in fig. the corresponding
merger graph shown in fig.
PS NS,Z
I1 I2 I3 I4
A … E,1 B,1 ….
B … D,1 … F,1
C F,1 … … …
D … … C,1 …
E C,0 … A,0 F,1
F D,0 A,1 B,0 …
States A and B have non-conflicting outputs, but the successor under input I2are compatible only
if implied states D and E are compatible. So, draw a broken line from A to B with DE written in
between states A and C are compatible because the next states and output entries of states A and
C are not conflicting. Therefore, a line is drawn between nodes A and C. states A and D have
non-conflicting outputs but the successor under input I3 are B and C. hence join A and D by a
broken line with BC entered In between.
Two states are said to be incompatible if no line is drawn between them. If implied states are
incompatible, they are crossed and the corresponding line is ignored. Like, implied states D and
E are incompatible, so states A and B are also incompatible. Next, it is necessary to check
whether the incompatibility of A and B does not invalidate any other broken line. Observe that
states E and F also become incompatible because the implied pair AB is incompatible. The
broken lines which remain in the graph after all the implied pairs have been verified to be
compatible are regarded as complete lines.
After checking all possibilities of incompatibility, the merger graph gives the following seven
compatible pairs.
Example:
Merger Table: