EMAC Instruction Set Summary

The mov.l instruction that stores the accumulator to an integer register (Rz) stalls until the program-visible copy of the accumulator is available. Figure 3-8shows EMAC timing.

 

 

 

 

 

Three-cycle

DSOC

 

 

 

regBusy stall

 

 

 

 

 

 

 

 

 

 

 

 

mac

 

 

 

mov

AGEX

 

mac

 

 

 

mov

mov

EMAC EX1 EMAC EX2 EMAC EX3 EMAC EX4

Accumulator 0

mac

mac

mac

old

mac

mov

new

Figure 3-8. EMAC-Specific OEP Sequence Stall

In Figure 3-8,the OEP stalls the store-accumulator instruction for 3 cycles: the depth of the EMAC pipeline minus 1. The minus 1 factor is needed because the OEP and EMAC pipelines overlap by a cycle, the AGEX stage. As the store-accumulator instruction reaches the AGEX stage where the operation is performed, the just-updated accumulator 0 value is available.

As with change or use stalls between accumulators and general-purpose registers, introducing intervening instructions that do not reference the busy register can reduce or eliminate sequence-related store-MAC instruction stalls. In fact, a major benefit of the EMAC is the addition of three accumulators to minimize stalls caused by exchanges between the accumulator(s) and the general-purpose registers.

3.5.2Data Representation

MACSR[S/U,F/I] selects one of the following three modes, where each mode defines a unique operand type.

Two’s complement signed integer: In this format, an N-bit operand value lies in the range -2(N-1)< operand < 2(N-1)- 1. The binary point is right of the lsb.

Unsigned integer: In this format, an N-bit operand value lies in the range 0 < operand < 2N - 1. The binary point is right of the lsb.

Two’s complement, signed fractional: In an N-bit number, the first bit is the sign bit. The remaining bits signify the first N-1 bits after the binary point. Given an N-bit number, aN-1aN-2aN-3... a2a1a0, its value is given by the equation in Figure 3-9.

MOTOROLA

Chapter 3. Enhanced Multiply-Accumulate Unit (EMAC)

3-13

Page 117
Image 117
Motorola MCF5281, MCF5282 user manual Data Representation, Mac Mov, Accumulator Mac Old Mov New