Forum Discussion
3 Replies
- Altera_Forum
Honored Contributor
yes, no problems with synthesis. But it will only have an effect if cnt becomes a register.
NOTE: you cannot assign -1 to a std_logic_vector. a std_logic_Vector is not a number. - Altera_Forum
Honored Contributor
A variable in vhdl process ends up as either register or not depending on how its value is located:
if you assign its value after it is updated then no register is synthesized. e.g. var1 := var1+1; data <= var1; if you assign its value before it is updated then it implies memory. e.g. data <= var1; var1 := var1 + 1; in both cases its own value is updated immediately. - Altera_Forum
Honored Contributor
Thanks very much, both of you.