8bit Limit on Enumerated Type?

Joined
Sep 24, 2008
Messages
2
Reaction score
0
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:

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.
 
Joined
Sep 24, 2008
Messages
2
Reaction score
0
Well I ran the code through a newer version of Modelsim: XE III Starter 6.3c and it worked fine. So I assume that this was a bug in Modelsim SE 6.0D that I was using.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top