AWECore 8.C.3 API Document
Data Fields
AWEInstance Struct Reference

The AWE instance. More...

#include <Include/AWECore.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. 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...
 
IOPinDescriptorpInputPin
 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];.
 
IOPinDescriptorpOutputPin
 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 void * 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
 Name of this instance as a string

 
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...
 
UINT32 _Reserved [52]
 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
bare_metal_example.c, ControlApp.c, LinuxApp.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
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
bare_metal_example.c, ControlApp.c, LinuxApp.c, and singleinstance_simple.c.

◆ fastHeapASize

UINT32 AWEInstance::fastHeapASize

The fast heap A size.

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
bare_metal_example.c, ControlApp.c, LinuxApp.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, and LinuxApp.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, and LinuxApp.c.

◆ 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
bare_metal_example.c, ControlApp.c, LinuxApp.c, and singleinstance_simple.c.

◆ pModuleDescriptorTable

const void* 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
bare_metal_example.c, ControlApp.c, LinuxApp.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
bare_metal_example.c, ControlApp.c, LinuxApp.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
bare_metal_example.c, ControlApp.c, LinuxApp.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 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
bare_metal_example.c, ControlApp.c, LinuxApp.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.

◆ 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
bare_metal_example.c, ControlApp.c, LinuxApp.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, and singleinstance_simple.c.

◆ _Reserved

UINT32 AWEInstance::_Reserved[52]

Internal members.

Reserved memory.


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