Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[vhdl ] how to deal with unused state in FSM? thank!!

Status
Not open for further replies.

vvsvv

Full Member level 1
Joined
May 26, 2004
Messages
98
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
796
I may use 5 states-- s0 s1 s2 s3 s4,

synthesis may use 000 001 010 011 100 to represent them ,

If I dont care the other 3 unused states (101,110,111), I think there may some unwanted things happen.

so I think I must do something to deal with the unused stateS!

but HOW ? :arrow:
thanks!!!
 

use them! :)
i mean to say that you should get them connected into the state machine flow. for example, if the SM steps into one of the unwanted states, make a transition into the reset or even better a known state to signal this problem.
however, maybe..., better solution to code the states in gray - if it possible at all, - to avoid unwanted state. In this case, only valid states can occur.
 

if you use the case costruct to resolve you state machine , you must use the case when others, and set NULL; or what do you like.
Be.
G.
 

if u use case statement i thik that unwanted states will never occour. then there is no question of irregularities with the output. usinf if statement or ant other statement u should use in such a way that undefined states will never occour. u dont have to worry abt them.

bye
ashish
 

The unwanted states of a state machine can EVER occur (even if you use a case structure), due to signal glitchs, various mismatchs, etc etc...

The problem is: if your state machine goes in an unwanted state, what happens after? the machine can recover from this condition?

A good coding practice is to provide in each case a resolution way from an unwanted state to a known state...
 

for 5 state u have to use 3bit binary number but its combination will give u more than 5 states so one way is to assign all unused states to some value,
or
give a defalt state.ie when the process goes from state s0-->s5 after s5 assign a state to which it has to return
 

In theory these states must not happen but in practice your system will experience some of them due to practical problem like glitchs, signal race,...In each case your system must be able to go to a known state and if it is critical you must reset your system.
 

You need describe them for your system stability. Check Verilog / VHDL LRM
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top