![]() |
![]() |
Framework Components Application Programming Interface (API)
fc-v02
|
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... | |
The ECPY module provides a comprehensive list of DMA operations applications or algorithms can perform on logical DMA channels it acquires through the IRES_EDMA3CHAN protocol. Example of ECPY operations include channel configuration, DMA transfer scheduling, and DMA transfer synchronization.
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.
[in] | handle | ECPY channel handle. |
[in] | params | DMA transfer specific parameters used to configure this logical DMA channel. |
[in] | transferNo | Indicates the individual transfer to be configured using the passed 'params' |
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).
[in] | handle | ECPY channel handle. |
[in] | params | DMA transfer specific parameters used to configure this logical DMA channel. |
[in] | transferNo | Indicates the individual transfer to be configured using the passed 'params' |
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.
[in] | handle | IRES_EDMA3CHAN channel handle. |
[in] | fieldId | Indicates which of the parameters is to be modified. |
[in] | value | New value of the parameter to be modified. |
[in] | transferNo | Indicates which transfer the parameters correspond to (same value that would be passed to ECPY_configure()). |
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.
[in] | handle | IRES_EDMA3CHAN channel handle. |
[in] | fieldId | Indicates which of the parameters is to be modified. |
[in] | value | New value of the parameter to be modified. |
[in] | transferNo | Indicates which transfer the parameters correspond to (same value that would be passed to ECPY_directConfigure()). |
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.
[in] | handle | ECPY channel handle. |
[in] | fieldId | Indicates which of the parameters is to be modified. |
[in] | value | New value of the parameter to be modified. |
[in] | transferNo | Indicates which transfer the parameters correspond to (same value that would be passed to ECPY_configure()). |
handle
must be a valid channel handle.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.
[in] | handle | ECPY channel handle. |
[in] | fieldId | Indicates which of the parameters is to be modified. |
[in] | value | New value of the parameter to be modified. |
[in] | transferNo | Indicates which transfer the parameters correspond to (same value that would be passed to ECPY_configure()). |
handle
must be a valid channel handle.Void ECPY_setFinal | ( | ECPY_Handle | handle, |
short | transferNo | ||
) |
Indicate that a given transfer will be the last in a sequence of linked transfers.
This API can be used to dynamically change the number of transfers in a linked transfers.
[in] | handle | ECPY channel handle. |
[in] | transferNo | Indicates the transfer number that will be the last one of the set of linked transfers. |
Void ECPY_directSetFinal | ( | ECPY_Handle | handle, |
short | transferNo | ||
) |
Indicate that a given transfer will be the last in a sequence of linked transfers.
This API can be used to dynamically change the number of transfers in a linked transfers.
[in] | handle | ECPY channel handle. |
[in] | transferNo | Indicates the transfer number that will be the last one of the set of linked transfers. |
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.
[in] | handle | ECPY channel handle. |
[in] | mode | DMA destination description of type IRES_EDMA3CHAN_DmaDestType. |
Void ECPY_start | ( | ECPY_Handle | handle | ) |
Submit a single or linked transfer using the most recently configured transfer parameter settings.
[in] | handle | ECPY channel handle. |
Void ECPY_directStartEdma | ( | ECPY_Handle | handle | ) |
Submit a single or linked transfer using the most recently 'direct' configured transfer parameter settings.
[in] | handle | ECPY channel handle. |
Void ECPY_directStartQdma | ( | ECPY_Handle | handle | ) |
ECPY_directStartQdma has not been implemented.
Void ECPY_wait | ( | ECPY_Handle | handle | ) |
Wait for all data transfers on a logical channel to complete.
[in] | handle | ECPY channel handle. |
Void ECPY_directWait | ( | ECPY_Handle | handle | ) |
Wait for all EDMA data transfers submitted to the logical channel via ECPY_directStartEdma to complete.
[in] | handle | ECPY channel handle. |
Void ECPY_activate | ( | ECPY_Handle | handle | ) |
Activate the given channel.
[in] | handle | ECPY channel handle. |
handle
must be a valid channel handle.handle
must be a valid handle obtained by ECPY_createHandle.ECPY_Handle ECPY_createHandle | ( | IRES_EDMA3CHAN2_Handle | handle, |
IALG_Handle | alg | ||
) |
Create an ECPY Handle using the supplied IRES_EDMA3CHAN handle.
[in] | handle | IRES_EDMA3CHAN channel handle. |
[in] | alg | IALG handle. |
handle
must be a valid handle.Void ECPY_deleteHandle | ( | ECPY_Handle | handle | ) |
Delete ECPY_Handle.
[in] | handle | ECPY channel handle. |
handle
must be a valid handle obtained by ECPY_createHandle. Void ECPY_deactivate | ( | ECPY_Handle | handle | ) |
Deactivates the given channel.
[in] | handle | ECPY channel handle. |
handle
must be a valid channel handle.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.
Selecting the Early Completion mode may lead to performance improvements by increasing the EDMA throughput of linked transfers by submitting each transfer request from the EDMA Channel Controller to the Transfer Controller without waiting for the completion of the previous transfer from the Transfer Controller.
[in] | handle | ECPY channel handle. |
[in] | enabled | 1/TRUE to set TCCMODE to 1 (Early Completion) 0/FALSE to set TCCMODE to 1 (Normal Completion) |
Void ECPY_init | ( | Void | ) |
Initialize the ECPY module. Called by framework.
Void ECPY_exit | ( | Void | ) |
Finalization of the ECPY module.
#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.
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.
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.
typedef enum ECPY_TransferType ECPY_TransferType |
ECPY DMA Transfer Types:
Note that all transfers can be specified using the ECPY_2D2D transfer type, and providing element and frame indices for both source and destination. However, the other transfer types are provided to simplify configuration when applicable. For example, when using the ECPY_1D2D transfer type, you do not need to set the source element and frame indices in the ECPY_Params structure.
typedef struct ECPY_Obj* ECPY_Handle |
Handle to "logical" ECPY Channel.
typedef struct ECPY_Params ECPY_Params |
DMA transfer specific parameters. Defines the configuration of a logical channel.
typedef Bool( ECPY_PersistentAllocFxn) (IALG_MemRec *memTab, Int numRecs) |
Memory allocation function signature for module configuration.
typedef Void( ECPY_PersistentFreeFxn) (IALG_MemRec *memTab, Int numRecs) |
Memory deallocation function signature for module configuration.
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.
typedef Void( ECPY_ScratchFreeFxn) (Int mutexId, Void *addr, UInt size) |
Scratch Memory free function for all scratch allocated memory in ECPY Handle.
typedef Int( ECPY_getScratchIdFxn) (IALG_Handle alg) |
Function, when supplied, returns the scratchId associated with the algorithm instance whose handle is passed.
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.
enum 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.
enum 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.
Enumerator | |
---|---|
ECPY_PARAMFIELD_SRCADDR | |
ECPY_PARAMFIELD_DSTADDR | |
ECPY_PARAMFIELD_ELEMENTINDEXES | |
ECPY_PARAMFIELD_FRAMEINDEXES |
enum ECPY_TransferType |
ECPY DMA Transfer Types:
Note that all transfers can be specified using the ECPY_2D2D transfer type, and providing element and frame indices for both source and destination. However, the other transfer types are provided to simplify configuration when applicable. For example, when using the ECPY_1D2D transfer type, you do not need to set the source element and frame indices in the ECPY_Params structure.
Enumerator | |
---|---|
ECPY_1D1D |
Only one element is copied from source to destination. The size of the element is specified in the elementSize field of ECPY_Params |
ECPY_1D2D |
After each element is copied to destination, the source and destination of the next element to copy is updated as follows:
After an entire frame is copied (the frame size specified by the numElements field of ECPY_Params), the source and destination of the next frame to copy are given by:
|
ECPY_2D1D |
This is similar to ECPY_1D2D, except that source and destination are updated after an element is copied, as follows:
After an entire frame is copied by:
|
ECPY_2D2D |
This transfer type combines ECPY_1D2D and ECPY_2D1D, so that source and destination are updated after an element is copied by:
After a frame is copied by:
|
__FAR__ ECPY_CfgParams ECPY_CFG_PARAMS |
Initialization parameters for the ECPY module.