Framework Components Application Programming Interface (API)  fc-v07
Functions | Macros | Data Structures | Typedefs | Enumerations | Variables
ecpy.h File Reference

Detailed Description

ECPY Definitions - High performance functional library for use with the EDMA3 DMA peripheral. Provides a comprehensive list of DMA operations an algorithm can perform on logical DMA channels it acquires through the IRES_EDMA3CHAN protocol.

Remarks
ECPY library contains two sets of functions: direct and non-direct. The direct APIs are functions prefixed with 'ECPY_direct' and are faster due to less state maintanence, fewer checks and/or lack of PaRAM shadowing of the 1st transfer. As a result they are slightly harder and require the caller to ensure integrity of state, for example, to make sure each ECPY_directStart call is matched with exactly one ECPY_directWait call. Another example is the need to remember to re-configure first transfer following a linked transfer or single 3D transfer.

The non-direct APIs are slightly easier to use and maintain state and persistence of 1st transfer's settings across transfers.

It is important to not mix and match direct and non-direct functions for any given channel, as this may result in unexpected behavior.

#include <ti/sdo/fc/ires/edma3chan/ires_edma3Chan.h>
Include dependency graph for ecpy.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Void ECPY_configure (ECPY_Handle handle, ECPY_Params *restrict params, short transferNo)
 Configures the DMA transfer settings for the transfer=transferNo of the logical channel. Except for transferNo==1, the physical EDMA3 PaRAM associated with the transfer is modified. For transferNo==1 a "shadow" of the PaRAM registers gets configured, so that the configuration of 1st transfer remains persistent following ECPY_startEdma() calls. More...
 
Void ECPY_directConfigure (ECPY_Handle handle, ECPY_Params *restrict params, short transferNo)
 Configure the DMA transfer settings of handle's 'transferNo' transfer. This function always directly configures the physical EDMA3 PaRAM associated with the transfer. Since no shadow is used for the 1st transfer, the configuration settings of the 1st transfer gets lost following linked transfers or when the 1st transfer is a 3D transfer (numFrames > 1). More...
 
Void ECPY_configure16 (ECPY_Handle handle, ECPY_ParamField16b fieldId, unsigned short value, short transferNo)
 Modify the 16-bit DMA transfer parameter, indicated by the parameter field id, fieldId, of the current channel settings. More...
 
Void ECPY_directConfigure16 (ECPY_Handle handle, ECPY_ParamField16b fieldId, unsigned short value, short transferNo)
 Modify the 16-bit DMA transfer parameter, indicated by the parameter field id, fieldId, of the current channel settings. This function always directly configures the physical EDMA3 PaRAM's 16-bit half of the 32-bit registered associated with the transfer & field . No shadow is used. More...
 
Void ECPY_configure32 (ECPY_Handle handle, ECPY_ParamField32b fieldId, unsigned int value, short transferNo)
 Modify the 32-bit DMA transfer parameter, indicated by the parameter field id, fieldId, of the current channel settings. More...
 
Void ECPY_directConfigure32 (ECPY_Handle handle, ECPY_ParamField32b fieldId, unsigned int value, short transferNo)
 Modify the 32-bit DMA transfer parameter, indicated by the parameter field id, fieldId, of the current channel settings. More...
 
Void ECPY_setFinal (ECPY_Handle handle, short transferNo)
 Indicate that a given transfer will be the last in a sequence of linked transfers. More...
 
Void ECPY_directSetFinal (ECPY_Handle handle, short transferNo)
 Indicate that a given transfer will be the last in a sequence of linked transfers. More...
 
Void ECPY_setDestinationMemoryMode (ECPY_Handle handle, short mode)
 Indicate the memory space that DMA transfers submitted to the channel associated with the handle will modify. This information can be used for channel to TC Queue mapping for avoiding known Silicon GEM lockup issues or for performance improvements. More...
 
Void ECPY_start (ECPY_Handle handle)
 Submit a single or linked transfer using the most recently configured transfer parameter settings. More...
 
Void ECPY_directStartEdma (ECPY_Handle handle)
 Submit a single or linked transfer using the most recently 'direct' configured transfer parameter settings. More...
 
Void ECPY_directStartQdma (ECPY_Handle handle)
 ECPY_directStartQdma has not been implemented. More...
 
Void ECPY_wait (ECPY_Handle handle)
 Wait for all data transfers on a logical channel to complete. More...
 
Void ECPY_directWait (ECPY_Handle handle)
 Wait for all EDMA data transfers submitted to the logical channel via ECPY_directStartEdma to complete. More...
 
Void ECPY_activate (ECPY_Handle handle)
 Activate the given channel. More...
 
ECPY_Handle ECPY_createHandle (IRES_EDMA3CHAN2_Handle handle, IALG_Handle alg)
 Create an ECPY Handle using the supplied IRES_EDMA3CHAN handle. More...
 
Void ECPY_deleteHandle (ECPY_Handle handle)
 Delete ECPY_Handle. More...
 
