dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 164

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Data Arithmetic Logic Unit
5.3.3
Multiplication
The multiplication operation is not the same for integer and fractional arithmetic. The result of a fractional
multiplication differs from the result of an integer multiplication. The difference amounts to a 1-bit shift of
the final result, as illustrated in Figure 5-13. Any binary multiplication of two N-bit signed numbers gives
a signed result that is 2N – 1 bits in length. This (2N – 1)-bit result must then be properly placed in a field
of 2N bits to fit correctly into the on-chip registers. For correct fractional multiplication, an extra zero bit is
inserted in the LSB to give a 2N-bit result. For correct integer multiplication, an extra sign bit is inserted in
the MSB to give a 2N-bit result.
Signed Multiplication: N × N = 2N – 1 Bits
Integer
Fractional
S
S
S
S
X
X
Signed Multiplier
Signed Multiplier
S
S
MSP
LSP
S
MSP
LSP
0
N – 1
N
N
N – 1
Sign Extension
Zero Fill
2N Bits
2N Bits
Figure 5-13. Comparison of Integer and Fractional Multiplication
The MPY, MAC, MPYR, and MACR instructions perform fractional multiplication and fractional
multiply-accumulation. The IMPY.W, IMPY.L, and IMAC.L instructions perform integer multiplication.
These types of multiplication are explained in more detail in the following sections.
5.3.3.1
Fractional Multiplication
Figure 5-14 on page 5-19 shows the multiplication of two 16-bit, signed, fractional operands. The
multiplication results in an intermediate 32-bit, signed, fractional result with the LSB always cleared. This
intermediate result is then stored in one of the 36-bit accumulators, with sign extension placed in the
extension register. If rounding is specified (using the MPYR instruction), the intermediate results is
rounded to 16 bits before being stored in the destination accumulator, and the LSP is cleared.
5-18
DSP56800E Core Reference Manual
Freescale Semiconductor

Related parts for dsp56800e