How to connect DPI systemverilog to class member

,

In reply to eranv:

Similar to standard C function calls, the lifetime of the function and local variables is just during the function call. You can create global variables that can be shared as required, and use the context to determine the caller.