Table 4-1 describes macsr fields – Freescale Semiconductor MCF5480 User Manual

Page 154

Advertising
background image

MCF548x Reference Manual, Rev. 3

4-6

Freescale Semiconductor

Table 4-1

describes MACSR fields.

31

30

29

28

27

26

25

24

23

22

21

20

19

18

17

16

R

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

W

Reset

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

R

0

0

0

0

PAVx

OMC

S/U

F/I

R/T

N

Z

V

EV

W

Reset

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

Reg

Addr

Figure 4-7. MAC Status Register (MACSR)

Table 4-1. MACSR Field Descriptions

Bits

Name

Description

31–12

Reserved, should be cleared.

11–8

PAVx

Product/accumulation overflow flags. Contains four flags, one per accumulator, that indicate if past
MAC or MSAC instructions generated an overflow during product calculation or the 48-bit
accumulation. When a MAC or MSAC instruction is executed, the PAVx flag associated with the
destination accumulator is used to form the general overflow flag, MACSR[V]. Once set, each flag
remains set until V is cleared by a MOV.L , MACSR instruction or the accumulator is loaded directly.

7

OMC

Operational mode field: Overflow/saturation mode. Used to enable or disable saturation mode on
overflow. If set, the accumulator is set to the appropriate constant on any operation which overflows
the accumulator. Once saturated, the accumulator remains unaffected by any other MAC or MSAC
instructions until either the overflow bit is cleared or the accumulator is directly loaded.

6

S/U

Operational mode field: Signed/unsigned operations.
In integer mode:
S/U determines whether operations performed are signed or unsigned. It also determines the
accumulator value during saturation, if enabled.
0 Signed numbers. On overflow, if OMC is enabled, an accumulator saturates to the most positive

(0x7FFF_FFFF) or the most negative (0x8000_0000) number, depending on both the instruction
and the value of the product that overflowed.

1 Unsigned numbers. On overflow, if OMC is enabled, an accumulator saturates to the smallest

value (0x0000_0000) or the largest value (0xFFFF_FFFF), depending on the instruction.

In fractional mode:
S/U controls rounding while storing an accumulator to a general-purpose register.
0 Move accumulator without rounding to a 16-bit value. Accumulator is moved to a general-purpose

register as a 32-bit value.

1 The accumulator is rounded to a 16-bit value using the round-to-nearest (even) method when it

is moved to a general-purpose register. See

Section 4.2.1.1.1, “Rounding

. The resulting 16-bit

value is stored in the lower word of the destination register. The upper word is zero-filled. The
accumulator value is not affected by this rounding procedure.

Advertising
This manual is related to the following products: