K
KJ
Guest
<psihodelia@googlemail.com> wrote in message
news:1194363845.707476.133700@19g2000hsx.googlegroups.com...
takes the current state as an argument (along with other inputs which are
usually necessary) and compute the next state but I don't think it will do
anything to make the code more readable since, although the code for the
state machine collapses right down to a simple function call, that code has
now moved verbatim over to some other function so the reader now is
redirected and you haven't really simplified or reduced the actual number of
lines of code. Just my 2 cents.
Tressler's web site has several good examples to peruse that may give you
some ideas to build upon
http://home.comcast.net/~mike_treseler/
KJ
news:1194363845.707476.133700@19g2000hsx.googlegroups.com...
Is it possible to have in a FSM one procedure-or-function for each
state?
Yes.
You can't have an array of functions in VHDL. You can have a function thatIt should make the program code easy to read. It will be also
better to have an array of functions and call them according FSM state
number.
takes the current state as an argument (along with other inputs which are
usually necessary) and compute the next state but I don't think it will do
anything to make the code more readable since, although the code for the
state machine collapses right down to a simple function call, that code has
now moved verbatim over to some other function so the reader now is
redirected and you haven't really simplified or reduced the actual number of
lines of code. Just my 2 cents.
FSMs) so you're general path of investigating how to use them is good. MikeDo you have any idea how to implement this approach in VHDL?
Functions and procedures are useful to use in several places (including
Tressler's web site has several good examples to peruse that may give you
some ideas to build upon
http://home.comcast.net/~mike_treseler/
KJ