Chapter 5. Enhanced Multiply-Accumulate Unit (EMAC)
For More Information On This Product,
Go to: www.freescale.com
5-3
General Operation
array is optimized for single-cycle pipelined operations with a possible accumulation after
product generation. This functionality is common in many signal processing applications.
The ColdFire core architecture also has been modified to allow an operand to be fetched in
parallel with a multiply, increasing overall performance for certain DSP operations.
Consider a typical filtering operation where the filter is defined as in Figure 5-2.
Figure 5-2. Infinite Impulse Response (IIR) Filter
Here, the output y(i) is determined by past output values or past input values. This is the
general form of an infinite impulse response (IIR) filter. A finite impulse response (FIR)
filter can be obtained by setting coefficients a(k) to zero. In either case, the operations
involved in computing such a filter are multiplies and product summing. To show this point,
reduce the above equation to a simple, four-tap FIR filter, shown in Figure 5-3, in which the
accumulated sum is a sum of past data values and coefficients.
Figure 5-3. Four-Tap FIR Filter
5.3 General Operation
The MAC speeds execution of ColdFire integer multiply instructions (MULS and MULU)
and provides additional functionality for multiply-accumulate operations. By executing
MULS and MULU in the MAC, execution times are minimized and deterministic
compared to the 2-bit/cycle algorithm with early termination that the OEP normally uses if
no MAC hardware is present.
The added MAC instructions to the ColdFire ISA provide for the multiplication of two
numbers, followed by the addition or subtraction of the product to/from the value in an
accumulator. Optionally, the product may be shifted left or right by 1 bit before addition or
subtraction. Hardware support for saturation arithmetic can be enabled to minimize
software overhead when dealing with potential overflow conditions. Multiply-accumulate
operations support 16- or 32-bit input operands of the following formats:
Signed integers
Unsigned integers
Signed, fixed-point, fractional numbers
The EMAC is optimized for single-cycle, pipelined 32x32 multiplications. For word- and
y i
( )
a
k
1
=
N
1
–
∑
=
k
( )
y i
k
–
)
b
k
0
=
N
1
–
∑
k
( )
x i
k
–
)
+
y i
( )
b k
x i
k
–
)
k
0
=
3
∑
b 0
x i
( )
b 1
x i
1
–
)
b 2
x i
2
–
)
b 3
x i
3
–
)
+
+
+
=
=
F
Freescale Semiconductor, Inc.
n
.