[Cryptech-Commits] [core/hash/sha512] 01/03: Minor cleanup of mask definition to make it easier to understand.

git at cryptech.is git at cryptech.is
Fri Apr 6 13:03:21 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.

commit bb88518a94cf1fc6b2c8c4c6d66810d5ee298e87
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Fri Apr 6 13:57:57 2018 +0200

    Minor cleanup of mask definition to make it easier to understand.
---
 src/tb/tb_sha512_core.v | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/tb/tb_sha512_core.v b/src/tb/tb_sha512_core.v
index e2b8a21..955fee6 100644
--- a/src/tb/tb_sha512_core.v
+++ b/src/tb/tb_sha512_core.v
@@ -422,22 +422,22 @@ module tb_sha512_core();
      case (mode)
        MODE_SHA_512_224:
          begin
-           mask = {{7{32'hffffffff}}, {9{32'h00000000}}};
+           mask = {{224{1'h1}}, 288'h0};
          end
 
        MODE_SHA_512_256:
          begin
-           mask = {{8{32'hffffffff}}, {8{32'h00000000}}};
+           mask = {{256{1'h1}}, 256'h0};
          end
 
        MODE_SHA_384:
          begin
-           mask = {{12{32'hffffffff}}, {4{32'h00000000}}};
+           mask = {{384{1'h1}}, 128'h0};
          end
 
        MODE_SHA_512:
          begin
-           mask = {16{32'hffffffff}};
+           mask = {512{1'h1}};
          end
      endcase // case (mode)
 



More information about the Commits mailing list