Altera_Forum
Honored Contributor
15 years agoVHDL integers initialization and FPGAs
I've started coding in VHDL just less than a year ago - unexperienced student warning!
My question is about integer initalization. I own an Altera DE1 board and I've also got some experience with Xilinx Spartan 3. With both deviced I've noticed a strange thing about integers. I must initialize an integer to some value at declaration level (i.e. signal int : integer range bla to blabla := 0; ), because otherwise my program may freeze or some other voodoo might appear. Usually I use integer signals for counters (UART interface for instance). Have you ever encountered this before ? I guess I'm configuring/doing something wrong as I know that initialization at declaration level doesn't (or shouldn't?) affect the program after synthesis.