[Cryptech-Commits] [core/pkey/ed25519] 04/04: Started porting modular reductor...

git at cryptech.is git at cryptech.is
Wed Sep 26 11:35:07 UTC 2018


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

meisterpaul1 at yandex.ru pushed a commit to branch master
in repository core/pkey/ed25519.

commit 8d002c47537fa5d1002df8353c134a9f5303cd7f
Author: Pavel V. Shatov (Meister) <meisterpaul1 at yandex.ru>
AuthorDate: Wed Sep 26 14:32:58 2018 +0300

    Started porting modular reductor...
---
 bench/tb_modular_multiplier.v                     | 4 ++--
 rtl/modular_multiplier/ed25519_modular_reductor.v | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bench/tb_modular_multiplier.v b/bench/tb_modular_multiplier.v
index bd7599f..c3de537 100644
--- a/bench/tb_modular_multiplier.v
+++ b/bench/tb_modular_multiplier.v
@@ -162,8 +162,8 @@ module tb_modular_multiplier;
         #100;
         
             /* run tests */
-        $display("1. A1*B1=P1...");
-        test_modular_multiplier(A1, B1);
+        $display("1. A1 * A1 = ...");
+        test_modular_multiplier(A1, A1);
         
             /* print result */
         if (ok) $display("tb_modular_multiplier: SUCCESS");
diff --git a/rtl/modular_multiplier/ed25519_modular_reductor.v b/rtl/modular_multiplier/ed25519_modular_reductor.v
index 5b50cb3..75b5a84 100644
--- a/rtl/modular_multiplier/ed25519_modular_reductor.v
+++ b/rtl/modular_multiplier/ed25519_modular_reductor.v
@@ -83,7 +83,7 @@ endfunction
     output  rdy;    // ready output
 
     output  [WORD_COUNTER_WIDTH  :0]    x_addr; // index of current X word
-    output  [WORD_COUNTER_WIDTH-1:0]    p_addr; // index of current P word
+    output  [WORD_COUNTER_WIDTH-1:0]    y_addr; // index of current P word
     
     output  y_wren;     // store current Y word now
 
@@ -104,7 +104,7 @@ assign x_addr   = index_x;
     //
     // FSM
     //
-    localparam integer FSM_SHREG_WIDTH = 2;//(2 * OPERAND_NUM_WORDS + 1) + (5 * 2) + 1;
+    localparam integer FSM_SHREG_WIDTH = 10;//(2 * OPERAND_NUM_WORDS + 1) + (5 * 2) + 1;
 
     localparam FSM_SHREG_INIT = {{(FSM_SHREG_WIDTH-1){1'b0}}, 1'b1};
     



More information about the Commits mailing list