8bit Limit on Enumerated Type?

Discussion in 'VHDL' started by GuruSY, Sep 24, 2008.

  1. GuruSY

    GuruSY

    Joined:
    Sep 24, 2008
    Messages:
    2
    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 (state0state1, ...... 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.
    GuruSY, Sep 24, 2008
    #1
    1. Advertising

  2. GuruSY

    GuruSY

    Joined:
    Sep 24, 2008
    Messages:
    2
    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.
    GuruSY, Sep 24, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marek Ponca

    Enumerated Type in assertion ?

    Marek Ponca, Jan 10, 2005, in forum: VHDL
    Replies:
    2
    Views:
    3,211
    Jonathan Bromley
    Jan 10, 2005
  2. Nick Bassiliades

    Redefining an enumerated attribute type

    Nick Bassiliades, Dec 9, 2005, in forum: XML
    Replies:
    1
    Views:
    432
    Henry S. Thompson
    Dec 12, 2005
  3. davidmcb@pacbell.net
    Replies:
    1
    Views:
    368
    Henry S. Thompson
    Mar 6, 2006
  4. David
    Replies:
    0
    Views:
    363
    David
    Mar 1, 2006
  5. humble
    Replies:
    0
    Views:
    881
    humble
    Oct 28, 2006
Loading...

Share This Page