Altera_Forum
Honored Contributor
13 years agoAfraid of integers and variables...
Hi,
I'm still learning a lot about VHDL and I have this question (and it may sound stupid :p). I have the feeling that using variables in VHDL is not good. Maybe because it's confusing in translating it into logic, I don't know. Also, I never use bool because why would I? It seems more logic (both literally and figuratively) to me to use std_logic. The same happens when using numbers. I don't use integer, I use unsigned. I have the feeling that I don't control integer... how much logic will it use? I know, you could range the integer, but still... So I end up using a lot of std_logic, std_logic_vector and unsigned. Today, I could really use an integer variable. Is there a reason why I shouldn't use it? Am I wrong to think that variables and integers are bad? Thanks!