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.18. aocl_mmd_hostchannel_get_buffer

The aocl_mmd_hostchannel_get_buffer function provides a host with a pointer to the buffer they can access to write or read from the channel interface, along with the space or data available in the buffer, in bytes.

Syntax

void *aocl_mmd_hostchannel_get_buffer( int handle,
                                       int channel,
                                       size_t *buffer_size,
                                       int *status );

Function Arguments

  • handle—A positive int value representing the handle to the board obtained from the aocl_mmd_open() call.
  • channel—A positive int value representing handle to the channel to close obtained from the aocl_mmd_hostchannel_create() call.
  • buffer_size—A pointer to size_t that the function writes available buffer space or size to.
  • status—A pointer to int that the function writes result of the call to.

Return Value

If the function executes successfully, int pointed to by the status pointer is 0. Returned void* may still be NULL, in which case size_t pointed by the buffer_size is 0.

If the function fails to execute, int pointed by the status pointer is a negative value.