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, the SHARC logo, EZ-ICE, and SHARC are
registered trademarks of Analog Devices, Inc.
VisualDSP++ is a trademark of Analog Devices, Inc.
All other brand and product names are trademarks or service marks of
their respective owners.
CONTENTS
PREFACE
For Additional Information About Analog Products ...................... -xiii
For Technical or Customer Support .............................................. -xiv
What’s This Book About and Who’s It For? ................................... -xiv
How to Use This Manual ............................................................. -xvi
Related Documents .................................................................... -xviii
Conventions of Notation .............................................................. -xix
The ADSP-21065L documentation set contains two manuals, the
ADSP-21065L SHARC DSP User’s Manual and the ADSP-21065L
SHARC DSP Technical Reference. These manuals are reference guides for
hardware and software engineers who want to develop applications using
the ADSP-21065L. These manuals assume that the user has a working
knowledge of the ADSP-21065L’s Super Harvard Architecture.
The ADSP-21065L SHARC DSP User’s Manual describes the architecture
and operation of the ADSP-21065L’s individual components, intercomponent connections and access, off-chip connections and access, and the
processor’s hardware/software interface.
xiv ADSP-21065L SHARC DSP Technical Reference
Preface
The information in this book includes:
•Pin definitions and instructions for connecting the pins to external
devices and peripherals in single- and multiprocessor systems.
•Processor features and instructions for configuring the processor for
specific operation options.
•Internal and external data paths and instructions for moving data
between internal components and between the processor and external devices and peripherals.
•Timing, sequencing, and throughput of control signals and data
accesses.
The ADSP-21065L SHARC DSP Technical Reference provides detailed
technical information on programming the ADSP-21065L. This information includes:
•A description of each instruction in the processor’s instruction set,
supported numeric formats, and the default bit definitions for all of
the processor’s control and status registers.
•A description of the pins and the control and data registers of the
JTAG test access port.
•A list of all vector interrupts and their addresses.
To supplement the information in these manuals, users can attend scheduled workshops sponsored by Analog Devices, Inc. (ADI) and access other
ADI documentation related specifically to this product. For details, see
“Related Documents” on page xviii.
ADSP-21065L SHARC DSP Technical Reference xv
How to Use This Manual
How to Use This Manual
For information on…See…
ALU operationChapter 2, Computation Units; Appendix B,
Compute Operation Reference
Address generationChapter 4, Data Addressing; Chapter 5, Mem-
ory; Chapter 6, DMA
BootingChapter 5, Memory; Chapter 7, System Design
Clock generationChapter 9, Serial Ports; Chapter 11, Pro-
grammable Timers and I/O Ports; Chapter 12,
System Design
an alphabetic prefix (as C-12) reference
information in ADSP-21065L SHARC DSP Techni-cal Reference. Pages with a numeric prefix
(as 5-41) reference information in
ADSP-21065L SHARC DSP User’s Manual.
Related Documents
For information on related products, see the following documents available from Analog Devices, Inc.:
The following conventions apply to all chapters within this manual. Additional conventions that apply to specific chapters only are documented at
the beginning of the chapter in which they appear.
This notation…Denotes…
Letter Gothic
font
ItalicsSpecial terminology; titles of books.
*
,
Code, software or command line options or keywords; input you must enter from the keyboard.
A hint or tip.
A warning or caution.
ADSP-21065L SHARC DSP Technical Reference xix
Conventions of Notation
xx ADSP-21065L SHARC DSP Technical Reference
AINSTRUCTION SET
REFERENCE
Figure A-0.
Table A-0.
Listing A-0.
Appendix A and B describe the processor’s instruction set. This appendix
explains each instruction type, including the assembly language syntax and
opcodes, which result from instruction assembly.
Many instructions’ opcodes contain a COMPUTE field that specifies a compute operation using the ALU, Multiplier, or Shifter. Because a large
number of options are available for computations, their descriptions
appear in Appendix B.
Because data moves between the MR registers and the Register File are
considered Multiplier operations, their descriptions appear in Appendix B.
ADSP-21065L SHARC DSP Technical Reference A-1
Instruction Summary
Instruction Summary
Each instruction is specified in this appendix. 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 its
opcode. The instruction types are organized into four groups:
•“Group I Instructions (Compute & Move)” on page A-28
These instruction specify a compute operation in parallel with one
or two data moves or an index register modify.
•“Group II Instructions (Program Flow Control)” on page A-44
These instructions specify various types of branches, calls, returns,
and loops. Some may also specify a compute operation or a data
move.
•“Group III Instructions (Immediate Move)” on page A-62
These instructions use immediate instruction fields as operators for
addressing.
•“Group IV Instructions (Miscellaneous)” on page A-70
These instructions include bit modify, bit test, no operation, and
idle.
The instructions are referred to by type, ranging from 1 to 23. These types
correspond to the opcodes that the processor recognizes, but are for reference only and have no bearing on programming.
Some instructions have more than one syntactical form; for example,
instruction “Compute/dregÙDM|PM, immediate modify (Type 4)” on
page A-35 has four distinct forms.
A-2 ADSP-21065L SHARC DSP Technical Reference
Instruction Set Reference
Many instructions can be conditional. These instructions are prefaced by
IF COND; for example:
If COND compute, |DM(Ia,Mb)| = ureg;
In a conditional instruction, the execution of the entire instruction is
based on the specified condition.
ADSP-21065L SHARC DSP Technical Reference A-3
Instruction Summary
Compute and Move/Modify Summary
Compute and move/modify instructions are classed as Group I instructions, and they provide math, conditional, memory or register access
services. For a complete description of these instructions, see the noted
pages.
*
For all compute and move/modify instructions, IF
COND is optional.
“Compute/uregÙDM|PM, register modify (Type 3)” on page A-33
IF COND compute, DM(Ia, Mb)= ureg ;
, PM(Ic, Md)
, DM(Mb, Ia)= ureg ;
, PM(Md, Ic)
, ureg =DM(Ia, Mb) ;
PM(Ic, Md) ;
, ureg =DM(Mb, Ia) ;
PM(Md, Ic) ;
A-4 ADSP-21065L SHARC DSP Technical Reference
Instruction Set Reference
“Compute/dregÙDM|PM, immediate modify (Type 4)” on page A-35
IF COND compute, DM(Ia, <data6>) = dreg ;
, PM(Ic, <data6>)
, DM(<data6>, Ia) = dreg ;
, PM(<data6>, Ic)
, dreg =DM(Ia, <data6>) ;
PM(Ic, <data6>) ;
, dreg =DM(<data6>, Ia) ;
PM(<data6>, Ic) ;
“Compute/uregÙureg (Type 5)” on page A-37
IF COND compute, ureg1 = ureg2 ;
“Immediate Shift/dregÙDM|PM (Type 6)” on page A-39
IF COND shiftimm, DM(Ia, Mb) = dreg ;
, PM(Ic, Md)
, dreg =DM(Ia, Mb) ;
PM(Ic, Md) ;
“Compute/modify (Type 7)” on page A-42
IF COND compute, MODIFY(Ia, Mb) ;
(Ic, Md) ;
ADSP-21065L SHARC DSP Technical Reference A-5
Instruction Summary
Program Flow Control Summary
Program flow control instructions are classed as Group II instructions,
and they provide control of program execution flow. For a complete
description of these instructions, see the noted pages.
*
instructions, IF COND is optional.
“Direct Jump|Call (Type 8)” on page A-45
For all program flow control instructions, except type 10
IF COND
JUMP
IF COND
CALL
<addr24>(DB);
(PC, <reladdr24>)(LA)
(CI)
(DB, LA)
(DB, CI)
<addr24>(DB);
(PC, <reladdr24>)
“Indirect Jump|Call / Compute (Type 9)” on page A-48
IF COND
JUMP
(Md, Ic)(DB), compute;
(PC, <reladdr6>)(LA), ELSE compute
(CI)
(DB, LA)
(DB, CI)
IF COND
CALL
(Md, Ic)(DB), compute;
(PC, <reladdr6>), ELSE compute
“Indirect Jump or Compute/dregÙDM (Type 10)” on page A-52
IF COND
Jump
(Md, Ic), Else compute, DM(Ia, Mb) = dreg ;
(PC, <reladdr6>compute, dreg = DM(Ia, Mb) ;
A-6 ADSP-21065L SHARC DSP Technical Reference
Instruction Set Reference
“Return From Subroutine|Interrupt/Compute (Type 11)” on page A-55
IF COND RTS(DB), compute;
(LR), ELSE compute
(DB, LR)
IF COND RTI(DB), compute;
, ELSE compute
“Do Until Counter Expired (Type 12)” on page A-58
LCNTR = <data16>, DO<addr24> UNTIL LCE ;
ureg(<PC, reladdr24>)
“Do Until (Type 13)” on page A-60
DO<addr24>UNTIL termination ;
(PC, <reladdr24>)
ADSP-21065L SHARC DSP Technical Reference A-7
Instruction Summary
Immediate Move Summary
Immediate move instructions are classed as Group III instructions, and
they provide memory and register access services. For a complete description of these instructions, see the noted pages.
“UregÙDM|PM (direct addressing) (Type 14)” on page A-63
DM(<addr32>)
PM(<addr24>)
ureg =DM(<addr32>) ;
= ureg ;
PM(<addr24>)
“UregÙDM|PM (indirect addressing) (Type 15)” on page A-65
DM(<data32>, Ia)
PM(<data24>, Ic)
ureg =DM(<data32>, Ia) ;
= ureg ;
PM(<data24>, Ic) ;
“Immediate dataÖDM|PM (Type 16)” on page A-67
DM(Ia, Mb)
PM(Ic, Md)
= <data32> ;
“Immediate dataÖureg (Type 17)” on page A-69
ureg = <data32> ;
A-8 ADSP-21065L SHARC DSP Technical Reference
Instruction Set Reference
Miscellaneous Instructions Summary
Miscellaneous instructions are classed as Group IV instructions, and they
provide system register, bit manipulation, and low power services. For a
complete description of these instructions, see the noted pages.
“System Register Bit Manipulation (Type 18)” on page A-71
BITSET sreg <data32> ;
CLR
TGL
TST
XOR
“Register Modify/bit-reverse (Type 19)” on page A-73
MODIFY(Ia, <data32>) ;
(Ic, <data24>)
BITREV(Ia, <data32>) ;
(Ic, <data24>)
“Push|Pop Stacks/Flush Cache (Type 20)” on page A-75