How to connect DPI systemverilog to class member

,

In reply to TomerM_:

In reply to cgales:
Hi,
If I understand the problem correctly, he’s looking for a way to instantiate a c++ object that would be accessible via the DPI functions but would be instantiated outside the scope of these functions.
Eran - is this what you’re trying to achieve?

Yes, i’m trying to instantiate an object in the start of the simulation and access the members and methods of the same instance of the object via DPI call at different steps of the test.