UDP_data_process/try_smg/counter.v

14 lines
232 B
Coq
Raw Normal View History

2025-12-03 16:46:03 +08:00
module counter
(
input clk, enable, rst_n,
output reg [8-1:0] count
);
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
count <= 0;
else if (enable == 1'b1)
count <= count + 1;
end
2025-12-03 16:33:55 +08:00
endmodule