Zero Copy Data Mover

As mentioned previously, the zero copy data mover is a special one because it covers both the accelerator interface and the data mover. The syntax of this pragma is:

#pragma SDS data zero_copy(arg[offset:size])

Where [offset:size] is optional, and only needed if data transfer size for an array cannot be determined at compile time.

By default, SDSoC assumes copy semantics for an array argument, meaning the data is explicitly copied from the PS to the accelerator via a data mover. When this zero_copy pragma is specified, SDSoC generates an AXI-Master interface for the specified argument on the accelerator, which grabs the data from the PS as specified in the accelerator code.

To use the zero_copy pragma, the memory corresponding to the array has to be physically contiguous, that is allocated with sds_alloc.