Skip to content

File properties.h

FileList > docs > sw > include > opae > properties.h

Go to the source code of this file.

Functions for examining and manipulating fpga_properties objects.More...

  • #include <opae/types.h>

Public Functions

Type Name
fpga_result fpgaClearProperties (fpga_properties prop)
Clear a fpga_properties object.
fpga_result fpgaCloneProperties (fpga_properties src, fpga_properties * dst)
Clone a fpga_properties object.
fpga_result fpgaDestroyProperties (fpga_properties * prop)
Destroy a fpga_properties object.
fpga_result fpgaGetProperties (fpga_token token, fpga_properties * prop)
Create a fpga_properties object.
fpga_result fpgaGetPropertiesFromHandle (fpga_handle handle, fpga_properties * prop)
Create a fpga_properties object.
fpga_result fpgaPropertiesGetAcceleratorState (const fpga_properties prop, fpga_accelerator_state * state)
Get the state of a accelerator resource property.
fpga_result fpgaPropertiesGetBBSID (const fpga_properties prop, uint64_t * bbs_id)
Get the BBS ID of an FPGA resource property.
fpga_result fpgaPropertiesGetBBSVersion (const fpga_properties prop, fpga_version * bbs_version)
Get the BBS Version of an FPGA resource property.
fpga_result fpgaPropertiesGetBus (const fpga_properties prop, uint8_t * bus)
Get the PCI bus number of a resource.
fpga_result fpgaPropertiesGetCapabilities (const fpga_properties prop, uint64_t * capabilities)
Get the capabilities FPGA resource property.
fpga_result fpgaPropertiesGetDevice (const fpga_properties prop, uint8_t * device)
Get the PCI device number of a resource.
fpga_result fpgaPropertiesGetDeviceID (const fpga_properties prop, uint16_t * device_id)
Get the device id of the resource.
fpga_result fpgaPropertiesGetFunction (const fpga_properties prop, uint8_t * function)
Get the PCI function number of a resource.
fpga_result fpgaPropertiesGetGUID (const fpga_properties prop, fpga_guid * guid)
Get the GUID of a resource.
fpga_result fpgaPropertiesGetInterface (const fpga_properties prop, fpga_interface * interface)
Get the OPAE plugin interface implemented by a resource.
fpga_result fpgaPropertiesGetLocalMemorySize (const fpga_properties prop, uint64_t * lms)
Get the local memory size of an FPGA resource property.
fpga_result fpgaPropertiesGetModel (const fpga_properties prop, char * model)
Get the model of an FPGA resource property.
fpga_result fpgaPropertiesGetNumErrors (const fpga_properties prop, uint32_t * num_errors)
Get the number of errors that can be reported by a resource.
fpga_result fpgaPropertiesGetNumInterrupts (const fpga_properties prop, uint32_t * num_interrupts)
Get the number of interrupts.
fpga_result fpgaPropertiesGetNumMMIO (const fpga_properties prop, uint32_t * mmio_spaces)
Get the number of mmio spaces.
fpga_result fpgaPropertiesGetNumSlots (const fpga_properties prop, uint32_t * num_slots)
Get the number of slots of an FPGA resource property.
fpga_result fpgaPropertiesGetObjectID (const fpga_properties prop, uint64_t * object_id)
Get the object ID of a resource.
fpga_result fpgaPropertiesGetObjectType (const fpga_properties prop, fpga_objtype * objtype)
Get the object type of a resource.
fpga_result fpgaPropertiesGetParent (const fpga_properties prop, fpga_token * parent)
Get the token of the parent object.
fpga_result fpgaPropertiesGetSegment (const fpga_properties prop, uint16_t * segment)
Get the PCI segment number of a resource.
fpga_result fpgaPropertiesGetSocketID (const fpga_properties prop, uint8_t * socket_id)
Get the socket id of a resource.
fpga_result fpgaPropertiesGetSubsystemDeviceID (const fpga_properties prop, uint16_t * subsystem_device_id)
Get the subsystem device id of an FPGA resource property.
fpga_result fpgaPropertiesGetSubsystemVendorID (const fpga_properties prop, uint16_t * subsystem_vendor_id)
Get the subsystem vendor id of an FPGA resource property.
fpga_result fpgaPropertiesGetVendorID (const fpga_properties prop, uint16_t * vendor_id)
Get the vendor id of an FPGA resource property.
fpga_result fpgaPropertiesSetAcceleratorState (fpga_properties prop, fpga_accelerator_state state)
Set the state of an accelerator resource property.
fpga_result fpgaPropertiesSetBBSID (fpga_properties prop, uint64_t bbs_id)
Set the BBS ID of an FPGA resource property.
fpga_result fpgaPropertiesSetBBSVersion (fpga_properties prop, fpga_version version)
Set the BBS Version of an FPGA resource property.
fpga_result fpgaPropertiesSetBus (fpga_properties prop, uint8_t bus)
Set the PCI bus number of a resource.
fpga_result fpgaPropertiesSetCapabilities (fpga_properties prop, uint64_t capabilities)
Set the capabilities of an FPGA resource property.
fpga_result fpgaPropertiesSetDevice (fpga_properties prop, uint8_t device)
Set the PCI device number of a resource.
fpga_result fpgaPropertiesSetDeviceID (fpga_properties prop, uint16_t device_id)
Set the device id of the resource.
fpga_result fpgaPropertiesSetFunction (fpga_properties prop, uint8_t function)
Set the PCI function number of a resource.
fpga_result fpgaPropertiesSetGUID (fpga_properties prop, fpga_guid guid)
Set the GUID of a resource.
fpga_result fpgaPropertiesSetInterface (const fpga_properties prop, fpga_interface interface)
Set the OPAE plugin interface implemented by a resource.
fpga_result fpgaPropertiesSetLocalMemorySize (fpga_properties prop, uint64_t lms)
Set the local memory size of an FPGA resource property.
fpga_result fpgaPropertiesSetModel (fpga_properties prop, char * model)
Set the model of an FPGA resource property.
fpga_result fpgaPropertiesSetNumErrors (const fpga_properties prop, uint32_t num_errors)
Set the number of error registers.
fpga_result fpgaPropertiesSetNumInterrupts (fpga_properties prop, uint32_t num_interrupts)
Set the number of interrupts.
fpga_result fpgaPropertiesSetNumMMIO (fpga_properties prop, uint32_t mmio_spaces)
Set the number of mmio spaces.
fpga_result fpgaPropertiesSetNumSlots (fpga_properties prop, uint32_t num_slots)
Set the number of slots of an FPGA resource property.
fpga_result fpgaPropertiesSetObjectID (const fpga_properties prop, uint64_t object_id)
Set the object ID of a resource.
fpga_result fpgaPropertiesSetObjectType (fpga_properties prop, fpga_objtype objtype)
Set the object type of a resource.
fpga_result fpgaPropertiesSetParent (fpga_properties prop, fpga_token parent)
Set the token of the parent object.
fpga_result fpgaPropertiesSetSegment (fpga_properties prop, uint16_t segment)
Set the PCI segment number of a resource.
fpga_result fpgaPropertiesSetSocketID (fpga_properties prop, uint8_t socket_id)
Set the socket id of the resource.
fpga_result fpgaPropertiesSetSubsystemDeviceID (fpga_properties prop, uint16_t subsystem_device_id)
Set the subsystem device id of an FPGA resource property.
fpga_result fpgaPropertiesSetSubsystemVendorID (fpga_properties prop, uint16_t subsystem_vendor_id)
Set the subsystem vendor id of an FPGA resource property.
fpga_result fpgaPropertiesSetVendorID (fpga_properties prop, uint16_t vendor_id)
Set the vendor id of an FPGA resource property.
fpga_result fpgaUpdateProperties (fpga_token token, fpga_properties prop)
Update a fpga_properties object.

