Forum Discussion
Altera_Forum
Honored Contributor
14 years agoAs FvM points out, the VHDL language is essentially changing your code to:
signal currState, nextState : state_type := S0; Which is a synthesizeable construct; whatever Quartus decides is the state width, and the encoding for S0, the registers will be initialized to at power-on. If STARTUPSTATE should be first, then either the enumeration can be changed, or the code changed to signal currState, nextState : state_type := STARTUPSTATE; or, explicitly use a reset signal and initialize the state in the process as you have shown. However, even in that case, if you never assert reset in the simulation, the state variables will be assigned to either S0 or whatever you explicitly assign to. Personally I prefer the explicit use of a reset signal. Cheers, Dave