diff options
author | Joachim StroĢmbergson <joachim@secworks.se> | 2018-06-21 14:56:26 +0200 |
---|---|---|
committer | Joachim StroĢmbergson <joachim@secworks.se> | 2018-06-21 14:56:26 +0200 |
commit | 3b8b42a6bb6091f7e9fa1e8b82ffe9a283bfec55 (patch) | |
tree | fac124acb76258afc4dbadbacdd5b902398a41d0 /src/rtl | |
parent | 35c2a01ff8831dabcd06c00999a3f66e494ced22 (diff) |
Diffstat (limited to 'src/rtl')
-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 |