
DE10-Agilex
User Manual
125
www.terasic.com
January 29,
2021
TERASIC_PCIE_AVMM512.DLL API. The details of API are described below:
7.4
PCI Express Library API
Below shows the exported API in the TERASIC_PCIE_AVMM512.DLL. The API
prototype is defined in the TERASIC_PCIE_AVMM512.h.
Note: the Linux library terasic_pcie512_qsys.so also use the same API and header file.
PCIE_Open
Function:
Open a specified PCIe card with vendor ID, device ID, and matched card index.
Prototype:
PCIE_HANDLE PCIE_Open(
uint8_t wVendorID,
uint8_t wDeviceID,
uint8_t wCardIndex);
Parameters:
wVendorID:
Specify the desired vendor ID. A zero value means to ignore the vendor ID.
wDeviceID:
Specify the desired device ID. A zero value means to ignore the device ID.
wCardIndex:
Specify the matched card index, a zero based index, based on the matched
vendor ID and device ID.
Return Value:
Return a handle to presents specified PCIe card. A positive value is return if the PCIe
card is opened successfully. A value zero means failed to connect the target PCIe
card.
This handle value is used as a parameter for other functions, e.g. PCIE_Read32.
Users need to call PCIE_Close to release handle once the handle is no longer used.
PCIE_Close
Function:
Close a handle associated to the PCIe card.
Prototype: