cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kavinduvsomadas
Contributor
Contributor
850 Views
Registered: ‎08-28-2020

Cascading DSP48E2

I'm trying to cascade DSP48E2 to connect ACIN of the cascaded dsp from the previous dsp to connect ACIN. In the top module I created 2 DSP48E2 instances which needs to be connected as follows. (only the relevant part is given)

        dsp48 dsp1(.CLK(CLK), .OPMODE(OPMODE), 
                   .A(A_1), .ACIN(30'd0), .B(B_1), .C(C), 
                   .ACOUT(ACOUT_1), .BCOUT(BCOUT_1), .P(P_1), 
                   .OVERFLOW(OVERFLOW_1), .UNDERFLOW(UNDERFLOW_1), .PATTERNDETECT(PATTERNDETECT_1), .PATTERNBDETECT(PATTERNBDETECT_1),
                   .CUSTOM_OVERFLOW(CUSTOM_OVERFLOW_1), .CUSTOM_UNDERFLOW(CUSTOM_UNDERFLOW_1)
                   );
            
        dsp48 #(.A_INPUT("CASCADE")) dsp2(.CLK(CLK), .OPMODE(OPMODE), 
                   .A(A_2), .ACIN(ACOUT_1), .B(B_2), .C(C),
                   .ACOUT(ACOUT_2), .BCOUT(BCOUT_2), .P(P_2), 
                   .OVERFLOW(OVERFLOW_2), .UNDERFLOW(UNDERFLOW_2), .PATTERNDETECT(PATTERNDETECT_2), .PATTERNBDETECT(PATTERNBDETECT_2),
                   .CUSTOM_OVERFLOW(CUSTOM_OVERFLOW_2), .CUSTOM_UNDERFLOW(CUSTOM_UNDERFLOW_2)
                   );

As you can see in the above code, ACIN of dsp2 has been connected with ACOUT of dsp1 and A_INPUT parameter to the dsp2 has also been passed as "CASCADE", in order to cascade dsp2 with dsp1. But I got the following simulation waveforms in which it seems that dsp2 hasn't been connected with dsp1. Because ACOUT_2 goes to Z which means that ACIN of dsp2  isn't connected with ACOUT of dsp1.

issue of passing ACIN of dsp2.PNG

Can anyone tell me is there anything I'm missing while cascading both DSPs to have this issue ?

