Can anyone explain the diff between these 2 codes. The first one creates Clock while other
generates straight line. Why
module osc2 (clk);
output clk;
reg clk;
initial
#10 clk = 0;
always @(clk)
#10 clk <= ~clk;
endmodule
module osc2 (clk);
output clk;
reg clk;
initial
#10 clk = 0;
always @(clk)
#10 clk = ~clk;
endmodule
The only difference in codes is that one uses blocking and other non blocking assignment.