Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
• State box – A rectangle represents a state of the FSM. It is equivalent to a node in the state
diagram or a row in the state table. The name of the state is indicated outside the box in the top-
left corner. The Moore-type outputs are listed inside the box. These are the outputs that depend
only on the values of the state variables that define the state; we will refer to them simply as
Moore outputs. It is customary to write only the name of the signal that has to be asserted. Thus
it is sufficient to write z, rather than z = 1, to indicate that the output z must have the value 1.
Also, it may be useful to indicate an action that must be taken; for example, Count ← Count + 1
specifies that the contents of a counter have to be incremented by 1.
• Decision box –A diamond indicates that the stated condition expression is to be tested and the
exit path is to be chosen accordingly. The condition expression consists of one or more inputs to
the FSM. For example, w indicates that the decision is based on the value of the input w, whereas
w1 ・ w2 indicates that the true path is taken if w1 = w2 = 1 and the false path is taken otherwise.
• Conditional output box – An oval denotes the output signals that are of Mealy type. These
outputs depend on the values of the state variables and the inputs of the FSM; we will refer to
these outputs simply as Mealy outputs. The condition that determines whether such outputs are
generated is specified in a decision box.
ASM charts are similar to traditional flowcharts. Unlike a traditional flowchart, the ASM chart
includes timing information because it implicitly specifies that the FSM changes (flows) from
one state to another only after each active clock edge. The examples of ASM charts presented
here are quite simple.
We have used them to introduce the ASM chart terminology by giving examples of state,
decision, and conditional-output boxes. Another term sometimes applied to ASM charts is ASM
block, which refers to a single state box and any decision and conditional-output boxes that the
state box may be connected to. The ASM charts can be used to describe complex circuits that
include one or more finite state machines and other circuitry such as registers, shift registers,
counters, adders, and multipliers.
Verilog Code
Figure 7.25 ASM chart for the multiplier control circuit.
The design of synchronous sequential circuits in which the state variables are represented by flip-
flops that are controlled by a clock. The clock is a periodic signal that consists of pulses.
Changes in state can occur on the positive or negative edge of each clock pulse. Since they are
controlled by pulses, synchronous sequential circuits are said to operate in pulse mode.
In this chapter we present sequential circuits that do not operate in pulse mode and do not
use flip-flops to represent state variables. These circuits are called asynchronous sequential
circuits. In an asynchronous sequential circuit, changes in state are not triggered by clock pulses.
Instead, changes in state are dependent on whether each of the inputs to the circuit has the logic
level 0 or 1 at any given time. To achieve reliable operation, the inputs to the circuit must change
in a specific manner.
In this introductory discussion we will concentrate on the simplest case in which a
constraint is imposed that the inputs must change one at a time. Moreover, there must be
sufficient time between the changes in input signals to allow the circuit to reach a stable state,
which is achieved when all internal signals stop changing. A circuit that adheres to these
constraints is said to operate in the fundamental mode.
Asynchronous circuits are much more difficult to design than synchronous circuits.
Terminology
However, when dealing with asynchronous sequential circuits, it is customary to use two
different terms. Instead of a “state table,” it is more common to speak of a flow table, which
indicates how the changes in state flow as a result of the changes in the input signals. Instead of a
“state-assigned table,” it is usual to refer to a transition table or an excitation table. We will use
the terms flow table and excitation table in this chapter.
A flow table will define the state changes and outputs that must be generated. An
excitation table will depict the transitions in terms of the state variables. The term excitation
table derives from the fact that a change from a stable state is performed by “exciting” the next-
state variables to start changing towards a new state.
To gain familiarity with asynchronous circuits, it is useful to analyze a few examples. We will
keep in mind the general model in Figure 6.85, assuming that the delays in the feedback paths
are a representation of the propagation delays in the circuit. Then each gate symbol will represent
an ideal gate with zero delay.
The term Dy in this expression is redundant and could be deleted without changing the logic
function of Y . Hence the minimal expression is
Figure 9.4 The gated D latch.
Synthesis of asynchronous sequential circuits follows the same basic steps used to synthesize the
synchronous circuits. There are some differences due to the asynchronous nature, which make
the asynchronous circuits more difficult to design. We will explain the differences by
investigating a few design examples.
The basic steps are
• Devise a state diagram for an FSM that realizes the required functional behavior.
• Derive the flow table and reduce the number of states if possible.
• Perform the state assignment and derive the excitation table.
• Obtain the next-state and output expressions.
• Construct a circuit that implements these expressions.
5. State Reduction
In Chapter 3 we saw that reducing the number of states needed to realize the functionality of a
given FSM usually leads to fewer state variables, which means that fewer flip-flops are required
in the corresponding synchronous sequential circuit. In asynchronous sequential circuits it is also
useful to try to reduce the number of states because this usually results in simpler
implementations.
Merging Procedure
In Example 9.7 it was easy to decide which rows should be merged because the only possibilities
are to merge row C with either A or E. We chose to merge C and E because this can be done
preserving the Moore model, which is likely to lead to a simpler expression that realizes the
output z.
In general, there can be many possibilities for merging rows in larger flow tables. In such cases it
is necessary to have a more structured procedure for making the choice. A useful procedure can
be defined using the concept of compatibility of states.
Definition 9.1 – Two states (rows in a flow table), Si and Sj , are said to be compatible if there
are no state conflicts for any input valuation. Thus for each input valuation, one of the following
conditions must be true:
• both Si and Sj have the same successor, or
• both Si and Sj are stable, or
• the successor of Si or Sj , or both, is unspecified.
Moreover, both Si and Sj must have the same output whenever specified.
Choosing an optimal subset of compatible states for merging can be a very complicated task
because for large FSMs there may be many possibilities that should be investigated. A trial-and-
error approach is a reasonable way to tackle this problem.
6. Hazards
In asynchronous sequential circuits it is important that undesirable glitches on signals should not
occur. The designer must be aware of the possible sources of glitches and ensure that the
transitions in a circuit will be glitch free. The glitches caused by the structure of a given circuit
and propagation delays in the circuit are referred to as hazards.
Two types of hazards are illustrated in Figure 9.61.
A static hazard exists if a signal is supposed to remain at a particular logic value when an input
variable changes its value, but instead the signal undergoes a momentary change in its required
value.
As shown in Figure 9.61a, one type of static hazard is when the signal at level 1 is supposed to
remain at 1 but dips to 0 for a short time. Another type is when the signal is supposed to remain
at level 0 but rises momentarily to 1, thus producing a glitch.
A different type of hazard may occur when a signal is supposed to change from 1 to 0 or from 0
to 1. If such a change involves a short oscillation before the signal settles into its new level, as
illustrated in Figure 9.61b, then a dynamic hazard is said to exist.
Static Hazards
Figure 9.62a shows a circuit with a static hazard. Suppose that the circuit is in the state where x1
= x2 = x3 = 1, in which case f = 1. Now let x1 change from 1 to 0. Then the circuit is supposed to
maintain f = 1. But consider what happens when the propagation delays through the gates are
taken into account. The change in x1 will probably be observed at point p before it will be seen at
point q because the path from x1 to q has an extra gate (NOT) in it. Thus the signal at p will
become 0 before the signal at q becomes equal to 1.
For a short time both p and q will be 0, causing f to drop to 0 before it recovers back to 1. This
gives rise to the signal depicted on the left side of Figure 9.61a.The glitch on f can be prevented
as follows. The circuit implements the function
f = x1x2 + x1x3
The corresponding Karnaugh map is given in Figure 9.62b. The two product terms realize the
prime implicants encircled in black. The hazard explained above occurs when there is a
transition from the prime implicant x1x2 to the prime implicant x1x3. The hazard can be
eliminated by including the third prime implicant, encircled in blue. (This is the consensus term,
defined in Property 17a in Section 2.5.) Then the function would be implemented as
f = x1x2 + x1x3 + x2x3
Now the change in x1 from 1 to 0 would have no effect on the output f because the product term
x2x3 would be equal to 1 if x2 = x3 = 1, regardless of the value of x1. The resulting hazard-free
circuit is depicted in Figure 9.62c.
Dynamic Hazards
A dynamic hazard causes glitches on 0 → 1 or 1 → 0 transitions of an output signal. An example
is given in Figure 9.66. Assuming that all NAND gates have equal delays, a timing diagram can
be constructed as shown. The time elapsed between two vertical lines corresponds to a gate
delay. The output f exhibits a glitch that should be avoided. It is interesting to consider the
function implemented by this circuit, which is
Coins are deposited one at a time. The coin-sensing mechanism generates signals N = 1 and D =
1 when it sees a nickel or a dime, respectively. It is impossible to have N = D = 1 at the same
time. Following the insertion of a coin for which the sum equals or exceeds 15 cents, the
machine releases the candy and resets to the initial state.
Figure 9.67 shows a state diagram for the required FSM. It is derived using a
straightforward approach in which all possible sequences of depositing nickels and dimes are
enumerated in a treelike structure. To keep the diagram uncluttered, the labels D and N denote
the input conditions DN = 10 and DN = 01, respectively. The condition DN = 00 is labeled
simply as 0. The candy is released in states F, H, and K, which are reached after 15 cents has
been deposited, and in states I and L, upon a deposit of 20 cents. The corresponding flow table is
given in Figure 9.68. It can be reduced using the partitioning procedure as follows
P1 = (ADGJ)(BE)(C)(FIL)(HK)
P2 = (A)(D)(GJ)(B)(E)(C)(FIL)(HK)
P3 = P2
Figure 9.68 Initial flow table for the vending-machine controller Figure 9.69 First step in state minimization.