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.2. aocl_mmd_get_info

The aocl_mmd_get_info function obtains information about the board specified in the requested_info_id argument.

Syntax

int aocl_mmd_get_info( int handle,
                       aocl_mmd_info_t requested_info_id,
                       size_t param_value_size,
                       void* param_value,
                       size_t* param_size_ret );

Function Arguments

  • handle—A positive int value representing the handle to the board obtained from the aocl_mmd_open() call.
  • requested_info_id—An enum value of type aocl_mmd_offline_info_t that indicates the device information returning to the caller.
Table 17.  Possible Enum Values for the requested_info_id Argument
Name Description Type
AOCL_MMD_NUM_KERNEL_INTERFACES Number of kernel interfaces int
AOCL_MMD_KERNEL_INTERFACES Kernel interfaces int*
AOCL_MMD_PLL_INTERFACES Kernel clock handles int*
AOCL_MMD_MEMORY_INTERFACE Global memory handle int
AOCL_MMD_TERMPERATURE Temperature measurement float
AOCL_MMD_PCIE_INFO PCIe® information char*
AOCL_MMD_BOARD_NAME Board name char*
AOCL_MMD_BOARD_UNIQUE_ID Unique board ID char*
AOCL_MMD_CONCURRENT_READS Number of parallel reads

A value of 1 indicates serial reads.

int
AOCL_MMD_CONCURRENT_WRITES Number of parallel writes

A value of 1 indicates serial writes.

int
AOCL_MMD_CONCURRENT_READS_OR_WRITES Total number of concurrent read and write operations. int
AOCL_MMD_MIN_HOST_MEMORY_ALIGNMENT Minimum alignment that the BSP supports for host allocations. size_t
AOCL_MMD_HOST_MEM_CAPABILITIES Capabilities of aocl_mmd_host_alloc() function unsigned int
AOCL_MMD_SHARED_MEM_CAPABILITIES Capabilities of aocl_mmd_shared_alloc() function unsigned int
AOCL_MMD_DEVICE_MEM_CAPABILITIES Capabilities of aocl_mmd_device_alloc() function unsigned int
AOCL_MMD_HOST_MEM_CONCURRENT_GRANULARITY Granularity of concurrent host accesses size_t
AOCL_MMD_SHARED_MEM_CONCURRENT_GRANULARITY Granularity of concurrent shared accesses size_t
AOCL_MMD_DEVICE_MEM_CONCURRENT_GRANULARITY Granularity of concurrent device accesses size_t
  • param_value_size—Size of the param_value field in bytes. This size_t value should match the size of the expected return type that the enum definition indicates.

    For example, if AOCL_MMD_TEMPERATURE returns a value of type float, set the param_value_size to sizeof (float). You should see the same number of bytes returned in the param_size_ret argument.

  • param_value—A void* pointer to the variable that receives the returned information.
  • param_size_ret—A pointer argument of type size_t* that receives the number of bytes of returned data.

Capability Values

Table 18.  Capability Values for aocl_mmd_get_info Function
Value Description
AOCL_MMD_MEM_CAPABILITY_SUPPORTED If you do not set this value, allocation function is not supported even if other capabilities are set.
AOCL_MMD_MEM_CAPABILITY_ATOMIC Supports atomic access to the memory by either the host or the device.
AOCL_MMD_MEM_CAPABILITY_CONCURRENT Supports concurrent access to the memory either by the host or the device if the accesses are not on the same block. Block granularity is defined by AOCL_MMD_*_MEM_CONCURRENT_GRANULARITY. Blocks are aligned to this granularity.
AOCL_MMD_MEM_CAPABILITY_P2P Memory can be accessed by multiple devices at the same time.

Return Value

A negative return value indicates an error.