View Single Post
  #4 (permalink)  
Old 01-16-2004, 07:48 AM
Thomas Stanka
Guest
 
Posts: n/a
Default Re: Gray encoding for FSM

[email protected] (guille) wrote:
> I would like to use Gray encoding for this FSM but I'm not sure how it
> should be done. Using Gray encoding is straightforward for things like
> counters and such where there's only one possible next state for each
> current state. However, is it possible in a case like this?


Draw a picture of your FSM. Now try to color each state with two
rules:
1. no adjacent state shall have the same color (A and B shall be
adjacent iff theres a edge from state A to state B)
2. use no unused color when possible

If you come along with two colors, your statemachine fits perfect into
gray code. Else you could start inserting states unless you need only
two colors.
There are two possibilities for inserting states:
1. null states without funktion (these will anyway delay your fsm)
2. Split a state in two states, that will do the work.

Another possibility is to use gray as good as possible, but to break
the rules for some seldom used transitions.

bye Thomas
Reply With Quote