32-Bit Hardware Multiplier Operation
9-7
32-Bit Hardware Multiplier
9.2.2
Result Registers
The multiplication result is always 64-bits wide. It is accessible via registers
RES0 to RES3. Used with a signed operation MPYS or MACS the results are
appropriately sign extended. If the result registers are loaded with initial values
before a MACS operation the user software must take care that the written
value is properly sign extended to 64 bits.
Note: Changing of Result Registers During Multiplication
The result registers must not be modified by the user software after writing
the second operand into OP2 or OP2L until the initiated operation is
completed.
In addition to RES0 to RES3, for compatibility with the 16
×
16 hardware
multiplier the 32-bit result of a 8-bit or 16-bit operation is accessible via
RESLO, RESHI, and SUMEXT. In this case the result low register RESLO
holds the lower 16-bits of the calculation result and the result high register
RESHI holds the upper 16−bits. RES0 and RES1 are identical to RESLO and
RESHI, respectively, in usage and access of calculated results.
The sum extension registers SUMEXT contents depend on the multiply
operation and are listed in Table 9−4. If all operands are 16 bits wide or less
the 32-bit result is used to determine sign and carry. If one of the operands is
larger than 16 bits the 64-bit result is used.
The MPYC bit reflects the multiplier’s carry as listed in Table 9−4 and thus can
be used as 33rd or 65th bit of the result if fractional or saturation mode is not
selected. With MAC or MACS operations the MPYC bit reflects the carry of the
32-bit or 64-bit accumulation and is not taken into account for successive MAC
and MACS operations as the 33rd or 65th bit.
Table 9−4. SUMEXT Contents and MPYC Contents
Mode
SUMEXT
MPYC
MPY
SUMEXT is always 0000h
MPYC is always 0
MPYS
SUMEXT contains the extended sign of the result
MPYC contains the sign of the result
00000h Result was positive or zero
0
Result was positive or zero
0FFFFh Result was negative
1
Result was negative
MAC
SUMEXT contains the carry of the result
MPYC contains the carry of the result
0000h
No carry for result
0
No carry for result
0001h
Result has a carry
1
Result has a carry
MACS
SUMEXT contains the extended sign of the result
MPYC contains the carry of the result
00000h Result was positive or zero
0
No carry for result,
0FFFFh Result was negative
1
Result has a carry
Summary of Contents for MSP430x4xx Family
Page 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Page 2: ......
Page 6: ...vi ...
Page 114: ...3 76 RISC 16 Bit CPU ...
Page 304: ...5 20 FLL Clock Module ...
Page 340: ...7 8 Supply Voltage Supervisor ...
Page 348: ...8 8 16 Bit Hardware Multiplier ...
Page 372: ...9 24 32 Bit Hardware Multiplier ...
Page 400: ...10 28 DMA Controller ...
Page 428: ...13 10 Basic Timer1 ...
Page 466: ...15 24 Timer_A ...
Page 522: ...17 30 USART Peripheral Interface UART Mode ...
Page 544: ...18 22 USART Peripheral Interface SPI Mode ...
Page 672: ...23 12 Comparator_A ...
Page 692: ...24 20 LCD Controller ...
Page 746: ...26 28 ADC12 ...