Hello,
I am designing a logically simple interface to a chip, which requires around 300 states. It could require less but I find copy-and-paste
easier than making counters. :veryprou:
Anyway, I always assign my states using the standard enumerated type declaration and let the synthesizer detect my state machine and encode it,
like so:
I did a behavioral simulation in Modelsim Version 6.0D, and for some reason this happens:
As a test I changed my code to go from state0 to state257, and the state machine stays in state0 the entire time. Obviously Modelsim is
limiting the size of my enumerated type to 256. Is their a way to force the use of a larger vector? Or am I stuck doing the state encoding by
hand? I think that I could just ignore Modelsim and let the synthesizer do this, but I am a firm believer in clean behavioral simulations
before I move on.
I am designing a logically simple interface to a chip, which requires around 300 states. It could require less but I find copy-and-paste
easier than making counters. :veryprou:
Anyway, I always assign my states using the standard enumerated type declaration and let the synthesizer detect my state machine and encode it,
like so:
PHP:
type states is (state0, state1, ...... etc.
signal presentstate : states;
signal nextstate : states;
I did a behavioral simulation in Modelsim Version 6.0D, and for some reason this happens:
PHP:
time t=i:
presentstate = state256
nextstate = state257
time t=i+1:
presentstate = state0
nextstate = state1
As a test I changed my code to go from state0 to state257, and the state machine stays in state0 the entire time. Obviously Modelsim is
limiting the size of my enumerated type to 256. Is their a way to force the use of a larger vector? Or am I stuck doing the state encoding by
hand? I think that I could just ignore Modelsim and let the synthesizer do this, but I am a firm believer in clean behavioral simulations
before I move on.