Scratchpad Sequential Implementation API¶
-
group
aml_scratch_seq
Sequential Scratchpad implementation.
Scratchpad uses calling thread to trigger asynchronous dma movements.
Defines
-
AML_SCRATCH_SEQ_DECL
(name)¶ Static declaration of a sequential scratchpad. Needs to be initialized with aml_scratch_seq_init()
-
AML_SCRATCH_SEQ_ALLOCSIZE
¶ Static declaration of a sequential scratchpad size.
Functions
-
int
aml_scratch_seq_create
(struct aml_scratch **scratch, struct aml_area *scratch_area, struct aml_area *src_area, struct aml_dma *dma, struct aml_tiling *tiling, size_t nbtiles, size_t nbreqs)¶ Allocates and initializes a new sequential scratchpad.
- Return
0 if successful; an error code otherwise.
- Parameters
scratch
: an address where the pointer to the newly allocated scratchpad structure will be stored.scratch_area
: the memory area where the scratchpad will be allocated.source_area
: the memory area containing the user data structure.dma
: the DMA that will be used for migrating data to and from the scratchpad.tiling
: the tiling to use on the user data structure and the scratch.nbtiles
: number of tiles to divide the scratchpad into.nbreqs
: the initial number of slots for asynchronous request that are in-flight (will be increased automatically if necessary).
-
int
aml_scratch_seq_init
(struct aml_scratch *scratch, struct aml_area *scratch_area, struct aml_area *src_area, struct aml_dma *dma, struct aml_tiling *tiling, size_t nbtiles, size_t nbreqs)¶ Initializes a new sequential scratchpad. Similar to the create.
- Return
0 if successful; an error code otherwise.
- Parameters
scratch
: a pointer to a scratch declared with AML_SCRATCH_SEQ_DECL.
-
void
aml_scratch_seq_fini
(struct aml_scratch *scratch)¶ Finalize a scratchpad.
- Parameters
scratch
: a pointer to a scratch initialized by aml_scratch_seq_init
-
void
aml_scratch_seq_destroy
(struct aml_scratch **scratch)¶ Tears down an initialized sequential scratchpad.
- Parameters
scratch
: an initialized scratchpad structure. NULL on return.
Variables
-
struct aml_scratch_ops
aml_scratch_seq_ops
¶ Default table of scratchpad operations for linux sequential dma.
-
struct
aml_scratch_request_seq
¶ - #include <seq.h>
Inside of a sequential scratch request with linux dma.
-
struct
aml_scratch_seq_data
¶ - #include <seq.h>
Inner data of the sequential scratchpad implementation
-
struct
aml_scratch_seq_ops
- #include <seq.h>
The set of operation embeded in the sequential scratchpad
-
struct
aml_scratch_seq
¶ - #include <seq.h>
Sequential implementation of a scratchpad
-