NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on The site is now set to read only.

Memory management in XDAIS with DSKT2

From Texas Instruments Wiki
Jump to: navigation, search

Introduction, Motivation

There have been several queries on the Community Forums and other support channels on XDAIS memory management. This topic presents the recommended APIs for working with XDAIS algorithms.

DSKT2 is a C library with APIs to create and manage XDAIS algorithms. It is part of the Framework Components suite. The DSKT2 API Reference Guide is available online.

DSKT2 automates the standard algorithm operations that use an algorithm’s IALG methods. This work includes using an algorithm's IALG methods to instantiate the algorithm, get its memory requests, allocate memory for the algorithm, and activate/deactivate scratch memory. DSKT2 provides APIs to perform these and other tasks. DSKT2 also introduces two primary features that result in fine-grained memory configuration and optimized memory management: -

  • You can define multiple memory heap segments and configure a mapping from an algorithm's memory requests to a preferred heap segment designated for the request’s memory-space attribute.
  • You can transparently share scratch memory assignments of algorithm instances that belong to the same scratch-group ID.

By adopting DSKT2, you can realize the following benefits:

  • You can reduce the DSP application footprint by not duplicating functionality that is provided by DSKT2.
  • Having all algorithm memory allocation performed inside DSKT2 provides the ability to retain a certain level of control of DSP-side memory allocations. Without this centralized allocation of algorithm memory, each algorithm developer could implement different allocation policies, for example grabbing all on-chip memory for their own algorithms, without consideration for other algorithms concurrently running on the DSP.

Presentation on DSKT2

This presentation demonstrates the main features of DSKT2.

Alternatives to DSKT2

DSKT2 is a fully supported API within the Framework Components product. In addition Codec Engine relies upon FC's services.

However, if for some reason it does not meet your needs the following alternatives are available.

  • ALG - this is a basic library shipped in. Source code can be found in C:\CCStudio_v3.3\C6000\xdais\src\api. It does not support multiple heaps or similar advanced features.
  • ALGRF - introduced in the Reference Frameworks product. Used in RF3 and RF5. Similar functionality to DSKT2.

To reiterate however, DSKT2 is the preferred, supported API. Code examples using DSKT2 are included in the Framework Components product release.

See Also