Computer Hardware Algorithm Standard User's Guide
Table Of Contents
- Table of Contents
- Preface
- 1 Overview
- 2 General Programming Guidelines
- 3 Algorithm Component Model
- 3.1 Interfaces and Modules
- 3.1.1 External Identifiers
- 3.1.2 Naming Conventions
- 3.1.3 Module Initialization and Finalization
- 3.1.4 Module Instance Objects
- 3.1.5 Design-Time Object Creation
- 3.1.6 Run-Time Object Creation and Deletion
- 3.1.7 Module Configuration
- 3.1.8 Example Module
- 3.1.9 Multiple Interface Support
- 3.1.10 Interface Inheritance
- 3.1.11 Summary
- 3.2 Algorithms
- 3.3 Packaging
- 3.1 Interfaces and Modules
- 4 Algorithm Performance Characterization
- 5 DSP-Specific Guidelines
- 6 Use of the DMA Resource
- 6.1 Overview
- 6.2 Algorithm and Framework
- 6.3 Requirements for the Use of the DMA Resource
- 6.4 Logical Channel
- 6.5 Data Transfer Properties
- 6.6 Data Transfer Synchronization
- 6.7 Abstract Interface
- 6.8 Resource Characterization
- 6.9 Runtime APIs
- 6.10 Strong Ordering of DMA Transfer Requests
- 6.11 Submitting DMA Transfer Requests
- 6.12 Device Independent DMA Optimization Guideline
- 6.13 C6xxx Specific DMA Rules and Guidelines
- 6.14 C55x Specific DMA Rules and Guidelines
- 6.15 Inter-Algorithm Synchronization
- A Rules and Guidelines
- B Core Run-Time APIs
- C Bibliography
- D Glossary
www.ti.com
B.1 TI C-Language Run-Time Support Library
B.2 DSP/BIOS Run-time Support Library
TI C-Language Run-Time Support Library
Recall that only a subset of the DSP/BIOS and the TI C run-time support library functions are allowed to
be referenced from an eXpressDSP-compliant algorithm.
In the future, this list of allowable APIs will grow to include a rich set of DSP math function calls; e.g.,
functions for computing a DCT, FFT, dot product, etc.
The following table summarizes the TI C-Language Run-time Support Library functions that may be
referenced by eXpressDSP-compliant algorithms.
Allowed or
Disallowed Category Typical Functions in Category Notes
allowed String functions strcpy, strchr, etc
(1)
allowed Memory-moving functions memcpy, memmove, memset, etc.
(2)
allowed Integer math support _divi, _divu, _remi, _remu, etc.
(2)
allowed Floating point support _addf, _subf, _mpyf, _divf, _addd, _subd, _mpyd, _divd,
(2) (3)
log10, cosh, etc.
allowed Conversion functions atoi, ftoi, itof, etc.
(2)
disallowed Heap management functions malloc, free, realloc, alloc, …
(4)
disallowed I/O functions printf, open, read, write, etc
(5)
disallowed misc. non-reentrant functions printf, sprintf, ctime, etc.
(4) (6)
(1)
Exceptions: strtok is not reentrant, and strdup allocates memory with malloc.
(2)
Some of these are issued by the compiler automatically for certain C operators.
(3)
The errno paradigm is not reentrant. Thus, errno must not be used by eXpressDSP-compliant algorithms.
(4)
Algorithms must not allocate memory.
(5)
Algorithms are not allowed to perform I/O.
(6)
Algorithms must be reentrant and must, therefore, only reference reentrant functions.
The HWI module's HWI disable, HWI enable, and HWI restore are the only allowed DSP/BIOS functions.
These operations can be used to create critical sections within an algorithm and provide a
processor-independent way of controlling preemption when used in a DSP/BIOS framework.
82 Core Run-Time APIs SPRU352G – June 2005 – Revised February 2007
Submit Documentation Feedback