jdshah
Junior Member level 3
As far as I understand Static storage is memory created for the variable once and it will remain till end of simulation.
Automatic storage is stack memory created every time subroutine or block called and deallocated when subroutine or block execution is over.
Argument pass by reference share the same memory with caller and sub routine. So it will be better is ref argument is passed to routine with Static storage as static storage will not create stack memory for every call. And multiple call to same routine can change the value at same memory location.
I am confused here. Please help.
Automatic storage is stack memory created every time subroutine or block called and deallocated when subroutine or block execution is over.
Argument pass by reference share the same memory with caller and sub routine. So it will be better is ref argument is passed to routine with Static storage as static storage will not create stack memory for every call. And multiple call to same routine can change the value at same memory location.
I am confused here. Please help.