# What does it mean to have a sequential encoding scheme to enumerate states?

1. ## What does it mean to have a sequential encoding scheme to enumerate states?

So I implemented a Mealy machine for a pattern recognizer of '1010'. I defined my states as

Code:
`TYPE state_type IS (STATE_INIT, STATE_1, STATE_10, STATE_101);`
I then went on to do the normal combinational logic to decide where to go from each state based on the input e.g.
Code:
``` WHEN STATE_1 =>
IF x='0' THEN
nextState <= STATE_10;
ELSE
nextState <= STATE_1;
END IF;```
as well as the necessary sequential logic with the clock and reset signals and it all works fine.

I assume that this is a combinational encoding scheme to enumerate the states as they are encoded as bit patterns but as part of this project I'm asked to assume that a sequential encoding scheme to enumerate the states has been used, I don't really understand what that means. I understand that sequential logic is dependent on both present and past inputs whereas combinational logic is only dependent on present inputs but I don't see how that relates to a sequential encoding scheme to enumerate states?

•

2. ## Re: What does it mean to have a sequential encoding scheme to enumerate states?

Not sequential as in clocked logic but instead sequential as in a sequence, i.e. 0, 1, 2, 3 as opposed to something non-sequential, i.e. 3,1,0,2

Note the states in your state_type can have := 0/1/2/3 after each state to define what the bit values are for each state, otherwise by default they start a 0 for the left most item and increase sequentially by 1 to the right.

1 members found this post helpful.

--[[ ]]--