You are on page 1of 13

VHDL Behavioral Representation

of FSMs
Model for VHDL implementations of
FSMs.
Example-2
• Write the VHDL code that implements the FSM
shown on the right. Use a dependent PS/NS
coding style in your implementation.
Cont..
Example-2

• Write the VHDL code


that implements the
FSM shown on the
right. Use a dependent
PS/NS coding style in
your implementation.
Consider the state
variables as outputs of
the FSM.
Cont..
The state diagram shown in this problem indicates that this is a three-state FSM
with one Mealy-type external output and one external input. Since there are
three states, the solution requires at least two state variables to handle the
three states. The black-box diagram of the solution is shown in Listing 7.3. Note
that the two state variables are handled as a bundled signal.
Example-3

Write the VHDL


code that implements the FSM
shown on the right. Use a
dependent PS/NS coding style in
your implementation. Consider
the listed state variables as
output.
Cont..
The state diagram indicates that its implementation will contain four
states, one external input and two external outputs. This is a hybrid
FSM in that the if contains both a Mealy and Moore-type output
but in this case, the FSM would be considered a Mealy-type FSM.
The black-box diagram and the actual solution for the solution is
shown in Listing
Example-4

Write the VHDL


code that implements the FSM
shown on the right. Use a depend-
ent PS/NS coding style in your im-
plementation. Consider the listed
state variables as output. Use one-
hot encoding for the state variables.

You might also like