Detailed Description

In OPAE, fpga_properties objects are used both for obtaining information about resources and for selectively enumerating resources based on their properties. This file provides accessor functions (get/set) to allow reading and writing individual items of an fpga_properties object. Generally, not all object types supported by OPAE carry all properties. If you call a property accessor method on a fpga_properties object that does not support this particular property, it will return FPGA_INVALID_PARAM.

Accessor Return Values

In addition to the return values specified in the documentation below, all accessor functions return FPGA_OK on success, FPGA_INVALID_PARAM if you pass NULL or invalid parameters (i.e. non-initialized properties objects), FPGA_EXCEPTION if an internal exception occurred trying to access the properties object, FPGA_NOT_FOUND if the requested property is not part of the supplied properties object.

Public Functions Documentation

function fpgaClearProperties

Clear a fpga_properties object.

fpga_result fpgaClearProperties (
    fpga_properties prop
) 

Sets all fields of the properties object pointed at by 'prop' to 'don't care', which implies that the fpga_properties object would match all FPGA resources if used for an fpgaEnumerate() query. The matching criteria can be further refined by using fpgaSet* functions on the properties object.

Instead of creating a new fpga_properties object every time, this function can be used to re-use fpga_properties objects from previous queries.

Parameters:

  • prop fpga_properties object to clear

