dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 171

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
5.3.5
The logic unit in the data ALU can perform 16- and 32-bit logical operations. All logical operations are
performed on the raw bits that are contained in the operands, regardless of whether they represent integer
or fractional values. Typically, logical operations are only performed on integer values, but the
DSP56800E supports logical operations on fractional values as well.
When logical operations are performed on 16-bit values, they operate on the FF1 portion of an accumulator
register or on any of the 16-bit data registers (X0, Y0, and Y1). Logical operations on 32-bit values are
performed on the FF1:FF0 portion of the accumulators and can also use the 32-bit Y register. Figure 5-17
shows examples of 16- and 32-bit logical operations.
Logical AND, OR, and EOR operations are supported for both 16- and 32-bit operands. A logical NOT
operation is also supported, but only for 16-bit operands. See Chapter 4, “Instruction Set Introduction,”
and the appropriate sections in Appendix A, “Instruction Set Details,” for more information on the logical
operation instructions.
5.3.6
A variety of shifting operations can be done on both integer and fractional data values. For both types of
data, an arithmetic left shift of 1 bit corresponds to a multiplication by two. An arithmetic right shift of
1 bit corresponds to a signed division by two, and a logical right shift of 1 bit corresponds to an unsigned
division by two.
5.3.6.1
The shifter performs single-cycle arithmetic or logical shifts of 0 to 15 bits on 16-bit word values.
Figure 5-18 on page 5-26 shows both right and left shifting of a 16-bit word.
Freescale Semiconductor
A
A
Logical Operations
Shifting Operations
35 32 31
35 32 31
A2
A2
Shifting 16-Bit Words
1
1
2
2
Before Execution
Before Execution
3
3
A1
A1
4
4
Figure 5-17. 16- and 32-Bit Logical Operations
5
5
16 15
16 15
6
6
16-Bit Logical Operation:
32-Bit Logical Operation:
7
7
Data Arithmetic Logic Unit
A0
A0
8
8
9
9
0
0
AND.W #$F,A
AND.L #$F,A
A
A
35 32 31
35 32 31
A2
A2
1
1
0
0
Fractional and Integer Arithmetic
After Execution
0
After Execution
0
A1
A1
0
0
5
16 15
0
16 15
6
0
7
0
A0
A0
8
0
9
9
0
0
5-25

Related parts for dsp56800e