DE10-Advanced revC demo: PCI Express Library API
From Terasic Wiki
(Difference between revisions)
(→1) |
|||
(4 intermediate revisions not shown) | |||
Line 73: | Line 73: | ||
|} | |} | ||
<div style="margin-left:0cm;margin-right:0cm;"></div> | <div style="margin-left:0cm;margin-right:0cm;"></div> | ||
+ | |||
+ | |||
* <div style="margin-left:0cm;margin-right:0cm;">'''PCIE_Read32'''</div> | * <div style="margin-left:0cm;margin-right:0cm;">'''PCIE_Read32'''</div> | ||
Line 164: | Line 166: | ||
<div style="margin-left:0cm;margin-right:0cm;"></div> | <div style="margin-left:0cm;margin-right:0cm;"></div> | ||
- | + | ||
* <div style="margin-left:0cm;margin-right:0cm;">'''PCIE_Read8'''</div> | * <div style="margin-left:0cm;margin-right:0cm;">'''PCIE_Read8'''</div> | ||
Line 352: | Line 354: | ||
|- | |- | ||
|} | |} | ||
- | |||
- | + | ||
* <div style="margin-left:0cm;margin-right:0cm;">'''PCIE_ConfigRead32'''</div> | * <div style="margin-left:0cm;margin-right:0cm;">'''PCIE_ConfigRead32'''</div> | ||
- | |||
- | |||
- | |||
{| style="border-spacing:0;width:15.251cm;" | {| style="border-spacing:0;width:15.251cm;" | ||
Line 364: | Line 362: | ||
|| '''Function:''' | || '''Function:''' | ||
- | Read PCIe Configuration Table. Read a 32-bit data by given a byte offset. | + | :Read PCIe Configuration Table. Read a 32-bit data by given a byte offset. |
|- style="background-color:#e6e6e6;border:0.5pt solid #00000a;padding:0cm;" | |- style="background-color:#e6e6e6;border:0.5pt solid #00000a;padding:0cm;" | ||
|| '''Prototype:''' | || '''Prototype:''' | ||
- | bool PCIE_ConfigRead32 ( | + | :bool PCIE_ConfigRead32 ( |
- | PCIE_HANDLE hPCIE, | + | ::PCIE_HANDLE hPCIE, |
- | uint32_t Offset, | + | ::uint32_t Offset, |
- | uint32_t *pdwData | + | ::uint32_t *pdwData |
- | ); | + | ::); |
|- style="background-color:#e6e6e6;border:0.5pt solid #00000a;padding:0cm;" | |- style="background-color:#e6e6e6;border:0.5pt solid #00000a;padding:0cm;" | ||
|| '''Parameters:''' | || '''Parameters:''' | ||
- | hPCIE: | + | :hPCIE: |
- | A PCIe handle return by PCIE_Open function. | + | ::A PCIe handle return by PCIE_Open function. |
- | Offset: | + | :Offset: |
- | Specify the target byte of offset in PCIe configuration table. | + | ::Specify the target byte of offset in PCIe configuration table. |
- | pdwData: | + | :pdwData: |
- | A 4-bytes buffer to retrieve the 32-bit data. | + | ::A 4-bytes buffer to retrieve the 32-bit data. |
|- style="background-color:#e6e6e6;border:0.5pt solid #00000a;padding:0cm;" | |- style="background-color:#e6e6e6;border:0.5pt solid #00000a;padding:0cm;" | ||
|| '''Return Value:''' | || '''Return Value:''' | ||
- | Return '''true''' if read data is successful; otherwise '''false''' is returned. | + | :Return '''true''' if read data is successful; otherwise '''false''' is returned. |
|- | |- | ||
|} | |} | ||
+ | |||
+ | '''[[DE10_Advance_revC_demo: PCI Express Design for Windows |Back]]''' |
Latest revision as of 16:12, 27 August 2018
Below shows the exported API in the TERASIC_PCIE_AVMM.dll. The API prototype is defined in the TERASIC_PCIE_AVMM.h.
Note: the Linux library terasic_pcie_qsys.so also use the same API and header file.
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:
|
- PCIE_Read8
Function:
Read an 8-bit data from the FPGA board. |
Prototype:
|
Parameters:
|
Return Value:
|
- PCIE_Write8
Function:
|
Prototype:
|
Parameters:
|
Return Value:
|
- PCIE_DmaRead
Function:
Maximal read size is (4GB-1) bytes. |
Prototype:
|
Parameters:
|
Return Value:
|
- PCIE_DmaWrite
Function:
|
Prototype:
); |
Parameters:
|
Return Value:
|
- PCIE_ConfigRead32
Function:
|
Prototype:
|
Parameters:
|
Return Value:
|