MATHLIB User's Manual (c66x)
Release 3.0.1.1
- Introduction
to MATHLIB
- Getting
Started
- MATHLIB
Usage Examples
- Integration
The Texas
Instruments MATHLIB library is an optimized floating-point math function library
for C programmers using TI floating point devices. These routines are typically
used in computationally intensive real-time applications where optimal execution
speed is critical. By using these routines instead of the routines found in the
existing run-time-support libraries, you can achieve execution speeds
considerably faster without rewriting existing code. The MATHLIB library
includes all floating-point math routines currently provided in existing
run-time-support libraries. These new functions can be called with the current
run-time-support library names or the new names included in the MATHLIB library.
The TI c66x
MATHLIB contains commonly used floating point math routines, as well as source
code that allows you to modify functions to match your specific needs.
- ANSI C source code models
- C-callable routines fully compatible with the TI C6000 compiler
- Host library to enable PC based development and testing
- CCS v4 projects to rebuild library or individual routines unit test.
- Benchmarks (cycles)
- Tested against reference C model
- Unit-test for each routines.
The rich set of
software routines included in MATHLIB are organized into two categories:
- Single precision floating point
- Double precision floating point
For detailed descriptions of each MATHLIB function see the MATHLIB
Function Reference.
Unless otherwise
specified, the MATHLIB package installs under C:\Program Files\Texas
Instruments\ in directory mathlib_c66x_3_0_1_1 . The
directory structure of the installed package will look similar to that displayed
below in Figure 1, though the release notes will match the installation version.
Figure 1. c66x MATHLIB Directory Structure
|
The files that comprise the MATHLIB installation can be categorized into the
following seven categories:
- Documentation
- Repository
- Kernel Source
- Include Directory
- Library Directory
- Eclipse Support
- Internal Meta Data
Installation places all
MATHLIB documentation in a Docs directory in the MATHLIB
root. The following documentation comes with the delivery:
- mathlib_c66x_3_0_1_1_release_notes.html
- docs/MATHLIB_Users_Manual.chm
- docs/MATHLIB_Users_Manual.html
- docs/MATHLIB_Software_Manifest.html
- Note:
- Files and paths are relative to the MATHLIB root installation
directory
The
installation creates a Components directory in the MATHLIB
root folder. This directory serves as a repository for all packages included in
the MATHLIB installation. Each package in this repository is compressed.
The installation also
creates a Packages directory in the MATHLIB root folder.
This directory holds all kernels contained within the MATHLIB library. This
directory follows the standard TI directory structure. As an example, the files
that comprise the MATHLIB kernel atandp will be located,
relative to the MATHLIB root installation directory, at
packages/ti/mathlib/src/atandp/.
Each Kernel is delivered with a pre-compiled CCSv4 project that illustrates
the kernel API and performs several validation tests. Each project provides an
estimate of kernel cycle and program memory requirements.
The
Include directory contains the main API header file for
MATHLIB.
The
Library directory will contain all libraries required to
integrate MATHLIB into a system.
MATHLIB Library Reference
| Library Name |
Target |
Object type |
Endianess
|
| mathlib.ae66 |
C66x DSP |
ELF |
Little |
| mathlib.ae66e |
C66x DSP |
ELF |
Big |
| mathlib.ae66 |
C66x DSP |
COFF |
Little |
| mathlib.ae66e |
C66x DSP |
COFF |
Big
|
The
Eclipse directory contains all files required for MATHLIB to
be recognized by Eclipse (CCS Version 4) as a plug-in. This is a support
directory and can be safely ignored.
The MATHLIB
installation creates a Package directory. This directory
contains meta information required by the TI packaging tools. This is a support
directory and can be safely ignored.
The examples
folder will provide example applications that employ MATHLIB to achieve
higher-level mathematical functions.
Since MATHLIB is a
collection of individual kernels, any combination of the kernels that comprise
MATHLIB may be integrated into a system individually. Integration, for single or
multiple kernels, requires four simple steps:
- Compile MATHLIB for c66x (optional)
- Add API calls within system code
- Compile system code
- Link MATHLIB
The sections that follow provide details regarding the above four steps.
On
installation, the MATHLIB libraries are built and ready to link. Therefore, this
step is only required when the original kernel source code has been refined or
contributions have been added. See MATHLIB
Build Process for details regarding building MATHLIB .
Add calls to
MATHLIB kernels within the system source code as necessary. Any system source
file that contains calls to an MATHLIB kernel will require that the MATHLIB
header file mathlib.h is included. See the MATHLIB
Function Reference for details on individual kernel APIs.
To re-compile
the system code, the path to the packages directory will need to be
added to the compiler's include path search list. This path will depend on the
MATHLIB root installation directory. This allows the main MATHLIB header file to
be moved from within the installation directory and still recognize the
individual kernel headers.
The path to the MATHLIB
libraries must be provided to the linker via the -l directive. See Library
Directory for MATHLIB library details.
Copyright 2012, Texas Instruments Incorporated