Analog Devices, Inc. reserves the right to change this product without
prior notice. Information furnished by Analog Devices is believed to be
accurate and reliable. However, no responsibility is assumed by Analog
Devices for its use; nor for any infringement of patents or other rights of
third parties which may result from its use. No license is granted by implication or otherwise under the patent rights of Analog Devices, Inc.
Trademark and Service Mark Notice
The Analog Devices logo, Blackfin, EZ-KIT Lite, SHARC, TigerSHARC,
and VisualDSP++ are registered trademarks of Analog Devices, Inc.
All other brand and product names are trademarks or service marks of
their respective owners.
CONTENTS
PREFACE
Purpose of This Manual ................................................................ xiii
Intended Audience ........................................................................ xiii
Manual Contents ........................................................................... xiv
What’s New in This Manual ............................................................ xv
Technical or Customer Support ....................................................... xv
Supported Processors ...................................................................... xvi
Product Information ..................................................................... xvii
MyAnalog.com ........................................................................ xvii
Processor Product Information ................................................ xviii
Related Documents .................................................................. xix
Online Technical Documentation ............................................. xix
Accessing Documentation From VisualDSP++ ....................... xx
Accessing Documentation From Windows ............................. xx
Accessing Documentation From the Web .............................. xxi
Printed Manuals ....................................................................... xxi
VisualDSP++ Documentation Set ........................................ xxii
Type 1: Compute | DregX«···DM | DregY«···PM ......................... 8-17
Type 3: Dreg/Ireg/Mreg «···» DM/PM ......................................... 8-18
Type 4: Compute | Dreg «···» DM ............................................... 8-19
Type 6: Dreg «··· Data16 ............................................................. 8-20
Type 7: Reg1/2 «··· Data16 ......................................................... 8-21
Type 8: Compute | Dreg1 «··· Dreg2 ........................................... 8-22
Type 9: Compute ........................................................................ 8-23
Type 9a: Compute ...................................................................... 8-26
Type 10: Direct Jump ................................................................. 8-28
Type 10a: Direct Jump/Call ........................................................ 8-29
Type 11: Do ··· Until .................................................................. 8-30
xADSP-219x DSP Instruction Set Reference
CONTENTS
Type 12: Shift | Dreg «···» DM .................................................... 8-31
Type 14: Shift | Dreg1 «··· Dreg2 ................................................. 8-32
Type 15: Shift Data8 ................................................................... 8-33
Type 16: Shift Reg0 .................................................................... 8-34
Type 17: Any Reg «···Any Reg ..................................................... 8-35
Type 18: Mode Change ............................................................... 8-36
Type 19: Indirect Jump/Call ........................................................ 8-37
Type 20: Return .......................................................................... 8-38
Type 21: Modify DagI ................................................................. 8-39
Type 21a: Modify DagI ............................................................... 8-40
Type 22: DM «··· Data16 ............................................................ 8-41
Type 22a: PM «··· Data24 ............................................................ 8-42
Type 23: Divide primitive, DIVQ ................................................ 8-43
Type 24: Divide primitive, DIVS ................................................. 8-44
Type 25: Saturate ........................................................................ 8-45
Type 26:Push/Pop/Cache ............................................................ 8-46
Type 29: Dreg «···» DM .............................................................. 8-47
Type 30: NOP ............................................................................ 8-48
Type 31: Idle ............................................................................... 8-49
Type 32: Any Reg «···» PM/DM .................................................. 8-50
Type 32a: DM«···DAG Reg | DAG Reg«···Ireg ............................. 8-51
Type 33: Reg3 «··· Data12 ........................................................... 8-52
Type 34: Dreg «···» IOreg ............................................................ 8-53
Type 35: Dreg «···»Sreg ............................................................... 8-54
ADSP-219x DSP Instruction Set Referencexi
CONTENTS
Type 36: Long Jump/Call ........................................................... 8-55
Type 37: Interrupt ...................................................................... 8-56
INDEX
xiiADSP-219x DSP Instruction Set Reference
PREFACE
Thank you for purchasing and developing systems using ADSP-219x
DSPs from Analog Devices.
Purpose of This Manual
The ADSP-219x DSP Instruction Set Reference provides assembly syntax
information for ADSP-219x DSPs. The syntax descriptions cover instructions that execute within the DSP’s processor core (processing elements,
program sequencer, and data address generators). For architecture and
design information on the DSP, see the ADSP-219x/2192 DSP Hardware Reference.
Intended Audience
The primary audience for this manual is a programmer who is familiar
with Analog Devices processors. This manual assumes that the audience
has a working knowledge of the appropriate processor architecture and
instruction set. Programmers who are unfamiliar with Analog Devices
processors can use this manual, but should supplement it with other texts
(such as the appropriate hardware reference manuals and data sheets) that
describe your target architecture.
ADSP-219x DSP Instruction Set Referencexiii
Manual Contents
Manual Contents
This reference presents instruction information organized by the type of
the instruction. Instruction types relate to the machine language opcode
for the instruction. On this DSP, the opcodes categorize the instructions
by the portions of the DSP architecture that execute the instructions. The
following chapters cover the different types of instructions.
•“Instruction Set Summary” on page 1-1—This chapter provides a
syntax summary of all instructions and describes the conventions
that are used on the instruction reference pages.
•“ALU Instructions” on page 2-1—These instruction specify opera-
tions that occur in the DSP’s ALU.
•“MAC Instructions” on page 3-1—These instructions specify operations that occur in the DSP’s Shifter.
•“Shifter Instructions” on page 4-1—These instructions specify
operations that occur in the DSP’s Shifter.
•“Multifunction Instructions” on page 5-1—These instructions
specify parallel, single-cycle operations.
•“Data Move Instructions” on page 6-1—These instructions specify
memory and register access operations.
•“Program Flow Instructions” on page 7-1—These instructions
specify program sequencer operations.
•“Instruction Opcodes” on page 8-1—This chapter lists the instruction encoding fields for all instructions.
Each of the DSP’s instructions is specified in this text. The reference page
for an instruction shows the syntax of the instruction, describes its function, gives one or two assembly-language examples, and identifies fields of
xivADSP-219x DSP Instruction Set Reference
Preface
its opcode. The instructions are referred to by type, ranging from 1 to 37.
These types correspond to the opcodes that ADSP-219x DSPs recognize,
but are for reference only and have no bearing on programming.
Some instructions have more than one syntactical form; for example, the
instruction “Type 9: Compute” on page 8-23 has many distinct forms.
Many instructions can be conditional. These instructions are prefaced by
IF COND; for example:
If COND compute;
In a conditional instruction, the execution of the entire instruction is
based on the specified condition.
What’s New in This Manual
Revision 2.0 of the ADSP-219x DSP Instruction Set Reference corrects all
known document errata issues.
L
This instruction set reference is a companion document to the
ADSP-219x/2192 DSP Hardware Reference (Rev 1.1, April 2004).
Technical or Customer Support
You can reach Analog Devices, Inc. Customer Support in the following
ways:
•Visit the Embedded Processing and DSP products Web site at
•Contact your Analog Devices, Inc. local sales office or authorized
distributor
•Send questions by mail to:
Analog Devices, Inc.
One Technology Way
P.O. Box 9106
Norwood, MA 02062-9106
USA
Supported Processors
The following is the list of Analog Devices, Inc. processors supported in
VisualDSP++®.
TigerSHARC® (ADSP-TSxxx) Processors
The name TigerSHARC refers to a family of floating-point and fixed-point
[8-bit, 16-bit, and 32-bit] processors. VisualDSP++ currently supports the
following TigerSHARC families: ADSP-TS101 and ADSP-TS20x.
SHARC® (ADSP-21xxx) Processors
The name SHARC refers to a family of high-performance, 32-bit,
floating-point processors that can be used in speech, sound, graphics, and
imaging applications. VisualDSP++ currently supports the following
SHARC families: ADSP-2106x, ADSP-2116x, ADSP-2126x, and
ADSP-2136x.
xviADSP-219x DSP Instruction Set Reference
Blackfin® (ADSP-BFxxx) Processors
The name Blackfin refers to a family of 16-bit, embedded processors.
VisualDSP++ currently supports the following Blackfin families:
ADSP-BF53x and ADSP-BF56x.
ADSP-21xx Processors
The ADSP-21xx processors are high-performance 16-bit DSPs for communications, instrumentation, industrial/control, voice/speech, medical
and military applications. The family includes the ADSP-218x,
ADSP-219x, and mixed-signal products (ADSP-21990, ADSP-21991,
and ADSP-21992).
Product Information
You can obtain product information from the Analog Devices Web site,
from the product CD-ROM, or from the printed publications (manuals).
Preface
Analog Devices is online at www.analog.com. Our Web site provides information about a broad range of products—analog integrated circuits,
amplifiers, converters, and digital signal processors.
MyAnalog.com
MyAnalog.com is a free feature of the Analog Devices Web site that allows
customization of a Web page to display only the latest information on
products you are interested in. You can also choose to receive weekly
e-mail notifications containing updates to the Web pages that meet your
interests. MyAnalog.com provides access to books, application notes, data
sheets, code examples, and more.
ADSP-219x DSP Instruction Set Referencexvii
Product Information
Registration
Visit
www.myanalog.com to sign up. Click Register to use MyAnalog.com.
Registration takes about five minutes and serves as a means to select the
information you want to receive.
If you are already a registered user, just log on. Your user name is your
e-mail address.
Processor Product Information
For information on embedded processors and DSPs, visit our Web site at
www.analog.com/processors, which provides access to technical publica-
tions, data sheets, application notes, product overviews, and product
announcements.
You may also obtain additional information about Analog Devices and its
products in any of the following ways.
Online documentation comprises the VisualDSP++ Help system, software
tools manuals, hardware tools manuals, processor manuals, the Dinkum
Abridged C++ library, and Flexible License Manager (FlexLM) network
license manager software documentation. You can easily search across the
entire VisualDSP++ documentation set for any topic of interest. For easy
printing, supplementary .PDF files of most manuals are also provided.
ADSP-219x DSP Instruction Set Referencexix
Product Information
Each documentation file type is described as follows.
File Description
.CHMHelp system files and manuals in Help format
.HTM or
.HTML
.PDFVisualDSP++ and processor manuals in Portable Documentation Format (PDF).
Dinkum Abridged C++ library and FlexLM network license manager software documentation. Viewing and printing the
Internet Explorer 4.0 (or higher).
Viewing and printing the .PDF files requires a PDF reader, such as Adobe Acrobat
Reader (4.0 or higher).
.HTML files requires a browser, such as
If documentation is not installed on your system as part of the software
installation, you can add it from the VisualDSP++ CD-ROM at any time
by running the Tools installation. Access the online documentation from
the VisualDSP++ environment, Windows® Explorer, or the Analog
Devices Web site.
Accessing Documentation From VisualDSP++
From the VisualDSP++ environment:
•Access VisualDSP++ online Help from the Help menu’s Contents, Search, and Index commands.
•Open online Help from context-sensitive user interface items (toolbar buttons, menu commands, and windows).
Accessing Documentation From Windows
In addition to any shortcuts you may have constructed, there are many
ways to open VisualDSP++ online Help or the supplementary documentation from Windows.
xxADSP-219x DSP Instruction Set Reference
Preface
Help system files (.
CHM) are located in the Help folder, and .PDF files are
located in the Docs folder of your VisualDSP++ installation CD-ROM.
The Docs folder also contains the Dinkum Abridged C++ library and the
FlexLM network license manager software documentation.
Using Windows Explorer
•Double-click the vdsp-help.chm file, which is the master Help system, to access all the other .CHM files.
•Double-click any file that is part of the VisualDSP++ documentation set.
Using the Windows Start Button
•Access VisualDSP++ online Help by clicking the Start button and
choosing Programs, Analog Devices, VisualDSP++, and
VisualDSP++ Documentation.
•Access the .PDF files by clicking the Start button and choosing
Programs, Analog Devices, VisualDSP++, Documentation for
Printing, and the name of the book.
Select a processor family and book title. Download archive (.ZIP) files, one
for each manual. Use any archive management software, such as WinZip,
to decompress downloaded files.
Printed Manuals
For general questions regarding literature ordering, call the Literature
Center at 1-800-ANALOGD (1-800-262-5643) and follow the prompts.
ADSP-219x DSP Instruction Set Referencexxi
Product Information
VisualDSP++ Documentation Set
To purchase VisualDSP++ manuals, call 1-603-883-2430. The manuals
may be purchased only as a kit.
If you do not have an account with Analog Devices, you are referred to
Analog Devices distributors. For information on our distributors, log onto
http://www.analog.com/salesdir.
Hardware Tools Manuals
To purchase EZ-KIT Lite® and In-Circuit Emulator (ICE) manuals, call
1-603-883-2430. The manuals may be ordered by title or by product
number located on the back cover of each manual.
Processor Manuals
Hardware reference and instruction set reference manuals may be ordered
through the Literature Center at 1-800-ANALOGD (1-800-262-5643),
or downloaded from the Analog Devices Web site. Manuals may be
ordered by title or by product number located on the back cover of each
manual.
Data Sheets
All data sheets (preliminary and production) may be downloaded from the
Analog Devices Web site. Only production (final) data sheets (Rev. 0, A,
B, C, and so on) can be obtained from the Literature Center at
1-800-ANALOGD (1-800-262-5643); they also can be downloaded from
the Web site.
To have a data sheet faxed to you, call the Analog Devices Faxback System
at 1-800-446-6212. Follow the prompts and a list of data sheet code
numbers will be faxed to you. If the data sheet you want is not listed,
check for it on the Web site.
xxiiADSP-219x DSP Instruction Set Reference
Conventions
Text conventions used in this manual are identified and described as
follows.
ExampleDescription
Preface
Close command
(File menu)
{this | that}Alternative items in syntax descriptions appear within curly brackets and
[this | that]Optional items in syntax descriptions appear within brackets and separated
[this,…]Optional item lists in syntax descriptions appear within brackets delimited
.SECTIONCommands, directives, keywords, and feature names are in text with let-
filenameNon-keyword placeholders appear in text with italic style format.
L
a
Titles in reference sections indicate the location of an item within the
VisualDSP++ environment’s menu system (for example, the Close command appears on the File menu).
separated by vertical bars; read the example as this or that. One or the
other is required.
by vertical bars; read the example as an optional
by commas and terminated with an ellipse; read the example as an optional
comma-separated list of this.
ter gothic font.
Note: For correct operation, ...
A Note: provides supplementary information on a related topic. In the
online version of this book, the word Note appears instead of this symbol.
Caution: Incorrect device operation may result if ...
Caution: Device damage may result if ...
A Caution: identifies conditions or inappropriate usage of the product that
could lead to undesirable results or product damage. In the online version of
this book, the word Caution appears instead of this symbol.
this or that.
Warn in g: Injury to device users may result if ...
[
A Warning: identifies conditions or inappropriate usage of the product that
could lead to conditions that are potentially hazardous for devices users. In
the online version of this book, the word War ni ng appears instead of this
symbol.
ADSP-219x DSP Instruction Set Referencexxiii
Preface
L
Additional conventions, which apply only to specific chapters, may
appear throughout this document.
ADSP-219x DSP Instruction Set Referencexxiv
1INSTRUCTION SET SUMMARY
This chapter provides a summary of the instructions in the ADSP-219x
DSP’s instruction set. Chapters 2 through 8 describe these instructions in
more detail as follows:
•“ALU Instructions” on page 2-1
•“MAC Instructions” on page 3-1
•“Shifter Instructions” on page 4-1
•“Multifunction Instructions” on page 5-1
•“Data Move Instructions” on page 6-1
•“Program Flow Instructions” on page 7-1
•“Instruction Opcodes” on page 8-1
Also, this chapter identifies mnemonics for using DSP registers, bits, and
operating conditions. This information appears in the following
summaries:
•“Core Registers Summary” on page 1-2
•“Arithmetic Status (ASTAT) Register” on page 1-3
•“Condition Code (CCODE) Register” on page 1-5
•“Interrupt Control (ICNTL) Register” on page 1-6
•“Interrupt Mask (IMASK) Register and Interrupt Latch (IRPTL)
Register” on page 1-7
ADSP-219x DSP Instruction Set Reference1-1
Core Registers Summary
•“Mode Status (MSTAT) Register” on page 1-8
•“System Status (SSTAT) Register” on page 1-10
•“Condition Codes Summary” on page 1-11
For information on instruction reference notation, see “Conventions” on
page xxiii.
Core Registers Summary
The DSP has three categories of registers: core registers, system control
registers, and I/O registers. Table 1-1 lists and describes the DSP’s core
registers. For information about system control and I/O registers, see the
ADSP-219x/2192 DSP Hardware Reference.
Table 1-1. Core Registers
TypeRegistersFunction
ALU dataAX0, AX1, AY0, AY1,
AR, AF
Multiplier dataMX0, MX1, MY0, MY1,
MR0, MR1, MR2
Shifter dataSI, SE, SB, SR0, SR1, SR2
DAG addressI0, I1, I2, I3
I4, I5, I6, I7
M0, M1, M2, M3
M4, M5, M6, M7
L0, L1, L2, L3
L4, L5, L6, L7
16-bit data registers (X and Y) provide input
for ALU, multiplier, and shifter operations.
AR and AF are ALU result and feedback registers. MR and SR are multiplier result and feedback registers. SR also is the shifter results
register.
In this text, Dreg denotes unrestricted use of
data registers as a data register file, while “
XOP” and “YOP” denote restricted use.
The data registers (except AF, SE, and SB) serve
as a register file for unconditional, single-function instructions.
DAG1 index registers
DAG2 index registers
DAG1 modify registers
DAG2 modify registers
DAG1 length registers
DAG2 length registers
1-2ADSP-219x DSP Instruction Set Reference
Table 1-1. Core Registers (Cont’d)
TypeRegistersFunction
Instruction Set Summary
System controlB0, B1, B2, B3, B4, B5,
B6, B7, SYSCTL, CACTL
Program flowCCODE
LPSTACKA
LPSTACKP
STACKA
STACKP
InterruptICNTL
IMASK
IRPTL
StatusASTAT
MSTAT
SSTAT (read-only)
PageDMPG1
DMPG2
IJPG
IOPG
Bus exchangePXHolds eight LSBs of 24-bit memory data for
ShifterSE
SB
DAG1 base address registers (B0-3), DAG2
base address registers (B4-7), System control,
and Cache control
Software condition register
Loop PC stack A register, 16 address LSBs
Loop PC stack P register, 8 address MSBs
PC stack A register, 16 address LSBs
PC stack P register, 8 address MSBs
Interrupt control register
Interrupt mask register
Interrupt latch register
Arithmetic status flags
Mode control and status flags
System status
The DSP updates the status bits in ASTAT, indicating the status of the
most recent ALU, multiplier, or shifter operation.
ADSP-219x DSP Instruction Set Reference1-3
Arithmetic Status (ASTAT) Register
Table 1-2. ASTAT Register Bit Definitions
BitNameDescription
0AZALU result zero. Logical NOR of all bits written to the ALU result register
(AR) or ALU feedback register (AF).
0 =ALU output ≠ 0
1 =ALU output = 0
1ANALU result negative. Sign of the value written to the ALU result register
(AR) or ALU feedback register (AF).
0 =ALU output positive (+)
1 =ALU output negative (−)
2AVALU result overflow.
0 =No overflow
1 =Overflow
3ACALU result carry.
0 =No carry
1 =Carry
4AS ALU x input sign. Sign bit of the ALU x-input operand; set by the ABS
instruction only.
0 =Positive (+)
1 =Negative (−)
5AQALU quotient. Sign of the resulting quotient; set by the DIVS or DIVQ
instructions.
0 =Positive (+)
1 =Negative (−)
6MVMultiplier overflow. Records overflow/underflow condition for MR result
register.
0 =No overflow or underflow
1 =Overflow or underflow
7SSShifter input sign. Sign of the shifter input operand.
0 =Positive (+)
1 =Negative (−)
8SVShifter overflow. Records overflow/underflow condition for SR result reg-
ister.
0 =No overflow or underflow
1 =Overflow or underflow
1-4ADSP-219x DSP Instruction Set Reference
Instruction Set Summary
Condition Code (CCODE) Register
Using the CCODE register (shown in Table 1-3), conditional instructions
may base execution on a comparison of the CCODE value (user-selected) and
the SWCOND condition (DSP status). The CCODE register holds a value
between 0x0 and 0xF, which the instruction tests against when the conditional instruction uses SWCOND or NOT SWCOND. Note that the CCODE register
has a one-cycle effect latency.
Table 1-3. CCODE Register Bit Definitions
CCODESoftware Condition
ValueSWCOND (1010)NOT SWCOND (1011)
0x00PF0 pin highPF0 pin low
0x01PF1 pin highPF1 pin low
0x02PF2 pin highPF2 pin low
0x03PF3 pin highPF3 pin low
0x04PF4 pin highPF4 pin low
0x05PF5 pin highPF5 pin low
0x06PF6 pin highPF6 pin low
0x07PF7 pin highPF7 pin low
0x08ASNOT AS
0x09SVNOT SV
0x0APF8 pin highPF8 pin low
0x0BPF9 pin highPF9 pin low
0x0CPF10 pin highPF10 pin low
0x0DPF11 pin highPF11 pin low
0x0EPF12 pin highPF12 pin low
0x0FPF13 pin highPF13 pin low
ADSP-219x DSP Instruction Set Reference1-5
Interrupt Control (ICNTL) Register
Interrupt Control (ICNTL) Register
Refer to Table 1-4 for ICNTL register bit definitions.
Table 1-4. ICNTL Register Bit Definitions
BitNameDescription
0reservedwrite 0
1reservedwrite 0
2reservedwrite 0
3reservedwrite 0
4INEInterrupt nesting enable.
0 =Disabled
1 =Enabled
5GIEGlobal interrupt enable.
0 =Disabled
1 =Enabled
6reservedwrite 0
7BIASRNDMAC biased rounding mode.
0 =Disabled
1 =Enabled
8-9reservedwrite 0
10PCSTKEPC stack interrupt enable.
0 =Disabled
1 =Enabled
11EMUCNTEEmulator cycle counter interrupt enable.
0 =Disabled
1 =Enabled
12-15reservedwrite 0
1-6ADSP-219x DSP Instruction Set Reference
Loading...
+ 358 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.