Can we return data from SystemVerilog task?

A task may have output arguments whose values are assigned upon returning from the task.
If an input argument is a class reference, you can update the class object by reference at any time during the task call.

1 Like