16.3.5 MACC

16.3.5.1 MACC

18-bit x 18-bit multiply-accumulate MACC block. The MACC block can accumulate the current multiplication product with a previous result, a constant, a dynamic value, or a result from another MACC block. Each MACC block can also be configured to perform a Dot-product operation. All the signals of the MACC block (except CDIN and CDOUT) have optional registers.

Figure 16-252. MACC Port
Table 16-529. Ports
Port NameDirectionTypePolarityDescription
DOTPInputStaticHighDot-product mode.
  • When DOTP = 1, MACC block performs Dot-product of two pairs of 9-bit operands.
  • When DOTP = 0, it is called the normal mode.
SIMDInputStaticReserved. Must be 0.
OVFL_CARRYOUT_SELInputStaticHighGenerate OVERFLOW or CARRYOUT with result P.

OVERFLOW when OVFL_CARRYOUT_SEL = 0

CARRYOUT when OVFL_CARRYOUT_SEL = 1

CLK[1:0]InputDynamicRising edgeInput clocks.

CLK[1] is the clock for A[17:9], B[17:9], C[43:18], P[43:18], OVFL_CARRYOUT, ARSHFT17, CDSEL, FDBKSEL and SUB registers.

CLK[0] is the clock for A[8:0], B[8:0], C[17:0], CARRYIN and P[17:0].

In normal mode, ensure CLK[1] = CLK[0].

A[17:0]InputDynamicHighInput data A.
A_BYPASS[1:0]InputStaticHighBypass data A registers.

A_BYPASS[1] is for A[17:9]. Connect to 1, if not registered.

A_BYPASS[0] is for A[8:0]. Connect to 1, if not registered.

In normal mode, ensure 
A_BYPASS[0] = A_BYPASS[1].

A_ARST_N[1:0]InputDynamicLowAsynchronous reset for data A registers.

Connect both A_ARST_N[1] and = A_ARST_N[0] to 1 or to the global Asynchronous reset of the design

A_SRST_N[1:0]InputDynamicLowSynchronous reset for data A registers.

A_SRST_N[1] is for A[17:9]. Connect to 1, if not registered.

A_SRST_N[0] is for A[8:0]. Connect to 1, if not registered.

In normal mode, ensure 
A_SRST_N[1] = A_SRST_N[0].

A_EN[1:0]InputDynamicHighEnable for data A registers.

A_EN[1] is for A[17:9]. Connect to 1, if not registered.

A_EN[0] is for A[8:0]. Connect to 1, if not registered.

In normal mode, ensure A_EN[1] = A_EN[0].

B[17:0]InputDynamicHighInput data B.
B_BYPASS[1:0]InputStaticHighBypass data B registers.

B_BYPASS[1] is for B[17:9]. Connect to 1, if not registered.

B_BYPASS[0] is for B[8:0]. Connect to 1, if not registered.

In normal mode, ensure 
B_BYPASS[0] = B_BYPASS[1].

B_ARST_N[1:0]InputDynamicLowAsynchronous reset for data B registers.

In normal mode, ensure

Connect both B_ARST_N[1] and B_ARST_N[0] to 1 or to the global Asynchronous reset of the design.

B_SRST_N[1:0]InputDynamicLowSynchronous reset for data B registers.

B_SRST_N[1] is for B[17:9]. Connect to 1, if not registered.

B_SRST_N[0] is for B[8:0]. Connect to 1, if not registered.

In normal mode, ensure 
B_SRST_N[1] = B_SRST_N[0].

B_EN[1:0]InputDynamicHighEnable for data B registers.

B_EN[1] is for B[17:9]. Connect to 1, if not registered.

B_EN[0] is for B[8:0]. Connect to 1, if not registered.

In normal mode, ensure B_EN[1] = B_EN[0].

P[43:0]OutputHighResult data.

Normal mode

P = D + (CARRYIN + C) + (A * B), when SUB = 0

P = D + (CARRYIN + C) - (A * B), when SUB = 1

Dot-product mode

P = D + (CARRYIN + C) + 512 * ((AL * BH) + (AH * BL)), when SUB = 0

