[Cryptech-Commits] [core/hash/sha512] branch clock_speed updated: Removed redundant code by fusing expression.

git at cryptech.is git at cryptech.is
Tue Apr 24 16:24:08 UTC 2018


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

joachim at secworks.se pushed a commit to branch clock_speed
in repository core/hash/sha512.

The following commit(s) were added to refs/heads/clock_speed by this push:
     new 259db74  Removed redundant code by fusing expression.
259db74 is described below

commit 259db74b04fbc1489dbbe5fcb0dc4ac289a162cd
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Tue Apr 24 18:23:59 2018 +0200

    Removed redundant code by fusing expression.
---
 src/rtl/sha512_core.v | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/src/rtl/sha512_core.v b/src/rtl/sha512_core.v
index 43ece2b..e855f76 100644
--- a/src/rtl/sha512_core.v
+++ b/src/rtl/sha512_core.v
@@ -656,24 +656,13 @@ module sha512_core(
 
         CTRL_DONE:
           begin
-            if (work_factor)
+            if ((work_factor) && (!work_factor_ctr_done))
               begin
-                if (!work_factor_ctr_done)
-                  begin
-                    w_init              = 1;
-                    state_init          = 1;
-                    round_ctr_rst       = 1;
-                    sha512_ctrl_new     = CTRL_T1_T2;
-                    sha512_ctrl_we      = 1;
-                  end
-                else
-                  begin
-                    digest_update    = 1;
-                    digest_valid_new = 1;
-                    digest_valid_we  = 1;
-                    sha512_ctrl_new  = CTRL_IDLE;
-                    sha512_ctrl_we   = 1;
-                  end
+                w_init              = 1;
+                state_init          = 1;
+                round_ctr_rst       = 1;
+                sha512_ctrl_new     = CTRL_T1_T2;
+                sha512_ctrl_we      = 1;
               end
             else
               begin

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


More information about the Commits mailing list