File access.h¶
FileList > docs > sw > include > opae > access.h
Go to the source code of this file.
Functions to acquire, release, and reset OPAE FPGA resources.
#include <opae/types.h>
Public Functions¶
Type | Name |
---|---|
fpga_result | fpgaClose (fpga_handle handle) Close a previously opened FPGA object. |
fpga_result | fpgaOpen (fpga_token token, fpga_handle * handle, int flags) Open an FPGA object. |
fpga_result | fpgaReset (fpga_handle handle) Reset an FPGA object. |
Public Functions Documentation¶
function fpgaClose¶
Close a previously opened FPGA object.
Relinquishes ownership of a previously fpgaOpen()ed resource. This enables others to acquire ownership if the resource was opened exclusively. Also deallocates / unmaps MMIO and UMsg memory areas.
Parameters:
handle
Handle to previously opened FPGA object
Returns:
FPGA_OK on success. FPGA_INVALID_PARAM if handle does not refer to an acquired resource, or if handle is NULL. FPGA_EXCEPTION if an internal error occurred while accessing the handle.
function fpgaOpen¶
Open an FPGA object.
Acquires ownership of the FPGA resource referred to by 'token'.
Most often this will be used to open an accelerator object to directly interact with an accelerator function, or to open an FPGA object to perform management functions.
Parameters:
token
Pointer to token identifying resource to acquire ownership ofhandle
Pointer to preallocated memory to place a handle in. This handle will be used in subsequent API calls.flags
One of the following flags:- FPGA_OPEN_SHARED allows the resource to be opened multiple times (not supported in ASE) Shared resources (including buffers) are released when all associated handles have been closed (either explicitly with fpgaClose() or by process termination).
Returns:
FPGA_OK on success. FPGA_NOT_FOUND if the resource for 'token' could not be found. FPGA_INVALID_PARAM if 'token' does not refer to a resource that can be opened, or if either argument is NULL or invalid. FPGA_EXCEPTION if an internal exception occurred while creating the handle. FPGA_NO_DRIVER if the driver is not loaded. FPGA_BUSY if trying to open a resource that has already been opened in exclusive mode. FPGA_NO_ACCESS if the current process' privileges are not sufficient to open the resource.
function fpgaReset¶
Reset an FPGA object.
Performs an accelerator reset.
Parameters:
handle
Handle to previously opened FPGA object
Returns:
FPGA_OK on success. FPGA_INVALID_PARAM if handle does not refer to an acquired resource or to a resource that cannot be reset. FPGA_EXCEPTION if an internal error occurred while trying to access the handle or resetting the resource.
The documentation for this class was generated from the following file docs/sw/include/opae/access.h