PROGRAMMING MODEL

The CCR is a special purpose control register that defines the current user state of the processor. The CCR bits are affected by data arithmetic logic unit (ALU) operations, par- allel move operations, and by instructions that directly reference the CCR (ORI and ANDI). The CCR bits are not affected by parallel move operations unless data limiting oc- curs when reading the A or B accumulators. During processor reset, all CCR bits are cleared.

5.4.2.1Carry (Bit 0)

The carry (C) bit is set if a carry is generated out of the MSB of the result in an addition. This bit is also set if a borrow is generated in a subtraction. The carry or borrow is gener- ated from bit 55 of the result. The carry bit is also affected by bit manipulation, rotate, and shift instructions. Otherwise, this bit is cleared.

5.4.2.2Overflow (Bit 1)

The overflow (V) bit is set if an arithmetic overflow occurs in the 56-bit result. This bit indi- cates that the result cannot be represented in the accumulator register; thus, the register has overflowed. Otherwise, this bit is cleared.

5.4.2.3Zero (Bit 2)

The zero (Z) bit is set if the result equals zero; otherwise, this bit is cleared.

5.4.2.4Negative (Bit 3)

The negative (N) bit is set if the MSB (bit 55) of the result is set; otherwise, this bit is cleared.

5.4.2.5Unnormalized (Bit 4)

The unnormalized (U) bit is set if the two MSBs of the most significant product (MSP) portion of the result are identical. Otherwise, this bit is cleared. The MSP portion of the A or B accumulators, which is defined by the scaling mode and the U bit, is computed as follows:

 

 

 

 

 

 

 

 

 

 

 

 

S1

S0

Scaling Mode

U Bit Computation

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

No Scaling

U =

 

 

 

 

 

 

 

 

(Bit 47

Bit 46)

 

 

 

 

 

 

 

 

 

 

 

 

0

1

Scale Down

U =

 

 

 

 

 

 

 

 

(Bit 48

Bit 47)

 

 

 

 

 

 

 

 

 

 

 

1

0

Scale Up

U =

 

 

 

 

 

 

 

(Bit 46

Bit 45)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5 - 10

PROGRAM CONTROL UNIT

MOTOROLA

Page 89
Image 89
Motorola 24-Bit Digital Signal Processor, DSP56000 manual Carry Bit, Overflow Bit, Zero Bit, Negative Bit, Unnormalized Bit