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 SDSbound 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])
  • ArrayNamemust be one of the formal parameters of the function.
  • DataMovermust be either AXIFIFO, AXIDMA_SG, or AXIDMA_SIMPLE.
  • :idis optional, andidmust 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:idcan 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

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 argumentsAandB, because the same data moverIDhas been specified.