AN2345 Freescale Semiconductor / Motorola, AN2345 Datasheet - Page 13

no-image

AN2345

Manufacturer Part Number
AN2345
Description
Real-Time Memory Manager for StarCore DSPs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
3.4 VSMM Configuration Header File
3.5 VSMM Additional ‘C’ Header Files
• Critical entry and exit routines. Although the release provides several critical methods, you can add or
In addition to these configurable parameters, the VSMM_cfg.c source file also contains three global
VSMM declarations. Do not edit these declarations because VSMM execution may become
unpredictable. These global declarations must reside here to allow the additional configuration
capabilities described within the next section. These global declarations are:
• *gpstVSMMMemFreeList. A global pointer to a free list of memory partitions.
• gastVSMMMemTbl[VSMM_MAX_MEM_PART]. This is a global array of memory control blocks used
• guliDSPSR. Storage for DSP status register contents. This global is declared only if Critical Method 2
The VSMM_cfg.h file is a standard ‘C’ header file to provide additional VSMM configuration
capabilities. Configurable items within this file include the following three constants:
• OSE_RTOS. Defining this constant to a value of 1 indicates to that VSMM that it is to be used in an
• VSMM_CRITICAL_METHOD. Specifies the desired critical method to be utilized for entering and
• VSMM_MAX_MEM_PART. Specifies the maximum number of partitions allowed within your
Three additional ‘C’ header files provided with the VSMM release are as follows:
• VSMM_dsp.h. Defines DSP-specific constants such as data types and byte alignment macro.
• VSMM.h. Defines VSMM error codes, function prototyping, and VSMM data structure types.
• VSMM_Includes.h. A master include file for VSMM that contains all of the “includes” required by
Use caution when editing any of these header files because they are critical to VSMM operation.
parameters passed to a VSMM routine are within allowable range. Setting this global constant to 0
disables this feature, thus reducing the cycle overhead and code footprint of each VSMM routine.
modify these on a per application basis. For details on the critical methods provided with this release,
see Section 3.6, VSMM Critical Methods, on page 14.
by VSMM. See the next section for details on the VSMM_MAX_MEM_PART constant.
is selected and used to store the contents of the DSP status register prior to entering a critical section.
The value stored within this global variable is tested when a critical section is exited to determine the
state to which the interrupts are to be set. If the interrupts are already disabled before a critical section
is entered, the interrupts remain disabled during the exit. Otherwise, interrupts are re-enabled.
OSEck RTOS environment. This flag causes the alternate critical methods associated with methods 1
or 2 to be built in. These alternate methods use OSEck RTOS macros to enter and exit critical sections.
exiting critical sections.VSMM provides several default methods and allows user-defined methods.
application. The VSMM requires at least two partitions, also called heaps, and allows an indefinite
number of heaps, based only on the amount of physical memory available. Each heap requires 24 bytes
of overhead. See Section 8.1, Configuration Header File, VSMM_cfg.h, on page 28 for a listing of
VSMM_cfg.h.
the VSMM modules. The order of the includes within this file is important and should never be
modified.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
VSMM Distribution
13

Related parts for AN2345