diff options
-rw-r--r-- | src/rtl/toggle.v | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rtl/toggle.v b/src/rtl/toggle.v index 31c4518..7a018ad 100644 --- a/src/rtl/toggle.v +++ b/src/rtl/toggle.v @@ -74,16 +74,15 @@ module toggle always @* begin : sys_clk_toggle - toggle_new = ~toggle_reg; - toggle_we = 1'b0; + toggle_ctr_new = toggle_ctr_reg + 1'b1; + toggle_new = ~toggle_reg; + toggle_we = 1'b0; if (toggle_ctr_reg == TOGGLE_DELAY_CYCLES) begin toggle_ctr_new = 32'h0; toggle_we = 1'b1; end - else - toggle_ctr_new = toggle_ctr_reg + 1'b1; end endmodule // toggle |