Tms320c55x V3.X DSP Algebraic Instruction Set
Total Page:16
File Type:pdf, Size:1020Kb
C55x v3.x CPU Algebraic Instruction Set Reference Guide Literature Number: SWPU068E June 2009 Preface Read This First About This Manual The C55x™ is a fixed-point digital signal processor (DSP) in the TMS320™ DSP family, and it can use either of two forms of the instruction set: a mnemonic form or an algebraic form. This book is a reference for the algebraic form of the instruction set. It contains information about the instructions used for all types of operations. For information on the mnemonic instruction set, see C55x v3.x CPU Mnemonic Instruction Set Reference Guide, SWPU067. This release is updated with the 3.0 Revision of the TMS320C55x DSP. Infor- mation not affected by the revision remains identical to the previous manual. The main new features of this revision are: - Relaxed parallelism restrictions: Total size of both instructions may be up to 8 bytes. Constant buses (KAB and KDB) are no longer a source of conflict. - New instructions: lsmf 36 dual mac instructions with double coefficient features MPY, MAC, and MAS instructions with unsigned coefficients lock iii Notational Conventions Notational Conventions This book uses the following conventions. - In syntax descriptions, the instruction is in a bold typeface. Portions of a syntax in bold must be entered as shown. Here is an example of an instruction syntax: lms(Xmem, Ymem, ACx, ACy) lms is the instruction, and it has four operands: Xmem, Ymem, ACx, and ACy. When you use lms, the operands should be actual dual data- memory operand values and accumulator values. A comma and a space (optional) must separate the four values. - Square brackets, [ and ], identify an optional parameter. If you use an optional parameter, specify the information within the brackets; do not type the brackets themselves. iv Related DocumentationRelated Documentation From Texas Instruments From Texas / TrademarksInstruments Related Documentation From Texas Instruments The following books describe the C55x™ devices and related support tools. To obtain a copy of any of these TI documents, call the Texas Instruments Literature Response Center at (800) 477-8924. When ordering, please identify the book by its title and literature number. TMS320C55x Technical Overview (SPRU393). This overview is an introduction to the TMS320C55x™ digital signal processor (DSP). The TMS320C55x is the latest generation of fixed-point DSPs in the TMS320C5000™ DSP platform. Like the previous generations, this processor is optimized for high performance and low-power operation. This book describes the CPU architecture, low-power enhancements, and embedded emulation features of the TMS320C55x. C55x CPU Reference Guide (literature number SWPU073) describes the architecture, registers, and operation of the CPU for the TMS320C55x™ digital signal processors (DSPs). C55x CPU Mnemonic Instruction Set Reference Guide (literature number SWPU067) describes the mnemonic instructions individually. It also includes a summary of the instruction set, a list of the instruction opcodes, and a cross-reference to the algebraic instruction set. TMS320C55x Programmer’s Guide (literature number SPRU376) describes ways to optimize C and assembly code for the TMS320C55x™ DSPs and explains how to write code that uses special features and instructions of the DSP. TMS320C55x Optimizing C Compiler User’s Guide (literature number SPRU281) describes the TMS320C55x™ C Compiler. This C compiler accepts ANSI standard C source code and produces assembly language source code for TMS320C55x devices. TMS320C55x Assembly Language Tools User’s Guide (literature number SPRU280) describes the assembly language tools (assembler, linker, and other tools used to develop assembly language code), assembler directives, macros, common object file format, and symbolic debugging directives for TMS320C55x™ devices. Trademarks TMS320, TMS320C54x, TMS320C55x, C54x, and C55x are trademarks of Texas Instruments. v vi Contents Contents 1 Terms, Symbols, and Abbreviations. 1-1 Lists and defines the terms, symbols, and abbreviations used in the TMS320C55x DSP algebraic instruction set summary and in the individual instruction descriptions. 1.1 Instruction Set Terms, Symbols, and Abbreviations. 1-2 1.2 Instruction Set Conditional (cond) Fields. 1-7 1.3 Affect of Status Bits. 1-9 1.3.1 Accumulator Overflow Status Bit (ACOVx). 1-9 1.3.2 C54CM Status Bit. 1-9 1.3.3 CARRY Status Bit. 1-9 1.3.4 FRCT Status Bit. 1-9 1.3.5 INTM Status Bit. 1-9 1.3.6 M40 Status Bit. 1-10 1.3.7 RDM Status Bit. 1-12 1.3.8 SATA Status Bit. 1-12 1.3.9 SATD Status Bit. 1-13 1.3.10 SMUL Status Bit. 1-13 1.3.11 SXMD Status Bit. 1-13 1.3.12 Test Control Status Bit (TCx). 1-13 1.4 Instruction Set Notes and Rules. 1-14 1.4.1 Notes. 1-14 1.4.2 Rules. 1-14 1.5 Nonrepeatable Instructions. 1-20 2 Parallelism Features and Rules. 2-1 Describes the parallelism features and rules of the TMS320C55x DSP algebraic instruction set. 2.1 Parallelism Features. 2-2 2.2 Parallelism Basics. 2-3 2.3 Resource Conflicts. 2-4 2.3.1 Operators. 2-4 2.3.2 Address Generation Units. 2-4 2.3.3 Buses. 2-5 2.4 Soft-Dual Parallelism. 2-5 2.4.1 Soft-Dual Parallelism of MAR Instructions. 2-6 2.5 Execute Conditionally Instructions. 2-6 2.6 Other Exceptions. 2-7 vii Contents 3 Introduction to Addressing Modes. 3-1 Provides an introduction to the addressing modes of the TMS320C55x DSP. 3.1 Introduction to the Addressing Modes. 3-2 3.2 Absolute Addressing Modes. 3-3 3.2.1 k16 Absolute Addressing Mode. 3-3 3.2.2 k23 Absolute Addressing Mode. 3-3 3.2.3 I/O Absolute Addressing Mode. 3-3 3.3 Direct Addressing Modes. 3-4 3.3.1 DP Direct Addressing Mode. 3-4 3.3.2 SP Direct Addressing Mode. 3-5 3.3.3 Register-Bit Direct Addressing Mode. 3-5 3.3.4 PDP Direct Addressing Mode. 3-5 3.4 Indirect Addressing Modes. 3-6 3.4.1 AR Indirect Addressing Mode. 3-6 3.4.2 Dual AR Indirect Addressing Mode. 3-14 3.4.3 CDP Indirect Addressing Mode. 3-16 3.4.4 Coefficient Indirect Addressing Mode. 3-19 3.5 Circular Addressing. 3-21 4 Instruction Set Summary. 4-1 Provides a summary of the TMS320C55x DSP algebraic instruction set. 5 Instruction Set Descriptions. 5-1 Detailed information on the TMS320C55x DSP algebraic instruction set. Absolute Distance (abdst). 5-2 Absolute Value . 5-4 Addition . 5-7 Addition with Absolute Value. 5-27 Addition with Parallel Store Accumulator Content to Memory. 5-29 Addition or Subtraction Conditionally (adsc). ..