Returns:

FPGA_OK on success. FPGA_INVALID_PARAM if prop is not a valid object. FPGA_EXCEPTION if an * internal exception occured when trying to access prop.

function fpgaCloneProperties

Clone a fpga_properties object.

fpga_result fpgaCloneProperties (
    fpga_properties src,
    fpga_properties * dst
) 

Creates a copy of an fpga_properties object.

Note:

This call creates a new properties object and allocates memory for it. Both the 'src' and the newly created 'dst' objects will eventually need to be destroyed using fpgaDestroyProperties().

Parameters:

  • src fpga_properties object to copy
  • dst New fpga_properties object cloned from 'src'

Returns:

FPGA_OK on success. FPGA_INVALID_PARAM if src is not a valid object, or if dst is NULL. FPGA_NO_MEMORY if there was not enough memory to allocate an fpga_properties object for dst. FPGA_EXCEPTION if an internal exception occurred either accessing src or updating dst.

function fpgaDestroyProperties

Destroy a fpga_properties object.

fpga_result fpgaDestroyProperties (
    fpga_properties * prop
) 

Destroys an existing fpga_properties object that the caller has previously created using fpgaGetProperties() or fpgaCloneProperties().

Note:

fpgaDestroyProperties() requires the address of an fpga_properties object, similar to fpgaGetPropertiesFromHandle(), fpgaGetProperties(), and fpgaCloneProperties(). Passing any other value results in undefined behavior.

Parameters:

  • prop Pointer to the fpga_properties object to destroy

Returns:

FPGA_OK on success. FPGA_INVALID_PARAM is prop is not a valid object. FPGA_EXCEPTION if an internal exception occurrred while trying to access prop.

function fpgaGetProperties

Create a fpga_properties object.

fpga_result fpgaGetProperties (
    fpga_token token,
    fpga_properties * prop
) 

Initializes the memory pointed at by prop to represent a properties object, and populates it with the properties of the resource referred to by token. Individual properties can then be queried using fpgaPropertiesGet*() accessor functions.

