286
Document # 001-20559 Rev. *D
Multiply Accumulate (MAC)
26.2
Application Description
26.2.1
Multiplication with No
Accumulation
For simple multiplication, the MAC block accepts two 8-bit
signed numbers as the multiplicands for a multiply opera-
tion. The product of the multiplication is stored in a 16-bit
signed form. Up to four registers are involved with simple
multiplication: MULx_X, MULx_Y, MULx_DH, and
MULx_DL.
To execute a multiply, simply write a value to either the
MULx_X or MULx_Y registers. Immediately after the write of
the multiplicand, the product is available at registers
MULx_DH and MULx_DL. After reset of the part at power up
or after an external reset, the MAC registers are not reset to
zero. Therefore, after the write of the first multiplicand, the
product is indeterminate. After the write of the second multi-
plicand, the product registers are updated with the product
of the first and second multiplicands (assuming one of the
writes was to MULx_X and the other was to MULx_Y). Multi-
plication is associative so the order in which you write to X
and Y does not matter.
26.2.2
Accumulation After Multiplication
Accumulation of products is a feature that is implemented on
top of simple multiplication. When using the MAC to accu-
mulate the products of successive multiplications, two 8-bit
signed values are used for input. The product of the multipli-
cation is accumulated as a 32-bit signed value.
The user has the choice to either cause a multiply/accumu-
late function to take place or a multiply only function. The
user selects which operation is performed by choosing of
input register. The multiply function occurs immediately
whenever the MULx_X or the MULx_Y multiplier input regis-
ters are written, and the result is available in the MULx_DH
and MULx_DL multiplier result registers, as discussed in the
26.2.1 Multiplication with No Accumulation
tiply/accumulate function is executed whenever there is a
write to the MACx_X or the MACx_Y multiply/accumulate
input registers; the result is available in the ACCx_DR3,
ACCx_DR2, ACCx_DR1, and ACCx_DR0 accumulator
result registers. A write to the MULx_X or MACx_X registers
is input as the X value to both the multiply and multiply/accu-
mulate functions. A write to the MULx_Y or MACx_Y regis-
ters is input as the Y value to both the multiply and multiply/
accumulate functions. A write to the MACx_CL0 or
MACx_CL1 registers clears the value in the four accumulate
registers.
To clear the accumulated products, simply write to either of
the MACx_CLx registers.
Summary of Contents for PSoC CY8C23533
Page 4: ...Contents Overview 4 Document 001 20559 Rev D Section G Glossary 385 Index 401 ...
Page 16: ...Contents Overview 16 Document 001 20559 Rev D ...
Page 24: ...24 Document 001 20559 Rev D Section A Overview ...
Page 30: ...30 Document 001 20559 Rev D Pin Information ...
Page 54: ...54 Document 001 20559 Rev D Supervisory ROM SROM ...
Page 60: ...60 Document 001 20559 Rev D RAM Paging ...
Page 68: ...68 Document 001 20559 Rev D Interrupt Controller ...
Page 76: ...12 Document 001 20559 Rev D General Purpose IO GPIO ...
Page 82: ...18 Document 001 20559 Rev D Internal Main Oscillator IMO ...
Page 84: ...20 Document 001 20559 Rev D Internal Low Speed Oscillator ILO ...
Page 90: ...26 Document 001 20559 Rev D External Crystal Oscillator ECO ...
Page 94: ...30 Document 001 20559 Rev D Phase Locked Loop PLL ...
Page 106: ...42 Document 001 20559 Rev D Sleep and Watchdog ...
Page 228: ...164 Document 001 20559 Rev D Section D Digital System ...
Page 234: ...170 Document 001 20559 Rev D Array Digital Interconnect ADI ...
Page 278: ...214 Document 001 20559 Rev D Digital Blocks ...
Page 296: ...232 Document 001 20559 Rev D Analog Interface ...
Page 304: ...240 Document 001 20559 Rev D Analog Array ...
Page 308: ...244 Document 001 20559 Rev D Analog Input Configuration ...
Page 312: ...248 Document 001 20559 Rev D Analog Reference ...
Page 338: ...274 Document 001 20559 Rev D Section F System Resources ...
Page 354: ...290 Document 001 20559 Rev D Multiply Accumulate MAC ...
Page 374: ...310 Document 001 20559 Rev D I2C ...
Page 400: ...336 Document 001 20559 Rev D Section G Glossary ...