Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Static options for Case Statement

Reply
Thread Tools

Static options for Case Statement

 
 
dwerdna
Guest
Posts: n/a
 
      02-23-2005
Hello all

Im getting a warning in Modelsim saying that my case statement options
needs to be static

ie

case test is
when 1 =>
when 2 =>
when 3 =>
end case;

would be a static statement..

Now what I have is a set of constants instead of explicit values

constant C_ONE : integer := 1;
etc, etc

case test is
when C_ONE =>
when C_TWO =>
when C_THREE =>
end case;

now that usually works fine for me, except in this case my constant is
a derived value from other constants

constant C_IRDA_CMD_NUM_0_VEC : std_logic_vector(C_IRDA_CMD_WIDTH - 1
downto 0) :=
std_logic_vector(to_unsigned(C_IRDA_CMD_NUM_0,C_IR DA_CMD_WIDTH));


(im converting a constant that is declared as an integer into a
std_logic_vector so to be able to match on a field in a pkt)

I usually have all my constants in a pkg_constants.vhd file, and I have
also tried to move it locally and declare it in the source file it will
be used in, and these warnings still come up. The issue I have is by
definition constants are static!!!

Its only a warning, so maybe it doesn't matter, and I haven't
actually got to looking at this section of code in the simulation, and
it could be a modelsim translation issue, rather than my own fault.. I
just don't know.. I seem to be doing the right thing, as my text
book suggests, and I'm compiling the pkg file before the source file
and all that...

Any ideas?

Thanks

 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      02-24-2005
dwerdna wrote:
> Hello all
>
> Im getting a warning in Modelsim saying that my case statement options
> needs to be static


This has be discussed here. See:
http://groups-beta.google.com/groups?q=vhdl+case+static

-- Mike Treseler
 
Reply With Quote
 
 
 
 
dwerdna
Guest
Posts: n/a
 
      02-24-2005
OK, thanks!

 
Reply With Quote
 
 
 
Reply

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
gcc compiler options for K&R C code Options Utkado C Programming 2 12-18-2008 01:50 PM
why doesn't this "belongs_to" line of code, using options override,not work??? (need help using belongs_to with options) Greg Hauptmann Ruby 1 10-30-2008 10:44 PM
OptionParser - no short options or incomplete options Bryan Richardson Ruby 6 02-25-2008 03:22 AM
Performance issue in multi-level Oracle Object/thin JDBC Options Options jacksu Java 0 10-09-2007 08:21 PM
good compile options for g++ options to enforce good coding Cliff Martin C++ 1 01-31-2007 02:03 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57