P = D + (CARRYIN + C) - 512 * ((AL * BH) + (AH * BL)), when SUB = 1

Notation:

AL = A[8:0], AH = A[17:9]

BL = B[8:0], BH = B[17:9]

Refer to Table 5-4 to see how operand D is obtained from P, CDIN or 0.

OVFL_CARRYOUTOutputHighOverflow or CarryOut

Refer to Table 5-5.

P_BYPASS[1:0]InputStaticHighBypass result P registers.

P_BYPASS[1] is for P[43:18] and OVFL_CARRYOUT. Connect to 1, if not registered.

P_BYPASS[0] is for P[17:0]. Connect to 1, if not registered.

In normal mode, ensure 
P_BYPASS[0] = P_BYPASS[1].

P_ARST_N[1:0]InputDynamicLowAsynchronous reset for P and OVFL_CARRYOUT registers.

Connect both P_ARST_N[1] and P_ARST_N[0] to 1 or to the global Asynchronous reset of the design.

P_SRST_N[1:0]InputDynamicLowSynchronous reset for result P registers.

P_SRST_N[1] is for P[43:18] and OVFL_CARRYOUT. Connect to 1, if not registered.

P_SRST_N[0] is for P[17:0]. Connect to 1, if not registered.

In normal mode, ensure 
P_SRST_N[1] = P_SRST_N[0].

P_EN[1:0]InputDynamicHighEnable for result P registers.

P_EN[1] is for P[43:18] and OVFL_CARRYOUT. Connect to 1, if not registered.

P_EN[0] is for P[17:0]. Connect to 1, if not registered.

In normal mode, ensure P_EN[1] = P_EN[0].

CDOUT[43:0]OutputCascadeHighCascade output of result P.

CDOUT is the same as P. The entire bus must either be dangling or drive an entire CDIN of another MACC block in cascaded mode.

CARRYINInputDynamicHighCarryIn for operand C.
C[43:0]InputDynamicHighRouted input for operand C.

In Dot-product mode, connect C[8:0] to the CARRYIN.

C_BYPASS[1:0]InputStaticHighBypass data C registers.

C_BYPASS[1] is for C[43:18]. Connect to 1, if not registered.

C_BYPASS[0] is for C[17:0] and CARRYIN. Connect to 1, if not registered.

In normal mode, ensure 
C_BYPASS[0] = C_BYPASS[1].

C_ARST_N[1:0]InputDynamicLowAsynchronous reset for CARRYIN and C registers. Connect both C_ARST_N[1] and C_ARST_N[0] to 1 or to the global Asynchronous reset of the design.
C_SRST_N[1:0]InputDynamicLowSynchronous reset for data C registers.

C_SRST_N[1] is for C[43:18]. Connect to 1, if not registered.

C_SRST_N[0] is for C[17:0] and CARRYIN. Connect to 1, if not registered.

In normal mode, ensure 
C_SRST_N[1] = C_SRST_N[0].

C_EN[1:0]InputDynamicHighEnable for data C registers.

C_EN[1] is for C[43:18]. Connect to 1, if not registered.

C_EN[0] is for C[17:0] and CARRYIN. Connect to 1, if not registered.

In normal mode, ensure C_EN[1] = C_EN[0].

CDIN[43:0]InputCascadeHighCascaded input for operand D.

The entire bus must be driven by an entire CDOUT of another MACC block. In Dot-product mode the CDOUT must also be generated by a MACC block in Dot-product mode.

Refer to Table 5-4 to see how CDIN is propagated to operand D.

ARSHFT17InputDynamicHighArithmetic right-shift for operand D.

When asserted, a 17-bit arithmetic right-shift is performed on operand D going into the accumulator.

Refer to Table 5-4 to see how operand D is obtained from P, CDIN or 0.

ARSHFT17_BYPASSInputStaticHighBypass ARSHFT17 register. Connect to 1, if not registered.
ARSHFT17_AL_NInputDynamicLowAsynchronous load for ARSHFT17 register.

Connect to 1 or to the global Asynchronous reset of the design.

When asserted, ARSHFT17 register is loaded with ARSHFT17_AD.

