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]