Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Configuration of EDMA3 RM in Framework Components

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

This information pertains to FC 2.10 or above.

Algorithms that require EDMA3 resources (including EDMA channels, QDMA channels, Tccs and PaRams) can implement the IRES interface (in particular, the IRES_EDMA3CHAN interface) to be able to request and receive these resources in the form of IRES handles (IRES_EDMA3CHAN_Handle). Algorithms then use the IRES handles with a customized DMA library to perform EDMA/QDMA transfers.

RMAN queries the algorithms' IRES_EDMA3CHAN interface and grants them available resources depending on what its "registered" resource manager is configured with. The corresponding resource manager for EDMA3 resources is IRESMAN_EDMA3CHAN. This resource manager has to be registered with RMAN by the application whenever the algorithms being instantiated require IRES EDMA3CHAN resources. IRESMAN_EDMA3CHAN resource manager, in turn, talks to the EDMA3 Low Level Resource Manager (part of the EDMA3 Low Level Driver product) to obtain resources.

All entities on the system that require EDMA3 resources (Apps, drivers, algorithms etc) are encouraged to negotiate their resources from this common underlying EDMA3 Low Level Resource Manager to avoid resource conflicts between multiple users of the EDMA3. Framework Components is also migrating towards using the EDMA3 Low Level Resource Manager to obtain EDMA3 resources for its DMA managers (DMAN3 and IRESMAN_EDMA3CHAN).

A common EDMA3 Meta config module is now included as part of the Framework Components library that configures the EDMA3 Low Level Resource Manager. Other modules (such as IRESMAN_EDMA3CHAN, and in future, the DMAN3) can now talk to this module to obtain available EDMA3 resources. This module, ti.sdo.fc.edma3.Settings also understands and supports the notion of Scratch Groups.

Hence, whenever you application uses RMAN and runs creates algorithms that request EDMA3 resources using their IRES interface, you will need to configure the "EDMA3" module ti.sdo.fc.edma3.Settings.

Configuration of ti.sdo.fc.edma3.Settings

As mentioned above, the EDMA3 Low Level Resource Manager can be configured using the ti.sdo.fc.edma3.Settings module.

Following are the configuration parameters of this module and a brief description of them:-


Name Type Default Description
region UInt 1 Id of the EDMA3 Region we will program with the assigned Resources etc. Region number 1 usually corresponds to DSP.
globalInit Bool false This flag decides if EDMA3 global registers and PaRam entries will be initialized by this module. If using on a device where ARM-side drivers might perform the intialization, set this to false so it doesn't overwrite the ARM-side setup. This decides values to various paramters that are used to initialize that EDMA LLD RM. These paramters are basically hints to whether the LLD RM should initialize any registers or PaRams during allocation and freeing or resources
EDMA3_MAXGROUPS const UInt 20 Maximum number of scratch groups for sharing EDMA3 resources
maxTccs UInt[] [10,10,10,10,0,0,0,0...] Arrays containing the maximum number of TCCs that will be assigned to groups for sharing. Algorithms created within a given group ID will share the EDMA3 resources assigned to that group
maxPaRams UInt[] [20,20,20,20,0,0,0,0...] Arrays containing the maximum number of PaRams that will be assigned to groups for sharing. Algorithms created within a given group ID will share the EDMA3 resources assigned to that group
maxEdmaChannels UInt[] [4,4,4,5,0,0,0,0...] Arrays containing the maximum number of EDMA Channels that will be assigned to groups for sharing. Algorithms created within a given group ID will share the EDMA3 resources assigned to that group
maxQdmaChannels UInt[] [1,1,1,1,0,0,0,0...] Arrays containing the maximum number of QDMA Channels that will be assigned to groups for sharing. Algorithms created within a given group ID will share the EDMA3 resources assigned to that group
contiguousPaRams Bool true Indicates if PaRams assigned to scratch groups need to be contiguous or not
globalConfig String null Global configuration required to set the SOC specific configuratin of the EDMA3 device. If set to NULL, it picks up the default configuration for the particular SOC that the application is being built on. To alter this value, you would create a variable of the type EDMA3_RM_GblConfigParams (defined in ti/sdo/edma3/rm/edma3_rm.h) and set appropriate values in the fields. Set parameter globalConfig to the address of this structure
regionConfig String null Instance specific configuration required to set the region specific resource ownership details of the EDMA3 device. If set to NULL, it picks up the default configuration for the particular SOC and region number (See paramter region above) that the application is being built on/configured with. To alter this value, you would create a variable of the type EDMA3_RM_InstanceInitConfig (defined in ti/sdo/edma3/rm/edma3_rm.h) and set appropriate bitmasks in the fields. Set parameter regionConfig to the address of this structure
persistentAllocFxn String null extern Bool () (IALG_MemRec *memTab, Int numRecs); Function for allocating persistent memory for allocating internal objects for this module. If this parameter is already set for the ti.sdo.fc.rman module, this doesn't need to be set here. Also if the RMAN module's useDSKT2 paramter is set to true, again this parameter is not required to be set.
persistentFreeFxn String null extern Void () (IALG_MemRec *memTab, Int numRecs); Function for freeing persistent memory allocated by persistentAllocFxn. If this parameter is already set for the ti.sdo.fc.rman module, this doesn't need to be set here. Also if the RMAN module's useDSKT2 paramter is set to true, again this parameter is not required to be set.
semCreateFxn String null Void * () (Int key, Int count); Function to create semaphores required by the EDMA3 LLD RM. If this parameter is already set for the ti.sdo.fc.rman module, this doesn't need to be set here.
semDeleteFxn String null Void () (Void * sem); Function to free semaphores created by semCreateFxn. If this parameter is already set for the ti.sdo.fc.rman module, this doesn't need to be set here.
semPendFxn String null Int () (Void * sem, unsigned int timeout); Function to post_semaphores created by _semCreateFxn. If this parameter is already set for the ti.sdo.fc.rman module, this doesn't need to be set here.
semPostFxn String null Void () (Void * sem); Function to post_semaphores created by _semCreateFxn. If this parameter is already set for the ti.sdo.fc.rman module, this doesn't need to be set here.
maxAlgs UInt 32 Maximum number of algorithm instances that will be created.
debug bool false Enable the debug profile of this library. Larger and slower library will be linked in.
trace bool false Enable the trace profile of this library.