Tasks, Functions and Void Functions Multiple statements without requiring begin..end block. Function can have output port, inout port. In SystemVerilog, if you want to call a function and ignore its return value, cast the result to void. void’ (my_func(42));
Any debug routine should be a void function rather than a task so that it can be called from any function or task function void print_state (…); $display(“@%0d : state = %0s”,$time,cur_state.name); endfunction