Chapter 3. Hardware Multiply/Accumulate (MAC) Unit
3-3
Overview
These registers are described as follows:
•
Accumulator (ACC)—This 32-bit, read/write, general-purpose register is used to
accumulate the results of MAC operations.
•
Mask register (MASK)—This 16-bit general-purpose register provides an optional
address mask for MAC instructions that fetch operands from memory. It is useful in
the implementation of circular queues in operand memory.
•
MAC status register (MACSR)—This 8-bit register defines configuration of the
MAC unit and contains indicator flags affected by MAC instructions. Unless noted
otherwise, the setting of MACSR indicator flags is based on the final result, that is,
the result of the final operation involving the product and accumulator.
3.1.2 General Operation
The MAC unit supports the ColdFire integer multiply instructions (MULS and MULU) and
provides additional functionality for multiply-accumulate operations. The added MAC
instructions to the ColdFire ISA provide for the multiplication of two numbers, followed
by the addition or subtraction of this number to or from the value contained in the
accumulator. The product may be optionally shifted left or right one bit before the addition
or subtraction takes place. Hardware support for saturation arithmetic may be enabled to
minimize software overhead when dealing with potential overflow conditions using signed
or unsigned operands.
These MAC operations treat the operands as one of the following formats:
•
Signed integers
•
Unsigned integers
•
Signed, fixed-point, fractional numbers
To maintain compactness, the MAC module is optimized for 16-bit multiplications. Two
16-bit operands produce a 32-bit product. Longword operations are performed by reusing
the 16-bit multiplier array at the expense of a small amount of extra control logic. Again,
the product of two 32-bit operands is a 32-bit result. For longword integer operations, only
the least significant 32 bits of the product are calculated. For fractional operations, the
entire 63-bit product is calculated and then either truncated or rounded to a 32-bit result
using the round-to-nearest (even) method.
Because the multiplier array is implemented in a 3-stage pipeline, MAC instructions can
have an effective issue rate of one clock for word operations, three for longword integer
operations, and four for 32-bit fractional operations. Arithmetic operations use
register-based input operands, and summed values are stored internally in the accumulator.
Thus, an additional MOVE instruction is necessary to store data in a general-purpose
register. MAC instructions can choose the upper or lower word of a register as the input,
which helps filtering operations in which one data register is loaded with input data and
another is loaded with coefficient data. Two 16-bit MAC operations can be performed
without fetching additional operands between instructions by alternating the word choice
during the calculations.
Содержание DigitalDNA ColdFire MCF5272
Страница 1: ...MCF5272UM D Rev 0 02 2001 MCF5272 ColdFire Integrated Microprocessor User s Manual ...
Страница 38: ...xxxviii MCF5272 User s Manual TABLES Table Number Title Page Number ...
Страница 58: ...1 10 MCF5272 User s Manual MCF5272 Specific Features ...
Страница 90: ...2 42 MCF5272 User s Manual Exception Processing Overview ...
Страница 96: ...3 6 MCF5272 User s Manual MAC Instruction Execution Timings ...
Страница 158: ...5 46 MCF5272 User s Manual Motorola Recommended BDM Pinout ...
Страница 184: ...7 12 MCF5272 User s Manual Interrupt Controller Registers ...
Страница 338: ...13 44 MCF5272 User s Manual Application Examples ...
Страница 414: ...18 6 MCF5272 User s Manual PWM Programming Model ...
Страница 452: ...19 38 MCF5272 User s Manual Power Supply Pins ...
Страница 482: ...20 30 MCF5272 User s Manual Reset Operation ...
Страница 492: ...21 10 MCF5272 User s Manual Non IEEE 1149 1 Operation ...
Страница 548: ...INDEX Index 12 MCF5272 User s Manual ...