Delay using for loop in SV and ovm

for(int j=0; j<(2*`NUM_INST - `NUM_PIO_INST);j=j+2) begin 
     fork
       begin  
         $sformat(inst_name, "spi%0d", spi_inst_num );
         
                          $display("mon[%0d] =%0s",j+num_of_mon_port,inst_name);
                         
        if(inst_num < (`NUM_INST - `NUM_PIO_INST) ) begin
                  inst_num=j+1;
          
                          $display("mon[%0d] =%0s",inst_num+num_of_mon_port,inst_name);
       
         end
                 inst_num=(j/2)+1;
                 num_of_mon_port1 = j+num_of_mon_port+1 ;
                 counter=counter+1;
     end 
  join
 end
      while (counter!=(2*`NUM_SPI_INST - `NUM_SPI_PIO_INST))
        #1us;
       #10us;

// in above code i want delay of sometime so that for loop do not work in 0 simulation , so added the while loop and the delay . But due to while loop it is keep on running and need to terminate the process again and again. So please suggest how to provide delay incase of for the loop to avoid its working in zero simulation.
[avoid using task or functions]

In reply to shiwani chadha:
Did you mean to put the while loop inside the fork/join?

I don’t really understand what this code is supposed to do, or he requirements you are under, so it is difficult to suggest a solution.

This code is simply generating the user defined slices. For example if we say 4 slices than instead of hard coding 4 times i used for loop to generate it.As we know for loop works in zero simulation time ,so i want that process should not occur in zero simulation so I added the while loop. So I want to know if there is any other way to do so ?[need it to happen sequentially not concurrently ] .

this code is written inside class , so its throwing an error
“illegal use of delay or synchronization.The uses can be wait, delay,clocking block assign”

In reply to shiwani chadha:
It’s going to be difficult to help you here in the forum without showing a lot more code and the context it is in.