From 9e564305d8941bceafc1b1c1d6d611b642c6dce9 Mon Sep 17 00:00:00 2001 From: "Pavel V. Shatov (Meister)" Date: Sat, 8 Jul 2017 19:40:39 +0300 Subject: 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 + + //---------------------------------------------------------------- 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