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

The aocl_mmd_write function is the write operation on a single interface.

Syntax

int aocl_mmd_write( int handle,
                    aocl_mmd_op_t op,
                    size_t len,
                    const void* src,
                    aocl_mmd_interface_t interface,
                    size_t 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. src—The host buffer, of type const void*, from which data is read.

  5. interface—The handle to the interface that aocl_mmd_write 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

  6. offset—The size_t byte offset within the interface at which the data transfer begins.

Return Value

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

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