always @(posedge clk ornegedge rst_n) begin if (rst_n) begin if (en) begin if (clk_cnt == (25000000 - 1)) begin clk_cnt <= 32'b0; clk_o <= ~clk_o; endelsebegin clk_cnt <= clk_cnt+1; clk_o <= clk_o; end endelsebegin clk_cnt <= clk_cnt; clk_o <= clk_o; end
always @(posedge clk ornegedge rst_n) begin if (!rst_n) begin
clk_cnt <= 0; clk_o <= 0;
endelsebegin
if (en) begin if (clk_cnt == (25000000 - 1)) begin clk_cnt <= 32'b0; clk_o <= ~clk_o; endelsebegin clk_cnt <= clk_cnt+1; clk_o <= clk_o; end endelsebegin clk_cnt <= clk_cnt; clk_o <= clk_o; end end