Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > 8bit Limit on Enumerated Type?

Thread Tools

8bit Limit on Enumerated Type?

GuruSY GuruSY is offline
Junior Member
Join Date: Sep 2008
Posts: 2

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.

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 Code:
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 Code:
time t=i:
presentstate state256

time t
presentstate state0

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.
Reply With Quote
GuruSY GuruSY is offline
Junior Member
Join Date: Sep 2008
Posts: 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.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
8bit * 8bit pipelined multiplier humble VHDL 0 10-28-2006 06:16 PM
8bit counter to 7seg VHDL 5 06-12-2005 08:52 AM
Convert a monochrome (1bit) image into a grayscale (8bit) one =?ISO-8859-1?Q?Christian_H=F6ntsch-Rode?= Java 6 02-03-2005 11:22 AM
8bit to 7bit numbers marko Perl 0 08-23-2003 10:50 AM
char 8bit wide or 7bit wide in c++? Web Developer C++ 2 07-31-2003 08:09 AM