| pciepsu Vitis Drivers API Documentation

- Overview
- APIs
- File List
- Examples

Functions
xpciepsu_egress_ep_enable_example.c File Reference

## Overview

This file contains a design example for using PS PCIe IP and its driver.

This is an example to show the usage of driver APIs which configures PS PCIe EndPoint.

The example initializes the PS PCIe EndPoint and shows how to use the API's.

This code will illustrate how the XPciePsu and its standalone driver can be used to:

- Initialize a PS PCIe bridge core built as an end point
- Retrieve root complex configuration assigned to end point
- Provides Egress translation setup

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  02/13              Initial version
    *

## Functions
int | XPciePsu_InitEndPoint (XPciePsu *PciePsuPtr, u16 DeviceId)
| This function initializes a PSU PCIe EndPoint complex. More...
void | XPciePsu_EP_IntrHandler (XPciePsu *PciePsuPtr)
| This function handles doorbell interrupts for PCIE Endpoint. More...
int | XPciePsu_EP_InitIntr (void)
| This function Initializes interrupts for PCIe EndPoint. More...
int | main ()
| This function is the entry point for PCIe EndPoint Example. More...

## Function Documentation

int main | ( | void |  | ) |

This function is the entry point for PCIe EndPoint Example.

Parameters

  None |

Returns
  - XST_SUCCESS if successful
  - XST_FAILURE if unsuccessful.

Note
  None.

References XPciePsu_Egress_EP_BridgeInitialize(), XPciePsu_EP_InitIntr(), XPciePsu_EP_SetupEgress(), XPciePsu_EP_WaitForLinkup(), XPciePsu_InitEndPoint(), XPciePsu_ReadReg(), and XPciePsu_WriteReg().

int XPciePsu_EP_InitIntr | ( | void |  | ) |

This function Initializes interrupts for PCIe EndPoint.

Parameters

  None |

Returns
  - XST_SUCCESS if successful
  - XST_FAILURE if unsuccessful

Note
  None

References XPciePsu_EP_IntrHandler().

Referenced by main().

void XPciePsu_EP_IntrHandler | ( | XPciePsu * | PciePsuPtr | ) |

This function handles doorbell interrupts for PCIE Endpoint.

Parameters

  PciePsuPtr | is a pointer to an instance of XPciePsu data

Returns
  -None

Note
  None

References XPciePsu_ReadReg(), and XPciePsu_WriteReg().

Referenced by XPciePsu_EP_InitIntr().

int XPciePsu_InitEndPoint | ( | XPciePsu * | PciePsuPtr,
|  | u16 | DeviceId
| ) |  |

This function initializes a PSU PCIe EndPoint complex.

Parameters

  PciePsuPtr | is a pointer to an instance of XPciePsu data structure represents a root complex.
  DeviceId | is PSU PCIe root complex unique ID

Returns
  - XST_SUCCESS if successful.
  - XST_FAILURE if unsuccessful.

Note
  None.

References XPciePsu_EP_CfgInitialize(), and XPciePsu_LookupConfig().

Referenced by main().