ARSHFT17_ADInputStaticHighAsynchronous load data for ARSHFT17 register.
ARSHFT17_SL_NInputDynamicLowSynchronous load for ARSHFT17 register. Connect to 1, if not registered. See Table 5-2.
ARSHFT17_SD_NInputStaticLowSynchronous load data for ARSHFT17 register. See Table 5-2.
ARSHFT17_ENInputDynamicHighEnable for ARSHFT17 register. Connect to 1, if not registered. See Table 5-2.
CDSELInputDynamicHighSelect CDIN for operand D.

When CDSEL = 1, propagate CDIN.

When CDSEL = 0, propagate 0 or P depending on FDBKSEL.

Refer to Table 5-4 to see how operand D is obtained from P, CDIN or 0.

CDSEL_BYPASSInputStaticHighBypass CDSEL register. Connect to 1, if not registered.
CDSEL_AL_NInputDynamicLowAsynchronous load for CDSEL register. Connect to 1 or to the global Asynchronous reset of the design.

When asserted, CDSEL register is loaded with CDSEL_AD.

CDSEL_ADInputStaticHighAsynchronous load data for CDSEL register.
CDSEL_SL_NInputDynamicLowSynchronous load for CDSEL register. Connect to 1, if not registered. See Table 5-2.
CDSEL_SD_NInputStaticLowSynchronous load data for CDSEL register. See Table 5-2.
CDSEL_ENInputDynamicHighEnable for CDSEL register. Connect to 1, if not registered. See Table 5-2.
FDBKSELInputDynamicHighSelect the feedback from P for operand D.

When FDBKSEL = 1, propagate the current value of result P register. Ensure P_BYPASS[1] = 0 and CDSEL = 0.

When FDBKSEL = 0, propagate 0. Ensure CDSEL = 0.

Refer to Table 5-4 to see how operand D is obtained from P, CDIN or 0.

FDBKSEL_BYPASSInputStaticHighBypass FDBKSEL register. Connect to 1, if not registered.
FDBKSEL_AL_NInputDynamicLowAsynchronous load for FDBKSEL register. Connect to 1 or to the global Asynchronous reset of the design.

When asserted, FDBKSEL register is loaded with FDBKSEL_AD.

FDBKSEL_ADInputStaticHighAsynchronous load data for FDBKSEL register.
FDBKSEL_SL_NInputDynamicLowSynchronous load for FDBKSEL register. Connect to 1, if not registered. See Table 5-2.
FDBKSEL_SD_NInputStaticLowSynchronous load data for FDBKSEL register. See Table 5-2.
FDBKSEL_ENInputDynamicHighEnable for FDBKSEL register. Connect to 1, if not registered. See Table 5-2.
SUBInputDynamicHighSubtract operation.
SUB_BYPASSInputStaticHighBypass SUB register. Connect to 1, if not registered.
SUB_AL_NInputDynamicLowAsynchronous load for SUB register.

Connect to 1 or to the global Asynchronous reset of the design.

When asserted, SUB register is loaded with SUB_AD.

