They are the same. Both are subroutines/subprograms that may block consuming time. In contrast, a function in both Verilog and VHDL never blocks and may be used as part of another expression. However, in SystemVerilog, you can can declare a void function that does not return a value and is essentially a procedure that cannot consume time.