14.14 RTAX-DSP Math Macro

MATH18X18

This component is supported by Accelerator families.

Figure 14-533. MATH18X18 Logic Diagram
  • Function: 18 bit x 18 bit signed (2’s complement) multiply-accumulate MATH block. The MATH block can accumulate the current multiplication product with a previous result, a constant, a dynamic value, or a result from another MATH block. Each MATH block can also be fractured into two 9 bit x 9 bit multipliers. All the signals of the MATH block, except CIN, CDIN and CDOUT, have optional registers.
  • Input: CLK[1:0], ARSTAT[1:0], ARSTB[1:0], ARSTP[1:0], SRSTA[1:0], SRSTB[1:0], SRSTP[1:0], EA[1:0], EB[1:0], EP[1:0], ALSHFTSEL, ALCDSEL, ALFDBKSEL, ALSUB, SLSHFTSEL, SLCDSEL, SLFDBKSEL, SLSUB, ESHFTSEL, ECDSEL, EFDBKSEL, ESUB, SHFTSEL, CDSEL, FDBKSEL, SUB, A[17:0], B[17:0], CDIN[40:0], CIN[40:0], ALAT[1:0], BLAT[1:0], PLAT[1:0], SHFTSELLAT, CDSELLAT, FDBKSELLAT, SUBLAT, SIMD, SHFTSELAD, CDSELAD, FDBKSELSD, SUBSD, FDBKSELAD, SUBAD, SHFTSELSD, CDSELSD
  • Output: P[40:0], CDOUT[40:0], OVFL
