diff options
Diffstat (limited to 'rtl/modexpng_dsp48e1.vh')
-rw-r--r-- | rtl/modexpng_dsp48e1.vh | 51 |
1 files 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; |