This appendix contains detailed information about each instruction in the DSP56000/
DSP56001 instruction set. An instruction guide is presented first to help understand the
individual instruction descriptions. This guide is followed by sections on notation and
addressing modes. Since parallel moves are allowed with many of the instructions, they
are discussed before the instructions. The instructions are then discussed in alphabetical
order.
A.1INSTRUCTION GUIDE
The following information is included in each instruction description with the goal of mak-
nc...
I
ing each description self-contained:
1. Name and Mnemonic: The mnemonic is highlighted in bold type for easy reference.
APPENDIX A
INSTRUCTION SET DETAILS
cale Semiconductor,
Frees
2. Assembler Syntax and Operation: For each instruction syntax, the corresponding
operation is symbolically described. If there are several operations indicated on a
single line in the operation field, those operations do not necessarily occur in the
order shown but are generally assumed to occur in parallel. If a parallel data move
is allowed, it will be indicated in parenthesis in both the assembler syntax and operation fields. If a letter in the mnemonic is optional, it will be shown in parenthesis in
the assembler syntax field.
3. Description: A complete text description of the instruction is given together with
any special cases and/or condition code anomalies of which the user should be
aware when using that instruction.
4. Example: An example of the use of the instruction is given. The example is shown
in DSP56000/DSP56001 assembler source code format. Most arithmetic and logical instruction examples include one or two parallel data moves to illustrate the
many types of parallel moves that are possible. The example includes a complete
explanation, which discusses the contents of the registers referenced by the
instruction (but not those referenced by the parallel moves) both before and after
the execution of the instruction. Most examples are designed to be easily understood without the use of a calculator.
5. Condition Codes: The status register is depicted with the condition code bits which
can be affected by the instruction highlighted in bold type. Not all bits in the status
register are used. Those which are reserved are indicated with a double asterisk
and are read as zeros.
6. Instruction Format: The instruction fields, the instruction opcode, and the instruction extension word are specified for each instruction syntax. When the extension
MOTOROLA DSP56000/DSP56001 USER’S MANUAL
For More Information On This Product,
Go to: www.freescale.com
A - 1
word is optional, it is so indicated. The values which can be assumed by each of the
variables in the various instruction fields are shown under the instruction field’s
heading. Note that the symbols used in decoding the various opcode fields of an
instruction are completely arbitrary . Furthermore, the opcode symbols used in
one instruction are completely independent of the opcode symbols used in a different instruction.
7. Timing: The number of oscillator clock cycles required for each instruction syntax is
given. This information provides the user a basis for comparison of the execution
times of the various instructions in oscillator clock cycles. Refer to Table A-1 and
A.7 INSTRUCTION TIMING for a complete explanation of instruction timing, including the meaning of the symbols ‘‘aio’’, ‘‘ap’’, ‘‘ax’’, ‘‘ay’’, ‘‘axy’’, ‘‘ea’’, ‘‘jx’’, ‘‘mv’’,
‘‘mvb’’, ‘‘mvc’’, ‘‘mvm’’, ‘‘mvp’’, ‘‘rx’’, ‘‘wio’’, ‘‘wp’’, ‘‘wx’’, and ‘‘wy’’.
8. Memory: The number of program memory words required for each instruction syntax is given. This information provides the user a basis for comparison of the number of program memory locations required for each of the various instructions in 24-
nc...
I
bit program memory words. Refer to Table A-1 and A.7 INSTRUCTION TIMING for
a complete explanation of instruction memory requirements, including the meaning
of the symbols ‘‘ea’’ and ‘‘mv’’.
Freescale Semiconductor, Inc.
cale Semiconductor,
Frees
A.2NOTATION
Each instruction description contains symbols used to abbreviate certain operands and
operations. Table A-1 lists the symbols used and their respective meanings. Depending
on the context, registers refer to either the register itself or the contents of the register.
A.3ADDRESSING MODES
The addressing modes are grouped into three categories: register direct, address register indirect, and special. These addressing modes are summarized in Table A-2. All
address calculations are performed in the address ALU to minimize execution time and
loop overhead. Addressing modes, which specify whether the operands are in registers,
in memory, or in the instruction itself (such as immediate data), provide the specific
address of the operands.
The register direct addressing mode can be subclassified according to the specific register addressed. The data registers include X1, X0, Y1, Y0, X, Y, A2, A1, A0, B2, B1, B0,
A, and B. The control registers include SR, OMR, SP, SSH, SSL, LA, LC, CCR, and MR.
Address register indirect modes use an address register Rn (R0–R7) to point to locations
in X, Y, and P memory. The contents of the Rn address register (Rn) is the effective
address (ea) of the specified operand, except in the ‘‘indexed by offset’’ mode where the
effective address (ea) is (Rn+Nn). Address register indirect modes use an address modifier register Mn to specify the type of arithmetic to be used to update the address register Rn. If an addressing mode specifies an address offset register Nn, the given address
offset register is used to update the corresponding address register Rn. The Rn address
register may only use the corresponding address offset register Nn and the corresponding address modifier register Mn. For example, the address register R0 may only use the
A - 2
DSP56000/DSP56001 USER’S MANUAL
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Freescale Semiconductor, Inc.
Table A-1 Instruction Description Notation
Data ALU Registers Operands
XnInput Register X1 or X0 (24 Bits)
YnInput Register Y1 or Y0 (24 Bits)
AnAccumulator Registers A2, A1, A0 (A2 — 8 Bits, A1 and A0 — 24 Bits)
BnAccumulator Registers B2, B1, B0 (B2 — 8 Bits, B1 and B0 — 24 Bits)
XInput Register X = X1: X0 (48 Bits)
YInput Register Y = Y1: Y0 (48 Bits)
AAccumulator A = A2: A1: A0 (56 Bits)*
nc...
I
cale Semiconductor,
Frees
BAccumulator B = B2: B1: B0 (56 BIts)*
ABAccumulators A and B = A1: B1 (48 Bits)*
BAAccumulators B and A = B1: A1 (48 Bits)*
A10Accumulator A = A1: A0 (48 Bits)
B10Accumulator B= B1:B0 (48 bits)
* NOTE: In data move operations , shifting and limiting are perf ormed when this register is specified
as a source operand. When specified as a destination operand, sign extension and possib ly
zeroing are performed.
N0 address offset register and the M0 address modifier register during actual address
computation and address register update operations. This unique implementation is
extremely powerful and allows the user to easily address a wide variety of DSP-oriented
data structures. All address register indirect modes use at least one set of address registers (Rn, Nn, and Mn), and the XY memory reference uses two sets of address registers,
one for the X memory space and one for the Y memory space.
The special addressing modes include immediate and absolute addressing modes as
well as implied references to the program counter (PC), the system stack (SSH or SSL),
and program (P) memory.
Addressing modes may also be categorized by the ways in which they may be used.
SSHUpper Portion of the Current Top of the Stack (16 Bits)
cale Semiconductor,
Frees
SSLLower P ortion of the Current Top of the Stack (16 Bits)
SSSystem Stack RAM = SSH: SSL (15 Locations b y 32 Bits)
Address Operands
eaEffective Address
eaxEffective Address for X Bus
eayEffective Address for Y Bus
xxxxAbsolute Address (16 Bits)
xxxShort Jump Address (12 Bits)
aaAbsolute Short Address (6 Bits, Zero Extended)
ppI/O Short Address (6 Bits, Ones Extended)
<. . .>Specifiies the Contents of the Specified Address
X:X Memory Reference
Y:Y Memory Reference
L:Long Memory Reference = X:Y
P:Program Memory Reference
Table A-3 shows the various categories to which each addressing mode belongs. The
following classifications will be used in the instruction descriptions.
Table A-3. DSP56000/DSP56001 Addressing Mode Encoding
These addressing mode categories may be combined so that additional, more restrictive
classifications may be defined. For example, the instruction descriptions may use a
S, SnSource Operand Register
D , DnDestination Operand Register
D [n]Bit n of D Destination Operand Register
#nImmediate Short Data (5 Bits)
#xxImmediate Short Data (8 Bits)
#xxxImmediate Short Data (12 Bits)
#xxxxxxImmediate Data (24 Bits)
nc...
I
cale Semiconductor,
Frees
Unary Operators
-Negation Operator
—Logical NOT Operator
PUSHPush Specified Value onto the System Stack (SS) Operator
PULLPull Specified Value from the System Stack (SS) Operator
READRead the Top of the System Stack (SS) Operator
PURGEDelete the Top Value on the System Stac k (SS) Oper ator
||Absolute Value Operator
<<I/O Short Addressing Mode Force Operator
<Short Addressing Mode Force Operator
>Long Addressing Mode Force Operator
#Immediate Addressing Mode Operator
#>Immediate Long Addressing Mode Force Oper ator
#<Immediate Short Addressing Mode Force Operator
nc...
I
Mode Register (MR) Symbols
cale Semiconductor,
Frees
LFLoop Flag Bit Indicating When a DO Loop is in Progress
TTrace Mode Bit Indicating if the Tracing Function has been Enabled
S1, S0Scaling Mode Bits Indicating the Current Scaling Mode
I1, I0Interrupt Mask Bits Indicating the Current Interrupt Priority Level
Condition Code Register (CCR) Symbols
Standard Definitions (Table A - 3 Describes Exceptions)
LLimit Bit Indicating Arithmetic Ov erflo w and/or Data Shifting/Limiting
EExtension Bit Indicating if the Integer Portion of A or B is in Use
UUnnormalized Bit Indicating if the A or B Result is Unnormalized
NNegativ e Bit Indicating if Bit 55 of the A or B Result is Set
ZZero Bit Indicating if the A or B Result Equals Zero
VOverflow Bit Indicating if Arithmetic Overflo w has Occurred in A or B
CCarry Bit Indicating if a Carry or Borrow Occurred in A or B Result
ory addressing modes and alterable addressing modes. Thus, memory alterable
addressing modes use address register indirect and absolute addressing modes.
The address register indirect addressing modes require that the offset register number
be the same as the address register number. However, future family members may allow
the offset register number to be different from the address register number. The assembler syntax ‘‘Nn’’ supports the future feature. The assembler syntax ‘‘N’’ may be used
aioTime Required to Access an I/O Operand
apTime Required to Access a P Memory Operand
axTime Required to Access an X Memory Operand
ayTime Required to Access a Y Memory Operand
axyTime Required to Access XY Memory Operands
eaTime or Number of W ords Required for an Effective Address
jxTime Required to Execute Part of a Jump-Type Instruction
mvTime or Number of W ords Required f or a Mo ve-Type Operation
nc...
I
mvbTime Required to Execute P art of a Bit Manipulation Instruction
cale Semiconductor,
Frees
mvcTime Required to Execute Part of a MOVEC Instruction
mvmTime Required to Execute P art of a MO VEM Instruction
mvpTime Required to Execute P art of a MO VEP Instruction
rxTime Required to Execute P art of an TR TI or RTS Instruction
wioNumber of W ait States Used in Accessing External I/O
wpNumber of Wait States Used in Accessing External P Memory
wxNumber of W ait States Used in Accessing External X Memory
wyNumber of W ait States Used in Accessing External Y Memory
Other Symbols
( )Optional Letter, Operand, or Operation
(. . . . .)An y Arithmetic or Logical Instruction Which Allo ws Parallel Moves
EXTExtension Register Portion of an Accumulator (A2 or B2)
LSLeast Significant
LSPLeast Significant Portion of an Accumulator (A0 or B0)
MSMost Significant
MSPMost Significant Portion of a n Accumulator (A1 or B1)
rRounding constant
S/LShifting and/or Limiting on a Data ALU Register
Sign ExtSign Externsion of a Data ALU Register
ZeroZeroing of a Data ALU Register
MOTOROLA DSP56000/DSP56001 USER’S MANUAL
For More Information On This Product,
Go to: www.freescale.com
A - 7
Freescale Semiconductor, Inc.
Table A-2 DSP 56000/56001 Addressing Modes
nc...
I
cale Semiconductor,
Frees
Addressing Mode
Data or Control RegisterNoXXX
Address Register RnNoX
Address Modifier Register
Mn
Address Offset Register NnNoX
No UpdateYesXXXXX
Postincrement b y 1YesXXXXX
Postdecrement b y 1YesXXXXX
Postincrement b y Offset NnYesXXXXX
Postdecrement b y Offset NnYesXXXX
Indexed b y Offset NnYesXXXX
Predecrement by 1YesXXXX
Immediate DataNoX
Absolute AddressNoXXXX
Immediate Short DataNoX
Short Jump AddressNoX
Absolute Short AddressNoXXXX
I/O Short AddressNoXX
ImplicitNoXXX
Uses Mn
Modifier
NoX
Address Register Indirect
SCDAPXYLXY
Register Direct
Special
Operand Reference
NOTE:S = System Stack ReferenceX = X Memory Reference
C = Program Controller Register ReferenceY = Y Memory Reference
D = Data ALU Register ReferenceL = L Memory Reference
A = Address ALU Register ReferenceXY = XY Memory Reference
P = Program Memory Reference
instead of ‘‘Nn’’ in the address register indirect memory addressing modes. If ‘‘N’’ is
specified, the offset register number is the same as the address register number.
A - 8
DSP56000/DSP56001 USER’S MANUAL
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Freescale Semiconductor, Inc.
Table A-3 DSP56000/56001 Addressing Mode Encoding
Addressing Mode
Data or Control Register——X(SeeTable A-1)
Address Register ——XRn
Address Offset Register ——XNn
Address Modifier Register ——XMn
No Update100RnXXX(Rn)
nc...
I
cale Semiconductor,
Postincrement b y 1011RnXXXX(Rn) +
Postdecrement b y 1010RnXXXX(Rn) Postincrement b y Offset Nn001RnXXXX (Rn) + Nn
Postdecrement b y Offset Nn000RnXXX(RN) - Nn
Indexed b y Offset Nn101RnXX(Rn + Nn)
Predecrement by 1111RnXX- (Rn)
Immediate Data110100X#xxxxxx
Absolute Address110000XXxxxx
Immediate Short Data——#xx
Short Jump Address——Xxxx
Absolute Short Address——Xaa
I/O Short Address——Xpp
Mode
MMM
Address Register Indirect
Reg
RRR
Register Direct
Special
Addressing Categories
UPMA
Assembler
Syntax
Frees
Implicit——X
Update Mode (U)The update addressing mode is used to modify address registers without any
associated data move.
Parallel Mode (P)The parallel addressing mode is used in instructions where two effective
addresses are required.
Memory Mode (M)The memory addressing mode is used to refer to operands in memory using an
effective addressing field.
Alterable Mode (A) The alterable addressing mode is used to refer to alter able or writable registers or
memory .
MOTOROLA DSP56000/DSP56001 USER’S MANUAL
For More Information On This Product,
Go to: www.freescale.com
A - 9
Freescale Semiconductor, Inc.
A.3.1 Addressing Mode Modifiers
The addressing mode selected in the instruction word is further specified by the contents
of the address modifier register Mn. The addressing mode update modifiers (M0–M7)
are shown in Table A-4. There are no restrictions on the use of modifier types with any
address register indirect addressing mode.
The condition code register (CCR) portion of the status register (SR) consists of seven
defined bits:
L — Limit BitZ — Zero Bit
E — Extension BitV — Overflow Bit
U — Unnormalized Bit C — Carry Bit
N — Negative Bit
The E, U, N, Z, V, and C bits are true condition code bits that reflect the condition of the result of a data ALU operation . These condition code bits are not latched and are not affected by address ALU calculations or by data transfers over the X, Y, or global
data buses. The L bit is a latching overflow bit which indicates that an overflow has occurred in the data ALU or that data limiting has occurred when moving the contents of the Aand/or[lz B accumulators.
The standard definition of the condition code bits is as follows. Exceptions to these standard definitions are given in Table A-5.
A - 10
DSP56000/DSP56001 USER’S MANUAL
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Freescale Semiconductor, Inc.
L (Limit Bit)Set if the overflow bit V is set or if the data shifter/limiters perform a limiting operation. Not affected otherwise. This bit is latched and must be reset by the user.
⊕
nc...
I
cale Semiconductor,
Frees
E (Extension Bit)Cleared if all the bits of the signed integer portion of the A or B result are the same =m i.e., the bit patterns are either 00 . . . 00 or 11 . . . 11. Set otherwise. The signed integer portion is defined
by the scaling mode as shown in the following table:
S1S0Scaling ModeSigned Integer Portion
00No ScalingBits 55, 54, . . . . 48, 47
01Scale DownBits 55, 54, . . . . 49, 48
10Scale UpBits 55, 54, . . . . 47, 46
Note that the signed integer portion of an accumulator IS NOT necessarily the same as the extension register portion of that accumulator. The signed integer portion of an accumulator consists of the MS 8, 9, or 10 bits of that accumulator, depending on the scaling mode being used. The extension register portion of an accumulator (A2 or B2) is always the MS 8 bits of that accumulator. The E bit refers to the signed integer portion of an accumulator and NOT the extension register portion of that accumulator. For
example, if the current scaling mode is set for no scaling (i.e., S1=S0=0), the signed integer portion of the A or B accumulator consists of bits 47 through 55 . If the A accumulator contained the signed 56-bit value $00:800000:000000 as a result of a data ALU oper-
ation , the E bit would be set (E=1) since the 9 MS bits of that accumulator were not all the same (i.e., neither 00 . . 00 nor 11 . . 11). This means that data limiting will occur if that 56-bit value is specified as a source operand in a move-type operation. This limiting
operation will result in either a positive or negative, 24-bit or 48-bit saturation constant being stored in the specified destination. The only situation in which the signed integer portion of an accumulator and the extension register portion of an accumulator are the same
is in the ‘‘Scale Down’’ scaling mode (i.e., S1=0 and S0=1).
U (Unnormalized Bit)Set if the two MS bits of the MSP portion of the A or B result are the same. Cleared otherwise. The MSP portion is defined by the scaling mode. The U bit is computed as follows:
S1S0Scaling ModeU Bit Computation
00No ScalingU=(Bit 47 ⊕ Bit 46)
01Scale DownU=(Bit 48 ⊕ Bit 47
10Scale UpU=(Bit 46
N (Negative Bit)Set if the MS bit 55 of the A or B result is set. Cleared otherwise.
Z (Zero Bit)Set if the A or B result equals zero. Cleared otherwise.
V (Overflow Bit)Set if an arithmetic overflow occurs in the 56-bit A or B result. This indicates that the result cannot be represented in the 56-bit accumulator; thus, the accumulator has overflowed. Cleared other-
C (Carry Bit)Set if a carry is generated out of the MS bit of the A or B result of an addition or if a borrow is generated out of the MS bit of the A or B result of a subtraction. The carry or borrow is generated out
Table A-5 details how each instruction affects the condition codes. The convention for the notation that is used is shown at the bottom of Table A-5.
wise.
of bit 55 of the A or B result. Cleared otherwise.
Bit 45
)
)
A.5PARALLEL MOVE DESCRIPTIONS
Many of the instructions in the DSP56000/DSP56001 instruction set allow optional parallel data bus movement. A.6 INSTRUCTION DESCRIPTIONS indicates the parallel move option in the instruction syntax with the statement ‘‘(parallel move)’’. The MOVE instruction is equivalent to a NOP with parallel moves. Therefore, a detailed description of each parallel move is given with the MOVE instruction details in A.6 INSTRUCTION DESCRIPTIONS.
A.6INSTRUCTION DESCRIPTIONS
The following section describes each instruction in the DSP56000/DSP56001 instruction set in complete detail. The format of each instruction description is given in A.1 INSTRUCTION GUIDE. Instructions which allow parallel moves include the notation ‘‘(parallel
move)’’ in both the Assembler Syntax and the Operation fields. The example given with each instruction discusses the contents of all the registers and memory locations referenced by the opcode-operand portion of that instruction but not those referenced by the
parallel move portion of that instruction. Refer to A.5 PARALLEL MOVE DESCRIPTIONS for a complete discussion of parallel moves, including examples which discuss the contents of all the registers and memory locations referenced by the parallel move portion of
an instruction.
Whenever an instruction uses an accumulator as both a destination operand for a data ALU operation and as a source for a parallel move operation, the parallel move operation will use the value in the accumulator prior to execution of any data ALU operation.
Whenever a bit in the condition code register is defined according to the standard definition given in A.4 CONDITION CODE COMPUTATION, a brief definition will be given in normal text in the Condition Code section of that instruction description. Whenever a bit
in the condition code register is defined according to a
cerning its use.
special definition for some particular instruction, the complete special definition of that bit will be given in the Condition Code section of that instruction in bold text to alert the user to any special conditions con-
— Not affected by the operation
? Set according to a special definition and can be a 0 or 1
0 The V bit is cleared
1 V Set if an arithmetic overflow occurs in the 56-bit result. Also set if the MS bit of the destination oper and is changed as a result of
the left shift. Cleared otherwise.
2 ? Cleared if the corresponding bit in the immediate data is cleared when the operand is the CCR. Not affected otherwise.
3 C Set if bit 55 of the source operand is set. Cleared otherwise.
4 C Set if bit 0 of the source operand is set. Cleared otherwise.
5 C Set if bit #n of the source operand is set. Cleared otherwise.
6 ? Set if the corresponding bit in the immediate data is set when the operand is the CCR. Not affected otherwise.
7 C Set if bit 55 of the result is cleared. Cleared otherwise.
8 N Set if bit 47 of the result is set. Cleared otherwise.
9 Z Set if bits 47 - 24 of the result are zero. Cleared otherwise.
10 C Set if bit 47 of the source operand is set. Cleared otherwise .
11 C Set if bit 24 of the source operand is set. Cleared otherwise .
12 ? Set according to the value pulled from the stack.
13 ? If the status register (SR) is specified as a destination operand, set according to the corresponding bit of the source operand. If
SR is not specified as a destination operand, the L bit is set if data limiting occurred. All ? bits are not aff ected otherwise .
14 ? Set if limiting occurs, not affected otherwise.
A - 12DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
The definition and thus the computation of both the E (extension) and U (unnormalized) bits
of the condition code register (CCR) varies according to the scaling mode being used. Refer
to A.4 CONDITION CODE COMPUTATION for complete details.
The signed integer portion of an accumulator is NOT necessarily the same as
either the A2 or B2 extension register portion of that accumulator. The signed
integer portion of an accumulator is defined according to the scaling mode being used and can consist of the MS 8, 9, or 10 bits of an accumulator. Refer to
A.4 CONDITION CODE COMPUTATION for complete details.
nc...
I
NOTE
cale Semiconductor,
Frees
MOTOROLA DSP56000/DSP56001 USER’S MANUALA - 13
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ABSAbsolute ValueABS
Operation:Assembler Syntax:
| D | ➞ D (parallel move)ABS D (parallel move)
Description: Take the absolute value of the destination operand D and store the result
in the destination accumulator.
Example:
:
ABS A #$123456,X0 A,Y0;take abs. value, set up X0, save value
nc...
I
:
Before ExecutionAfter Execution
AA
$FF:FFFFFF:FFFFF2$00:000000:00000E
cale Semiconductor,
Frees
Explanation of Example: Prior to execution, the 56-bit A accumulator contains the
value $FF:FFFFFF:FFFFF2. Since this is a negative number, the execution of the ABS
instruction takes the twos complement of that value and returns $00:000000:00000E.
Note:For the case in which the D operand equals $80:000000:000000 (-256.0), the
ABS instruction will cause an overflow to occur since the result cannot be correctly expressed using the standard 56-bit, fixed-point, twos-complement data representation.
Data limiting does not occur (i.e., A is not set to the limiting value of
$7F:FFFFFF:FFFFFF).
Condition Codes
1514131211109876543210
LF
**
:
T
S1S0I1I0
**
MRCCR
LEUNZVC
**
L — Set if limiting (parallel move) or overflow has occurred in result
E — Set if the signed integer portion of A or B result is in use
U — Set if A or B result is unnormalized
N — Set if bit 55 of A or B result is set
Z— Set if A or B result equals zero
V — Set if overflow has occurred in A or B result
Note:The definition of the E and U bits varies according to the scaling mode being
used. Refer to A.4 CONDITION CODE COMPUTATION for complete details.
A - 14DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ABSAbsolute ValueABS
Instruction Format:
ABS D
Opcode:
23874 30
DATA BUS MOVE FIELD
OPTIONAL EFFECTIVE ADDRESS EXTENSION
0010
d110
nc...
I
cale Semiconductor,
Frees
Instruction Fields:
D d
A 0
B 1
Timing: 2+mv oscillator clock cycles
Memory: 1+mv program words
MOTOROLADSP56000/DSP56001 USER’S MANUALA - 15
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ADCAdd Long with CarryADC
Operation:Assembler Syntax:
S+C+D ➞ D (parallel move)ADC S,D (parallel move)
Description: Add the source operand S and the carry bit C of the condition code register
to the destination operand D and store the result in the destination accumulator. Long
words (48 bits) may be added to the (56-bit) destination accumulator.
Note:The carry bit is set correctly for multiple precision arithmetic using long-word operands if the extension register of the destination accumulator (A2 or B2) is the sign
extension of bit 47 of the destination accumulator (A or B).
nc...
I
cale Semiconductor,
Frees
Example:
:
MOVE L:<$0,X;get a 48-bit LS long-word operand in X
MOVE L:<$1,A;get other LS long word in A (sign ext.)
MOVE L:<$2,Y;get a 48-bit MS long-word operand in Y
ADD X,A L:<$3,B;add LS words; get other MS word in B
ADC Y,B A10,L:<$4;add MS words with carry, save LS sum
MOVE B10,L:<$5;save MS sum
:
Before ExecutionAfter Execution
AA
XX
BB
YY
$FF:800000:000000$FF:000000:000000
$800000:000000$800000:000000
$00:000000:000001$00:000000:000003
$000000:000001$000000:000001
Explanation of Example: This example illustrates long-word double-precision (96-bit)
addition using the ADC instruction. Prior to execution of the ADD and ADC instructions,
the double-precision 96-bit value $000000:000001:800000:000000 is loaded into the Y
and X registers (Y:X), respectively. The other double-precision 96-bit value
$000000:000001:800000:000000 is loaded into the B and A accumulators (B:A), respectively. Since the 48-bit value loaded into the A accumulator is automatically sign
extended to 56 bits and the other 48-bit long-word operand is internally sign extended to
56 bits during instruction execution, the carry bit will be set correctly after the execution
of the ADD X,A instruction. The ADC Y,B instruction then produces the correct MS 56-bit
result. The actual 96-bit result is stored in memory using the A10 and B10 operands
(instead of A and B) because shifting and limiting is not desired.
A - 16DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ADCAdd Long with CarryADC
Condition Codes:
1514131211109876543210
LF
L — Set if limiting (parallel move) or overflow has occurred in result
E — Set if the signed integer portion of A or B result is in use
U — Set if A or B result is unnormalized
N — Set if bit 55 of A or B result is set
Z— Set if A or B result equals zero
nc...
I
V — Set if overflow has occurred in A or B result
C — Set if a carry (or borrow) occurs from bit 55 of A or B result.
**
T
S1S0I1I0
**
MRCCR
**
LEUNZVC
cale Semiconductor,
Frees
Note:The definition of the E and U bits varies according to the scaling mode being
used. Refer to A.4 CONDITION CODE COMPUTATION for complete details.
Instruction Format:
ADC S,D
Opcode:
23874 30
DATA BUS MOVE FIELD
OPTIONAL EFFECTIVE ADDRESS EXTENSION
001J
d001
Instruction Fields:
S,DJ d
X,A0 0
X,B0 1
Y,A1 0
Y,B1 1
Timing: 2+mv oscillator clock cycles
Memory: 1+mv program words
MOTOROLADSP56000/DSP56001 USER’S MANUALA - 17
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ADDAddADD
Operation:Assembler Syntax:
S+D➞D (parallel moveADD S,D (parallel move)
Description: Add the source operand S to the destination operand D and store the
result in the destination accumulator. Words (24 bits), long words (48 bits), and accumulators (56 bits) may be added to the destination accumulator.
Note:The carry bit is set correctly using word or long-word source operands if the extension register of the destination accumulator (A2 or B2) is the sign extension of bit 47
nc...
I
of the destination accumulator (A or B). Thus, the carry bit is always set correctly using
accumulator source operands, but can be set incorrectly if A1, B1, A10, or B10 are used
as source operands and A2 and B2 are not replicas of bit 47.
cale Semiconductor,
Frees
Example:
:
ADD X0,A A,X1 A,Y:(R1)+l;24-bit add, set up X1, save prev. result
:
Before ExecutionAfter Execution
X0X0
AA
$00:000100:000000$00:0000FF:000000
$FFFFFF
$FFFFFF
Explanation of Example: Prior to execution, the 24-bit X0 register contains the value
$FFFFFF and the 56-bit A accumulator contains the value $00:000100:000000. The
ADD instruction automatically appends the 24-bit value in the X0 register with 24 LS
zeros, sign extends the resulting 48-bit long word to 56 bits, and adds the result to the
56-bit A accumulator. Thus, 24-bit operands are added to the MSP portion of A or B (A1
or B1) because all arithmetic instructions assume a fractional, twos complement data
representation. Note that 24-bit operands can be added to the LSP portion of A or B (A0
or B0) by loading the 24-bit operand into X0 or Y0, forming a 48-bit word by loading X1 or
Y1 with the sign extension of X0 or Y0 and executing an ADD X,A or ADD Y,A instruction.
Condition Codes:
1514131211109876543210
**
T
LF
A - 18DSP56000/DSP56001 USER’S MANUALMOTOROLA
S1S0I1I0
**
MRCCR
LEUNZVC
**
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ADDAddADD
L — Set if limiting (parallel move) or overflow has occurred in result
E — Set if the signed integer portion of A or B result is in use
U — Set if A or B result is unnormalized
N — Set if bit 55 of A or B result is set
Z — Set if A or B result equals zero
V — Set if overflow has occurred in A or B result
C — Set if a carry (or borrow) occurs from bit 55 of A or B result.
Note:The definition of the E and U bits varies according to the scaling mode being
nc...
I
used. Refer to A.4 CONDITION CODE COMPUTATION for complete details.
Timing: 2+mv oscillator clock cycles
Memory: 1+mv program words
0JJJ
d000
MOTOROLA DSP56000/DSP56001 USER’S MANUALA - 19
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ADDLShift Left and Add AccumulatorsADDL
Operation:Assembler Syntax:
S+2
∗D➞D (parallel move)ADDL S,D (parallel move)
Description: Add the source operand S to two times the destination operand D and
store the result in the destination accumulator. The destination operand D is arithmetically shifted one bit to the left, and a zero is shifted into the LS bit of D prior to the addition operation. The carry bit is set correctly if the source operand does not overflow as a
result of the left shift operation. The overflow bit may be set as a result of either the shifting or addition operation (or both). This instruction is useful for efficient divide and deci-
nc...
I
mation in time (DIT) FFT algorithms.
Example:
:
ADDL A,B #$0,R0;A+2
:
∗B➞B, set up addr. reg. R0
cale Semiconductor,
Frees
Before ExecutionAfter Execution
A
B
$00:000000:000123
$00:005000:000000$00:00A000:000123
A
B
$00:000000:000123
Explanation of Example: Prior to execution, the 56-bit accumulator contains the value
$00:000000:000123, and the 56-bit B accumulator contains the value
$00:005000:000000. The ADDL A,B instruction adds two times the value in the B accumulator to the value in the A accumulator and stores the 56-bit result in the B accumulator.
Condition Codes:
1514131211109876543210
LF
**
T
S1S0I1I0
**
MRCCR
**
LEUNZVC
L — Set if limiting (parallel move) or overflow has occurred in result
E — Set if the signed integer portion of A or B result is in use
U — Set if A or B result is unnormalized
N — Set if bit 55 of A or B result is set
Z— Set if A or B result equals zero
V — Set if overflow has occurred in A or B result or if the MS bit of the destination
operand is changed as a result of the instruction’s left shift
C — Set if a carry (or borrow) occurs from bit 55 of A or B result.
A - 20DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ADDLShift Left and Add AccumulatorsADDL
Note:The definition of the E and U bits varies according to the scaling mode being
used. Refer to A.4 CONDITION CODE COMPUTATION for complete details.
Instruction Format:
ADDL S,D
Opcode:
23874 30
DATA BUS MOVE FIELD
nc...
I
OPTIONAL EFFECTIVE ADDRESS EXTENSION
0001
d010
cale Semiconductor,
Frees
Instruction Fields:
S,Dd
B,A0
A,B1
Timing: 2+mv oscillator clock cycles
Memory: 1+mv program words
MOTOROLADSP56000/DSP56001 USER’S MANUALA - 21
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ADDRShift Right and Add AccumulatorsADDR
Operation:Assembler Syntax:
S+D / 2➞D (parallel move)ADDR S,D (parallel move)
Description: Add the source operand S to one-half the destination operand D and store
the result in the destination accumulator. The destination operand D is arithmetically
shifted one bit to the right while the MS bit of D is held constant prior to the addition operation. In contrast to the ADDL instruction, the carry bit is always set correctly, and the
overflow bit can only be set by the addition operation and not by an overflow due to the
initial shifting operation. This instruction is useful for efficient divide and decimation in
nc...
I
time (DIT) FFT algorithms.
Example:
:
ADDR B,A X0,X:(R1)+N1 Y0,Y:(R4)– ;B+A / 2➞A, save X0 and Y0
:
cale Semiconductor,
Frees
Before ExecutionAfter Execution
AA
BB
$80:000000:2468AC
$00:013570:000000$00:013570:000000
$C0:013570:123456
Explanation of Example: Prior to execution, the 56-bit A accumulator contains the
value $80:000000:2468AC, and the 56-bit B accumulator contains the value
$00:013570:000000. The ADDR B,A instruction adds one-half the value in the A accumulator to the value in the B accumulator and stores the 56-bit result in the A accumulator.
Condition Codes:
1514131211109876543210
LF
**
T
S1S0I1I0
**
MRCCR
LEUNZVC
**
L — Set if limiting (parallel move) or overflow has occurred in result
E — Set if the signed integer portion of A or B result is in use
U — Set if A or B result is unnormalized
N — Set if bit 55 of A or B result is set
Z— Set if A or B result equals zero
V — Set if overflow has occurred in A or B result
C — Set if a carry (or borrow) occurs from bit 55 of A or B result.
A - 22DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ADDRShift Right and Add AccumulatorsADDR
Note:The definition of the E and U bits varies according to the scaling mode being
used. Refer to A.4 CONDITION CODE COMPUTATION for complete details.
Instruction Format:
ADDR S,D
Opcode:
23874 30
DATA BUS MOVE FIELD
nc...
I
OPTIONAL EFFECTIVE ADDRESS EXTENSION
0000
d010
cale Semiconductor,
Frees
Instruction Fields:
S,D d
B,A0
A,B1
Timing: 2+mv oscillator clock cycles
Memory: 1+mv program words
Description: Logically AND the source operand S with bits 47–24 of the destination
operand D and store the result in bits 47–24 of the destination accumulator. This instruction is a 24-bit operation. The remaining bits of the destination operand D are not
affected.
•denotes the logical AND operator
nc...
I
cale Semiconductor,
Frees
Example:
:
AND X0,A (R5)–N5;AND X0 with A1, update R5 using N5
:
Before ExecutionAfter Execution
X0X0
AA
$00:123456:789ABC$00:120000:789ABC
$FF0000
$FF0000
Explanation of Example: Prior to execution, the 24-bit X0 register contains the value
$FF0000, and the 56-bit A accumulator contains the value $00:123456:789ABC. The
AND X0,A instruction logically ANDs the 24-bit value in the X0 register with bits 47–24 of
the A accumulator (A1) and stores the result in the A accumulator with bits 55–48 and
23–0 unchanged.
Condition Codes:
1514131211109876543210
LF
**
T
S1S0I1I0
**
MRCCR
**
LEUNZVC
L — Set if data limiting has occurred during parallel move
N — Set if bit 47 of A or B result is set
Z— Set if bits 47–24 of A or B result are zero
V — Always cleared
Instruction Format:
AND S,D
A - 24DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ANDLogical ANDAND
Opcode:
23874 30
DATA BUS MOVE FIELD
OPTIONAL EFFECTIVE ADDRESS EXTENSION
Instruction Fields:
SJ JD d
nc...
I
X,00 0A 0 (only A1 is changed)
X,11 0B 1 (only B1 is changed)
Y,00 1
Y,11 1
01JJ
d110
cale Semiconductor,
Frees
Timing: 2+mv oscillator clock cycles
Memory: 1+mv program words
MOTOROLADSP56000/DSP56001 USER’S MANUALA - 25
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ANDIAND Immediate with Control RegisterANDI
Operation:Assembler Syntax:
#xx
• D➞DAND(I) #xx,D
where
Description: Logically AND the 8-bit immediate operand (#xx) with the contents of the
destination control register D and store the result in the destination control register. The
condition codes are affected only when the condition code register (CCR) is specified as
the destination operand.
• denotes the logical AND operator
nc...
I
cale Semiconductor,
Frees
Restrictions:The ANDI #xx,MR instruction cannot be used immediately before an
ENDDO or RTI instruction and cannot be one of the last three instructions in a DO loop
(at LA-2, LA-1, or LA).
The ANDI #xx,CCR instruction cannot be used immediately before an RTI instruction.
Example:
:
AND #$FE,CCR;clear carry bit C in cond. code register
:
Before ExecutionAfter Execution
CCR
$31$30
CCR
Explanation of Example: Prior to execution, the 8-bit condition code register (CCR)
contains the value $31. The AND #$FE,CCR instruction logically ANDs the immediate 8bit value $FE with the contents of the condition code register and stores the result in the
condition code register.
Condition Codes:
1514131211109876543210
LF
**
T
S1S0I1I0
**
MRCCR
**
LEUNZVC
For CCR Operand:
L — Cleared if bit 6 of the immediate operand is cleared
E — Cleared if bit 5 of the immediate operand is cleared
U — Cleared if bit 4 of the immediate operand is cleared
N — Cleared if bit 3 of the immediate operand is cleared
Z— Cleared if bit 2 of the immediate operand is cleared
A - 26DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ANDIAND Immediate with Control RegisterANDI
V — Cleared if bit 1 of the immediate operand is cleared
C — Cleared if bit 0 of the immediate operand is cleared
For MR and OMR Operands: The condition codes are not affected using these operands.
Instruction Format:
AND(I) #xx,D
Opcode:
nc...
I
2316 158 70
00000000iiiiiiii101110EE
cale Semiconductor,
Frees
Instruction Fields:
#xx=8-bit Immediate Short Data — i i i i i i i i
DE E
MR0 0
CCR 0 1
OMR 1 0
Timing: 2 oscillator clock cycles
Memory: 1 program word
MOTOROLADSP56000/DSP56001 USER’S MANUALA - 27
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ASLArithmetic Shift Accumulator LeftASL
5547230
Operation:
C
0 (parallel move)
Assembler Syntax:ASL D (parallel move)
Description: Arithmetically shift the destination operand D one bit to the left and store
the result in the destination accumulator. The MS bit of D prior to instruction execution is
shifted into the carry bit C and a zero is shifted into the LS bit of the destination accumu-
nc...
I
lator D. If a zero shift count is specified, the carry bit is cleared. The difference between
ASL and LSL is that ASL operates on the entire 56 bits of the accumulator and therefore
sets the V bit if the number overflowed.
Example:
:
ASL A (R3)–;multiply A by 2, update R3
:
Before ExecutionAfter Execution
A
SRSR
$A5:012345:012345
$0300$0373
A
$4A:02468A:02468A
Explanation of Example: Prior to execution, the 56-bit A accumulator contains the
cale Semiconductor,
value $A5:012345:012345. The execution of the ASL A instruction shifts the 56-bit value
in the A accumulator one bit to the left and stores the result back in the A accumulator.
Condition Codes:
Frees
1514131211109876543210
LF
**
T
S1S0I1I0
**
MRCCR
**
LEUNZVC
L — Set if limiting (parallel move) or overflow has occurred in result
E — Set if the signed integer portion of A or B result is in use
U — Set if A or B result is unnormalized
N — Set if bit 55 of A or B result is set
Z— Set if A or B result equals zero
V — Set if bit 55 of A or B result is changed due to left shift
C — Set if bit 55 of A or B was set prior to instruction execution
A - 28DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ASLArithmetic Shift Accumulator LeftASL
Note:The definition of the E and U bits varies according to the scaling mode being
used. Refer to A.4 CONDITION CODE COMPUTATION for complete details.
Instruction Format:
ASL D
Opcode:
23874 30
DATA BUS MOVE FIELD
nc...
I
OPTIONAL EFFECTIVE ADDRESS EXTENSION
0011
d010
cale Semiconductor,
Frees
Instruction Fields:
Dd
A0
B1
Timing: 2+mv oscillator clock cycles
Memory: 1+mv program words
MOTOROLADSP56000/DSP56001 USER’S MANUALA - 29
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
ASRArithmetic Shift Accumulator RightASR
5547230
Operation:
Assembler Syntax:ASR D (parallel move)
Description: Arithmetically shift the destination operand D one bit to the right and store
the result in the destination accumulator. The LS bit of D prior to instruction execution is
shifted into the carry bit C, and the MS bit of D is held constant.
C (parallel move)
nc...
I
cale Semiconductor,
Frees
Example:
:
ASR B X:–(R3),R3;divide B by 2, update R3, load R3
:
Before ExecutionAfter Execution
BB
SRSR
$A8:A86420:A86421
$0300$0329
$D4:543210:543210
Explanation of Example: Prior to execution, the 56-bit B accumulator contains the
value $A8:A86420:A86421. The execution of the ASR B instruction shifts the 56-bit
value in the B accumulator one bit to the right and stores the result back in the B accumulator.
Condition Codes:
1514131211109876543210
LF
**
T
S1S0I1I0
**
MRCCR
**
LEUNZVC
L — Set if limiting (parallel move) or overflow has occurred in result
E — Set if the signed integer portion of A or B result is in use
U — Set if A or B result is unnormalized
N — Set if bit 55 of A or B result is set
Z— Set if A or B result equals zero
V — Always cleared
C — Set if bit 0 of A or B was set prior to instruction execution
Note: The definition of the E and U bits varies according to the scaling mode being used.
A - 30DSP56000/DSP56001 USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Loading...
+ 96 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.