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

ID 683398
Date 5/04/2018
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

2.3.7. aocl_mmd_copy

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

Syntax

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

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

  2. 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.
    Note:

    aocl_mmd_op_t is defined as follows:

    typedef void* aocl_mmd_op_t;

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

  4. 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

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

  6. 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.