If token is NULL, an "empty" properties object is created to be used as a filter for fpgaEnumerate(). All individual fields are set to dont care`, which implies that the fpga_properties object would match all FPGA resources if used for an fpgaEnumerate() query. The matching criteria can be further refined by using fpgaSet* functions on the properties object, or the object can be populated with the actual properties of a resource by using fpgaUpdateProperties().

Note:

fpgaGetProperties() will allocate memory for the created properties object returned in prop. It is the responsibility of the caller to free this memory after use by calling fpgaDestroyProperties().

Parameters:

  • token Token to get properties for. Can be NULL, which will create an empty properties object to be used as a filter for fpgaEnumerate().
  • prop Pointer to a variable of type fpga_properties

Returns:

FPGA_OK on success. FPGA_NO_MEMORY if no memory could be allocated to create the fpga_properties object. FPGA_EXCEPTION if an exception happend while initializing the fpga_properties object.

function fpgaGetPropertiesFromHandle

Create a fpga_properties object.

fpga_result fpgaGetPropertiesFromHandle (
    fpga_handle handle,
    fpga_properties * prop
) 

Initializes the memory pointed at by prop to represent a properties object, and populates it with the properties of the resource referred to by handle. Individual properties can then be queried using fpgaPropertiesGet*() accessor functions.

Note:

fpgaGetPropertiesFromHandle() will allocate memory for the created properties object returned in prop. It is the responsibility of the caller to free this memory after use by calling fpgaDestroyProperties().

Parameters:

  • handle Open handle to get properties for.
  • prop Pointer to a variable of type fpga_properties

Returns:

FPGA_OK on success. FPGA_NO_MEMORY if no memory could be allocated to create the fpga_properties object. FPGA_EXCEPTION if an exception happend while initializing the fpga_properties object.

function fpgaPropertiesGetAcceleratorState

Get the state of a accelerator resource property.

fpga_result fpgaPropertiesGetAcceleratorState (
    const fpga_properties prop,
    fpga_accelerator_state * state
) 

Returns the accelerator state of a accelerator.

Parameters:

  • prop Properties object to query - must be of type FPGA_ACCELERATOR
  • state Pointer to a accelerator state variable of the accelerator

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_ACCELERATOR. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetBBSID

Get the BBS ID of an FPGA resource property.

fpga_result fpgaPropertiesGetBBSID (
    const fpga_properties prop,
    uint64_t * bbs_id
) 

Returns the blue bitstream id of an FPGA.

Parameters:

  • prop Properties object to query - must be of type FPGA_DEVICE
  • bbs_id Pointer to a bbs id variable of the FPGA

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetBBSVersion

Get the BBS Version of an FPGA resource property.

fpga_result fpgaPropertiesGetBBSVersion (
    const fpga_properties prop,
    fpga_version * bbs_version
) 

Returns the blue bitstream version of an FPGA.

Parameters:

  • prop Properties object to query - must be of type FPGA_DEVICE
  • bbs_version Pointer to a bbs version variable of the FPGA

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetBus

Get the PCI bus number of a resource.

fpga_result fpgaPropertiesGetBus (
    const fpga_properties prop,
    uint8_t * bus
) 

Returns the bus number the queried resource.

Parameters:

  • prop Properties object to query
  • bus Pointer to a PCI bus variable of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetCapabilities

Get the capabilities FPGA resource property.

fpga_result fpgaPropertiesGetCapabilities (
    const fpga_properties prop,
    uint64_t * capabilities
) 

Returns the capabilities of an FPGA. Capabilities is a bitfield value

Parameters:

  • prop Properties object to query - must be of type FPGA_DEVICE
  • capabilities Pointer to a capabilities variable of the FPGA

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

Note:

This API is not currently supported.

function fpgaPropertiesGetDevice

Get the PCI device number of a resource.

fpga_result fpgaPropertiesGetDevice (
    const fpga_properties prop,
    uint8_t * device
) 

Returns the device number the queried resource.

Parameters:

  • prop Properties object to query
  • device Pointer to a PCI device variable of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetDeviceID

Get the device id of the resource.

fpga_result fpgaPropertiesGetDeviceID (
    const fpga_properties prop,
    uint16_t * device_id
) 

Parameters:

  • prop Properties object to query
  • device_id Pointer to a device id variable of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetFunction

Get the PCI function number of a resource.

fpga_result fpgaPropertiesGetFunction (
    const fpga_properties prop,
    uint8_t * function
) 

Returns the function number the queried resource.

Parameters:

  • prop Properties object to query
  • function Pointer to PCI function variable of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetGUID

Get the GUID of a resource.

fpga_result fpgaPropertiesGetGUID (
    const fpga_properties prop,
    fpga_guid * guid
) 

Returns the GUID of an FPGA or accelerator object.

For an accelerator, the GUID uniquely identifies a specific accelerator context type, i.e. different accelerators will have different GUIDs. For an FPGA, the GUID is used to identify a certain instance of an FPGA, e.g. to determine whether a given bitstream would be compatible.

Parameters:

  • prop Properties object to query
  • guid Pointer to a GUID of the slot variable

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetInterface

Get the OPAE plugin interface implemented by a resource.

fpga_result fpgaPropertiesGetInterface (
    const fpga_properties prop,
    fpga_interface * interface
) 

Returns the plugin interface enumerator.

Parameters:

  • prop Properties object to query
  • interface Pointer to an fpga_interface location to store the interface in

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetLocalMemorySize

Get the local memory size of an FPGA resource property.

fpga_result fpgaPropertiesGetLocalMemorySize (
    const fpga_properties prop,
    uint64_t * lms
) 

Returns the local memory size of an FPGA.

Parameters:

  • prop Properties object to query - must be of type FPGA_DEVICE
  • lms Pointer to a memory size variable of the FPGA

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

Note:

This API is not currently supported.

function fpgaPropertiesGetModel

Get the model of an FPGA resource property.

fpga_result fpgaPropertiesGetModel (
    const fpga_properties prop,
    char * model
) 

Returns the model of an FPGA.

Parameters:

  • prop Properties object to query - must be of type FPGA_DEVICE
  • model Model of the FPGA resource (string of minimum FPGA_MODEL_LENGTH length

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

Note:

This API is not currently supported.

function fpgaPropertiesGetNumErrors

Get the number of errors that can be reported by a resource.

fpga_result fpgaPropertiesGetNumErrors (
    const fpga_properties prop,
    uint32_t * num_errors
) 

Returns the number of error registers understood by a resource.

Parameters:

  • prop Properties object to query
  • num_errors Pointer to a 32 bit memory location to store the number of supported errors in

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetNumInterrupts

Get the number of interrupts.

fpga_result fpgaPropertiesGetNumInterrupts (
    const fpga_properties prop,
    uint32_t * num_interrupts
) 

Returns the number of interrupts of an accelerator properties structure.

Parameters:

  • prop Properties object to query - must be of type FPGA_ACCELERATOR
  • num_interrupts Pointer to a variable for number of interrupts

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_ACCELERATOR. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetNumMMIO

Get the number of mmio spaces.

fpga_result fpgaPropertiesGetNumMMIO (
    const fpga_properties prop,
    uint32_t * mmio_spaces
) 

Returns the number of mmio spaces of an AFU properties structure.

Parameters:

  • prop Properties object to query - must be of type FPGA_ACCELERATOR
  • mmio_spaces Pointer to a variable for number of mmio spaces

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_ACCELERATOR. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetNumSlots

Get the number of slots of an FPGA resource property.

fpga_result fpgaPropertiesGetNumSlots (
    const fpga_properties prop,
    uint32_t * num_slots
) 

Returns the number of slots present in an FPGA.

Parameters:

  • prop Properties object to query - must be of type FPGA_DEVICE
  • num_slots Pointer to number of slots variable of the FPGA

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetObjectID

Get the object ID of a resource.

fpga_result fpgaPropertiesGetObjectID (
    const fpga_properties prop,
    uint64_t * object_id
) 

Returns the object ID of a resource. The object ID is a 64 bit identifier that is unique within a single node or system. It represents a similar concept as the token, but can be used across processes (e.g. passed on the command line).

Parameters:

  • prop Properties object to query
  • object_id Pointer to a 64bit memory location to store the object ID in

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetObjectType

Get the object type of a resource.

fpga_result fpgaPropertiesGetObjectType (
    const fpga_properties prop,
    fpga_objtype * objtype
) 

Returns the object type of the queried resource.

Parameters:

  • prop Properties object to query
  • objtype Pointer to an object type variable of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetParent

Get the token of the parent object.

fpga_result fpgaPropertiesGetParent (
    const fpga_properties prop,
    fpga_token * parent
) 

Returns the token of the parent of the queried resource in '*parent'.

Parameters:

  • prop Properties object to query
  • parent Pointer to a token variable of the resource 'prop' is associated with

Returns:

FPGA_NOT_FOUND if resource does not have a parent (e.g. an FPGA_DEVICE resource does not have parents). Also see "Accessor Return Values" in properties.h.

function fpgaPropertiesGetSegment

Get the PCI segment number of a resource.

fpga_result fpgaPropertiesGetSegment (
    const fpga_properties prop,
    uint16_t * segment
) 

Returns the segment number of the queried resource.

Parameters:

  • prop Properties object to query
  • segment Pointer to a PCI segment variable of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesGetSocketID

Get the socket id of a resource.

fpga_result fpgaPropertiesGetSocketID (
    const fpga_properties prop,
    uint8_t * socket_id
) 

Returns the socket id of the queried resource.

Parameters:

  • prop Properties object to query
  • socket_id Pointer to a socket id variable of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetSubsystemDeviceID

Get the subsystem device id of an FPGA resource property.

fpga_result fpgaPropertiesGetSubsystemDeviceID (
    const fpga_properties prop,
    uint16_t * subsystem_device_id
) 

Returns the subsystem device id of an FPGA.

Parameters:

  • prop Properties object to query
  • subsystem_device_id Pointer to a device id variable of the FPGA

Returns:

FPGA_OK on success. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetSubsystemVendorID

Get the subsystem vendor id of an FPGA resource property.

fpga_result fpgaPropertiesGetSubsystemVendorID (
    const fpga_properties prop,
    uint16_t * subsystem_vendor_id
) 

Returns the subsystem vendor id of an FPGA.

Parameters:

  • prop Properties object to query
  • subsystem_vendor_id Pointer to a vendor id variable of the FPGA

Returns:

FPGA_OK on success. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesGetVendorID

Get the vendor id of an FPGA resource property.

fpga_result fpgaPropertiesGetVendorID (
    const fpga_properties prop,
    uint16_t * vendor_id
) 

Returns the vendor id of an FPGA.

Parameters:

  • prop Properties object to query - must be of type FPGA_DEVICE
  • vendor_id Pointer to a vendor id variable of the FPGA

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

Note:

This API is not currently supported.

function fpgaPropertiesSetAcceleratorState

Set the state of an accelerator resource property.

fpga_result fpgaPropertiesSetAcceleratorState (
    fpga_properties prop,
    fpga_accelerator_state state
) 

Parameters:

  • prop Properties object to modify - must be of type FPGA_ACCELERATOR
  • state accelerator state of the accelerator resource

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_ACCELERATOR. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesSetBBSID

Set the BBS ID of an FPGA resource property.

fpga_result fpgaPropertiesSetBBSID (
    fpga_properties prop,
    uint64_t bbs_id
) 

Parameters:

  • prop Properties object to modify - must be of type FPGA_DEVICE
  • bbs_id Blue bitstream id of the FPGA resource

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesSetBBSVersion

Set the BBS Version of an FPGA resource property.

fpga_result fpgaPropertiesSetBBSVersion (
    fpga_properties prop,
    fpga_version version
) 

Parameters:

  • prop Properties object to modify - must be of type FPGA_DEVICE
  • version Blue bitstream version of the FPGA resource

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesSetBus

Set the PCI bus number of a resource.

fpga_result fpgaPropertiesSetBus (
    fpga_properties prop,
    uint8_t bus
) 

Parameters:

  • prop Properties object to modify
  • bus PCI bus number of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetCapabilities

Set the capabilities of an FPGA resource property.

fpga_result fpgaPropertiesSetCapabilities (
    fpga_properties prop,
    uint64_t capabilities
) 

Capabilities is a bitfield value

Parameters:

  • prop Properties object to modify - must be of type FPGA_DEVICE
  • capabilities Capabilities of the FPGA resource

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

Note:

This API is not currently supported.

function fpgaPropertiesSetDevice

Set the PCI device number of a resource.

fpga_result fpgaPropertiesSetDevice (
    fpga_properties prop,
    uint8_t device
) 

Enforces the limitation on the number of devices as specified in the PCI spec.

Parameters:

  • prop Properties object to modify
  • device PCI device number of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetDeviceID

Set the device id of the resource.

fpga_result fpgaPropertiesSetDeviceID (
    fpga_properties prop,
    uint16_t device_id
) 

Parameters:

  • prop Properties object to modify
  • device_id Device id of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetFunction

Set the PCI function number of a resource.

fpga_result fpgaPropertiesSetFunction (
    fpga_properties prop,
    uint8_t function
) 

Enforces the limitation on the number of functions as specified in the PCI spec.

Parameters:

  • prop Properties object to modify
  • function PCI function number of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetGUID

Set the GUID of a resource.

fpga_result fpgaPropertiesSetGUID (
    fpga_properties prop,
    fpga_guid guid
) 

Sets the GUID of an FPGA or accelerator object.

For an accelerator, the GUID uniquely identifies a specific accelerator context type, i.e. different accelerators will have different GUIDs. For an FPGA, the GUID is used to identify a certain instance of an FPGA, e.g. to determine whether a given bitstream would be compatible.

Parameters:

  • prop Properties object to modify
  • guid Pointer to a GUID of the slot variable

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetInterface

Set the OPAE plugin interface implemented by a resource.

fpga_result fpgaPropertiesSetInterface (
    const fpga_properties prop,
    fpga_interface interface
) 

Set the plugin interface enumerator.

Parameters:

  • prop Properties object to query
  • interface The interface enumerator to set

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetLocalMemorySize

Set the local memory size of an FPGA resource property.

fpga_result fpgaPropertiesSetLocalMemorySize (
    fpga_properties prop,
    uint64_t lms
) 

Parameters:

  • prop Properties object to modify - must be of type FPGA_DEVICE
  • lms Local memory size of the FPGA resource

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

Note:

This API is not currently supported.

function fpgaPropertiesSetModel

Set the model of an FPGA resource property.

fpga_result fpgaPropertiesSetModel (
    fpga_properties prop,
    char * model
) 

Parameters:

  • prop Properties object to modify - must be of type FPGA_DEVICE
  • model Model of the FPGA resource (string of maximum FPGA_MODEL_LENGTH length

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

Note:

This API is not currently supported.

function fpgaPropertiesSetNumErrors

Set the number of error registers.

fpga_result fpgaPropertiesSetNumErrors (
    const fpga_properties prop,
    uint32_t num_errors
) 

Set the number of error registers understood by a resource to enumerate.

Parameters:

  • prop Properties object to query
  • num_errors Number of errors

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetNumInterrupts

Set the number of interrupts.

fpga_result fpgaPropertiesSetNumInterrupts (
    fpga_properties prop,
    uint32_t num_interrupts
) 

Sets the number of interrupts of an accelerator properties structure.

Parameters:

  • prop Properties object to modify - must be of type FPGA_ACCELERATOR
  • num_interrupts Number of interrupts of the accelerator

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_ACCELERATOR. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesSetNumMMIO

Set the number of mmio spaces.

fpga_result fpgaPropertiesSetNumMMIO (
    fpga_properties prop,
    uint32_t mmio_spaces
) 

Sets the number of mmio spaces of an AFU properties structure.

Parameters:

  • prop Properties object to modify - must be of type FPGA_ACCELERATOR
  • mmio_spaces Number of MMIO spaces of the accelerator

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_ACCELERATOR. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesSetNumSlots

Set the number of slots of an FPGA resource property.

fpga_result fpgaPropertiesSetNumSlots (
    fpga_properties prop,
    uint32_t num_slots
) 

Parameters:

  • prop Properties object to modify - must be of type FPGA_DEVICE
  • num_slots Number of slots of the FPGA

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesSetObjectID

Set the object ID of a resource.

fpga_result fpgaPropertiesSetObjectID (
    const fpga_properties prop,
    uint64_t object_id
) 

Sets the object ID of a resource. The object ID is a 64 bit identifier that is unique within a single node or system. It represents a similar concept as the token, but can be used across processes (e.g. passed on the command line).

Parameters:

  • prop Properties object to query
  • object_id A 64bit value to use as the object ID

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetObjectType

Set the object type of a resource.

fpga_result fpgaPropertiesSetObjectType (
    fpga_properties prop,
    fpga_objtype objtype
) 

Sets the object type of the resource. * Currently supported object types are FPGA_DEVICE and FPGA_ACCELERATOR.

Parameters:

  • prop Properties object to modify
  • objtype Object type of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetParent

Set the token of the parent object.

fpga_result fpgaPropertiesSetParent (
    fpga_properties prop,
    fpga_token parent
) 

Parameters:

  • prop Properties object to modify
  • parent Pointer to a token variable of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetSegment

Set the PCI segment number of a resource.

fpga_result fpgaPropertiesSetSegment (
    fpga_properties prop,
    uint16_t segment
) 

Parameters:

  • prop Properties object to modify
  • segment PCI segment number of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetSocketID

Set the socket id of the resource.

fpga_result fpgaPropertiesSetSocketID (
    fpga_properties prop,
    uint8_t socket_id
) 

Parameters:

  • prop Properties object to modify
  • socket_id Socket id of the resource 'prop' is associated with

Returns:

See "Accessor Return Values" in properties.h.

function fpgaPropertiesSetSubsystemDeviceID

Set the subsystem device id of an FPGA resource property.

fpga_result fpgaPropertiesSetSubsystemDeviceID (
    fpga_properties prop,
    uint16_t subsystem_device_id
) 

Parameters:

  • prop Properties object to modify
  • subsystem_device_id Subsystem Device id of the FPGA resource

Returns:

FPGA_OK on success. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesSetSubsystemVendorID

Set the subsystem vendor id of an FPGA resource property.

fpga_result fpgaPropertiesSetSubsystemVendorID (
    fpga_properties prop,
    uint16_t subsystem_vendor_id
) 

Parameters:

  • prop Properties object to modify
  • subsystem_vendor_id Subsystem Vendor id of the FPGA resource

Returns:

FPGA_OK on success. See also "Accessor Return Values" in properties.h.

function fpgaPropertiesSetVendorID

Set the vendor id of an FPGA resource property.

fpga_result fpgaPropertiesSetVendorID (
    fpga_properties prop,
    uint16_t vendor_id
) 

Parameters:

  • prop Properties object to modify - must be of type FPGA_DEVICE
  • vendor_id Vendor id of the FPGA resource

Returns:

FPGA_INVALID_PARAM if object type is not FPGA_DEVICE. See also "Accessor Return Values" in properties.h.

Note:

This API is not currently supported.

function fpgaUpdateProperties

Update a fpga_properties object.

fpga_result fpgaUpdateProperties (
    fpga_token token,
    fpga_properties prop
) 

Populates the properties object 'prop' with properties of the resource referred to by 'token'. Unlike fpgaGetProperties(), this call will not create a new properties object or allocate memory for it, but use a previously created properties object.

Parameters:

  • token Token to retrieve properties for
  • prop fpga_properties object to update

Returns:

FPGA_OK on success. FPGA_INVALID_PARAM if token or prop are not valid objects. FPGA_NOT_FOUND if the resource referred to by token was not found. FPGA_NO_DRIVER if not driver is loaded. FPGA_EXCEPTION if an internal exception occured when trying to update prop.


The documentation for this class was generated from the following file docs/sw/include/opae/properties.h