Skip to content

File properties.h

File List > docs > sw > include > opae > properties.h

Go to the documentation of this file.

// Copyright(c) 2017-2021, Intel Corporation
//
// Redistribution  and  use  in source  and  binary  forms,  with  or  without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of  source code  must retain the  above copyright notice,
//   this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
//   this list of conditions and the following disclaimer in the documentation
//   and/or other materials provided with the distribution.
// * Neither the name  of Intel Corporation  nor the names of its contributors
//   may be used to  endorse or promote  products derived  from this  software
//   without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,  BUT NOT LIMITED TO,  THE
// IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED.  IN NO EVENT  SHALL THE COPYRIGHT OWNER  OR CONTRIBUTORS BE
// LIABLE  FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR
// CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT LIMITED  TO,  PROCUREMENT  OF
// SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE,  DATA, OR PROFITS;  OR BUSINESS
// INTERRUPTION)  HOWEVER CAUSED  AND ON ANY THEORY  OF LIABILITY,  WHETHER IN
// CONTRACT,  STRICT LIABILITY,  OR TORT  (INCLUDING NEGLIGENCE  OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,  EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

#ifndef __FPGA_PROPERTIES_H__
#define __FPGA_PROPERTIES_H__

#include <opae/types.h>

#ifdef __cplusplus
extern "C" {
#endif

fpga_result fpgaGetPropertiesFromHandle(fpga_handle handle, fpga_properties *prop);

fpga_result fpgaGetProperties(fpga_token token, fpga_properties *prop);

fpga_result fpgaUpdateProperties(fpga_token token, fpga_properties prop);

fpga_result fpgaClearProperties(fpga_properties prop);

fpga_result fpgaCloneProperties(fpga_properties src, fpga_properties *dst);

fpga_result fpgaDestroyProperties(fpga_properties *prop);

fpga_result fpgaPropertiesGetParent(const fpga_properties prop,
                    fpga_token *parent);

fpga_result fpgaPropertiesSetParent(fpga_properties prop,
                    fpga_token parent);
fpga_result fpgaPropertiesGetObjectType(const fpga_properties prop,
                    fpga_objtype *objtype);

fpga_result fpgaPropertiesSetObjectType(fpga_properties prop,
                    fpga_objtype objtype);
fpga_result fpgaPropertiesGetSegment(const fpga_properties prop, uint16_t *segment);

fpga_result fpgaPropertiesSetSegment(fpga_properties prop, uint16_t segment);

fpga_result fpgaPropertiesGetBus(const fpga_properties prop, uint8_t *bus);

fpga_result fpgaPropertiesSetBus(fpga_properties prop, uint8_t bus);

fpga_result fpgaPropertiesGetDevice(const fpga_properties prop,
                    uint8_t *device);

fpga_result fpgaPropertiesSetDevice(fpga_properties prop,
                    uint8_t device);

fpga_result fpgaPropertiesGetFunction(const fpga_properties prop,
                      uint8_t *function);

fpga_result fpgaPropertiesSetFunction(fpga_properties prop,
                      uint8_t function);

fpga_result fpgaPropertiesGetSocketID(const fpga_properties prop,
                      uint8_t *socket_id);

fpga_result fpgaPropertiesSetSocketID(fpga_properties prop,
                      uint8_t socket_id);

fpga_result fpgaPropertiesGetDeviceID(const fpga_properties prop,
                      uint16_t *device_id);

fpga_result fpgaPropertiesSetDeviceID(fpga_properties prop,
                      uint16_t device_id);

fpga_result fpgaPropertiesGetNumSlots(const fpga_properties prop,
                      uint32_t *num_slots);

fpga_result fpgaPropertiesSetNumSlots(fpga_properties prop,
                      uint32_t num_slots);

fpga_result fpgaPropertiesGetBBSID(const fpga_properties prop,
                   uint64_t *bbs_id);


fpga_result fpgaPropertiesSetBBSID(fpga_properties prop,
                   uint64_t bbs_id);


fpga_result fpgaPropertiesGetBBSVersion(const fpga_properties prop,
                    fpga_version *bbs_version);

fpga_result fpgaPropertiesSetBBSVersion(fpga_properties prop,
                    fpga_version version);


fpga_result fpgaPropertiesGetVendorID(const fpga_properties prop,
                      uint16_t *vendor_id);


fpga_result fpgaPropertiesSetVendorID(fpga_properties prop,
                      uint16_t vendor_id);

fpga_result fpgaPropertiesGetModel(const fpga_properties prop,
                   char *model);


fpga_result fpgaPropertiesSetModel(fpga_properties prop,
                   char *model);


fpga_result fpgaPropertiesGetLocalMemorySize(const fpga_properties prop,
                         uint64_t *lms);


fpga_result fpgaPropertiesSetLocalMemorySize(fpga_properties prop,
                         uint64_t lms);

fpga_result fpgaPropertiesGetCapabilities(const fpga_properties prop,
                      uint64_t *capabilities);


fpga_result fpgaPropertiesSetCapabilities(fpga_properties prop,
                      uint64_t capabilities);

fpga_result fpgaPropertiesGetGUID(const fpga_properties prop,
                  fpga_guid *guid);

fpga_result fpgaPropertiesSetGUID(fpga_properties prop, fpga_guid guid);

fpga_result fpgaPropertiesGetNumMMIO(const fpga_properties prop,
                     uint32_t *mmio_spaces);

fpga_result fpgaPropertiesSetNumMMIO(fpga_properties prop,
                     uint32_t mmio_spaces);

fpga_result fpgaPropertiesGetNumInterrupts(const fpga_properties prop,
                       uint32_t *num_interrupts);

fpga_result fpgaPropertiesSetNumInterrupts(fpga_properties prop,
                       uint32_t num_interrupts);

fpga_result fpgaPropertiesGetAcceleratorState(const fpga_properties prop,
                          fpga_accelerator_state *state);


fpga_result fpgaPropertiesSetAcceleratorState(fpga_properties prop,
                          fpga_accelerator_state state);

fpga_result fpgaPropertiesGetObjectID(const fpga_properties prop,
                        uint64_t *object_id);


fpga_result fpgaPropertiesSetObjectID(const fpga_properties prop,
                        uint64_t object_id);


fpga_result fpgaPropertiesGetNumErrors(const fpga_properties prop,
                       uint32_t *num_errors);


fpga_result fpgaPropertiesSetNumErrors(const fpga_properties prop,
                       uint32_t num_errors);

fpga_result fpgaPropertiesGetInterface(const fpga_properties prop,
                       fpga_interface *interface);

fpga_result fpgaPropertiesSetInterface(const fpga_properties prop,
                       fpga_interface interface);

fpga_result fpgaPropertiesGetSubsystemVendorID(const fpga_properties prop,
                           uint16_t *subsystem_vendor_id);


fpga_result fpgaPropertiesSetSubsystemVendorID(fpga_properties prop,
                           uint16_t subsystem_vendor_id);

fpga_result fpgaPropertiesGetSubsystemDeviceID(const fpga_properties prop,
                           uint16_t *subsystem_device_id);


fpga_result fpgaPropertiesSetSubsystemDeviceID(fpga_properties prop,
                           uint16_t subsystem_device_id);

#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus

#endif // __FPGA_PROPERTIES_H__