SUB_ADInputStaticHighAsynchronous load data for SUB register.
SUB_SL_NInputDynamicLowSynchronous load for SUB register. Connect to 1, if not registered. See Table 5-2.
SUB_SD_NInputStaticLowSynchronous load data for SUB register. See Table 5-2.
SUB_ENInputDynamicHighEnable for SUB register. Connect to 1, if not registered. See Table 5-2.
Table 16-530. Truth Table for Control Registers ARSHFT17, CDSEL, FDBKSEL, and SUB
_AL_N_AD_BYPASS_CLK_EN_SL_N_SD_NDQn+1
0ADXXXXXXAD
1X0Not risingXXXXQn
1X00XXXQn
1X010SDnX!SDn
1X011XDD
1X1X0XXXQn
1X1X10SDnX!SDn
1X1X11XDD
Table 16-531. Truth Table—Data Registers A, B, C, CARRYIN, P, and OVFL_CARRYOUT
_ARST_N_BYPASS_CLK_EN_SRST_NDQn+1
0XXXXX0
10Not risingXXXQn
100XXQn
1010X0
1011DD
11X0XXQn
11X10X0
11X11DD
Table 16-532. Truth Table—Propagating Data to Operand D
FDBKSELCDSELARSHFT17Operand D
00x44'b0
x10CDIN[43:0]
x11{{17{CDIN[43]}},CDIN[43:17]}
100P[43:0]
101{{17{P[43]}},P[43:17]}
Table 16-533. Truth Table—Computation of OVFL_CARRYOUT
OVFL_CARRYOUT_SELOVFL_CARRYOUTDescription
0(SUM[45] ^ SUM[44) | (SUM[44] ^ SUM[43])True if overflow or underflow occurred.
1C[43] ^ D[43] ^ SUM[44]A signal that can be used to extend the final adder in the fabric.

SUM[45:0] is defined similarly to P[43:0], except that SUM is a 46-bit quantity so that no overflow can occur. SUM[44] is the carry out bit of a 44-bit final adder producing P[43:0].

16.3.5.2 MACC_RT

18 bit x 18 bit multiply-accumulate MACC_RT block.

The MACC_RT block can accumulate the current multiplication product with a previous result, a constant, a dynamic value, or a result from another MACC_RT block. Each MACC_RT block can also be configured to perform a Dot-product operation. All the signals of the MACC_RT block (except CDIN and CDOUT) have optional registers.

Figure 16-253. Ports
Table 16-534. Ports
Port NameDirectionTypePolarityDescription
DOTPInputStaticHighDot-product mode.

When DOTP = 1, MACC_RT block performs Dot-product of two pairs of 9-bit operands.

When DOTP = 0, it is called the normal mode.

OVFL_CARRYOUT_SELInputStaticHighGenerate OVERFLOW or CARRYOUT with result P.

OVERFLOW when OVFL_CARRYOUT_SEL = 0

CARRYOUT when OVFL_CARRYOUT_SEL = 1

DELENInputStaticHighEnable Single-event Transient mitigation
CLKInputDynamicRising edgeInput clocks.

CLK is the clock for A[17:0], B[17:0], C[43:0], P[43:0], OVFL_CARRYOUT, ARSHFT17, CDSEL, FDBKSEL and SUB registers.

ARST_NInputDynamicLowAsynchronous reset for all registers
A[17:0]InputDynamicHighInput data A.
A_BYPASSInputStaticHighBypass data A registers.

Connect to 1, if not registered.

A_SRST_NInputDynamicLowSynchronous reset for data A registers.

Connect to 1, if not registered.

A_ENInputDynamicHighEnable for data A registers.

Connect to 1, if not registered.

B[17:0]InputDynamicHighInput data B.
B_BYPASSInputStaticHighBypass data B registers.

Connect to 1, if not registered.

B_SRST_NInputDynamicLowSynchronous reset for data B registers.

Connect to 1, if not registered.

B_ENInputDynamicHighEnable for data B registers.

Connect to 1, if not registered.

P[43:0]OutputHighResult data.

Normal mode

P = D + (CARRYIN + C) + (A * B), when SUB = 0

P = D + (CARRYIN + C) - (A * B), when SUB = 1

Dot-product mode

P = D + (CARRYIN + C) + 512 * ((AL * BH) + (AH * BL)), when SUB = 0

P = D + (CARRYIN + C) - 512 * ((AL * BH) + (AH * BL)), when SUB = 1

Notation:

AL = A[8:0], AH = A[17:9]

BL = B[8:0], BH = B[17:9]

Refer to Table 5-4 to see how operand D is obtained from P, CDIN or 0.

OVFL_CARRYOUTOutputHighOverflow or CarryOut

Refer to Table 5-5.

P_BYPASSInputStaticHighBypass P and OVFL_CARRYOUT registers.

Connect to 1, if not registered.

P_SRST_NInputDynamicLowSynchronous reset for P and OVFL_CARRYOUT registers.

Connect to 1, if not registered.

P_ENInputDynamicHighEnable for P and OVFL_CARRYOUT registers.

Connect to 1, if not registered.

CDOUT[43:0]OutputCascadeHighCascade output of result P.

CDOUT is the same as P. The entire bus must either be dangling or drive an entire CDIN of another MACC_RT block in cascaded mode.

CARRYINInputDynamicHighCarryIn for operand C.
C[43:0]InputDynamicHighRouted input for operand C.

In Dot-product mode, connect C[8:0] to the CARRYIN.

C_BYPASSInputStaticHighBypass CARRYIN and C registers.

Connect to 1, if not registered.

C_SRST_NInputDynamicLowSynchronous reset for CARRYIN and C registers.

Connect to 1, if not registered.

C_ENInputDynamicHighEnable for CARRYIN and C registers.

Connect to 1, if not registered.

CDIN[43:0]InputCascadeHighCascaded input for operand D.

The entire bus must be driven by an entire CDOUT of another MACC_RT block. In Dot-product mode the CDOUT must also be generated by a MACC_RT block in Dot-product mode.

Refer to Table 5-4 to see how CDIN is propagated to operand D.

ARSHFT17InputDynamicHighArithmetic right-shift for operand D.

When asserted, a 17-bit arithmetic right-shift is performed on operand D going into the accumulator.

Refer to Table 5-4 to see how operand D is obtained from P, CDIN or 0.

ARSHFT17_BYPASSInputStaticHighBypass ARSHFT17 register. Connect to 1, if not registered.
ARSHFT17_SL_NInputDynamicLowSynchronous load for ARSHFT17 register. Connect to 1, if not registered. See Table 5-7.
ARSHFT17_SDInputStaticHighSynchronous load data for ARSHFT17 register. See Table 5-7.
ARSHFT17_ENInputDynamicHighEnable for ARSHFT17 register. Connect to 1, if not registered. See Table 5-7.
CDSELInputDynamicHighSelect CDIN for operand D.

When CDSEL = 1, propagate CDIN.

When CDSEL = 0, propagate 0 or P depending on FDBKSEL.

Refer to Table 5-4 to see how operand D is obtained from P, CDIN or 0.

CDSEL_BYPASSInputStaticHighBypass CDSEL register. Connect to 1, if not registered.
CDSEL_SL_NInputDynamicLowSynchronous load for CDSEL register. Connect to 1, if not registered. See Table 5-7.
CDSEL_SDInputStaticHighSynchronous load data for CDSEL register. See Table 5-7.
CDSEL_ENInputDynamicHighEnable for CDSEL register. Connect to 1, if not registered. See Table 5-7.
FDBKSELInputDynamicHighSelect the feedback from P for operand D.

When FDBKSEL = 1, propagate the current value of result P register. Ensure P_BYPASS = 0 and CDSEL = 0.

When FDBKSEL = 0, propagate 0. Ensure CDSEL = 0.

Refer to Table 5-4 to see how operand D is obtained from P, CDIN or 0.

FDBKSEL_BYPASSInputStaticHighBypass FDBKSEL register. Connect to 1, if not registered.
FDBKSEL_SL_NInputDynamicLowSynchronous load for FDBKSEL register. Connect to 1, if not registered. See Table 5-7.
FDBKSEL_SDInputStaticHighSynchronous load data for FDBKSEL register. See Table 5-7.
FDBKSEL_ENInputDynamicHighEnable for FDBKSEL register. Connect to 1, if not registered. See Table 5-7.
SUBInputDynamicHighSubtract operation.
SUB_BYPASSInputStaticHighBypass SUB register. Connect to 1, if not registered.
SUB_SL_NInputDynamicLowSynchronous load for SUB register. Connect to 1, if not registered. See Table 5-7.
SUB_SDInputStaticHighSynchronous load data for SUB register. See Table 5-7.
SUB_ENInputDynamicHighEnable for SUB register. Connect to 1, if not registered. See Table 5-7.
Table 16-535. Truth Table for Control Registers ARSHFT17, CDSEL, FDBKSEL, and SUB
ARST_N_BYPASS_CLK_EN_SL_N_SDDQn+1
0XXXXXX0
10Not risingXXXXQn
100XXXQn
1010SDnXSDn
1011XDD
11X0XXXQn
11X10SDnXSDn
11X11XDD