Void ECPY_deactivate (ECPY_Handle handle)
 Deactivates the given channel. More...
 
Void ECPY_setEarlyCompletionMode (ECPY_Handle handle, short enabled)
 Setting the TCCMODE (Early or Normal) affects only the 'intermediate transfers' of the linked transfers submitted using this channel. All subsequent direct and non-direct ECPY_configure* calls using this ecpyHandle will program the OPT's TCCMODE to select Early or Normal completion mode based on the 'enabled' argument. More...
 
Void ECPY_init (Void)
 Initialize the ECPY module. Called by framework. More...
 
Void ECPY_exit (Void)
 Finalization of the ECPY module. More...
 

Macros

#define ti_sdo_fc_ires_NOPROTOCOLREV
 
#define ECPY_GTNAME   "ti.sdo.fc.ecpy"
 
#define ECPY_MODNAME   "ti.sdo.fc.ecpy"
 Name to pass to Diags_setMask() to enable logging for ECPY functions. For example, Diags_setMask(ECPY_MODNAME"+EX1234567"); turns on all Log statements in this module. Diags_setMask() must be called after initialization to take effect. More...
 

Data Structures

struct  ECPY_Params
 DMA transfer specific parameters. Defines the configuration of a logical channel. More...
 
struct  ECPY_CfgParams
 The module configuration structure for ECPY. It is set at design time by the system integrator to register customize memory allocation/free implementations. More...
 

Typedefs

typedef enum ECPY_ParamField16b ECPY_ParamField16b
 ECPY 16-bit param field structure. These values are passed to ECPY_configure16() to indicate the field of the ECPY_Params structure to be changed. More...
 
typedef enum ECPY_ParamField32b ECPY_ParamField32b
 ECPY 32-bit param field structure. These values are passed to ECPY_configure32() to indicate the field of the ECPY_Params structure to be changed. More...
 
typedef enum ECPY_TransferType ECPY_TransferType
 ECPY DMA Transfer Types: More...
 
typedef struct ECPY_Obj * ECPY_Handle
 Handle to "logical" ECPY Channel. More...
 
typedef struct ECPY_Params ECPY_Params
 DMA transfer specific parameters. Defines the configuration of a logical channel. More...
 
typedef Bool( ECPY_PersistentAllocFxn) (IALG_MemRec *memTab, Int numRecs)
 Memory allocation function signature for module configuration. More...
 
typedef Void( ECPY_PersistentFreeFxn) (IALG_MemRec *memTab, Int numRecs)
 Memory deallocation function signature for module configuration. More...
 
typedef Bool( ECPY_ScratchAllocFxn) (IALG_Handle alg, Int scratchId, IALG_MemRec *memTab, Int numRecs)
 Scratch Memory allocation function for all shared scratch ECPY handle state. More...
 
typedef Void( ECPY_ScratchFreeFxn) (Int mutexId, Void *addr, UInt size)
 Scratch Memory free function for all scratch allocated memory in ECPY Handle. More...
 
typedef Int( ECPY_getScratchIdFxn) (IALG_Handle alg)
 Function, when supplied, returns the scratchId associated with the algorithm instance whose handle is passed. More...
 
typedef struct ECPY_CfgParams ECPY_CfgParams
 The module configuration structure for ECPY. It is set at design time by the system integrator to register customize memory allocation/free implementations. More...
 

Enumerations

enum  ECPY_ParamField16b {
  ECPY_PARAMFIELD_ELEMENTSIZE = 8,
  ECPY_PARAMFIELD_NUMELEMENTS = 10,
  ECPY_PARAMFIELD_ELEMENTINDEX_SRC = 16,
  ECPY_PARAMFIELD_ELEMENTINDEX_DST = 18,
  ECPY_PARAMFIELD_FRAMEINDEX_SRC = 24,
  ECPY_PARAMFIELD_FRAMEINDEX_DST = 26,
  ECPY_PARAMFIELD_NUMFRAMES = 28
}
 ECPY 16-bit param field structure. These values are passed to ECPY_configure16() to indicate the field of the ECPY_Params structure to be changed. More...
 
enum  ECPY_ParamField32b {
  ECPY_PARAMFIELD_SRCADDR = 4,
  ECPY_PARAMFIELD_DSTADDR = 12,
  ECPY_PARAMFIELD_ELEMENTINDEXES = 16,
  ECPY_PARAMFIELD_FRAMEINDEXES = 24
}
 ECPY 32-bit param field structure. These values are passed to ECPY_configure32() to indicate the field of the ECPY_Params structure to be changed. More...
 
enum  ECPY_TransferType {
  ECPY_1D1D,
  ECPY_1D2D,
  ECPY_2D1D,
  ECPY_2D2D
}
 ECPY DMA Transfer Types: More...
 

Variables

__FAR__ ECPY_CfgParams ECPY_CFG_PARAMS
 Initialization parameters for the ECPY module. More...
 
Copyright 2016, Texas Instruments Incorporated