![]() |
![]() |
|
Framework Components Application Programming Interface (API)
fc-w02
|
EDMA3 Functional library. More...
Functions | |
| int32_t | EdmaMgr_init (int32_t proc_id, void *edma3_config) |
| Initialize EdmaMgr. More... | |
| EdmaMgr_Handle | EdmaMgr_alloc (int32_t max_linked_transfers) |
| Allocate an EdmaMgr channel. More... | |
| int32_t | EdmaMgr_getSizesLarge (EdmaMgr_ConfigLarge *cfg, IALG_MemRec memTab[]) |
| Get buffer requirements for a large channel. More... | |
| EdmaMgr_Handle | EdmaMgr_allocLarge (EdmaMgr_ConfigLarge *cfg, IALG_MemRec memTab[]) |
| Allocate an EdmaMgr channel for "Large" 1D2D or 2D1D transfers which have a pitch outside the range [-32768,32768]. More... | |
| int32_t | EdmaMgr_free (EdmaMgr_Handle h) |
| Frees an EdmaMgr channel. More... | |
| void | EdmaMgr_wait (EdmaMgr_Handle h) |
| Wait for transfers to complete. More... | |
| int32_t | EdmaMgr_copy1D1D (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes) |
| Perform a single 1D->1D transfer. More... | |
| int32_t | EdmaMgr_copy1D2D (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t pitch) |
| Perform a 1D->2D transfer. More... | |
| int32_t | EdmaMgr_copy2D1D (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t pitch) |
| Perform a 2D->1D transfer. More... | |
| int32_t | EdmaMgr_copy2D2D (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t pitch) |
| Perform a 2D->2D transfer of buffers with the same pitch. More... | |
| int32_t | EdmaMgr_copy2D2DSep (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t src_pitch, int32_t dst_pitch) |
| Perform a 2D->2D transfer of buffers with different pitches. More... | |
| int32_t | EdmaMgr_copy1D1DLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_transfers) |
| Perform a group of linked 1D->1D transfers. More... | |
| int32_t | EdmaMgr_copy1D2DLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_lines[], int32_t pitch[], int32_t num_transfers) |
| Perform a group of linked 1D->2D transfers. More... | |
| int32_t | EdmaMgr_copy2D1DLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_lines[], int32_t pitch[], int32_t num_transfers) |
| Perform a group of linked 2D->1D transfers. More... | |
| int32_t | EdmaMgr_copy2D2DLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_lines[], int32_t pitch[], int32_t num_transfers) |
| Perform a group of linked 2D->2D transfers. More... | |
| int32_t | EdmaMgr_copy2D2DSepLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_lines[], int32_t src_pitch[], int32_t dst_pitch[], int32_t num_transfers) |
| Perform a group of linked 2D->2D transfers with different pitches. More... | |
| int32_t | EdmaMgr_copy1D2DLarge (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t pitch) |
| Perform a 1D->2D large transfer. More... | |
| int32_t | EdmaMgr_copy2D1DLarge (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t pitch) |
| Perform a 2D->1D large transfer. More... | |
| int32_t | EdmaMgr_copyFast (EdmaMgr_Handle h, void *restrict src, void *restrict dst) |
Perform a fast copy. This API inherits the transfer configuration of a previous transfer and only modifies the src and dst addresses. More... | |
| int32_t | EdmaMgr_copyLinkedFast (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_transfers) |
Perform a linked fast copy. This API inherits the transfer configuration of a previous transfer and only modifies the src and dst addresses. More... | |
Macros | |
| #define | EdmaMgr_SUCCESS 0 |
| #define | EdmaMgr_ERROR_INVARG -1 |
| #define | EdmaMgr_ERROR_INVCFG -2 |
| #define | EdmaMgr_ERROR_RMANINIT -3 |
| #define | EdmaMgr_ERROR_INVHANDLE -4 |
| #define | EdmaMgr_ERROR_FREE -5 |
| #define | EdmaMgr_MAX_NUM_MEMRECS_LARGE 1 |
Data Structures | |
| struct | _EdmaMgr_ConfigLarge |
| Configuration for a large channel. More... | |
Typedefs | |
| typedef void * | EdmaMgr_Handle |
| Handle to an EdmaMgr instance. More... | |
| typedef struct _EdmaMgr_ConfigLarge | EdmaMgr_ConfigLarge |
| Configuration for a large channel. More... | |
EDMA3 Functional library.
| int32_t EdmaMgr_init | ( | int32_t | proc_id, |
| void * | edma3_config | ||
| ) |
Initialize EdmaMgr.
| [in] | proc_id | Processor ID. This ID is used to index into the EDMA3_InstanceInitConfig array pointed to by the ti_sdo_fc_edmamgr_edma3RegionConfig variable. |
| [in] | edma3_config | Optional edma3_config which will override the configuration which is pointed to by ti_sdo_fc_edmamgr_edma3RegionConfig. |
| EdmaMgr_SUCCESS | Success |
| EdmaMgr_ERROR_INVARG | Failure, Invalid Argument |
| EdmaMgr_ERROR_INVCFG | Failure, Invalid Configuration |
| EdmaMgr_ERROR_RMANINIT | Failure, RMAN initialization |
edma3_config may be NULL to accept default values.ti_sdo_fc_edma3RegionConfig variable. | EdmaMgr_Handle EdmaMgr_alloc | ( | int32_t | max_linked_transfers | ) |
Allocate an EdmaMgr channel.
| [in] | max_linked_transfers | Maximum linked transfers |
| NULL | Failure to allocate the channel |
| non-NULL | Success |
| int32_t EdmaMgr_getSizesLarge | ( | EdmaMgr_ConfigLarge * | cfg, |
| IALG_MemRec | memTab[] | ||
| ) |
Get buffer requirements for a large channel.
| [in] | cfg | Configuration for a large channel. |
| [out] | memTab | Buffer requirements for a large channel. |
| EdmaMgr_SUCCESS | Success |
| EdmaMgr_ERROR_INVCFG | Failure, Invalid Configuration |
| EdmaMgr_Handle EdmaMgr_allocLarge | ( | EdmaMgr_ConfigLarge * | cfg, |
| IALG_MemRec | memTab[] | ||
| ) |
Allocate an EdmaMgr channel for "Large" 1D2D or 2D1D transfers which have a pitch outside the range [-32768,32768].
| [in] | cfg | Configuration for a large channel. |
| [in] | memTab | Buffer requirements along with allocated buffers for a large channel. |
| NULL | Failure to allocate the channel |
| non-NULL | Success |
| int32_t EdmaMgr_free | ( | EdmaMgr_Handle | h | ) |
Frees an EdmaMgr channel.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| EdmaMgr_SUCCESS | Success |
| EdmaMgr_ERROR_INVHANDLE | Failure, Invalid Handle |
| EdmaMgr_ERROR_FREE | Failure to free a resource |
h must be a handle successfully returned from EdmaMgr_alloc(). | void EdmaMgr_wait | ( | EdmaMgr_Handle | h | ) |
Wait for transfers to complete.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
h must be a handle successfully returned from EdmaMgr_alloc().| int32_t EdmaMgr_copy1D1D | ( | EdmaMgr_Handle | h, |
| void *restrict | src, | ||
| void *restrict | dst, | ||
| int32_t | num_bytes | ||
| ) |
Perform a single 1D->1D transfer.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src | Source address |
| [in] | dst | Destination address |
| [in] | num_bytes | Number of bytes to transfer |
h must be a handle successfully returned from EdmaMgr_alloc().num_bytes bytes from src address to dst address.| int32_t EdmaMgr_copy1D2D | ( | EdmaMgr_Handle | h, |
| void *restrict | src, | ||
| void *restrict | dst, | ||
| int32_t | num_bytes, | ||
| int32_t | num_lines, | ||
| int32_t | pitch | ||
| ) |
Perform a 1D->2D transfer.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src | Source address |
| [in] | dst | Destination address |
| [in] | num_bytes | Number of bytes to transfer |
| [in] | num_lines | Number of lines |
| [in] | pitch | Pitch |
h must be a handle successfully returned from EdmaMgr_alloc().num_bytes bytes. The source is one dimensional, and the destination is two dimensional.num_bytes is transferred, the src address is incremented by num_bytes and the dst address is incremented by pitch bytes. | int32_t EdmaMgr_copy2D1D | ( | EdmaMgr_Handle | h, |
| void *restrict | src, | ||
| void *restrict | dst, | ||
| int32_t | num_bytes, | ||
| int32_t | num_lines, | ||
| int32_t | pitch | ||
| ) |
Perform a 2D->1D transfer.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src | Source address |
| [in] | dst | Destination address |
| [in] | num_bytes | Number of bytes to transfer |
| [in] | num_lines | Number of lines |
| [in] | pitch | Pitch |
h must be a handle successfully returned from EdmaMgr_alloc().num_bytes bytes. The source is two dimensional, and the destination is one dimensional.num_bytes is transferred, the src address is incremented by pitch and the dst address is incremented by num_bytes bytes. | int32_t EdmaMgr_copy2D2D | ( | EdmaMgr_Handle | h, |
| void *restrict | src, | ||
| void *restrict | dst, | ||
| int32_t | num_bytes, | ||
| int32_t | num_lines, | ||
| int32_t | pitch | ||
| ) |
Perform a 2D->2D transfer of buffers with the same pitch.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src | Source address |
| [in] | dst | Destination address |
| [in] | num_bytes | Number of bytes to transfer |
| [in] | num_lines | Number of lines |
| [in] | pitch | Pitch |
h must be a handle successfully returned from EdmaMgr_alloc().num_bytes bytes. The source and destination are two dimensional.num_bytes is transferred, the src address and dst address is incremented by pitch bytes. | int32_t EdmaMgr_copy2D2DSep | ( | EdmaMgr_Handle | h, |
| void *restrict | src, | ||
| void *restrict | dst, | ||
| int32_t | num_bytes, | ||
| int32_t | num_lines, | ||
| int32_t | src_pitch, | ||
| int32_t | dst_pitch | ||
| ) |
Perform a 2D->2D transfer of buffers with different pitches.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src | Source address |
| [in] | dst | Destination address |
| [in] | num_bytes | Number of bytes to transfer |
| [in] | num_lines | Number of lines |
| [in] | src_pitch | Source buffer pitch |
| [in] | dst_pitch | Destination buffer pitch |
h must be a handle successfully returned from EdmaMgr_alloc().num_bytes bytes. The source and destination are two dimensional.num_bytes is transferred, the src address is incremented by src_pitch bytes and the dst address is incremented by dst_pitch bytes. | int32_t EdmaMgr_copy1D1DLinked | ( | EdmaMgr_Handle | h, |
| void *restrict | src[], | ||
| void *restrict | dst[], | ||
| int32_t | num_bytes[], | ||
| int32_t | num_transfers | ||
| ) |
Perform a group of linked 1D->1D transfers.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src[] | Array of source addresses |
| [in] | dst[] | Array of destination addresses |
| [in] | num_bytes[] | Array of number of bytes to transfer |
| [in] | num_transfers | Number of transfers |
h must be a handle successfully returned from EdmaMgr_alloc().| int32_t EdmaMgr_copy1D2DLinked | ( | EdmaMgr_Handle | h, |
| void *restrict | src[], | ||
| void *restrict | dst[], | ||
| int32_t | num_bytes[], | ||
| int32_t | num_lines[], | ||
| int32_t | pitch[], | ||
| int32_t | num_transfers | ||
| ) |
Perform a group of linked 1D->2D transfers.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src[] | Array of source addresses |
| [in] | dst[] | Array of destination addresses |
| [in] | num_bytes[] | Array of number of bytes to transfer |
| [in] | num_lines[] | Array of lines to transfer |
| [in] | pitch[] | Array of pitches |
| [in] | num_transfers | Number of transfers |
h must be a handle successfully returned from EdmaMgr_alloc().| int32_t EdmaMgr_copy2D1DLinked | ( | EdmaMgr_Handle | h, |
| void *restrict | src[], | ||
| void *restrict | dst[], | ||
| int32_t | num_bytes[], | ||
| int32_t | num_lines[], | ||
| int32_t | pitch[], | ||
| int32_t | num_transfers | ||
| ) |
Perform a group of linked 2D->1D transfers.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src[] | Array of source addresses |
| [in] | dst[] | Array of destination addresses |
| [in] | num_bytes[] | Array of number of bytes to transfer |
| [in] | num_lines[] | Array of lines to transfer |
| [in] | pitch[] | Array of pitches |
| [in] | num_transfers | Number of transfers |
h must be a handle successfully returned from EdmaMgr_alloc().| int32_t EdmaMgr_copy2D2DLinked | ( | EdmaMgr_Handle | h, |
| void *restrict | src[], | ||
| void *restrict | dst[], | ||
| int32_t | num_bytes[], | ||
| int32_t | num_lines[], | ||
| int32_t | pitch[], | ||
| int32_t | num_transfers | ||
| ) |
Perform a group of linked 2D->2D transfers.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src[] | Array of source addresses |
| [in] | dst[] | Array of destination addresses |
| [in] | num_bytes[] | Array of number of bytes to transfer |
| [in] | num_lines[] | Array of lines to transfer |
| [in] | pitch[] | Array of pitches |
| [in] | num_transfers | Number of transfers |
h must be a handle successfully returned from EdmaMgr_alloc().| int32_t EdmaMgr_copy2D2DSepLinked | ( | EdmaMgr_Handle | h, |
| void *restrict | src[], | ||
| void *restrict | dst[], | ||
| int32_t | num_bytes[], | ||
| int32_t | num_lines[], | ||
| int32_t | src_pitch[], | ||
| int32_t | dst_pitch[], | ||
| int32_t | num_transfers | ||
| ) |
Perform a group of linked 2D->2D transfers with different pitches.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src[] | Array of source addresses |
| [in] | dst[] | Array of destination addresses |
| [in] | num_bytes[] | Array of number of bytes to transfer |
| [in] | num_lines[] | Array of lines to transfer |
| [in] | src_pitch[] | Array of source pitches |
| [in] | dst_pitch[] | Array of destination pitches |
| [in] | num_transfers | Number of transfers |
h must be a handle successfully returned from EdmaMgr_alloc().| int32_t EdmaMgr_copy1D2DLarge | ( | EdmaMgr_Handle | h, |
| void *restrict | src, | ||
| void *restrict | dst, | ||
| int32_t | num_bytes, | ||
| int32_t | num_lines, | ||
| int32_t | pitch | ||
| ) |
Perform a 1D->2D large transfer.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src | Source address |
| [in] | dst | Destination address |
| [in] | num_bytes | Number of bytes to transfer |
| [in] | num_lines | Number of lines |
| [in] | pitch | Pitch |
h must be a handle successfully returned from EdmaMgr_allocLarge().num_bytes bytes. The source is one dimensional, and the destination is two dimensional.num_bytes is transferred, the src address is incremented by num_bytes and the dst address is incremented by pitch bytes.| int32_t EdmaMgr_copy2D1DLarge | ( | EdmaMgr_Handle | h, |
| void *restrict | src, | ||
| void *restrict | dst, | ||
| int32_t | num_bytes, | ||
| int32_t | num_lines, | ||
| int32_t | pitch | ||
| ) |
Perform a 2D->1D large transfer.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src | Source address |
| [in] | dst | Destination address |
| [in] | num_bytes | Number of bytes to transfer |
| [in] | num_lines | Number of lines |
| [in] | pitch | Pitch |
h must be a handle successfully returned from EdmaMgr_allocLarge().num_bytes bytes. The source is two dimensional, and the destination is one dimensional.num_bytes is transferred, the src address is incremented by pitch and the dst address is incremented by num_bytes bytes.| int32_t EdmaMgr_copyFast | ( | EdmaMgr_Handle | h, |
| void *restrict | src, | ||
| void *restrict | dst | ||
| ) |
Perform a fast copy. This API inherits the transfer configuration of a previous transfer and only modifies the src and dst addresses.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src | Source address |
| [in] | dst | Destination address |
h must be a handle successfully returned from EdmaMgr_alloc().h before calling this function.| int32_t EdmaMgr_copyLinkedFast | ( | EdmaMgr_Handle | h, |
| void *restrict | src[], | ||
| void *restrict | dst[], | ||
| int32_t | num_transfers | ||
| ) |
Perform a linked fast copy. This API inherits the transfer configuration of a previous transfer and only modifies the src and dst addresses.
| [in] | h | Handle returned from EdmaMgr_alloc(). |
| [in] | src[] | Array of source addresses |
| [in] | dst[] | Array of destination addresses |
| [in] | num_transfers | Number of transfers |
h must be a handle successfully returned from EdmaMgr_alloc().h before calling this function.| #define EdmaMgr_SUCCESS 0 |
Success
| #define EdmaMgr_ERROR_INVARG -1 |
Failure, Invalid Argument
| #define EdmaMgr_ERROR_INVCFG -2 |
Failure, Invalid Configuration
| #define EdmaMgr_ERROR_RMANINIT -3 |
Failure, RMAN initialization
| #define EdmaMgr_ERROR_INVHANDLE -4 |
Failure, Invalid Handle
| #define EdmaMgr_ERROR_FREE -5 |
Failure to free a resource
| #define EdmaMgr_MAX_NUM_MEMRECS_LARGE 1 |
Maximum number of buffers required to allocate a large channel.
| typedef void* EdmaMgr_Handle |
Handle to an EdmaMgr instance.
| typedef struct _EdmaMgr_ConfigLarge EdmaMgr_ConfigLarge |
Configuration for a large channel.