这两段代码一个是用了堵塞一个是用了非堵塞,这两个模块有什么区别?
综合后的电路这俩模块有区别吗?
module cntx1
(
input clk,
input rst_n,
output reg[4:0] cnt_out
);
always@(posedge clk)
begin
if( rst_n==0 )
cnt_out <= 5'b0;
else
cnt_out <= cnt_out+1'b1;
end
endmodule
module cntx2
(
input clk,
input rst_n,
output reg[4:0] cnt_out
);
always@(posedge clk)
begin
if( rst_n==0 )
cnt_out = 5'b0;
else
cnt_out = cnt_out+1'b1;
end
endmodule