$display

In reply to DigvijayS:

Hi Vijay,

In the above code if I declare int m without automatic keyword before it, then my compiler results to error. Can you explain why it is so.

From LRM-3.1a
join_none - The parent process continues to execute concurrently with all the processes spawned by the fork. The spawned processes do not start executing until the parent thread executes a blocking statement.

but the below code is providing the different result:
Code:
module fork_join_none();

int a,b,c;

initial begin
a=5;
fork
a=6;
join_none
$display(“value of A before blocking stmt a=%d”,a);
b=0; //blocking statement
$display(“value of A after blocking stmt a=%d”,a);
end
endmodule : fork_join_none

Result:
value of A before blocking stmt a= 5
value of A after blocking stmt a= 5

Thanks & Regards,
Shriramvaraprasad B.