Texas Instruments TMS320 User Manual page 184

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

Memory Management
5.1 Memory Management
5.1.1
Configuring Memory Segments
5-2
The Memory Section Manager (MEM module) manages named memory
segments that correspond to physical ranges of memory. If you want more
control over memory segments, you can create your own linker command file
and include the linker command file created when you run the configuration
script.
The MEM module also provides a set of functions for dynamically allocating
and freeing variable-sized blocks of memory. The BUF module provides a set
of functions for dynamically allocating and freeing fixed-sized blocks of
memory.
Unlike standard C functions like malloc, the MEM functions enable you to
specify which segment of memory is used to satisfy a particular request for
storage. Real-time DSP hardware platforms typically contain several different
types of memory: fast, on-device RAMs; zero wait-state external SRAMs;
slower DRAMs for bulk data; and several others. Having explicit control over
which memory segment contains a particular block of data is essential to
meeting real-time constraints in many DSP applications.
The MEM module does not set or configure hardware registers associated
with a DSPs memory subsystem. Such configuration is your responsibility
and is typically handled by software loading programs, or in the case of Code
Composer Studio, the GEL start-up or menu options. For example, to access
external memory on a C6000 platform, the External Memory Interface (EMIF)
registers must first be set appropriately before any access. The earliest
opportunity for EMIF initialization within DSP/BIOS would be during the user
initialization function (see Global Settings in the TMS320 DSP/BIOS API
Reference Guide for your platform).
The MEM functions allocate and free variable-sized memory blocks. Memory
allocation and freeing are non-deterministic when using the MEM module,
since this module maintains a linked list of free blocks for each particular
memory segment. MEM_alloc and MEM_free must transverse this linked list
when allocating and freeing memory.
The templates provided with DSP/BIOS define a set of memory segments.
These segments are somewhat different for each supported DSP board. If
you are using a hardware platform for which there is no configuration
template, you need to customize the MEM objects and their properties. You
can customize MEM segments in the following ways:
❏ Insert a new MEM segment and define its properties. For details on MEM
object properties, see the TMS320 DSP/BIOS API Reference Guide for
your platform.

Advertisement

Table of Contents
loading

Table of Contents