AWE Core 8.D.10 Documentation
Data Fields
_AWEInstance Struct Reference

The AWE instance. More...

#include <Include/AWEInstance.h>

Data Fields

UINT32 instanceId
 The ID of this instance. More...
 
UINT32 * pFastHeapA
 Fast heap A. More...
 
UINT32 * pFastHeapB
 The second fast heap, B .
 
UINT32 * pSlowHeap
 The slow heap.
 
UINT32 fastHeapASize
 The fast heap A size in 32-bit words. More...
 
UINT32 fastHeapBSize
 The fast heap B size.
 
UINT32 slowHeapSize
 The slow heap size.
 
INT32(* cbAudioStart )(struct _AWEInstance *PAWE)
 OPTIONAL This callback is invoked when a layout is run or when a StartAudio command is sent. More...
 
INT32(* cbAudioStop )(struct _AWEInstance *pAWE)
 OPTIONAL. More...
 
INT32(* cbCacheInvalidate )(struct _AWEInstance *pAWE, void *nStartingAddress, UINT32 lengthInWords)
 OPTIONAL This callback is invoked wherever cache flush or invalidation is required, either in the framework or in modules. More...
 
INT32(* cbGetLayoutThreadPriority )(struct _AWEInstance *pAWE, INT32 layoutNum)
 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. More...
 
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. More...
 
const ModClassModule ** pModuleDescriptorTable
 Pointer to module table. More...
 
UINT32 * pPacketBuffer
 The Packet buffer pointer. More...
 
UINT32 * pReplyBuffer
 Reply buffer pointer. More...
 
UINT32 packetBufferSize
 Packet buffer size. More...
 
UINT32 userVersion
 User Version word. More...
 
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. More...
 
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. More...
 
AWEFlashFSInstancepFlashFileSystem
 DSPC Flash file system instance. More...
 
volatile UINT32 * pSharedHeap
 AWE Core shared memory definitions. More...
 
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 _Reserved [308]
 Internal members. More...
 

Detailed Description

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..

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

Field Documentation

◆ instanceId

UINT32 _AWEInstance::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

Examples
LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ pFastHeapA

UINT32* _AWEInstance::pFastHeapA

Fast heap A.

This is the main heap. AWE heaps are user allocated memory required by the AWE Instance.

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ fastHeapASize

UINT32 _AWEInstance::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.

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ cbAudioStart

INT32(* _AWEInstance::cbAudioStart) (struct _AWEInstance *PAWE)

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..

Examples
ControlApp.c, LinuxApp.c, and LinuxAppMulti.c.

◆ cbAudioStop

INT32(* _AWEInstance::cbAudioStop) (struct _AWEInstance *pAWE)

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...

Examples
ControlApp.c, LinuxApp.c, and LinuxAppMulti.c.

◆ cbCacheInvalidate

INT32(* _AWEInstance::cbCacheInvalidate) (struct _AWEInstance *pAWE, void *nStartingAddress, UINT32 lengthInWords)

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 two arguments; the start address of the memory to be invalidated, and length in 32-bit words.

◆ cbGetLayoutThreadPriority

INT32(* _AWEInstance::cbGetLayoutThreadPriority) (struct _AWEInstance *pAWE, INT32 layoutNum)

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.

◆ numModules

UINT32 _AWEInstance::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;

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ pModuleDescriptorTable

const ModClassModule** _AWEInstance::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.

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ pPacketBuffer

UINT32* _AWEInstance::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;

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ pReplyBuffer

UINT32* _AWEInstance::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;

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ packetBufferSize

UINT32 _AWEInstance::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)

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ userVersion

UINT32 _AWEInstance::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.

Examples
bare_metal_example.c.

◆ pName

const char* _AWEInstance::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

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ fundamentalBlockSize

UINT32 _AWEInstance::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

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, bare_metal_example.c, and singleinstance_simple.c.

◆ pFlashFileSystem

AWEFlashFSInstance* _AWEInstance::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

Examples
ControlApp.c, LinuxApp.c, LinuxAppMulti.c, and singleinstance_simple.c.

◆ pSharedHeap

volatile UINT32* _AWEInstance::pSharedHeap

AWE Core shared memory definitions.

Not required if using only single-instance AWE Core The shared heap.

Examples
LinuxAppMulti.c.

◆ _Reserved

UINT32 _AWEInstance::_Reserved[308]

Internal members.

Reserved memory.


The documentation for this struct was generated from the following file: