DE10-Advanced revC demo: PCI Express Library API
From Terasic Wiki
Function:
|
Prototype:
|
Parameters:
|
Return Value:
|
Function:
|
Prototype:
void PCIE_Close(
|
Parameters:
|
Return Value:
|
- PCIE_Read32
Function:
|
Prototype:
|
Parameters:
|
Return Value:
|
- PCIE_Write32
Function:
|
Prototype:
uint32_t dwData); |
Parameters:
|
Return Value:
Return true if write data is successful; otherwise false is returned. |
1
- PCIE_Read8
Function:
Read an 8-bit data from the FPGA board. |
Prototype:
bool PCIE_Read8( PCIE_HANDLE hPCIE, PCIE_BAR PcieBar, PCIE_ADDRESS PcieAddress, uint8_t *pByte); |
Parameters:
hPCIE: A PCIe handle return by PCIE_Open function. PcieBar: Specify the target BAR. PcieAddress: Specify the target address in FPGA. pByte: A buffer to retrieve the 8-bit data. |
Return Value:
Return true if read data is successful; otherwise false is returned. |
- PCIE_Write8
Function:
Write an 8-bit data to the FPGA Board. |
Prototype:
bool PCIE_Write8( PCIE_HANDLE hPCIE, PCIE_BAR PcieBar, PCIE_ADDRESS PcieAddress, uint8_t Byte); |
Parameters:
hPCIE: A PCIe handle return by PCIE_Open function. PcieBar: Specify the target BAR. PcieAddress: Specify the target address in FPGA. Byte: Specify an 8-bit data which will be written to FPGA board. |
Return Value:
Return true if write data is successful; otherwise false is returned. |
- PCIE_DmaRead
Function:
Read data from the memory-mapped memory of FPGA board in DMA. Maximal read size is (4GB-1) bytes. |
Prototype:
bool PCIE_DmaRead( PCIE_HANDLE hPCIE, PCIE_LOCAL_ADDRESS LocalAddress, void *pBuffer, uint32_t dwBufSize ); |
Parameters:
hPCIE: A PCIe handle return by PCIE_Open function. LocalAddress: Specify the target memory-mapped address in FPGA. pBuffer: A pointer to a memory buffer to retrieved the data from FPGA. The size of buffer should be equal or larger the dwBufSize. dwBufSize: Specify the byte number of data retrieved from FPGA. |
Return Value:
Return true if read data is successful; otherwise false is returned. |
- PCIE_DmaWrite
Function:
Write data to the memory-mapped memory of FPGA board in DMA. |
Prototype:
bool PCIE_DmaWrite( PCIE_HANDLE hPCIE, PCIE_LOCAL_ADDRESS LocalAddress, void *pData, uint32_t dwDataSize ); |
Parameters:
hPCIE: A PCIe handle return by PCIE_Open function. LocalAddress: Specify the target memory mapped address in FPGA. pData: A pointer to a memory buffer to store the data which will be written to FPGA. dwDataSize: Specify the byte number of data which will be written to FPGA. |
Return Value:
Return true if write data is successful; otherwise false is returned. |
- PCIE_ConfigRead32
Function:
Read PCIe Configuration Table. Read a 32-bit data by given a byte offset. |
Prototype:
bool PCIE_ConfigRead32 ( PCIE_HANDLE hPCIE, uint32_t Offset, uint32_t *pdwData ); |
Parameters:
hPCIE: A PCIe handle return by PCIE_Open function. Offset: Specify the target byte of offset in PCIe configuration table. pdwData: A 4-bytes buffer to retrieve the 32-bit data. |
Return Value:
Return true if read data is successful; otherwise false is returned.
|