FpgaManager
Software API Documentation
|
Modules | |
Types | |
Typedefs | |
typedef void(* | FMmAccessStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, MmAccessHandle const mmAccess_p, void *const arg_p) |
Callback function to be execute on change of the MmAccess status. More... | |
typedef void(* | FMmAccessSlaveStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, MmAccessSlaveHandle const mmAccess_p, void *const arg_p) |
Callback function to be execute on change of the MmAccessSlave status. More... | |
typedef bool(* | FMmAccessSlaveOperationCallbackFct) (const en_uint32 address, en_byte *const buffer_p, const en_uint32 accessSize, const bool noAddrInc, MmAccessSlaveHandle const mmAccess_p, void *const arg_p) |
Callback function to be execute on operations (Read/Write) to be executed. More... | |
typedef void(* | FStreamStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, StreamHandle const stream_p, void *const arg_p) |
Callback function to be execute on change of the stream status. More... | |
typedef void(* | FTransferCallbackFct) (const EN_RESULT error, TransferHandle const transfer_p, void *const arg_p) |
Callback function to be execute on completion of a transfer. More... | |
Functions | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceApi_Delete (DeviceHandle *const handle_p) |
Delete Device and set handle to nullptr. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceApi_Create (DeviceHandle *const handle_p, const char *url, const en_uint8 streams) |
Creator with Transfer handle as parameter and error code as return value. More... | |
FPGAMANAGER_DLL_FCT DeviceHandle | DeviceApi_CreateObj (const char *url, const en_uint8 streams, EN_RESULT *const retVal_p) |
Creator with Device handle as return value and error code as parameter. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceApi_Open (DeviceHandle const handle) |
Open device. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceApi_Close (DeviceHandle const handle, const bool forcing) |
Close device. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceApi_CreateMmAccess (DeviceHandle const deviceHandle, MmAccessHandle const mmAccessHandle, const en_uint8 streamNr) |
Create and get memory mapped access object. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceApi_CreateStream (DeviceHandle const deviceHandle, StreamHandle const streamHandle, const en_uint8 streamNr, const bool frameBased, const bool upStreamEna, const bool downStreamEna) |
Create and get streaming access object. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceApi_SetProperty (DeviceHandle const deviceHandle, const char *const name, const en_uint32 value) |
Set property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceApi_GetProperty (DeviceHandle const deviceHandle, const char *const name, en_uint32 *const value_p) |
Get property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceSlaveApi_Delete (DeviceSlaveHandle *const handle_p) |
Delete Device slave and set handle to nullptr. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceSlaveApi_Create (DeviceSlaveHandle *const handle_p, const char *url, const en_uint8 streams) |
Creator with Device slave handle as parameter and error code as return value. More... | |
FPGAMANAGER_DLL_FCT DeviceSlaveHandle | DeviceSlaveApi_CreateObj (const char *url, const en_uint8 streams, EN_RESULT *const retVal_p) |
Creator with Device slave handle as return value and error code as parameter. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceSlaveApi_Open (DeviceSlaveHandle const handle) |
Open device. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceSlaveApi_Close (DeviceSlaveHandle const handle, const bool forcing) |
Close device slave. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceSlaveApi_CreateMmAccess (DeviceSlaveHandle const deviceHandle, MmAccessSlaveHandle const mmAccessHandle, const en_uint8 streamNr) |
Create and get memory mapped slave access object. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceSlaveApi_CreateStream (DeviceSlaveHandle const deviceHandle, StreamHandle const streamHandle, const en_uint8 streamNr, const bool frameBased, const bool upStreamEna, const bool downStreamEna) |
Create and get streaming access object. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceSlaveApi_SetProperty (DeviceSlaveHandle const deviceHandle, const char *const name, const en_uint32 value) |
Set property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | DeviceSlaveApi_GetProperty (DeviceSlaveHandle const deviceHandle, const char *const name, en_uint32 *const value_p) |
Get property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_Delete (MmAccessHandle *const handle_p) |
Delete MmAccess and set handle to nullptr. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_Create (MmAccessHandle *const handle_p) |
Creator with MmAccess handle as parameter and error code as return value. More... | |
FPGAMANAGER_DLL_FCT MmAccessHandle | MmAccessApi_CreateObj (EN_RESULT *const retVal_p) |
Creator with MmAccess handle as return value and error code as parameter. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_Open (MmAccessHandle const handle) |
Open memory-mapped access port. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_Close (MmAccessHandle const handle, const bool forcing) |
Close memory-mapped access port. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_Read (MmAccessHandle const mmAccessHandle, en_byte *const buffer_p, const en_uint32 bufSize, const en_uint32 address, const bool burst, const bool noAddrInc, TransferHandle const transferHandle) |
Read operation. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_Write (MmAccessHandle const mmAccessHandle, en_byte *const buffer_p, const en_uint32 bufSize, const en_uint32 address, const bool burst, const bool noAddrInc, TransferHandle const transferHandle) |
Write operation. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_GetStatus (MmAccessHandle const mmAccessHandle, EProtocolStatus *const status_p) |
Get MmAccess status. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_SetStatusEvtCallback (MmAccessHandle const mmAccessHandle, const FMmAccessStatusEvtCallbackFct callback, void *const arg_p) |
Set status event callback function. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_SetProperty (MmAccessHandle const mmAccessHandle, const char *const name, const en_uint32 value) |
Set property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessApi_GetProperty (MmAccessHandle const mmAccessHandle, const char *const name, en_uint32 *const value_p) |
Get property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_Delete (MmAccessSlaveHandle *const handle_p) |
Delete MmAccessSlave and set handle to nullptr. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_Create (MmAccessSlaveHandle *const handle_p) |
Creator with MmAccessSlave handle as parameter and error code as return value. More... | |
FPGAMANAGER_DLL_FCT MmAccessSlaveHandle | MmAccessSlaveApi_CreateObj (EN_RESULT *const retVal_p) |
Creator with MmAccessSlave handle as return value and error code as parameter. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_Listen (MmAccessSlaveHandle const handle) |
Set Memory-mapped access slave port to listen. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_Close (MmAccessSlaveHandle const handle, const bool forcing) |
Close memory-mapped access slave. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_GetStatus (MmAccessSlaveHandle const handle, EProtocolStatus *const status_p) |
Get MmAccess slavestatus. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_SetStatusEvtCallback (MmAccessSlaveHandle const mmAccessHandle, const FMmAccessSlaveStatusEvtCallbackFct callback, void *const arg_p) |
Set status event callback function. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_SetReadCallback (MmAccessSlaveHandle const mmAccessHandle, const FMmAccessSlaveOperationCallbackFct callback, void *const arg_p) |
Set read operation callback function. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_SetWriteCallback (MmAccessSlaveHandle const mmAccessHandle, const FMmAccessSlaveOperationCallbackFct callback, void *const arg_p) |
Set write operation callback function. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_SetProperty (MmAccessSlaveHandle const mmAccessHandle, const char *const name, const en_uint32 value) |
Set property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | MmAccessSlaveApi_GetProperty (MmAccessSlaveHandle const mmAccessHandle, const char *const name, en_uint32 *const value_p) |
Get property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_Delete (StreamHandle *const handle_p) |
Delete Stream and set handle to nullptr. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_Create (StreamHandle *const handle_p) |
Creator with Stream handle as parameter and error code as return value. More... | |
FPGAMANAGER_DLL_FCT StreamHandle | StreamApi_CreateObj (EN_RESULT *const retVal_p) |
Creator with Stream handle as return value and error code as parameter. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_Open (StreamHandle const handle) |
Open stream. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_Close (StreamHandle const handle, const bool forcing) |
Close stream. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_Receive (StreamHandle const streamHandle, en_byte *const buffer_p, const en_uint32 bufSize, TransferHandle const transferHandle) |
Receive operation. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_Send (StreamHandle const streamHandle, en_byte *const buffer_p, const en_uint32 bufSize, TransferHandle const transferHandle) |
Send operation. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_GetStatus (StreamHandle const streamHandle, EProtocolStatus *const status_p) |
Get stream status. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_SetStatusEvtCallback (StreamHandle const streamHandle, const FStreamStatusEvtCallbackFct callback, void *const arg_p) |
Set status event callback function. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_SetProperty (StreamHandle const streamHandle, const char *const name, const en_uint32 value) |
Set property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | StreamApi_GetProperty (StreamHandle const streamHandle, const char *const name, en_uint32 *const value_p) |
Get property value. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | SystemApi_Delete (SystemHandle *const handle_p) |
Delete System object and set handle to nullptr. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | SystemApi_Create (SystemHandle *const handle_p) |
Creator with System handle as parameter and error code as return value. More... | |
FPGAMANAGER_DLL_FCT SystemHandle | SystemApi_CreateObj (EN_RESULT *const retVal_p) |
Creator with System object handle as return value and error code as parameter. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | SystemApi_GetSwVersion (SystemHandle const handle, en_uint8 *const major_p, en_uint8 *const minor_p) |
Get SW version. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | SystemApi_GetErrorTrace (SystemHandle const handle, char **trace_p) |
Get error trace. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | SystemApi_GetErrorMessage (SystemHandle const handle, const EN_RESULT error, char **message_p) |
Get error message for a given error code. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | TransferApi_Delete (TransferHandle *const handle_p) |
Delete transfer and set handle to nullptr. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | TransferApi_Create (TransferHandle *const handle_p) |
Creator with Transfer handle as parameter and error code as return value. More... | |
FPGAMANAGER_DLL_FCT TransferHandle | TransferApi_CreateObj (EN_RESULT *const retVal_p) |
Creator with Transfer handle as return value and error code as parameter. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | TransferApi_GetStatus (TransferHandle const handle, ETransferStatus *const transferStatus_p) |
Get transfer status. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | TransferApi_GetTransferredBytes (TransferHandle const handle, en_uint32 *const bytes_p) |
Get the number of bytes transferred. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | TransferApi_GetFrameNumber (TransferHandle const handle, en_uint16 *const frameNumber_p) |
Get received UniSCP frame number. More... | |
FPGAMANAGER_DLL_FCT EN_RESULT | TransferApi_SetCallback (TransferHandle const handle, FTransferCallbackFct callback, void *const arg_p) |
Set callback function to be executed if the transfer is completed. More... | |
typedef bool(* FMmAccessSlaveOperationCallbackFct) (const en_uint32 address, en_byte *const buffer_p, const en_uint32 accessSize, const bool noAddrInc, MmAccessSlaveHandle const mmAccess_p, void *const arg_p) |
Callback function to be execute on operations (Read/Write) to be executed.
The user has to impelement the Read/Write operations within the callbacks registered.
address | Address to access |
buffer_pp | Data buffer. Write: The write data is stored within this buffer Read: The read data must be copied into this buffer. |
accessSize | Size of the access in bytes |
noAddrInc | If true, all DWORDs are written to / read from the same address |
mm_access_p | Memory mapped access slave which called the callback function |
arg_p | Argument list |
typedef void(* FMmAccessSlaveStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, MmAccessSlaveHandle const mmAccess_p, void *const arg_p) |
Callback function to be execute on change of the MmAccessSlave status.
Note that a MmAccessSlave does not necessarily need to be linked with a callback function. If no callback function is set for the MmAccessSlave, no callback function is executed.
statusOld | Protocol status before transition |
statusNew | Protocol status after transition |
mmAccess_p | MmAccessSlave that called the callback function |
arg_p | Argument list |
typedef void(* FMmAccessStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, MmAccessHandle const mmAccess_p, void *const arg_p) |
Callback function to be execute on change of the MmAccess status.
Note that a MmAccess does not necessarily need to be linked with a callback function. If no callback function is set for the MmAccess, no callback function is executed.
statusOld | Protocol status before transition |
statusNew | Protocol status after transition |
stream_p | MmAccess that called the callback function |
arg_p | Argument list |
typedef void(* FStreamStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, StreamHandle const stream_p, void *const arg_p) |
Callback function to be execute on change of the stream status.
Note that a stream does not necessarily need to be linked with a callback function. If no callback function is set for the stream, no callback function is executed.
statusOld | Protocol status before transition |
statusNew | Protocol status after transition |
stream_p | Stream that called the callback function |
arg_p | Argument list |
typedef void(* FTransferCallbackFct) (const EN_RESULT error, TransferHandle const transfer_p, void *const arg_p) |
Callback function to be execute on completion of a transfer.
The callback function is executed if a transfer completes independently of whether the transfer was successful or contained an error.
Note that a transfer does not necessarily need to be linked with a callback function. If no callback function is set for the transfer, no callback function is executed.
error | Error code (error occured during reception) |
transfer_p | Transfer which was completed |
arg_p | Callback argument list |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Close | ( | DeviceHandle const | handle, |
const bool | forcing | ||
) |
Close device.
Close device must be called before the device is destructed. This command closes the link to the device.
handle | Handle for the Device to be close | ||||||
forcing | Forcing close
|
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Create | ( | DeviceHandle *const | handle_p, |
const char * | url, | ||
const en_uint8 | streams | ||
) |
Creator with Transfer handle as parameter and error code as return value.
handle_p | Pointer to write the handle for the created Device into. | |||||||||||||||||||
url | URL of the device to create Examples:
| |||||||||||||||||||
streams | Number of streams. Note that the memory mapped access also counts as one stream. |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateMmAccess | ( | DeviceHandle const | deviceHandle, |
MmAccessHandle const | mmAccessHandle, | ||
const en_uint8 | streamNr | ||
) |
Create and get memory mapped access object.
deviceHandle | Handle to the Device to create memory mapped access object for |
mmAccessHandle | Handle to the Memory Mapped Access to assign the newly created access to. |
streamNr | Stream number to use for the memory mapped access |
FPGAMANAGER_DLL_FCT DeviceHandle DeviceApi_CreateObj | ( | const char * | url, |
const en_uint8 | streams, | ||
EN_RESULT *const | retVal_p | ||
) |
Creator with Device handle as return value and error code as parameter.
url | URL of the device to create Examples:
| |||||||||||||||||||
streams | Number of streams. Note that the memory mapped access also counts as one stream. | |||||||||||||||||||
retVal_p | Error code |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateStream | ( | DeviceHandle const | deviceHandle, |
StreamHandle const | streamHandle, | ||
const en_uint8 | streamNr, | ||
const bool | frameBased, | ||
const bool | upStreamEna, | ||
const bool | downStreamEna | ||
) |
Create and get streaming access object.
deviceHandle | Handle to the Device to create stream access object for | ||||||
streamHandle | Handle to the Stream to assign the newly created access to. | ||||||
streamNr | Stream number to create | ||||||
frameBased | Stream type
| ||||||
downStreamEna | Downstream data (from master to slave)
| ||||||
upStreamEna | Upstream data (from slave to master)
|
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Delete | ( | DeviceHandle *const | handle_p | ) |
Delete Device and set handle to nullptr.
handle_p | Device to delete Is set to nullptr during the function call. |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_GetProperty | ( | DeviceHandle const | deviceHandle, |
const char *const | name, | ||
en_uint32 *const | value_p | ||
) |
Get property value.
deviceHandle | Handle for the Device to get the property value from |
name | Name of the property to get the value for |
value_p | Pointer to write the property value into |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Open | ( | DeviceHandle const | handle | ) |
Open device.
Open device must be called before any other operation can be used. This command opens the link to the device.
handle | Handle for the Device to be open |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_SetProperty | ( | DeviceHandle const | deviceHandle, |
const char *const | name, | ||
const en_uint32 | value | ||
) |
Set property value.
Properties:
Property | Default | Min | Max | Description |
---|---|---|---|---|
Fx3FifoMode | 0 | 0 | 1 | Available for FX3 devices only! 0: 16-bit FIFO interface 1: 32-bit FIFO interface |
Fx3PacketSizeMultiplier | 1 | 1 | 64 | Available for FX3 devices only! FX3 packet size in 16kB units. Use low values for fast roundtrip delay and high values for high streaming bandwidth. This value must match the setting of the FPGA firmware. |
Fx3OpenTransfers | 2 | 2 | 64000 | Available for FX3 devices only! Open transfers on FX3 layer. This has no relation to open UniSCP or MM transfers. The maximum allowed value is host controller dependent. |
UniScpVendorId | 0xDEADBEEF | 0 | 0xFFFFFFFF | UniSCP vendor ID - must match slave setting for opening it - must be set prior CreateStream() and CreateMmAccess() calls - Not available for PCIe |
UniScpProductId | 0xCAFEBABE | 0 | 0xFFFFFFFF | UniSCP product ID - must match slave setting for opening it - must be set prior CreateStream() and CreateMmAccess() calls - Not available for PCIe |
deviceHandle | Handle for the Device to set the property value for |
name | Name of the property to set |
value | New value of the property |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Close | ( | DeviceSlaveHandle const | handle, |
const bool | forcing | ||
) |
Close device slave.
Close device slave must be called before the device slave is destructed. This command closes the link to the device slave.
handle | Handle for the Device slave to be close | ||||||
forcing | Forcing close
|
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Create | ( | DeviceSlaveHandle *const | handle_p, |
const char * | url, | ||
const en_uint8 | streams | ||
) |
Creator with Device slave handle as parameter and error code as return value.
handle_p | Pointer to write the handle for the created Device slave into. | |||||||||
url | URL of the device slave to create Examples:
| |||||||||
streams | Number of streams. Note that the memory mapped access also counts as one stream. |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_CreateMmAccess | ( | DeviceSlaveHandle const | deviceHandle, |
MmAccessSlaveHandle const | mmAccessHandle, | ||
const en_uint8 | streamNr | ||
) |
Create and get memory mapped slave access object.
deviceHandle | Handle to the Device slave to create memory mapped access object for |
mmAccessHandle | Handle to the Memory Mapped Access slave to assign the newly created access to. |
streamNr | Stream number to use for the memory mapped access |
FPGAMANAGER_DLL_FCT DeviceSlaveHandle DeviceSlaveApi_CreateObj | ( | const char * | url, |
const en_uint8 | streams, | ||
EN_RESULT *const | retVal_p | ||
) |
Creator with Device slave handle as return value and error code as parameter.
url | URL of the device slave to create Examples:
| |||||||||
streams | Number of streams. Note that the memory mapped access also counts as one stream. | |||||||||
retVal_p | Error code |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_CreateStream | ( | DeviceSlaveHandle const | deviceHandle, |
StreamHandle const | streamHandle, | ||
const en_uint8 | streamNr, | ||
const bool | frameBased, | ||
const bool | upStreamEna, | ||
const bool | downStreamEna | ||
) |
Create and get streaming access object.
deviceHandle | Handle to the Device slave to create stream access object for | ||||||
streamHandle | Handle to the Stream to assign the newly created access to. | ||||||
streamNr | Stream number to create | ||||||
frameBased | Stream type
| ||||||
downStreamEna | Downstream data (from master to slave)
| ||||||
upStreamEna | Upstream data (from slave to master)
|
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Delete | ( | DeviceSlaveHandle *const | handle_p | ) |
Delete Device slave and set handle to nullptr.
handle_p | Device slave to delete Is set to nullptr during the function call. |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_GetProperty | ( | DeviceSlaveHandle const | deviceHandle, |
const char *const | name, | ||
en_uint32 *const | value_p | ||
) |
Get property value.
deviceHandle | Handle for the Device to get the property value from |
name | Name of the property to get the value for |
value_p | Pointer to write the property value into |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Open | ( | DeviceSlaveHandle const | handle | ) |
Open device.
Open device must be called before any other operation can be used. This command opens the link to the device slave.
handle | Handle for the Device slave to be open |
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_SetProperty | ( | DeviceSlaveHandle const | deviceHandle, |
const char *const | name, | ||
const en_uint32 | value | ||
) |
Set property value.
Properties:
Property | Default | Min | Max | Description |
---|---|---|---|---|
UniScpVendorId | 0xDEADBEEF | 0 | 0xFFFFFFFF | UniSCP vendor ID - must match slave setting for opening it - must be set prior CreateStream() and CreateMmAccess() calls |
UniScpProductId | 0xCAFEBABE | 0 | 0xFFFFFFFF | UniSCP product ID - must match slave setting for opening it - must be set prior CreateStream() and CreateMmAccess() calls |
deviceHandle | Handle for the Device to set the property value for |
name | Name of the property to set |
value | New value of the property |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Close | ( | MmAccessHandle const | handle, |
const bool | forcing | ||
) |
Close memory-mapped access port.
handle | Handle for the MmAccess to be closed | ||||||
forcing | Forcing close
|
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Create | ( | MmAccessHandle *const | handle_p | ) |
Creator with MmAccess handle as parameter and error code as return value.
handle_p | Pointer to write the handle to the created MmAccess into |
FPGAMANAGER_DLL_FCT MmAccessHandle MmAccessApi_CreateObj | ( | EN_RESULT *const | retVal_p | ) |
Creator with MmAccess handle as return value and error code as parameter.
retVal_p | Error code |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Delete | ( | MmAccessHandle *const | handle_p | ) |
Delete MmAccess and set handle to nullptr.
handle_p | MmAccess to delete Is set to nullptr during the function call. |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_GetProperty | ( | MmAccessHandle const | mmAccessHandle, |
const char *const | name, | ||
en_uint32 *const | value_p | ||
) |
Get property value.
mmAccessHandle | Handle for the MmAccess to get the property value from |
name | Name of the property to get the value for |
value_p | Pointer to write the property value into |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_GetStatus | ( | MmAccessHandle const | mmAccessHandle, |
EProtocolStatus *const | status_p | ||
) |
Get MmAccess status.
mmAccessHandle | Handle for the MmAccess to get the status of |
status_p | Pointer to write the MmAccess status into |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Open | ( | MmAccessHandle const | handle | ) |
Open memory-mapped access port.
The memory-mapped access port must be opened before MmAccessApi_Read() and MmAccessApi_Write() can be used.
handle | Handle for the MmAccess to be opened |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Read | ( | MmAccessHandle const | mmAccessHandle, |
en_byte *const | buffer_p, | ||
const en_uint32 | bufSize, | ||
const en_uint32 | address, | ||
const bool | burst, | ||
const bool | noAddrInc, | ||
TransferHandle const | transferHandle | ||
) |
Read operation.
Read from a memory location within the FPGA.
mmAccessHandle | Handle for the MmAccess to read from | ||||||
buffer_p | Buffer to write read data into This buffer must be kept alive until the transfer completed. It is suggested to allocate this buffer on the heap ond not on the stack. | ||||||
bufSize | Size of buffer_p in bytes | ||||||
transferHandle | Handle to the Transfer to track the status of non-blocking transfers. Pass nullptr for blocking transfers. | ||||||
address | Address start reading from. | ||||||
burst | Enable burst transfers
| ||||||
noAddrInc | Disable address increment
|
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_SetProperty | ( | MmAccessHandle const | mmAccessHandle, |
const char *const | name, | ||
const en_uint32 | value | ||
) |
Set property value.
Properties:
Property | Default | Min | Max | Description |
---|---|---|---|---|
MaxUniScpPacketSize | 1400 | 16 | 64000 | Maximum UniSCP packet size in bytes - Must match for master and slave - Must fit into one ethernet frame for UDP - Not applicable for PCIe implementation |
MaxMmCommandSize | 1388 | 16 | 64000 | Maximum memory mapped command size in bytes - Must be smaller or equal to the maximum expected size on slave side |
MaxMmResponseSize | 1388 | 16 | 64000 | Maximum memory mapped response size in bytes |
MaxOpenMmTransfers | 2 | 2 | 256 | Maximum number of open memory mapped transfers. - Must be set according the the generic set for the FPGA IP-Core |
MaxUniScpPendingPackets | 1024 | 1 | 64000 | Maximum number of pending UniSCP packets. Note that memory is required for each packet. Suggestions: - UDP/TCP/USB 2.0: 16 - USB 3.0: 1024 - Not applicable for PCIe implementation |
UniScpUpPktRate | 0 | 0 | 1000000 | Minimum delay between two packets sent by the slave - Can be used to prevent packet loss for slow masters - Is rounded internally by up to 12.5% - 0 = no limitation - Not applicable for PCIe implementation |
UniScpKeepAliveTimeout | 0 | 0 | 64000 | Time between KeepAlive packets in milliseconds - 0 = No KeepAlive packets - Not applicable for PCIe implementation |
mmAccessHandle | Handle for the MmAccess to set the property value for |
name | Name of the property to set |
value | New value of the property |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_SetStatusEvtCallback | ( | MmAccessHandle const | mmAccessHandle, |
const FMmAccessStatusEvtCallbackFct | callback, | ||
void *const | arg_p | ||
) |
Set status event callback function.
mmAccessHandle | Handle for the MmAccess to register the callback for |
callback | Callback function (use nullptr for unregistering a callback) |
arg_p | Argument list to pass when calling the callback |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Write | ( | MmAccessHandle const | mmAccessHandle, |
en_byte *const | buffer_p, | ||
const en_uint32 | bufSize, | ||
const en_uint32 | address, | ||
const bool | burst, | ||
const bool | noAddrInc, | ||
TransferHandle const | transferHandle | ||
) |
Write operation.
Write to a memory location within the FPGA.
mmAccessHandle | Handle for the MmAccess to write to | ||||||
buffer_p | Buffer which contains the write data This buffer must be kept alive until the transfer completed. It is suggested to allocate this buffer on the heap ond not on the stack. | ||||||
bufSize | Size of buffer_p in bytes | ||||||
transferHandle | Handle to the Transfer to track the status of non-blocking transfers. Pass nullptr for blocking transfers. | ||||||
address | Address to start writing at. | ||||||
burst | Enable burst transfers
| ||||||
noAddrInc | Disable address increment
|
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Close | ( | MmAccessSlaveHandle const | handle, |
const bool | forcing | ||
) |
Close memory-mapped access slave.
handle | Handle for the MmAccessSlave to be closed | ||||||
forcing | Forcing close
|
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Create | ( | MmAccessSlaveHandle *const | handle_p | ) |
Creator with MmAccessSlave handle as parameter and error code as return value.
handle_p | Pointer to write the handle to the created MmAccessSlave into |
FPGAMANAGER_DLL_FCT MmAccessSlaveHandle MmAccessSlaveApi_CreateObj | ( | EN_RESULT *const | retVal_p | ) |
Creator with MmAccessSlave handle as return value and error code as parameter.
retVal_p | Error code |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Delete | ( | MmAccessSlaveHandle *const | handle_p | ) |
Delete MmAccessSlave and set handle to nullptr.
handle_p | MmAccessSlave to delete Is set to nullptr during the function call. |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_GetProperty | ( | MmAccessSlaveHandle const | mmAccessHandle, |
const char *const | name, | ||
en_uint32 *const | value_p | ||
) |
Get property value.
mmAccessHandle | Handle for the MmAccessSlave to get the property value from |
name | Name of the property to get the value for |
value_p | Pointer to write the property value into |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_GetStatus | ( | MmAccessSlaveHandle const | handle, |
EProtocolStatus *const | status_p | ||
) |
Get MmAccess slavestatus.
handle | Handle for the MmAccess slave to get the status of |
status_p | Pointer to write the MmAccess slavestatus into |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Listen | ( | MmAccessSlaveHandle const | handle | ) |
Set Memory-mapped access slave port to listen.
The memory-mapped access port must be set to listen and opened by the master before any read or write operations are accepted.
handle | Handle for the MmAccessSlave to be opened |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetProperty | ( | MmAccessSlaveHandle const | mmAccessHandle, |
const char *const | name, | ||
const en_uint32 | value | ||
) |
Set property value.
Properties:
Property | Default | Min | Max | Description |
---|---|---|---|---|
MaxUniScpPacketSize | 1400 | 16 | 64000 | Maximum UniSCP packet size in bytes - Must match for master and slave - Must fit into one ethernet frame for UDP - Not applicable for PCIe implementation |
MaxMmCommandSize | 1388 | 16 | 64000 | Maximum memory mapped command size in bytes - Must be smaller or equal to the maximum expected size on slave side |
MaxMmResponseSize | 1388 | 16 | 64000 | Maximum memory mapped response size in bytes |
MaxOpenMmTransfers | 2 | 2 | 256 | Maximum number of open memory mapped transfers. - Must be set according the the generic set for the FPGA IP-Core |
MaxUniScpPendingPackets | 1024 | 1 | 64000 | Maximum number of pending UniSCP packets. Note that memory is required for each packet. Suggestions: - UDP/TCP/USB 2.0: 16 - USB 3.0: 1024 - Not applicable for PCIe implementation |
UniScpUpPktRate | 0 | 0 | 1000000 | Minimum delay between two packets sent by the slave - Can be used to prevent packet loss for slow masters - Is rounded internally by up to 12.5% - 0 = no limitation - Not applicable for PCIe implementation |
UniScpKeepAliveTimeout | 0 | 0 | 64000 | Time between KeepAlive packets in milliseconds - 0 = No KeepAlive packets - Not applicable for PCIe implementation |
mmAccessHandle | Handle for the MmAccessSlave to set the property value for |
name | Name of the property to set |
value | New value of the property |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetReadCallback | ( | MmAccessSlaveHandle const | mmAccessHandle, |
const FMmAccessSlaveOperationCallbackFct | callback, | ||
void *const | arg_p | ||
) |
Set read operation callback function.
mmAccessHandle | Handle for the MmAccessSlave to register the callback for |
callback | Callback function (use nullptr for unregistering a callback) |
arg_p | Argument list to pass when calling the callback |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetStatusEvtCallback | ( | MmAccessSlaveHandle const | mmAccessHandle, |
const FMmAccessSlaveStatusEvtCallbackFct | callback, | ||
void *const | arg_p | ||
) |
Set status event callback function.
mmAccessHandle | Handle for the MmAccessSlave to register the callback for |
callback | Callback function (use nullptr for unregistering a callback) |
arg_p | Argument list to pass when calling the callback |
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetWriteCallback | ( | MmAccessSlaveHandle const | mmAccessHandle, |
const FMmAccessSlaveOperationCallbackFct | callback, | ||
void *const | arg_p | ||
) |
Set write operation callback function.
mmAccessHandle | Handle for the MmAccessSlave to register the callback for |
callback | Callback function (use nullptr for unregistering a callback) |
arg_p | Argument list to pass when calling the callback |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Close | ( | StreamHandle const | handle, |
const bool | forcing | ||
) |
Close stream.
handle | Handle for the Stream to be closed | ||||||
forcing | Forcing close
|
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Create | ( | StreamHandle *const | handle_p | ) |
Creator with Stream handle as parameter and error code as return value.
handle_p | Pointer to write the handle to the created Stream into. |
FPGAMANAGER_DLL_FCT StreamHandle StreamApi_CreateObj | ( | EN_RESULT *const | retVal_p | ) |
Creator with Stream handle as return value and error code as parameter.
retVal_p | Error code |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Delete | ( | StreamHandle *const | handle_p | ) |
Delete Stream and set handle to nullptr.
handle_p | Stream to delete Is set to nullptr during the function call. |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_GetProperty | ( | StreamHandle const | streamHandle, |
const char *const | name, | ||
en_uint32 *const | value_p | ||
) |
Get property value.
streamHandle | Handle for the Stream to get the property value from |
name | Name of the property to get the value for |
value_p | Pointer to write the property value into |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_GetStatus | ( | StreamHandle const | streamHandle, |
EProtocolStatus *const | status_p | ||
) |
Get stream status.
streamHandle | Handle for the Stream to get the status of |
status_p | Pointer to write the stream status into |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Open | ( | StreamHandle const | handle | ) |
Open stream.
The stream must be opened before StreamApi_Send() and StreamApi_Receive() can be used.
handle | Handle for the Stream to be opened |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Receive | ( | StreamHandle const | streamHandle, |
en_byte *const | buffer_p, | ||
const en_uint32 | bufSize, | ||
TransferHandle const | transferHandle | ||
) |
Receive operation.
For frame based streams, one frame is received. If the frame does not fit into the buffer, an error is generated.
For byte streams, the transfer is finished as soon as the buffer is full (and not earlier).
streamHandle | Handle for the Stream to receive data from |
buffer_p | Buffer to write received data into This buffer must be kept alive until the transfer completed. It is suggested to allocate this buffer on the heap ond not on the stack. |
bufSize | Size of buffer_p in bytes |
transferHandle | Handle for the Transfer to track the status of non-blocking transfers. Pass nullptr for blocking transfers. |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Send | ( | StreamHandle const | streamHandle, |
en_byte *const | buffer_p, | ||
const en_uint32 | bufSize, | ||
TransferHandle const | transferHandle | ||
) |
Send operation.
streamHandle | Handle for the Stream to send data to |
buffer_p | Buffer containing the data to send This buffer must be kept alive until the transfer completed. It is suggested to allocate this buffer on the heap ond not on the stack. |
bufSize | Size of buffer_p in bytes |
transferHandle | Handle for the Transfer to track the status of non-blocking transfers. Pass nullptr for blocking transfers. |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_SetProperty | ( | StreamHandle const | streamHandle, |
const char *const | name, | ||
const en_uint32 | value | ||
) |
Set property value.
Properties:
Property | Default | Min | Max | Description |
---|---|---|---|---|
MaxUniScpPacketSize | 1400 | 16 | 64000 | Maximum UniSCP packet size in bytes - Must match for master and slave - Must fit into one ethernet frame for UDP - Not applicable for PCIe implementation |
MaxUniScpPendingPackets | 1024 | 1 | 64000 | Maximum number of pending UniSCP packets. Note that memory is required for each packet. Suggestions: - UDP/TCP/USB 2.0: 16 - USB 3.0: 1024 - Not applicable for PCIe implementation |
UniScpUpPktRate | 0 | 0 | 1000000 | Minimum delay between two packets sent by the slave - Can be used to prevent packet loss for slow masters - Is rounded internally by up to 12.5% - 0 = no limitation - Not applicable for PCIe implementation |
OperationMode | 0 | 0 | 1 | Operation mode: - 0: Continuous (no callbacks for packets lost completely) - 1: Synchronous (callback for every packet, also for lost packets) - Not applicable for PCIe implementation |
UniScpKeepAliveTimeout | 0 | 0 | 64000 | Time between KeepAlive packets in milliseconds - 0 = No KeepAlive packets - Not applicable for PCIe implementation |
streamHandle | Handle for the Stream to set the property value for |
name | Name of the property to set |
value | New value of the property |
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_SetStatusEvtCallback | ( | StreamHandle const | streamHandle, |
const FStreamStatusEvtCallbackFct | callback, | ||
void *const | arg_p | ||
) |
Set status event callback function.
streamHandle | Handle for the Stream to register the callback for |
callback | Callback function (use nullptr for unregistering a callback) |
arg_p | Argument list to pass when calling the callback |
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_Create | ( | SystemHandle *const | handle_p | ) |
Creator with System handle as parameter and error code as return value.
handle_p | Pointer to write the handle to the created System object into |
FPGAMANAGER_DLL_FCT SystemHandle SystemApi_CreateObj | ( | EN_RESULT *const | retVal_p | ) |
Creator with System object handle as return value and error code as parameter.
retVal_p | Error code |
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_Delete | ( | SystemHandle *const | handle_p | ) |
Delete System object and set handle to nullptr.
handle_p | Handle to System object to delete Is set to nullptr during the function call. |
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetErrorMessage | ( | SystemHandle const | handle, |
const EN_RESULT | error, | ||
char ** | message_p | ||
) |
Get error message for a given error code.
The error strings are held inside the FPGA manager. Only a pointer to the corresponding error string is returned.
The error message can be used to print user messages for handled and/or unhandled errors.
handle | System object to use |
error | Error code to get error message for |
message_p | Pointer to set to the error message |
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetErrorTrace | ( | SystemHandle const | handle, |
char ** | trace_p | ||
) |
Get error trace.
The error trace string is held inside the FPGA manager. Only a pointer to it is returned.
The error trace helps to track errors.
handle | Handle to the System object to get the error trace from |
trace_p | Pointer to set to the error trace |
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetSwVersion | ( | SystemHandle const | handle, |
en_uint8 *const | major_p, | ||
en_uint8 *const | minor_p | ||
) |
Get SW version.
handle | Handle to the System object to get the SW version from |
major_p | Pointer to write the major version number into |
minor_p | Pointer to write the minor version number into |
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_Create | ( | TransferHandle *const | handle_p | ) |
Creator with Transfer handle as parameter and error code as return value.
handle_p | Pointer to write the handle for the created Transfer into. |
FPGAMANAGER_DLL_FCT TransferHandle TransferApi_CreateObj | ( | EN_RESULT *const | retVal_p | ) |
Creator with Transfer handle as return value and error code as parameter.
retVal_p | Error code |
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_Delete | ( | TransferHandle *const | handle_p | ) |
Delete transfer and set handle to nullptr.
handle_p | Transfer to delete Is set to nullptr during the function call. |
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetFrameNumber | ( | TransferHandle const | handle, |
en_uint16 *const | frameNumber_p | ||
) |
Get received UniSCP frame number.
For streaming transfers, the frame number is returned. For memory mapped transfers an error is returned.
The frame number can be used to detect if frames are missing.
handle | Handle for the Transfer to get the frame number from |
frameNumber_p | Target to write frame number into. |
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetStatus | ( | TransferHandle const | handle, |
ETransferStatus *const | transferStatus_p | ||
) |
Get transfer status.
The transfer status is updated while the transfer is executed. It can be read safely during transfer execution.
handle | Handle for the Transfer to get the status for |
transferStatus_p | Target to write the transfer status into. |
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetTransferredBytes | ( | TransferHandle const | handle, |
en_uint32 *const | bytes_p | ||
) |
Get the number of bytes transferred.
The number of bytes transferred is updated while the transfer is in progress.
At the end of the transfer it can be used to find out the number of bytes really transferred.
handle | Handle for the Transfer to get the number of transferred bytes from |
bytes_p | Target to write the number of transferred bytes into. |
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_SetCallback | ( | TransferHandle const | handle, |
FTransferCallbackFct | callback, | ||
void *const | arg_p | ||
) |
Set callback function to be executed if the transfer is completed.
The callback function is executed independently of whether the transfer was successful or was aborted due to an error.
It is allowed to not set any callback function.
handle | Handle for the Transfer to set the callback for |
callback | Callback function, use nullptr to unregister the callback. |
arg_p | Pointer to an argument list for the callback to call. |