[Cryptech-Commits] [user/js/toggle] branch master updated: Simplified the toggle logic by using default assignments.

git at cryptech.is git at cryptech.is
Thu Jun 21 12:56:41 UTC 2018


This is an automated email from the git hooks/post-receive script.

joachim at secworks.se pushed a commit to branch master
in repository user/js/toggle.

The following commit(s) were added to refs/heads/master by this push:
     new 3b8b42a  Simplified the toggle logic by using default assignments.
3b8b42a is described below

commit 3b8b42a6bb6091f7e9fa1e8b82ffe9a283bfec55
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Thu Jun 21 14:56:26 2018 +0200

    Simplified the toggle logic by using default assignments.
---
 src/rtl/toggle.v | 7 +++----
 1 file 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list