Intel® FPGA SDK for OpenCL™ Pro Edition: Custom Platform Toolkit User Guide

ID 683085
Date 3/28/2022
Document Table of Contents

2.3.7. aocl_mmd_copy

The aocl_mmd_copy function is the copy operation on a single interface.


int aocl_mmd_copy( int handle,
                   aocl_mmd_op_t op,
                   size_t len,
                   aocl_mmd_interface_t intf,
                   size_t src_offset,
                   size_t dst_offset );

Function Arguments

  • handle—A positive int value representing the handle to the board obtained from the aocl_mmd_open() call.

  • op—The operation object of type aocl_mmd_op_t used to track the progress of the operation. If op is NULL, the call must block, and return only after the operation completes.

    aocl_mmd_op_t is defined as follows:

    typedef void* aocl_mmd_op_t;

  • len—The size of the data, in bytes, that the function transfers. Declare len with type size_t.

  • intf—The handle to the interface that aocl_mmd_read is accessing. For example, to access global memory, this handle is the enum value aocl_mmd_get_info() returns when its requested_info_id argument is AOCL_MMD_MEMORY_INTERFACE. The interface argument is of type aocl_mmd_interface_t, and can take one of the following values:
    Name Description
    AOCL_MMD_KERNEL Control interface into the kernel interface
    AOCL_MMD_MEMORY Data interface to device memory
    AOCL_MMD_PLL Interface for reconfigurable PLL

  • src_offset—The size_t byte offset within the source interface at which the data transfer begins.

  • dst_offset—The size_t byte offset within the destination interface at which the data transfer begins.

Return Value

If the copy operation is successful, the return value is 0.

If the copy operation fails, a negative return value indicates an error.