pragma SDS data data_mover

Description

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.

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.

By default, the SDSoC compiler chooses the type of the data mover automatically by analyzing the code. Thedata_moverpragma can be used to override the compiler default. This pragma specifies the HW IP type, orDataMover, 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:idcan be specified to assign a specific data mover instance for the associated formal parameter. If more than two formal parameters have the sameDataMoverand the sameid, they will share the same data mover HW IP instance.

Important:An additional requirement for using the AXIDMA_SIMPLE data mover is that the corresponding array must be allocated using sds_alloc().

Syntax

The syntax for this pragma is:
#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

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.

See Also