Task does not work

In reply to dave_59:

Thanks Dav,

It works with some modification under your solution.
One more question, should reference port be bit instead wire?


task automatic (ref bit clk, mask); // Works