Altera_Forum
Honored Contributor
11 years agoSynthesis of non-blocking statements
I'm wondering why the following two Verilog code snippets are synthesized in the same way.
Because of non-blocking statements, tools should give a warning in the first case.# out is the default when a=0
always @(posedge clk) begin
out <= 0
if(a)
out <= in
end
always @(posedge clk) begin
if(a)
out <= in
else
out <= 0
end