_AWEInstance
Module: AudioWeaver Core / AWECore Instance
The AWE instance. More...
#include <Include/AWEInstance.h>
Public Attributes
| Name | |
|---|---|
| UINT32 | instanceId The ID of this instance. |
| UINT32 * | pFastHeapA Fast heap A. |
| UINT32 * | pFastHeapB The second fast heap, B . |
| UINT32 * | pSlowHeap The slow heap. |
| UINT32 | fastHeapASize The fast heap A size in 32-bit words. |
| UINT32 | fastHeapBSize The fast heap B size. |
| UINT32 | slowHeapSize The slow heap size. |
| INT32()(struct _AWEInstance PAWE) | cbAudioStart OPTIONAL This callback is invoked when a layout is run or when a StartAudio command is sent. |
| INT32()(struct _AWEInstance pAWE) | cbAudioStop OPTIONAL. |
| INT32()(struct _AWEInstance pAWE) | cbPostDestroy OPTIONAL. |
| INT32()(struct _AWEInstance pAWE, void *nStartingAddress, UINT32 lengthInWords, INT32 CacheCallbackType) | cbCacheInvalidate OPTIONAL This callback is invoked wherever cache flush or invalidation is required, either in the framework or in modules. |
| INT32()(struct _AWEInstance pAWE, INT32 layoutNum) | cbGetLayoutThreadPriority OPTIONAL This callback is invoked from a module which is going to split the internal processing into multiple parallel threads at the same thread priority as the layout priority. |
| INT32()(struct _AWEInstance pAWE, INT32 instanceID) | cbAweForwardPacket OPTIONAL This callback is invoked from awe_packetProcessMulti when the received packet is to secondary instances so that the BSP can use events to signal corresponding core to wakeup packet processing thread on secondary instances. |
| IOPinDescriptor * | pInputPin A BSP author must define/allocate an input pin in their BSP and assign it to this member NOTE: AudioWeaver only supports single input/output pins, so the pin must have only ONE element Example: static IOPinDescriptor s_InputPin[1];. |
| IOPinDescriptor * | pOutputPin A BSP author must define/allocate an output pin in their BSP and assign it to this member NOTE: AudioWeaver only supports single input/output pins, so the pin must have only ONE element Example: static IOPinDescriptor s_OutputPin[1];. |
| UINT32 | numModules Number of modules in module table. |
| const ModClassModule ** | pModuleDescriptorTable Pointer to module table. |
| ModuleDescriptorList * | moduleDescriptors Pointer to a _ModuleDescriptorList struct. |
| UINT32 * | pPacketBuffer The Packet buffer pointer. |
| UINT32 * | pReplyBuffer Reply buffer pointer. |
| UINT32 | packetBufferSize Packet buffer size. |
| UINT32 | userVersion User Version word. |
| float | coreSpeed A BSP author will set this to the speed of the CPU they are integrating into. |
| float | profileSpeed Profiling clock speed in Hz. |
| const char * | pName The name of the AWE Instance that will be displayed in Server. |
| UINT32 | numThreads Number of threads supported for multithreaded systems(1-4). |
| float | sampleRate Default sample rate of this instance. |
| UINT32 | fundamentalBlockSize Base frame size of this instance. |
| AWEFlashFSInstance * | pFlashFileSystem DSPC Flash file system instance. |
| UINT32 * | pSharedHeap AWE Core shared memory definitions. |
| UINT32 | sharedHeapSize The shared heap size, in 32-bit words. |
| UINT32 | numProcessingInstances The number of audio processing instances of AWE Core configured on a single target. |
| UINT32[316] | _Reserved Internal members. |
Detailed Description
struct _AWEInstance;
The AWE instance.
The AWE Instance struct must have its members/pointers assigned at init time. The AWEInstance is the most important structure, and it must be initialized properly. After assigning all of the required members, the BSP author will call the awe_init() function. All members are required to be assigned unless they are marked optional in the detailed description below..
Public Attributes Documentation
variable instanceId
UINT32 instanceId;
The ID of this instance.
Single instance systems should always be 0. The instanceID of the AWEInstance must match the instanceID of your desired AWE commands. For example, if your packet router is routing commands to this instance with an address of 16, the instance's instanceID must be 16. See Packet Routing pseudocode above
variable pFastHeapA
UINT32 * pFastHeapA;
Fast heap A.
This is the main heap. AWE heaps are user allocated memory required by the AWE Instance.
variable pFastHeapB
UINT32 * pFastHeapB;
The second fast heap, B .
variable pSlowHeap
UINT32 * pSlowHeap;
The slow heap.
variable fastHeapASize
UINT32 fastHeapASize;
The fast heap A size in 32-bit words.
Heap sizes will vary from platform to platform, and also depend on the size of a layout. A good place to start for each heap is 1048576, however this will be too large for some platforms.
variable fastHeapBSize
UINT32 fastHeapBSize;
The fast heap B size.
variable slowHeapSize
UINT32 slowHeapSize;
The slow heap size.
variable cbAudioStart
INT32(*)(struct _AWEInstance *PAWE) cbAudioStart;
OPTIONAL This callback is invoked when a layout is run or when a StartAudio command is sent.
A user will define their own callback function and initialize this member with a pointer to their function. This callback can be used for whatever the BSP author pleases, including configuring audio devices based on layout properties, etc..
variable cbAudioStop
INT32(*)(struct _AWEInstance *pAWE) cbAudioStop;
OPTIONAL.
This callback is invoked when a layout is stopped or a StopAudio command is sent A user will define their own callback function and init this member with a pointer to their function. This callback can also be used for whatever the BSP author pleases, including halting audio streams, freeing buffers, etc...
variable cbPostDestroy
INT32(*)(struct _AWEInstance *pAWE) cbPostDestroy;
OPTIONAL.
This callback is invoked at the end of the PFID_Destroy command. A user will define their own callback function and init this member with a pointer to their function. This callback can be used for any custom destroy/cleanup tasks.
variable cbCacheInvalidate
INT32(*)(struct _AWEInstance *pAWE, void *nStartingAddress, UINT32 lengthInWords, INT32 CacheCallbackType) cbCacheInvalidate;
OPTIONAL This callback is invoked wherever cache flush or invalidation is required, either in the framework or in modules.
This callback is useful in the FFSWrapper where the FFS bin file stored in L2/L3 RAM. The callback is also useful for Multi Instance environments where the shared heap is allocated in a cached region. The callback function expects following arguments; the start address of the memory to be invalidated or flushed, length in 32-bit words and an integer indicating cache callback type to write back (flush) or invalidate - AWE_CACHE_CALLBACK_TYPE_WRITEBACK to write back and AWE_CACHE_CALLBACK_TYPE_INVALIDATE to invalidate.
variable cbGetLayoutThreadPriority
INT32(*)(struct _AWEInstance *pAWE, INT32 layoutNum) cbGetLayoutThreadPriority;
OPTIONAL This callback is invoked from a module which is going to split the internal processing into multiple parallel threads at the same thread priority as the layout priority.
BSP is responsible to return the thread priority of the layoutNum.
variable cbAweForwardPacket
INT32(*)(struct _AWEInstance *pAWE, INT32 instanceID) cbAweForwardPacket;
OPTIONAL This callback is invoked from awe_packetProcessMulti when the received packet is to secondary instances so that the BSP can use events to signal corresponding core to wakeup packet processing thread on secondary instances.
Note that only tuning master should register this callback and pAWE argument is always a pointer to the tuning instance.
variable pInputPin
IOPinDescriptor * pInputPin;
A BSP author must define/allocate an input pin in their BSP and assign it to this member NOTE: AudioWeaver only supports single input/output pins, so the pin must have only ONE element Example: static IOPinDescriptor s_InputPin[1];.
variable pOutputPin
IOPinDescriptor * pOutputPin;
A BSP author must define/allocate an output pin in their BSP and assign it to this member NOTE: AudioWeaver only supports single input/output pins, so the pin must have only ONE element Example: static IOPinDescriptor s_OutputPin[1];.
variable numModules
UINT32 numModules;
Number of modules in module table.
This can be manually set, or it can be determined by getting the size of the module descriptor table. Example: UINT32 module_descriptor_table_size = sizeof(g_module_descriptor_table) / sizeof(g_module_descriptor_table[0]); AWEInstance1.numModules = module_descriptor_table_size;
variable pModuleDescriptorTable
const ModClassModule ** pModuleDescriptorTable;
Pointer to module table.
The module table is the list of modules that will be included in the instance. See the provided "ModuleList.h" header for syntax specifics. Any set of available modules can be included/excluded from the instance by simply adding or removing them from the table. Note: this is often used for reducing the memory usage in production. AudioWeaver Designer can generate a ModuleList.h from a layout that ONLY includes the modules used in that layout.
variable moduleDescriptors
ModuleDescriptorList * moduleDescriptors;
Pointer to a _ModuleDescriptorList struct.
variable pPacketBuffer
UINT32 * pPacketBuffer;
The Packet buffer pointer.
A BSP author must allocate a buffer of length packetBufferSize and set pPacketBuffer to the address of that buffer. Example: g_AWEInstance.packetBufferSize = packetBufferSize; UINT32 AWE_Packet_Buffer[g_AWEInstance.packetBufferSize]; g_AWEInstance.pPacketBuffer = AWE_Packet_Buffer;
variable pReplyBuffer
UINT32 * pReplyBuffer;
Reply buffer pointer.
Initialized the same way as pPacketBuffer. The pPacketBuffer will be processed and the reply will be inserted into pReplyBuffer. Example: g_AWEInstance.packetBufferSize = packetBufferSize; UINT32 AWE_Reply_Buffer[g_AWEInstance.packetBufferSize]; g_AWEInstance.pReplyBuffer = AWE_Reply_Buffer;
variable packetBufferSize
UINT32 packetBufferSize;
Packet buffer size.
Must be initialized to the size of the BSP's packet buffers. The recommended packet buffer size is 264 32-bit words. If you need to use a smaller packetBufferSize due to memory constraints on your target, please contact DSPC Engineering. (The absolute minimum packetBufferSize is 16 and absolute max is 4105)
variable userVersion
UINT32 userVersion;
User Version word.
A BSP author can initialize this to any UINT32 value they would like. Should mean something to the BSP author, but no required meaning/syntax.
variable coreSpeed
float coreSpeed;
A BSP author will set this to the speed of the CPU they are integrating into.
variable profileSpeed
float profileSpeed;
Profiling clock speed in Hz.
variable pName
const char * pName;
The name of the AWE Instance that will be displayed in Server.
Can be any 8 character string Name of this instance as a string
variable numThreads
UINT32 numThreads;
Number of threads supported for multithreaded systems(1-4).
variable sampleRate
float sampleRate;
Default sample rate of this instance.
variable fundamentalBlockSize
UINT32 fundamentalBlockSize;
Base frame size of this instance.
In order for a layout to run on an instance, it must be a multiple of the fundamental blocksize
variable pFlashFileSystem
AWEFlashFSInstance * pFlashFileSystem;
DSPC Flash file system instance.
OPTIONAL if no FFS. If implementing the optional flash file system, then assign this pointer to your properly initialized flash file system instance
variable pSharedHeap
UINT32 * pSharedHeap;
AWE Core shared memory definitions.
Not required if using only single-instance AWE Core The shared heap.
variable sharedHeapSize
UINT32 sharedHeapSize;
The shared heap size, in 32-bit words.
variable numProcessingInstances
UINT32 numProcessingInstances;
The number of audio processing instances of AWE Core configured on a single target.
variable _Reserved
UINT32[316] _Reserved;
Internal members.
Reserved memory.
Updated on 2026-02-10 at 15:44:29 -0500