In reply to eranv:
It’s not clear what you want to achieve, but the DPI C layer has the concept of ‘context’ so that the C code can determine which SV component is doing the calling. You can also set the ‘context’ on the C side so you can target a specific SV component.
Annex H section H.9 of the LRM discusses this implementation.