[Cryptech-Commits] [user/shatov/modexp_fpga_model] 03/03: Minor update, there's no need to update Aj inside of systolic loop.
git at cryptech.is
git at cryptech.is
Mon Jul 10 18:13:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
meisterpaul1 at yandex.ru pushed a commit to branch master
in repository user/shatov/modexp_fpga_model.
commit 9e564305d8941bceafc1b1c1d6d611b642c6dce9
Author: Pavel V. Shatov (Meister) <meisterpaul1 at yandex.ru>
AuthorDate: Sat Jul 8 19:40:39 2017 +0300
Minor update, there's no need to update Aj inside of systolic loop.
---
modexp_fpga_systolic.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/modexp_fpga_systolic.cpp b/modexp_fpga_systolic.cpp
index 9dce130..93c6111 100644
--- a/modexp_fpga_systolic.cpp
+++ b/modexp_fpga_systolic.cpp
@@ -42,6 +42,9 @@
#include "modexp_fpga_model_pe.h"
+#include <stdio.h>
+
+
//----------------------------------------------------------------
void multiply_systolic(const FPGA_WORD *A, const FPGA_WORD *B, FPGA_WORD *P, size_t len_ab, size_t len_p)
//----------------------------------------------------------------
@@ -76,15 +79,17 @@ void multiply_systolic(const FPGA_WORD *A, const FPGA_WORD *B, FPGA_WORD *P, siz
// reset word index
j_index = 0;
- // scan chunks of A
+ // current word of A
+ Aj = (i < len_ab) ? A[i] : 0;
+
+ // scan chunks of B
for (k=0; k<num_systolic_cycles; k++)
{
// simulate how systolic array would work
for (j=0; j<SYSTOLIC_NUM_WORDS; j++)
{
- // current words of B and A
+ // current word of B
Bj = (j_index < len_ab) ? B[j_index] : 0;
- Aj = (i < len_ab) ? A[i] : 0;
// Pj = Aj * Bj
pe_mul(Aj, Bj, t[k][j], c_in[k][j], &s[k][j], &c_out[k][j]);
More information about the Commits
mailing list