Forum Discussion
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- Yes, without the static or automatic keyword, it is difficult to know if the local variable gets initialized once at time 0, or each time the function gets called. I think its best to declare your package as automatic, then all the functions are automatic, and all the local variables inside the functions are automatic. Then, only declare local variables as 'static' when they need to be. --- Quote End --- Did you mean I should declare the package like the following code?
automatic package pkg;
// ... dummy codes...
endpackage
I'm not familly enough for the SystemVerilog syntax, and not sure if it is right. Would you like tell me more details ?