For DSP slices I used following DSP48E2 instantiation and it resides in dsp48 module, I created.

    DSP48E2#(
    .AMULTSEL("A"), 
    .A_INPUT(A_INPUT),  
    .BMULTSEL("B"),   
    .USE_MULT("MULTIPLY"),
    .PREADDINSEL("A"),   
    .RND(48'h000000000000), 
    .USE_SIMD("ONE48"), 
    .USE_WIDEXOR("FALSE"), 
    .XORSIMD("XOR24_48_96"), 
    .AUTORESET_PATDET("NO_RESET"),
    .AUTORESET_PRIORITY("RESET"), 
    .MASK(48'h000000000fff),  // INITIAL VALUE : 48'h3fffffffffff
    .PATTERN(48'h000000000000),
    .SEL_MASK("MASK"), 
    .SEL_PATTERN("PATTERN"),
    .USE_PATTERN_DETECT("PATDET"), 
    .IS_ALUMODE_INVERTED(4'b0000), 
    .IS_CARRYIN_INVERTED(1'b0), 
    .IS_CLK_INVERTED(1'b0), 
    .IS_INMODE_INVERTED(5'b00000), 
    .IS_OPMODE_INVERTED(9'b000000000), 
    .IS_RSTALLCARRYIN_INVERTED(1'b0), 
    .IS_RSTALUMODE_INVERTED(1'b0),
    .IS_RSTA_INVERTED(1'b0), 
    .IS_RSTB_INVERTED(1'b0), 
    .IS_RSTCTRL_INVERTED(1'b0), 
    .IS_RSTC_INVERTED(1'b0), 
    .IS_RSTD_INVERTED(1'b0), 
    .IS_RSTINMODE_INVERTED(1'b0), 
    .IS_RSTM_INVERTED(1'b0), 
    .IS_RSTP_INVERTED(1'b0),  
    .ACASCREG(1), 
    .ADREG(1), 
    .ALUMODEREG(0), 
    .AREG(1),
    .BCASCREG(1), 
    .BREG(1), 
    .CARRYINREG(1),
    .CARRYINSELREG(1), 
    .CREG(1), 
    .DREG(1), 
    .INMODEREG(1), 
    .MREG(1), 
    .OPMODEREG(1), 
    .PREG(1)
    ) 
    DSP48E2_inst (
    .ACOUT(ACOUT), 
    .BCOUT(BCOUT), 
//    .CARRYCASCOUT(CARRYCASCOUT), 
//    .MULTSIGNOUT(MULTSIGNOUT), 
//    .PCOUT(PCOUT), 
    .OVERFLOW(OVERFLOW), 
    .PATTERNBDETECT(PATTERNBDETECT), 
    .PATTERNDETECT(PATTERNDETECT), 
    .UNDERFLOW(UNDERFLOW), 
//    .CARRYOUT(CARRYOUT), 
    .P(P), 
//    .XOROUT(XOROUT), 
    .ACIN(ACIN), 
//    .BCIN(BCIN), 
//    .CARRYCASCIN(CARRYCASCIN), 
//    .MULTSIGNIN(MULTSIGNIN), 
    .PCIN(PCIN),  
    .ALUMODE(4'd0), 
    .CARRYINSEL(3'd0), 
    .CLK(CLK), 
    .INMODE(5'd0), 
    .OPMODE(OPMODE), 
//    .RSTINMODE(RSTINMODE), 
    .A(A), 
    .B(B), 
    .C(C), 
    .CARRYIN(1'd0), 
//    .D(D),
//    .CEA1(CEA1), 
    .CEA2(1),
//    .CEAD(CEAD), 
    .CEALUMODE(1), 
//    .CEB1(CEB1), 
    .CEB2(1), 
    .CEC(1), 
//    .CECARRYIN(CECARRYIN), 
    .CECTRL(1), 
//    .CED(CED), 
    .CEINMODE(1), 
    .CEM(1), 
    .CEP(1), 
    .RSTA(0), 
//    .RSTALLCARRYIN(RSTALLCARRYIN), 
    .RSTALUMODE(0), 
    .RSTB(0), 
    .RSTC(0), 
    .RSTCTRL(0), 
//    .RSTD(RSTD), 
    .RSTM(0), 
    .RSTP(0) 
    );
0 Kudos
5 Replies
nathanx
Moderator
Moderator
698 Views
Registered: ‎08-01-2007

I guess it might due to some inputs of DSP48 being "X". Can you make sure all the inputs are reset to zero in the beginning 100ns? 

kavinduvsomadas
Contributor
Contributor
660 Views
Registered: ‎08-28-2020

Thank you for your answer. Is it essential to have all the input signals 0 at the beginning of 100 ns to work DSP48E2 properly? Because in above instantiation I made most of the signals 1 as you can see above. Can you please tell me could it be the issue?

0 Kudos
nathanx
Moderator
Moderator
608 Views
Registered: ‎08-01-2007

Forcing all the inputs to either 0 or 1 should be good, because I see "x" in the DSP48 outputs, I guess it might be some inputs are not assigned to 0 or 1, which causes "x".

---------------------------------------------------------------------------------
Please Kudo or Accept as a solution, If this Post helped you.
---------------------------------------------------------------------------------

kavinduvsomadas
Contributor
Contributor
588 Views
Registered: ‎08-28-2020

So it means that the way I did the cascading above with changing the A_INPUT attribute to "CASCADE" and connecting ACOUT of 1st DSP (ACOUT_2) to ACIN of 2nd DSP (ACIN_2) is correct, right?

I'll recheck again with any inputs which goes to 'X', but as you can see in the simulation waveform ACOUT of 1st DSP (ACOUT_1) works fine. (But ACOUT_2 doesn't show any value even if we connect ACOUT_1 to ACIN_2.

This happens only if we change A_INPUT attribute to "CASCADE", if we keep it as "DIRECT", then it works fine because then 2nd DSP takes A port as the input for the multiplication instead of ACIN_2. 

So can you tell me whether it is correct the way I did the cascading above. 

 

0 Kudos
nathanx
Moderator
Moderator
371 Views
Registered: ‎08-01-2007

So it means that the way I did the cascading above with changing the A_INPUT attribute to "CASCADE" and connecting ACOUT of 1st DSP (ACOUT_2) to ACIN of 2nd DSP (ACIN_2) is correct, right?

Ans -> Note the routing from ACOUT to ACIN is dedicated routing. So you are correct. ACOUT of previous DSP48 slice can only be directly connected to ACIN of next DSP48.

 

0 Kudos