Altera_Forum
Honored Contributor
12 years agoAbout signal and variable
I just start using VHDL for one month, I am a little confused by signal and variable.
I read the textbook, I know the difference between them like: Variable is a local one can be used inside process where it is declaration. Variable can be assigned an initial value while signal can but only in simulation. Both of them can be synthesised. But I am not clear is when I should use signal, and when I should use variable. Is there any rules I should follow? If someone can take some simple examples, that will be very helpful for me to understand. Thanks in advance.