Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Hello, I am wondering why I am getting an error when using a don't care statement in a case. Here is a portion of the code:
when "1000--" =>
<snip> This is the error message I get:
Warning (10325): VHDL Choice warning at testvhdl.vhd(294): ignored choice containing meta-value ""1000--""
Warning (10325): VHDL Choice warning at testvhdl.vhd(302): ignored choice containing meta-value ""1001-1""
--- Quote End --- Comparing something directly with the don't care either with an equals (i.e. this = "100--") or with a 'with' as you've done or as part of a case statement won't give you what you want. The only way is to either not include the bits in the comparison at all (which sometimes cannot be done) or the comparison must be done with the std_match function. For that you would say something like
if std_match(this, "100--") then
That's the way the std_logic_1164 package rolls. Kevin Jennings