Tms320c67x Fast RTS Library User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
TMS320C67x FastRTS Library Programmer’s Reference SPRU100A October 2002 Printed on Recycled Paper IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed. TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of that third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Mailing Address: Texas Instruments Post Office Box 655303 Dallas, Texas 75265 Copyright 2002, Texas Instruments Incorporated Preface Read This First About This Manual Welcome to the TMS320C67x Fast Run-Time-Support Library, or FastRTS li- brary for short. The FastRTS library is a collection of 26 optimized floating- point math functions for the TMS320C67x device. This source code library includes C-callable (ANSI-C-language compatible) optimized versions of the floating-point math functions included in previous run-time-support libraries. How to Use This Manual The information in this document describes the contents of the TMS320C67x FastRTS library in several different ways. - Chapter 1 provides a brief introduction to the C67x FastRTS library, shows the organization of the routines contained in the library, and lists the fea- tures and benefits of the library. - Chapter 2 provides information on how to install, use, and rebuild the C67x FastRTS library. - Chapter 3 provides a quick overview of all FastRTS functions for easy ref- erence. The information shown for each function includes the name, a brief description, and a page reference for obtaining more detailed infor- mation. - Chapter 4 provides a list of the routines within the FastRTS library orga- nized into functional categories. The functions are listed in alphabetical or- der and include syntax, file defined in, description, functions called, and special cases. - Appendix A provides information about warranty issues, software up- dates, and customer support. Read This First iii RelatedNotational Documentation Conventions /From Related Texas Documentation Instruments From Texas Instruments Notational Conventions This document uses the following conventions: - Program listings, program examples, and interactive displays are shown in a special typeface. - In syntax descriptions, the function appears in a bold typeface and the parameters appear in plainface. - The TMS320C67x is also referred to in this reference guide as the C67x. Related Documentation From Texas Instruments The following books describe the TMS320C6x devices and related support tools. To obtain a copy of any of these TI documents, call the Texas Instru- ments Literature Response Center at (800) 477-8924. When ordering, please identify the book by its title and literature number. Many of these documents can be found on the Internet at http://www.ti.com. TMS320C62x/C67x Technical Brief (literature number SPRU197) gives an introduction to the TMS320C62x and TMS320C67x digital signal processors, development tools, and third-party support. TMS320C6000 CPU and Instruction Set Reference Guide (literature number SPRU189) describes the TMS320C6000 CPU architecture, instruction set, pipeline, and interrupts for these digital signal proces- sors. TMS320C6201/C6701 Peripherals Reference Guide (literature number SPRU190) describes common peripherals available on the TMS320C6201 and TMS320C6701 digital signal processors. This book includes information on the internal data and program memories, the external memory interface (EMIF), the host port interface (HPI), multi- channel buffered serial ports (McBSPs), direct memory access (DMA), enhanced DMA (EDMA), expansion bus, clocking and phase-locked loop (PLL), and the power-down modes. TMS320C6000 Programmer’s Guide (literature number SPRU198) describes ways to optimize C and assembly code for the TMS320C6000 DSPs and includes application program examples. TMS320C6000 Assembly Language Tools User’s Guide (literature number SPRU186) 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 the TMS320C6000 generation of devices. iv Related Documentation From Texas Instruments / Trademarks TMS320C6000 Optimizing Compiler User’s Guide (literature number SPRU187) describes the TMS320C6000 C compiler and the assembly optimizer. This C compiler accepts ANSI standard C source code and produces assembly language source code for the TMS320C6000 gen- eration of devices. The assembly optimizer helps you optimize your assembly code. TMS320C6000 Chip Support Library (literature number SPRU401) de- scribes a set of application programming interfaces (APIs) used to con- figure and control all on-chip peripherals. Trademarks The Texas Instruments logo and Texas Instruments are registered trademarks of Texas Instruments Incorporated. Trademarks of Texas Instruments include: TI, Code Composer Studio, TMS320, TMS320C6000, and TMS320C67x. Read This First v Contents Contents 1 Introduction . 1-1 Provides an introduction to the C67x FastRTS, shows the organization of the routines con- tained in the library, and explains the features and benefits of the library 1.1 Introduction to the C67x FastRTS Library. 1-2 1.2 Features and Benefits. 1-3 2 Installing and Using FastRTS. 2-1 Provides information on how to install and rebuild the FastRTS library 2.1 FastRTS Library Contents. 2-2 2.2 How to Install the FastRTS Library. 2-3 2.3 Using the FastRTS Library. 2-4 2.3.1 FastRTS Library Arguments and Data Types. 2-4 2.3.2 Calling a FastRTS Function From C. 2-5 2.3.3 Calling a FastRTS Function From Assembly. 2-5 2.4 How to Rebuild the FastRTS Library. 2-6 3 FastRTS Library Functions Tables. 3-1 Provides tables containing all IMGLIB functions, a brief description of each, and a page refer- ence for more detailed information. 3.1 Arguments and Conventions Used. 3-2 3.2 FastRTS Functions. 3-3 4 FastRTS Reference. 4-1 Provides a list of the functions in the Fast Run-Time-Support (FastRTS) Library organized al- phabetically in two functional categories. 4.1 General FastRTS Functions. 4-2 4.2 Divide and Square Root Routines. 4-19 A Performance Considerations. A-1 Describes performance considerations related to the C67x FastRTS and provides information about software updates and customer support issues. A.1 Performance Considerations. A-2 A.2 FastRTS Software Updates. A-3 A.3 FastRTS Customer Support. A-3 B Glossary . B-1 Defines terms and acronyms used in this book vii Tables Tables 1-1 FastRTS Library Functions. 1-2 2-1 FastRTS Data Types. 2-4 3-1 Argument Conventions. 3-2 3-2 FastRTS Function Names Comparison. 3-3 3-3 Divide and Square Root Floating-Point Functions. 3-4 A-1 Sample Performance. A-2 viii Notes, Cautions, and Warnings Notes, Cautions, and Warnings Adding FastRTS in Code Composer Studio. 2-5 recip Function . 4-15 recipf Function . 4-15 Contents ix Chapter 1 Introduction This chapter provides a brief introduction to the C67x Fast Run-Time-Support (FastRTS) Library, shows the organization of the routines contained in the FastRTS library, and lists the features and benefits of the FastRTS library. Topic Page 1.1 Introduction to the C67x FastRTS Library. 1-2 1.2 Features and Benefits. 1-3 1-1 Introduction to the C67x FastRTS