Forum Discussion
Altera_Forum
Honored Contributor
15 years agoVHDL std_logic_vector Comparisons
What's the best way to compare std_logic_vector 's to zero in VHDL? I don't want to use conversion functions, create a std_logic_vector of "0"s, or do element-by-element comparisons.
Altera_Forum
Honored Contributor
15 years agoThanks FvM! I'm going to use AND_REDUCE() since the only way for a (unsigned) std_logic_vector to equal zero is if all its bits, and hence the ANDing of these bits, is '0'.