J
Jim Lewis
Guest
Nicolas,
do something reasonable for:
Y <= std_match(A, "10---100") ; -- see numeric_std
case1: If A is 10111100 then Y is true.
case2: If A is XXXXXXXX then Y is false.
If there were only 'X' and no '-', then case 2 would
be true. This would be bad. I believe that this is
one if the issues with Verilog's casex.
Cheers,
Jim
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training mailto:Jim@SynthWorks.com
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787
Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
By differentiating '-' and 'X', it is possible to'-' is "don't care" (never understood what this stands for, actually),
do something reasonable for:
Y <= std_match(A, "10---100") ; -- see numeric_std
case1: If A is 10111100 then Y is true.
case2: If A is XXXXXXXX then Y is false.
If there were only 'X' and no '-', then case 2 would
be true. This would be bad. I believe that this is
one if the issues with Verilog's casex.
Cheers,
Jim
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training mailto:Jim@SynthWorks.com
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787
Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~