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

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

2.3.5. aocl_mmd_read

The aocl_mmd_read function is the read operation on a single interface.

Syntax

int aocl_mmd_read( int handle,
                   aocl_mmd_op_t op,
                   size_t len,
                   void* dst,
                   aocl_mmd_interface_t interface,
                   size_t 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.
    Note:

    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.

  • dst—The host buffer, of type void*, to which data is written.

  • interface—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

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

Did you find the information on this page useful?

Characters remaining:

Feedback Message