From c5fa163f67df9649ad12486f0f35cb776660f706 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Mon, 11 Sep 2017 00:29:11 -0400 Subject: Reverse the polarity of the neutron flow --- verilog_constants.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/verilog_constants.h b/verilog_constants.h index 7b64c46..1b00b96 100644 --- a/verilog_constants.h +++ b/verilog_constants.h @@ -228,6 +228,10 @@ /* * ModExpA7 core. MODEXPA7_OPERAND_BITS is size in bits of largest * supported modulus. + * + * I prefer the way Pavel wrote the constants for this in his sample + * code to what I've done here, but let's get the thing working before + * worrying about the yaks' pedicures. */ #define MODEXPA7_OPERAND_BITS (4096) @@ -244,10 +248,10 @@ #define MODEXPA7_ADDR_MESSAGE (MODEXPA7_ADDR_OPERANDS + 1 * MODEXPA7_OPERAND_WORDS) #define MODEXPA7_ADDR_EXPONENT (MODEXPA7_ADDR_OPERANDS + 2 * MODEXPA7_OPERAND_WORDS) #define MODEXPA7_ADDR_RESULT (MODEXPA7_ADDR_OPERANDS + 3 * MODEXPA7_OPERAND_WORDS) -#define MODEXPA7_ADDR_MODULUS_COEFF_IN (MODEXPA7_ADDR_OPERANDS + 4 * MODEXPA7_OPERAND_WORDS) -#define MODEXPA7_ADDR_MODULUS_COEFF_OUT (MODEXPA7_ADDR_OPERANDS + 5 * MODEXPA7_OPERAND_WORDS) -#define MODEXPA7_ADDR_MONTGOMERY_FACTOR_IN (MODEXPA7_ADDR_OPERANDS + 6 * MODEXPA7_OPERAND_WORDS) -#define MODEXPA7_ADDR_MONTGOMERY_FACTOR_OUT (MODEXPA7_ADDR_OPERANDS + 7 * MODEXPA7_OPERAND_WORDS) +#define MODEXPA7_ADDR_MODULUS_COEFF_OUT (MODEXPA7_ADDR_OPERANDS + 4 * MODEXPA7_OPERAND_WORDS) +#define MODEXPA7_ADDR_MODULUS_COEFF_IN (MODEXPA7_ADDR_OPERANDS + 5 * MODEXPA7_OPERAND_WORDS) +#define MODEXPA7_ADDR_MONTGOMERY_FACTOR_OUT (MODEXPA7_ADDR_OPERANDS + 6 * MODEXPA7_OPERAND_WORDS) +#define MODEXPA7_ADDR_MONTGOMERY_FACTOR_IN (MODEXPA7_ADDR_OPERANDS + 7 * MODEXPA7_OPERAND_WORDS) #define MODEXPA7_MODE_CRT (1 << 1) #define MODEXPA7_MODE_PLAIN (0 << 1) -- cgit v1.2.3