How to pass an array in verilog funcion

In reply to sambasiva:

Function with ref arguments shall be automatic - your function inside module is static by default.