#negedge

clk为什么要用posedge,而不用negedge

Verilog中典型的counter逻辑是这样的:always@(posedgeclkornegedgereset)beginif(reset==1'b0)reg_inst1<=8'd0;elseif(clk==1'b1)reg_inst1<=reg_inst1+1'd1;elsereg_inst1<...