[Cryptech-Commits] [core/platform/alpha] branch gpio_led_toggle updated: Simplified toggle code by using default assignment.

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


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

joachim at secworks.se pushed a commit to branch gpio_led_toggle
in repository core/platform/alpha.

The following commit(s) were added to refs/heads/gpio_led_toggle by this push:
     new 7b5d7ec  Simplified toggle code by using default assignment.
7b5d7ec is described below

commit 7b5d7ec0abe3f0f53c8dbec6e4ca0a2c9361373e
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Thu Jun 21 14:57:33 2018 +0200

    Simplified toggle code by using default assignment.
---
 rtl/alpha_fmc_top.v | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/rtl/alpha_fmc_top.v b/rtl/alpha_fmc_top.v
index 4d7fcac..ae49884 100644
--- a/rtl/alpha_fmc_top.v
+++ b/rtl/alpha_fmc_top.v
@@ -234,16 +234,15 @@ module alpha_fmc_top
 
   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 // alpha_fmc_top

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


More information about the Commits mailing list