Task with for loop - starts and finishes at the same simulation timestep

In reply to ianmurph:

Without knowing how much time task_read_mem is supposed to take, it is difficult to know what your problem is. It’ possible it’s doing a “backdoor” read which would take 0 time.

You can also use $realtime instead of $time in case there are fractional ns involved. You also need to check the time precision of the module where this code exists.