Finite State machine - usually implemented with a large case statement. The two-process style works very well for state machines
For fuck's sake stop with the recommendations that anyone use a two-process state machine. Totally error prone, easy to screw up, difficult to maintain.
The new user should always use the single synchronous process for state machines, and use a two-process machine only if there's a Real Good Reason and he knows what he's doing.
For those playing at home, the two-process paradigm is as follows...
1. Declare a record to hold all your state information
2. You have two instances of that record - one which is the current_state, and one which is the next_state.
3. One process takes the current_state, and all of the module's inputs, and populates the "next_state" record. It usually starts with "next_state <= current_state;" to default all values, and then overwrites members in next_state that needs to change
4. The second small-but-important process is clocked, and just assigns the current_state from next_state
5. I would also add that you should only use signals not variables.
In the process that does all the work, for all assignments the left hand side should be next_state.something, and everything else should be "current_state.something"
Advantages.
1. Your design structure matches the actual hardware implementation (combinatorial logic & flipflops to hold state)
2. Delayed assignment becomes a non-issue, as you never assign into "current_state"
3. It is a strong enough framework to force you into thinking differently about your design,
In some ways it is like training wheels for VHDL. I used it for a few months until I fully groked it, then went back to single process design with a much-improved mental model of what I was doing from then on. I sometimes haul it out of the bag when designing pipelines, as when you use appropriately named members in the state record you can see if you have buggered up the pipeline (e.g. stage 2 state should only be populated using the values derived from stage 1's state)
If
bassman59 finds it error prone, easy to screw up and difficult to maintain then he is doing it wrong.