Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Which is not a problem to me, I never initialize a variable at the declaration, not even in C or C++ programs. I always initialise a variable just prior to the first use, to my idea it better documents what's going on. --- Quote End --- Yes that's also my usual way to handle variable initialization. Thanks for checking in Modelsim. As an additional information, the strange behaviour only occurs with variable in functions (and probably procedures, but I didn't check it). Initial value expressions for process variables are simply ignored by Quartus. This isn't a problem, but must be considered for RTL simulation consistency when process variables are used for persistent data storage (as in the Quartus counter templates). My final conclusion is this: Initial value expressions for variables in functions are not working Quartus according to the VHDL specification but have strange side effects. They must be strictly avoided. Best regards Frank