[Cryptech-Commits] [core/math/modexpng] 67/92: For the new general worker module to work we need dynamic switching of DSP OPMODE, ALUMODE and CARRYINSEL ports, thus more defined constants.

git at cryptech.is git at cryptech.is
Sat Mar 14 18:19:46 UTC 2020


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

paul at psgd.org pushed a commit to branch master
in repository core/math/modexpng.

commit 64928838b16fe4c7bb6855d57e5695876314e286
Author: Pavel V. Shatov (Meister) <meisterpaul1 at yandex.ru>
AuthorDate: Mon Jan 20 23:57:42 2020 +0300

    For the new general worker module to work we need dynamic switching of DSP
    OPMODE, ALUMODE and CARRYINSEL ports, thus more defined constants.
---
 rtl/modexpng_dsp48e1.vh | 51 +++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 43 insertions(+), 8 deletions(-)

diff --git a/rtl/modexpng_dsp48e1.vh b/rtl/modexpng_dsp48e1.vh
index 68c5335..8140917 100644
--- a/rtl/modexpng_dsp48e1.vh
+++ b/rtl/modexpng_dsp48e1.vh
@@ -30,12 +30,47 @@
 //
 //======================================================================
 
-localparam DSP48E1_A_W       = 30;
-localparam DSP48E1_B_W       = 18;
-localparam DSP48E1_C_W       = 48;
-localparam DSP48E1_D_W       = 25;
-localparam DSP48E1_P_W       = 48;
-localparam DSP48E1_INMODE_W  = 5;
-localparam DSP48E1_OPMODE_W  = 7;
-localparam DSP48E1_ALUMODE_W = 4;
+localparam DSP48E1_A_W          = 30;
+localparam DSP48E1_B_W          = 18;
+localparam DSP48E1_C_W          = 48;
+localparam DSP48E1_D_W          = 25;
+localparam DSP48E1_P_W          = 48;
+localparam DSP48E1_INMODE_W     = 5;
+localparam DSP48E1_OPMODE_W     = 7;
+localparam DSP48E1_ALUMODE_W    = 4;
+localparam DSP48E1_CARRYINSEL_W = 3;
+localparam DSP48E1_CARRYOUT_W   = 4;
 
+localparam DSP48E1_OPMODE_X_DNC = 2'bXX;
+localparam DSP48E1_OPMODE_X_0   = 2'b00;
+localparam DSP48E1_OPMODE_X_AB  = 2'b11;
+
+localparam DSP48E1_OPMODE_Y_DNC = 2'bXX;
+localparam DSP48E1_OPMODE_Y_0   = 2'b00;
+localparam DSP48E1_OPMODE_Y_C   = 2'b11;
+
+localparam DSP48E1_OPMODE_Z_DNC    = 3'bXXX;
+localparam DSP48E1_OPMODE_Z_0      = 3'b000;
+localparam DSP48E1_OPMODE_Z_P17    = 3'b110;
+localparam DSP48E1_OPMODE_Z_PCIN17 = 3'b101;
+localparam DSP48E1_OPMODE_Z_P      = 3'b010;
+localparam DSP48E1_OPMODE_Z_C      = 3'b011;
+
+localparam DSP48E1_OPMODE_DNC = {DSP48E1_OPMODE_Z_DNC, DSP48E1_OPMODE_Y_DNC, DSP48E1_OPMODE_X_DNC};
+
+localparam DSP48E1_OPMODE_Z0_YC_XAB      = {DSP48E1_OPMODE_Z_0,      DSP48E1_OPMODE_Y_C, DSP48E1_OPMODE_X_AB};
+localparam DSP48E1_OPMODE_ZP17_YC_XAB    = {DSP48E1_OPMODE_Z_P17,    DSP48E1_OPMODE_Y_C, DSP48E1_OPMODE_X_AB};
+localparam DSP48E1_OPMODE_Z0_Y0_XAB      = {DSP48E1_OPMODE_Z_0,      DSP48E1_OPMODE_Y_0, DSP48E1_OPMODE_X_AB};
+localparam DSP48E1_OPMODE_ZPCIN17_YC_XAB = {DSP48E1_OPMODE_Z_PCIN17, DSP48E1_OPMODE_Y_C, DSP48E1_OPMODE_X_AB};
+localparam DSP48E1_OPMODE_Z0_YC_X0       = {DSP48E1_OPMODE_Z_0,      DSP48E1_OPMODE_Y_C, DSP48E1_OPMODE_X_0};
+localparam DSP48E1_OPMODE_ZP17_YC_X0     = {DSP48E1_OPMODE_Z_P17,    DSP48E1_OPMODE_Y_C, DSP48E1_OPMODE_X_0};
+localparam DSP48E1_OPMODE_ZP_YC_X0       = {DSP48E1_OPMODE_Z_P,      DSP48E1_OPMODE_Y_C, DSP48E1_OPMODE_X_0};
+localparam DSP48E1_OPMODE_ZC_Y0_XAB      = {DSP48E1_OPMODE_Z_C,      DSP48E1_OPMODE_Y_0, DSP48E1_OPMODE_X_AB};
+
+localparam DSP48E1_CARRYINSEL_DNC          = 3'bXXX;
+localparam DSP48E1_CARRYINSEL_CARRYIN      = 3'b000;
+localparam DSP48E1_CARRYINSEL_CARRYCASCOUT = 3'b100;
+
+localparam DSP48E1_ALUMODE_DNC                     = 4'bXXXX;
+localparam DSP48E1_ALUMODE_Z_PLUS_X_AND_Y_AND_CIN  = 4'b0000;
+localparam DSP48E1_ALUMODE_Z_MINUS_X_AND_Y_AND_CIN = 4'b0011;



More information about the Commits mailing list