Systemverilog DPI

Hello,

How is a C function able to call a SV task and wait until its complete? Shouldn’t a C function execute in zero simulation time?

Thank you

In reply to Ivon:

C has no concept of “simulation time”, only SystemVerilog does.

See my DVCon paper “Easy Steps Towards Virtual Prototyping using the SystemVerilog DPI” for some background.

Some examples embedded in these links:

https://verificationacademy.com/forums/systemverilog/sv-dpi-accessing-task-within-module-c-code#reply-68439

https://verificationacademy.com/forums/systemverilog/easy-modelsim-dpi-book