Achieving time synchronization between C and HDL

In reply to kautilya87:

The task c_to_sv needs a blocking delay, like @(posedge clock).

You might want to look at this example to see how multiple C processes get synced together.