组合逻辑与时序逻辑分开写有什么好处吗?求解
例如
always @(posedge clk or negedge rst)
if(!rst) cnt <= 4'd0;
else if(cnt == 4'd9) cnt <= 4'd0;
else cnt <= cnt + 1'b1;
always @(posedge clk or negedge rst)
if(!rst) cnt <= 4'd0;
else cnt <=cnt_n;
always @(*)
if(cnt == 4'd9) cnt_n = 4'd0;
else cnt_n = cnt + 1'b1;
|