Calling a task multiple times with different arguments

Hi all,
I am trying to call a task multiple times with different arguments.But the task is called only once.See the code below.


 for( int i =0 ; i< div_avail ; i++ )
           begin
               div_value[i] = divider_values[8*i+:8];              ////for each existing divider div[i]=1;
               nxm_check( i ,div_value[i]);                  ////call tasks
               $display("NXM div_value[i]=%h",div_value[i]);
           end


task nxm_check()
##delay 
some code
endtask

I think the nxm_check takes the whole time in the simulation to complete so the for loop never executes twice.
My intention is to call the task “i” no. of times in parallel depending on div_avail.Is there anyway to do this.

The above piece of code is not doing this.

In reply to prashantk:
See section 9.3.2 Parallel Blocks in the 1800-2012 LRM and look at the last example in that section.

In reply to dave_59:

Thanks for the reply dave_59.I know the working of fork ,join,join_any and join_none.
And also tried that too in my code but applying fork join…still do no solves problem.I tried applying fork join.Just above and below the calling of my task but still it do not solves my problem.The task should be called in parallel which is not happening.

In reply to prashantk:

please see http://sscce.org/

In reply to prashantk:

Could you please try static keyword with the task and try.