2 mask register (mask), 2 mask register (mask) -5 – Motorola ColdFire MCF5281 User Manual

Page 83

Advertising
background image

Enhanced Multiply-Accumulate Unit (EMAC)

Freescale Semiconductor

3-5

Table 3-3

summarizes the interaction of the MACSR[S/U,F/I,R/T] control bits.

3.2.2

Mask Register (MASK)

The 32-bit MASK implements the low-order 16 bits to minimize the alignment complications involved
with loading and storing only 16 bits. When the MASK is loaded, the low-order 16 bits of the source
operand are actually loaded into the register. When it is stored, the upper 16 bits are all forced to ones.

This register performs a simple AND with the operand address for MAC instructions. The processor
calculates the normal operand address and, if enabled, that address is then ANDed with {0xFFFF,
MASK[15:0]} to form the final address. Therefore, with certain MASK bits cleared, the operand address
can be constrained to a certain memory region. This is used primarily to implement circular queues with
the (An)+ addressing mode.

This minimizes the addressing support required for filtering, convolution, or any routine that implements
a data array as a circular queue. For MAC + MOVE operations, the MASK contents can optionally be
included in all memory effective address calculations. The syntax is as follows:

mac.sz Ry,RxSF,<ea>yand ,Rw

1

V

Overflow. Set if an arithmetic overflow occurs on a MAC or MSAC instruction, indicating that the result
cannot be represented in the limited width of the EMAC. V is set only if a product overflow occurs or the
accumulation overflows the 48-bit structure. V is evaluated on each MAC or MSAC operation and uses the
appropriate PAVn flag in the next-state V evaluation.

0

EV

Extension overflow. Signals that the last MAC or MSAC instruction overflowed the 32 lsbs in integer mode
or the 40 lsbs in fractional mode of the destination accumulator. However, the result remains accurately
represented in the combined 48-bit accumulator structure. Although an overflow has occurred, the correct
result, sign, and magnitude are contained in the 48-bit accumulator. Subsequent MAC or MSAC operations
may return the accumulator to a valid 32/40-bit result.

Table 3-3. Summary of S/U, F/I, and R/T Control Bits

S/U

F/I

R/T

Operational Modes

0

0

x

Signed, integer

0

1

0

Signed, fractional
Truncate on MAC.L and MSAC.L
No round on accumulator stores

0

1

1

Signed, fractional
Round on MAC.L and MSAC.L
Round-to-32-bits on accumulator stores

1

0

x

Unsigned, integer

1

1

0

Signed, fractional
Truncate on MAC.L and MSAC.L
Round-to-16-bits on accumulator stores

1

1

1

Signed, fractional
Round on MAC.L and MSAC.L
Round-to-16-bits on accumulator stores

Table 3-2. MACSR Field Descriptions (continued)

Field

Description

MCF5282 and MCF5216 ColdFire Microcontroller User’s Manual, Rev. 3

Advertising
This manual is related to the following products: