pragma SDS data data_mover
Description
This pragma must be specified immediately preceding a function declaration, or immediately
preceding another #pragma SDS
bound to the function declaration. This pragma
applies to all the callers of the bound function.
By default, the SDSoC compiler chooses the type of the data mover automatically by analyzing
the code. The data_mover
pragma can be used to override the compiler
default. This pragma specifies the HW IP type, or DataMover
, used to
transfer an array argument.
The compiler automatically assigns an instance of the data mover HW IP to use for
transferring the corresponding array. The :id
can be specified to assign a
specific data mover instance for the associated formal parameter. If more than two formal
parameters have the same DataMover
and the same id
, they
will share the same data mover HW IP instance.
Syntax
#pragma SDS data data_mover(ArrayName:DataMover[:id])
Where:
ArrayName
: Specifies one of the formal parameters of the function to assign the pragma to.DataMover
: Must be either AXIFIFO, AXIDMA_SG, or AXIDMA_SIMPLE.:id
: is optional, but must be specified as a positive integer when it is used.- Multiple arrays can be specified in one pragma, separated by a comma (,). For example:
#pragma SDS data data_mover(ArrayName1:DataMover[:id], ArrayName2:DataMover[:id])
Example 1
#pragma SDS data data_mover(A:AXIDMA_SG:1, B:AXIDMA_SG:1)
void foo(int A[1024], int B[1024])
In the above example, the same AXIDMA_SG IP instance is shared to transfer data for arguments
A
and B
, because the same data mover ID
has
been specified.