Table 14-971. Math18x18 Ports
Port NameDirectionTypePolarityDescription
SIMDInputStaticHighSingle Instruction Multiple Data mode.When SIMD = 1, MATH block is fractured into two 9 bit x 9 bit multipliersWhen SIMD = 0, it is called the normal mode
CLK[1:0]InputDynamicRising edgeInput clocks.CLK[1] is the clock for A[17:9], B[17:9], P[40:18], OVFL,SHFTSEL, CDSEL, FDBKSEL and SUB registersCLK[0] is the clock for A[8:0], B[8:0] and P[17:0] In normal mode, ensure CLK[1] = CLK[0]
A[17:0]InputDynamicHighInput data A
ALAT[1:0]InputStaticHighBypass data A registersALAT[1] is for A[17:9]. Connect to 1, if not registeredALAT[0] is for A[8:0]. Connect to 1, if not registered In normal mode, ensure ALAT[0] = ALAT[1]
ARSTA[1:0]InputDynamicLowAsynchronous reset for data A registers.ARSTA[1] is for A[17:9]. Connect to 1, if not registeredARSTA[0] is for A[8:0]. Connect to 1, if not registered In normal mode, ensure ARSTA[1] = ARSTA[0]
SRSTA[1:0]InputDynamicLowSynchronous reset for data A registersSRSTA[1] is for A[17:9]. Connect to 1, if not registeredSRSTA[0] is for A[8:0]. Connect to 1, if not registered In normal mode, ensure SRSTA[1] = SRSTA[0]
EA[1:0]InputDynamicHighEnable for data A registersEA[1] is for A[17:9]. Connect to 1, if not registeredEA[0] is for A[8:0]. Connect to 1, if not registered In normal mode, ensure EA[1] = EA[0]
B[17:0]InputDynamicHighInput data B
BLAT[1:0]InputStaticHighBypass data B registers.BLAT[1] is for B[17:9]. Connect to 1, if not registered.BLAT[0] is for B[8:0]. Connect to 1, if not registered. In normal mode, ensure BLAT[0] = BLAT[1].
ARSTB[1:0]InputDynamicLowAsynchronous reset for data B registers.ARSTB[1] is for B[17:9]. Connect to 1, if not registered.ARSTB[0] is for B[8:0]. Connect to 1, if not registered. In normal mode, ensure ARSTB[1] = ARSTB[0].
SRSTB[1:0]InputDynamicLowSynchronous reset for data B registers.SRSTB[1] is for B[17:9]. Connect to 1, if not registered.SRSTB[0] is for B[8:0]. Connect to 1, if not registered. In normal mode, ensure SRSTB[1] = SRSTB[0].
EB[1:0]InputDynamicHighEnable for data B registers.EB[1] is for B[17:9]. Connect to 1, if not registered.EB[0] is for B[8:0]. Connect to 1, if not registered. In normal mode, ensure EB[1] = EB[0].
P[40:0]OutputHighResult data.Normal modeP = C + (A × B), when SUB = 0 P = C - (A × B), when SUB = 1SIMD mode PL = AL × BLPH = CH + (AH × BH), when SUB = 0PH = CH - (AH × BH), when SUB = 1Notation:AL = A[8:0], AH = A[17:9]BL = B[8:0], BH = B[17:9]PL = P[17:0], PH = P[40:18] CH = C[40:18].See Table 4 on page 324 to see how operand C is obtained from CIN, Por CDIN.
OVFLOutputHighOverflow.Normal modeif C +/- (A x B) > (240 ) - 1, then OVFL = 1 if C +/- (A x B) < -(240), then OVFL = 1otherwise, OVFL = 0SIMD modeif CH +/- (AH x BH) > (222) - 1, then OVFL = 1 if CH +/- (AH x BH) < -(222), then OVFL = 1otherwise, OVFL = 0
PLAT[1:0]InputStaticHighBypass result P registers.PLAT[1] is for P[40:18] and OVFL. Connect to 1, if not registeredPLAT[0] is for P[17:0]. Connect to 1, if not registered In normal mode, ensure PLAT[0] = PLAT[1].
ARSTP[1:0]InputDynamicLowAsynchronous reset for result P registers.ARSTP[1] is for P[40:18] and OVFL. Connect to 1, if not registered.ARSTP[0] is for P[17:0]. Connect to 1, if not registered In normal mode, ensure ARSTP[1] = ARSTP[0].
SRSTP[1:0]InputDynamicLowSynchronous reset for result P registers.SRSTP[1] is for P[40:18] and OVFL. Connect to 1, if not registered.SRSTP[0] is for P[17:0]. Connect to 1, if not registered. In normal mode, ensure SRSTP[1] = SRSTP[0].
EP[1:0]InputDynamicHighEnable for result P registers.EP[1] is for P[40:18] and OVFL. Connect to 1, if not registered.EP[0] is for P[17:0]. Connect to 1, if not registered. In normal mode, ensure EP[1] = EP[0].
CDOUT[40: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 MATH block in cascaded mode.
CIN[40:0]InputDynamicHighRouted input for operand C.In SIMD mode, connect CIN[17:0] to 0.See Table 4 on page 324 to see how CIN is propagated to operand C.
CDIN[40:0]InputCascadeHighCascaded input for operand C.The entire bus must be driven by an entire CDOUT of another MATH block.See Table 4 on page 324 to see how CDIN is propagated to operand C.
SHFTSELInputDynamicHighArithmetic right-shift for operand C.When asserted, a 17-bit arithmetic right-shift is performed on operand C going into the accumulator.In SIMD mode, SHFTSEL is ignored.See Table 4 on page 324 to see how operand C is obtained from CIN, P or CDIN.
SHFTSELLATInputStaticHighBypass SHFTSEL register. Connect to 1, if not registered.
ALSHFTSELInputDynamicLowAsynchronous load for SHFTSEL register. Connect to 1, if not registered.When asserted, SHFTSEL register is loaded with SHFTSELAD.
SHFTSELADInputStaticHighAsynchronous load data for SHFTSEL register.
SLSHFTSELInputDynamicLowSynchronous load for SHFTSEL register. Connect to 1, if not registered.See Table 2 on page 324
SHFTSELSDInputStaticLowSynchronous load data for SHFTSEL register. See Table 2 on page 324
ESHFTSELInputDynamicHighEnable for SHFTSEL register. Connect to 1, if not registered. See Table 2 on page 324
CDSELInputDynamicHighSelect CDIN for operand C.When CDSEL = 1, propagate CDIN.When CDSEL = 0, propagate CIN or P depending on FDBKSEL. In SIMD mode, CDSEL is ignored for CDIN[17:0] and only CDIN[40:18] is propagated.See Table 4 on page 324 to see how operand C is obtained from CIN, P or CDIN.
CDSELLATInputStaticHighBypass CDSEL register. Connect to 1, if not registered.
ALCDSELInputDynamicLowAsynchronous load for CDSEL register. Connect to 1, if not registered. When asserted, CDSEL register is loaded with CDSELAD.
CDSELADInputStaticHighAsynchronous load data for CDSEL register.
SLCDSELInputDynamicLowSynchronous load for CDSEL register. Connect to 1, if not registered. See Table 2 on page 324.
CDSELSDInputStaticLowSynchronous load data for CDSEL register. See Table 2 on page 324.
ECDSELInputDynamicHighEnable for CDSEL register. Connect to 1, if not registered. See Table 2 on page 324.
FDBKSELInputDynamicHighSelect the feedback from P for operand C.When FDBKSEL = 1, propagate the current value of result P register. Ensure PLAT[1] = 0 and CDSEL = 0.When FDBKSEL = 0, propagate CIN. Ensure CDSEL = 0. To load P from CIN, ensure either A = 0 or B = 0.In SIMD mode, FDBKSEL is ignored for P[17:0] and only P[40:18] is propagated.See Table 4 on page 324 to see how operand C is obtained from CIN, P or CDIN.
FDBKSELLATInputStaticHighBypass FDBKSEL register. Connect to 1, if not registered.
ALFDBKSELInputDynamicLowAsynchronous load for FDBKSEL register. Connect to 1, if not registered.When asserted, FDBKSEL register is loaded with FDBKSELAD.
FDBKSELADInputStaticHighAsynchronous load data for FDBKSEL register.
SLFDBKSELInputDynamicLowSynchronous load for FDBKSEL register. Connect to 1, if not registered.See Table 2 on page 324.
FDBKSELSDInputStaticLowSynchronous load data for FDBKSEL register. See Table 2 on page 324.
EFDBKSELInputDynamicHighEnable for FDBKSEL register. Connect to 1, if not registered. See Table 2.
SUBInputDynamicHighSubtract operation.When SUB = 1, perform Two's complement subtraction to get result P= C - (A x B).When SUB = 0, perform Two's complement addition to get result P = C + (A x B).
SUBLATInputStaticHighBypass SUB register. Connect to 1, if not registered.
ALSUBInputDynamicLowAsynchronous load for SUB register. Connect to 1, if not registered. When asserted, SUB register is loaded with SUBAD.
SUBADInputStaticHighAsynchronous load data for SUB register.
SLSUBInputDynamicLowSynchronous load for SUB register. Connect to 1, if not registered. See Table 2.
SUBSDInputStaticLowSynchronous load data for SUB register. See Table 2.
ESUBInputDynamicHighEnable for SUB register. Connect to 1, if not registered. See Table 2.
Table 14-972. Truth Table for Control Registers SHFTSEL, CDSEL, FDBKSEL and SUB
aladlatclkenslsddq
0xxxxxxxad
1x0not risingxxxxq
1x0rising0xxxq
1x0rising10xx!sd
1x0rising11xxd
1x1x0xxxq
1x1x10xx!sd
1x1x11xxd
Table 14-973. Truth Table for Data Registers A, B, P and OVFL
arstlatclkensrstdq
0xxxxx0
10not risingxxxq
10rising0xxq
10rising10x0
10rising11xd
11x0xxq
11x10x0
11x11xd
Table 14-974. Truth Table for Propagating Data to Operand C
FDBKSELCDSELSHFTSELSIMDOperand C
0000CIN[40:0]
00x1CIN[40:0]
Table 14-975. Truth Table for Propagating Data to Operand C
FDBKSELCDSELSHFTSELSIMDOperand C
0010{{17{CIN[40]}},CIN[40:17]}
x100CDIN[40:0]
x1x1{CDIN[40:18],CIN[17:0]}
x110{{17{CDIN[40]}},CDIN[40:17]}
1000P[40:0]
10x1{P[40:18],CIN[17:0]}
1010{{17{P[40]}},P[40:17]}