Data Mover Type
#pragma SDS data data_mover(ArrayName:DataMover[:id])
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.
Some notes about the syntax:
- Multiple arrays can be specified in one pragma, separated by a comma (,). For example:
#pragma SDS data data_mover(ArrayName:DataMover[:id], ArrayName:DataMover[:id])
ArrayName
must be one of the formal parameters of the function.DataMover
must be either AXIFIFO, AXIDMA_SG, or AXIDMA_SIMPLE.:id
is optional, andid
must be a positive integer.
This pragma specifies the data mover HW IP type used to transfer an array argument. By default, the compiler chooses the type of the data automatically by analyzing the code. This pragma can be used to override the compiler inference rules. Without the optional:id
, the compiler automatically assigns a data mover HW IP instance for transferring the corresponding array. The:id
can be used to override the compiler's choice and assign a specific data mover HW IP instance for the associated formal parameter. If more than two formal parameters have the same HW IP type and sameid
, they will share the same data mover HW IP instance.
There are some additional requirements for using AXIDMA_SIMPLE.
- The corresponding array must be allocated uisngsds_alloc().
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 argumentsA
andB
, because the same data moverID
has been specified.