Data Mover Type

Important: This pragma is not recommended for normal use. Only use this pragma if the compiler-generated data mover type does not meet the design requirement.
The syntax for this pragma is:
#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, and id 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 same id, 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 uisng sds_alloc().

Example 1

The following code snippet shows an example of specifying the data mover ID in the pragma:
#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.