![]() |
xdmapcie
Xilinx SDK Drivers API Documentation
|
This file contains a design example for using XDMA PCIe IP and its driver.
This is an example to show the usage of driver APIs when XDMA PCIe IP is configured as a Root Port.
The example initializes the XDMA PCIe IP and shows how to enumerate the PCIe system.
This example should be used only when XDMA PCIe IP is configured as root complex.
This code will illustrate how the XDmaPcie IP and its standalone driver can be used to:
Please note that this example enumerates and initializes PCIe end points only.
We tried to use as much of the driver's API calls as possible to show the reader how each call could be used and that probably made the example not the shortest way of doing the tasks shown as they could be done.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 tk 01/30/2019 Initial version of XDMA PCIe root complex example *
Functions | |
int | PcieInitRootComplex (XDmaPcie *XdmaPciePtr, u16 DeviceId) |
This function initializes a XDMA PCIe IP built as a root complex. More... | |
int | main (void) |
This function is the entry point for PCIe Root Complex Enumeration Example. More... | |
int main | ( | void | ) |
This function is the entry point for PCIe Root Complex Enumeration Example.
None |
References PcieInitRootComplex(), and XDmaPcie_EnumerateFabric().
int PcieInitRootComplex | ( | XDmaPcie * | XdmaPciePtr, |
u16 | DeviceId | ||
) |
This function initializes a XDMA PCIe IP built as a root complex.
XdmaPciePtr | is a pointer to an instance of XDmaPcie data structure represents a root complex IP. |
DeviceId | is XDMA PCIe IP unique ID |
References XDmaPcie_Config::BaseAddress, XDmaPcie::Config, XDmaPcie_Config::IncludeRootComplex, XDmaPcie_CfgInitialize(), XDmaPcie_ClearPendingInterrupts(), XDmaPcie_DisableInterrupts(), XDmaPcie_GetEnabledInterrupts(), XDmaPcie_GetPendingInterrupts(), XDmaPcie_GetRequesterId(), XDMAPCIE_ID_CLEAR_ALL_MASK, XDMAPCIE_IM_ENABLE_ALL_MASK, XDmaPcie_IsLinkUp, XDmaPcie_LookupConfig(), XDmaPcie_ReadLocalConfigSpace(), and XDmaPcie_WriteLocalConfigSpace().
Referenced by main().