A long time ago I came across an interesting FSM in which the next state was a function of current state and previous state, along with the current input values. Here previous state is not the state from previous clock cycle but the state that FSM had before entering the current state.

Is there a special name for an FSM where next state is function of current state, current inputs AND also the previous state?

  • 1
    \$\begingroup\$ What you are calling the state is just half of the actual state. \$\endgroup\$
    – copper.hat
    Apr 15, 2018 at 2:18
  • \$\begingroup\$ A typical VHDL FSM contains two variables, current state, next state. The next state is generated using a combinatorial process where next state is generated based on current state and current inputs. The current state is updated to next state on clock edge. What I am talking about is a situation where we have three variables, previous state, current state and next state. \$\endgroup\$
    – quantum231
    Apr 15, 2018 at 8:56
  • \$\begingroup\$ @quantum231 no, this is a typical 2-process state machine. Compared to the single process form, the 2-process equivalent is larger (in source, not gates), more complex, far more prone to trivial design mistakes, and bizarrely still more widely taught in courses and textbooks. Possibly related : hierarchical state machines such as stackoverflow.com/questions/32612604/substatemachine/… or (where inner state is just a delay) stackoverflow.com/questions/31138152/…. Or if these don't answer your... \$\endgroup\$
    – user16324
    Apr 15, 2018 at 12:26
  • \$\begingroup\$ ... your question, perhaps explain what you're asking with an example use case? \$\endgroup\$
    – user16324
    Apr 15, 2018 at 12:27

1 Answer 1


Nope. This is still a FSM, just with twice the amount of internal state.

Unless you also include any previous states (and not just the "last"), which would make this a "stack machine" or pushdown automaton.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.