See
Function arguments not initializing variable inside the body
The life of a SystemVerilog variable