How to connect systemverilog file with cplusplus(.cpp) file using dpi

In reply to hirenpatel:

OK, here are two example in one testcase. There are probably many more ways of doing this, but I hope this gives you the basic ideas of how to map to class objects.
cpp.tar.gz (2.1 KB)