aboutsummaryrefslogtreecommitdiff
path: root/src/rtl
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2018-06-21 14:56:26 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2018-06-21 14:56:26 +0200
commit3b8b42a6bb6091f7e9fa1e8b82ffe9a283bfec55 (patch)
treefac124acb76258afc4dbadbacdd5b902398a41d0 /src/rtl
parent35c2a01ff8831dabcd06c00999a3f66e494ced22 (diff)
Simplified the toggle logic by using default assignments.HEADmaster
Diffstat (limited to 'src/rtl')
-rw-r--r--src/rtl/toggle.v7
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