DMAs: Moving Data Across Areas¶
-
group
aml_dma
Management of low-level memory movements.
AML DMA is the abstraction for handling memory movements. AML DMA can asynchronously move data from one area to another. While performing a movement, DMA operation may also translates from a source tiling to a different destination tiling.
Defines
-
AML_DMA_REQUEST_TYPE_INVALID
¶ Internal macros used for tracking DMA request types. Invalid request type. Used for marking inactive requests in the vector.
-
AML_DMA_REQUEST_TYPE_COPY
¶ Internal macros used for tracking DMA request types. Copy request type. Uses memcpy() for data migration.
Functions
-
int
aml_dma_copy
(struct aml_dma *dma, ...)¶ Requests a synchronous data copy between two different tiles, using memcpy() or equivalent.
- Return
0 if successful; an error code otherwise.
- Parameters
dma
: an initialized DMA structure.dt
: an argument of type struct aml_tiling*; the destination tiling structure.dptr
: an argument of type void*; the start address of the complete destination user data structure.dtid
: an argument of type int; the destination tile identifier.st
: an argument of type struct aml_tiling*; the source tiling structure.sptr
: an argument of type void*; the start address of the complete source user data structure.stid
: an argument of type int; the source tile identifier.
-
int
aml_dma_async_copy
(struct aml_dma *dma, struct aml_dma_request **req, ...)¶ Requests a data copy between two different tiles. This is an asynchronous version of aml_dma_copy().
- Return
0 if successful; an error code otherwise.
- Parameters
dma
: an initialized DMA structure.req
: an address where the pointer to the newly assigned DMA request will be stored. Variadic arguments: see aml_dma_copy().
-
struct
aml_dma_ops
¶ - #include <aml.h>
aml_dma_ops is a structure containing operations for a specific aml_dma implementation. These operation are operation are detailed in the structure. They are specific in:
the type of aml_area source and destination,
the progress engine performing the operation,
the type of of source and destination data structures.
Each different combination of these three points may require a different set of dma operations.
-