vphy
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups
xvphy.c File Reference

Overview

Contains a minimal set of functions for the XVphy driver that allow access to all of the Video PHY core's functionality.

See xvphy.h for a detailed description of the driver.

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 als, 10/19/15 Initial release. gm 1.1 gm 02/01/16 Added GTPE2 and GTHE4 support Added more events to XVphy_LogEvent definitions. Added TxBufferBypass in XVphy_Config structure. Added XVphy_SetDefaultPpc and XVphy_SetPpc functions. als Added XVphy_GetLineRateHz function. gm 20/04/16 Added XVphy_GetRcfgChId function 1.2 gm Added HdmiFastSwitch in XVphy_Config Fixed bug in XVphy_IsPllLocked function Changed EffectiveAddr datatype in XVphy_CfgInitialize to UINTPTR Used usleep API instead of MB_Sleep API Fixed Null pointer dereference in XVphy_IBufDsEnable Suppressed warning messages due to unused arguments 1.4 gm 29/11/16 Moved internally used APIs to xvphy_i.c/h Added preprocessor directives for sw footprint reduction Fixed c++ compiler warnings 1.6 gm 12/06/17 Changed FAILURE return value of XVphy_DrpRead to 0xDEAD Added XVphy_DrpRd, XVphy_SetErrorCallback, XVphy_SetPllLayoutErrorCallback and XVphy_RegisterDebug APIs Added filter in XVphy_MmcmStart to prevent MMCM from starting when divider values are invalid 1.7 gm 13/09/17 Added GTYE4 support Updated XVphy_MmcmStart to be able to support a system with active HDMI and DP Added xvphy_mmcme2/3/4.c drivers to move MMCM configuration from RTL to SW Moved XVphy_MmcmWriteParameters to xvphy_mmcme2/3/4.c Added XVphy_SetPolarity, XVphy_SetPrbsSel and XVphy_TxPrbsForceError APIs 1.8 gm 05/14/18 Removed XVphy_DrpWrite and XVphy_DrpRead APIs 23/07/18 Added APIs XVphy_SetTxVoltageSwing and XVphy_SetTxPreEmphasis from xvphy_i.c/h Added XVphy_SetTxPostCursor API 1.9 gm 14/05/18 Added XVphy_SetRxLpm from xvphy_i.c/.h 1.10 ssh 16/08/22 Added support for multi gt (GTHE4 and GTYE4) 1.11 ssh 04/02/24 Added support for DP2.1 1.12 ssh 30/01/26 Updated QPLL0 and QPLL1 DRP values for DP2.1

See xvphy.h for a detailed description of the driver.

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 als 10/19/15 Initial release. 1.1 gm 02/01/16 Additional events for event log printout 1.2 gm Added log events for debugging 1.4 gm 11/24/16 Made debug log optional (can be disabled via makefile) Added XVPHY_LOG_EVT_TX_ALIGN_TMOUT log event 1.6 gm 06/08/17 Added XVPHY_LOG_EVT_HDMI20_ERR log event Added Red & Yellow printing for errors and warnings Added XVPHY_LOG_EVT_NO_QPLL_ERR log event Changed xil_printf new lines to carriage return Added XVPHY_LOG_EVT_DRU_CLK_ERR log event 1.7 gm 13/09/17 Added XVPHY_LOG_EVT_USRCLK_ERR event

#include "xparameters.h"
#include "xstatus.h"
#include "xvphy.h"
#include "xvphy_i.h"
#include "xvphy_hdmi.h"
#include "sleep.h"
#include "xvphy_gt.h"

Functions

void XVphy_CfgInitialize (XVphy *InstancePtr, XVphy_Config *ConfigPtr, UINTPTR EffectiveAddr)
 This function retrieves the configuration for this Video PHY instance and fills in the InstancePtr->Config structure. More...
 
u32 XVphy_PllInitialize (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_PllRefClkSelType QpllRefClkSel, XVphy_PllRefClkSelType CpllRefClkSel, XVphy_PllType TxPllSelect, XVphy_PllType RxPllSelect)
 This function will initialize the PLL selection for a given channel. More...
 
void XVphy_WaitUs (XVphy *InstancePtr, u32 MicroSeconds)
 This function is the delay/sleep function for the XVphy driver. More...
 
u32 XVphy_GetVersion (XVphy *InstancePtr)
 This function will obtian the IP version. More...
 
u32 XVphy_CfgLineRate (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u64 LineRateHz)
 Configure the channel's line rate. More...
 
XVphy_PllType XVphy_GetPllType (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, XVphy_ChannelId ChId)
 Obtain the channel's PLL reference clock selection. More...
 
u64 XVphy_GetLineRateHz (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 This function will return the line rate in Hz for a given channel / quad. More...
 
u32 XVphy_ResetGtPll (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold)
 This function will reset the GT's PLL logic. More...
 
u32 XVphy_ResetGtTxRx (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold)
 This function will reset the GT's TX/RX logic. More...
 
u32 XVphy_SetPolarity (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Polarity)
 This function will set/clear the TX/RX polarity bit. More...
 
u32 XVphy_SetPrbsSel (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, XVphy_PrbsPattern Pattern)
 This function will set the TX/RXPRBSEL of the GT. More...
 
u32 XVphy_TxPrbsForceError (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 ForceErr)
 This function will set the TX/RXPRBSEL of the GT. More...
 
void XVphy_SetTxVoltageSwing (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Vs)
 This function will set the TX voltage swing value for a given channel. More...
 
void XVphy_SetTxPreEmphasis (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Pe)
 This function will set the TX pre-emphasis value for a given channel. More...
 
void XVphy_SetTxPostCursor (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Pc)
 This function will set the TX post-cursor value for a given channel. More...
 
void XVphy_SetRxLpm (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Enable)
 This function will enable or disable the LPM logic in the Video PHY core. More...
 
u32 XVphy_DrpWr (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u16 Addr, u16 Val)
 This function will initiate a write DRP transaction. More...
 
u16 XVphy_DrpRd (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u16 Addr, u16 *RetVal)
 This function will initiate a read DRP transaction. More...
 
void XVphy_MmcmPowerDown (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Hold)
 This function will power down the mixed-mode clock manager (MMCM) core. More...
 
void XVphy_MmcmStart (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir)
 This function will start the mixed-mode clock manager (MMCM) core. More...
 
void XVphy_IBufDsEnable (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Enable)
 This function enables the TX or RX IBUFDS peripheral. More...
 
void XVphy_Clkout1OBufTdsEnable (XVphy *InstancePtr, XVphy_DirectionType Dir, u8 Enable)
 This function enables the TX or RX CLKOUT1 OBUFTDS peripheral. More...
 
u32 XVphy_IsBonded (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 This function returns true when the RX and TX are bonded and are running from the same (RX) reference clock. More...
 
void XVphy_SetErrorCallback (XVphy *InstancePtr, void *CallbackFunc, void *CallbackRef)
 This function installs a callback function for the VPHY error conditions. More...
 
void XVphy_RegisterDebug (XVphy *InstancePtr)
 This function prints out Video PHY register and GT Channel and Common DRP register contents. More...
 

Function Documentation

void XVphy_CfgInitialize ( XVphy InstancePtr,
XVphy_Config ConfigPtr,
UINTPTR  EffectiveAddr 
)

This function retrieves the configuration for this Video PHY instance and fills in the InstancePtr->Config structure.

Parameters
InstancePtris a pointer to the XVphy instance.
ConfigPtris a pointer to the configuration structure that will be used to copy the settings from.
EffectiveAddris the device base address in the virtual memory space. If the address translation is not used, then the physical address is passed.
Returns
None.
Note
Unexpected errors may occur if the address mapping is changed after this function is invoked.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Config::DruRefClkSel, XVphy::IsReady, XVphy_Config::RxRefClkSel, XVphy_Config::RxSysPllClkSel, XVphy_Config::TxRefClkSel, XVphy_Config::TxSysPllClkSel, and XVphy_Config::XcvrType.

u32 XVphy_CfgLineRate ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u64  LineRateHz 
)

Configure the channel's line rate.

This is a software only configuration and this value is used in the PLL calculator.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
LineRateHzis the line rate in Hz to configure software.
Returns
  • XST_SUCCESS if the reference clock type is valid.
  • XST_FAILURE otherwise.
Note
None.

References XVphy_Channel::LineRateHz, XVphy::Quads, and XVphy_Ch2Ids().

void XVphy_Clkout1OBufTdsEnable ( XVphy InstancePtr,
XVphy_DirectionType  Dir,
u8  Enable 
)

This function enables the TX or RX CLKOUT1 OBUFTDS peripheral.

Parameters
InstancePtris a pointer to the XVphy core instance.
Diris an indicator for TX or RX.
Enablespecifies TRUE/FALSE value to either enable or disable the OBUFTDS, respectively.
Returns
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVPHY_MISC_RXUSRCLK_REG, XVPHY_MISC_TXUSRCLK_REG, XVphy_ReadReg, and XVphy_WriteReg.

u16 XVphy_DrpRd ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u16  Addr,
u16 *  RetVal 
)

This function will initiate a read DRP transaction.

It is a wrapper around XVphy_DrpAccess.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID on which to direct the DRP access.
Addris the DRP address to issue the DRP access to.
RetValis the DRP read_value returned implicitly.
Returns
  • XST_SUCCESS if the DRP access was successful.
  • XST_FAILURE otherwise, if the busy bit did not go low, or if the ready bit did not go high.
Note
None.

Referenced by XVphy_RegisterDebug().

u32 XVphy_DrpWr ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u16  Addr,
u16  Val 
)

This function will initiate a write DRP transaction.

It is a wrapper around XVphy_DrpAccess.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID on which to direct the DRP access.
Addris the DRP address to issue the DRP access to.
Valis the value to write to the DRP address.
Returns
  • XST_SUCCESS if the DRP access was successful.
  • XST_FAILURE otherwise, if the busy bit did not go low, or if the ready bit did not go high.
Note
None.

Referenced by XVphy_MmcmWriteParameters().

u64 XVphy_GetLineRateHz ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

This function will return the line rate in Hz for a given channel / quad.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to check.
ChIdis the channel ID for which to retrieve the line rate.
Returns
The line rate in Hz.
Note
None.

References XVphy_Channel::LineRateHz, and XVphy::Quads.

Referenced by XVphy_PllCalculator().

XVphy_PllType XVphy_GetPllType ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
XVphy_ChannelId  ChId 
)

Obtain the channel's PLL reference clock selection.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
ChIdis the channel ID which to operate on.
Returns
The PLL type being used by the channel.
Note
None.

References XVphy::Config, XVphy_Config::XcvrType, XVphy_GetSysClkDataSel(), and XVphy_GetSysClkOutSel().

Referenced by XVphy_IsPllLocked().

u32 XVphy_GetVersion ( XVphy InstancePtr)

This function will obtian the IP version.

Parameters
InstancePtris a pointer to the XVphy core instance.
Returns
The IP version of the Video PHY core.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVPHY_VERSION_REG.

void XVphy_IBufDsEnable ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
u8  Enable 
)

This function enables the TX or RX IBUFDS peripheral.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
Enablespecifies TRUE/FALSE value to either enable or disable the IBUFDS, respectively.
Returns
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Config::DruIsPresent, XVphy_Config::DruRefClkSel, XVphy_Config::RxRefClkSel, XVphy_Config::TxRefClkSel, XVPHY_IBUFDS_GTXX_CTRL_GTREFCLK0_CEB_MASK, XVPHY_IBUFDS_GTXX_CTRL_GTREFCLK1_CEB_MASK, XVPHY_IBUFDS_GTXX_CTRL_REG, XVPHY_MISC_RXUSRCLK_REG, XVPHY_MISC_TXUSRCLK_REG, XVphy_ReadReg, and XVphy_WriteReg.

u32 XVphy_IsBonded ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

This function returns true when the RX and TX are bonded and are running from the same (RX) reference clock.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to check.
Returns
TRUE if the RX and TX are using the same PLL, FALSE otherwise.
Note
None.

References XVphy_GetSysClkDataSel(), and XVphy_GetSysClkOutSel().

void XVphy_MmcmPowerDown ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
u8  Hold 
)

This function will power down the mixed-mode clock manager (MMCM) core.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the power down if set to 1. If set to 0: power down, then power back up.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVPHY_MMCM_RXUSRCLK_CTRL_REG, XVPHY_MMCM_TXUSRCLK_CTRL_REG, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_MmcmStart().

void XVphy_MmcmStart ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir 
)

This function will start the mixed-mode clock manager (MMCM) core.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
Returns
None.
Note
None.

References XVphy::Config, XVphy::Quads, XVphy_Quad::RxMmcm, XVphy_Config::RxProtocol, XVphy_Quad::TxMmcm, XVphy_Config::TxProtocol, XVphy_IsHDMI(), XVPHY_LOG_EVT_RXPLL_RECONFIG, XVPHY_LOG_EVT_TXPLL_RECONFIG, XVphy_MmcmLockedMaskEnable(), XVphy_MmcmPowerDown(), XVphy_MmcmReset(), XVphy_MmcmWriteParameters(), and XVphy_WaitUs().

u32 XVphy_PllInitialize ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_PllRefClkSelType  QpllRefClkSel,
XVphy_PllRefClkSelType  CpllRefClkSel,
XVphy_PllType  TxPllSelect,
XVphy_PllType  RxPllSelect 
)

This function will initialize the PLL selection for a given channel.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
QpllRefClkSelis the QPLL reference clock selection for the quad.
  • In GTP, this is used to hold PLL0 refclk selection.
CpllRefClkSelis the CPLL reference clock selection for the quad.
  • In GTP, this is used to hold PLL1 refclk selection.
TxPllSelectis the reference clock selection for the quad's TX PLL dividers.
RxPllSelectis the reference clock selection for the quad's RX PLL dividers.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy::Config, Pll2SysClkData(), Pll2SysClkOut(), XVphy_Config::XcvrType, XVphy_CfgPllRefClkSel(), XVphy_CfgSysClkDataSel(), XVphy_CfgSysClkOutSel(), and XVphy_WriteCfgRefClkSelReg().

void XVphy_RegisterDebug ( XVphy InstancePtr)

This function prints out Video PHY register and GT Channel and Common DRP register contents.

Parameters
InstancePtris a pointer to the Vphy core instance.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy::HdmiIsQpllPresent, XVphy_Config::RxChannels, XVphy_Config::RxProtocol, XVphy_Config::TxChannels, XVphy_Config::TxProtocol, XVphy_Config::XcvrType, XVphy_DrpRd(), and XVphy_ReadReg.

u32 XVphy_ResetGtPll ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
u8  Hold 
)

This function will reset the GT's PLL logic.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_RX_INIT_REG, XVPHY_TX_INIT_REG, XVPHY_TXRX_INIT_PLLGTRESET_ALL_MASK, XVPHY_TXRX_INIT_PLLGTRESET_MASK, and XVphy_WriteReg.

u32 XVphy_ResetGtTxRx ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
u8  Hold 
)

This function will reset the GT's TX/RX logic.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_RX_INIT_REG, XVPHY_TX_INIT_REG, XVPHY_TXRX_INIT_GTRESET_ALL_MASK, XVPHY_TXRX_INIT_GTRESET_MASK, and XVphy_WriteReg.

void XVphy_SetErrorCallback ( XVphy InstancePtr,
void *  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for the VPHY error conditions.

Parameters
InstancePtris a pointer to the XVPhy instance.
CallbackFuncis the address to the callback function.
CallbackRefis the user data item that will be passed to the callback function when it is invoked.
Returns
None.
Note
The XVphy_ErrorHandler API calls the registered function in ErrorCallback and passes two arguments: 1) CallbackRef 2) Error Type as defined by XVphy_ErrType.

Sample Function Call: CallbackFunc(CallbackRef, XVphy_ErrType);

References XVphy::ErrorCallback, and XVphy::ErrorRef.

u32 XVphy_SetPolarity ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
u8  Polarity 
)

This function will set/clear the TX/RX polarity bit.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Polarity0-Not inverted 1-Inverted
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_RX_CONTROL_REG, XVPHY_TX_CONTROL_REG, and XVphy_WriteReg.

u32 XVphy_SetPrbsSel ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
XVphy_PrbsPattern  Pattern 
)

This function will set the TX/RXPRBSEL of the GT.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Patternis the pattern XVphy_PrbsPattern
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Ch2Ids(), XVphy_ReadReg, XVPHY_RX_CONTROL_REG, XVPHY_TX_CONTROL_REG, and XVphy_WriteReg.

void XVphy_SetRxLpm ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
u8  Enable 
)

This function will enable or disable the LPM logic in the Video PHY core.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Diris an indicator for TX or RX.
Enablewill enable (if 1) or disable (if 0) the LPM logic.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_RX_EQ_CDR_REG, and XVphy_WriteReg.

void XVphy_SetTxPostCursor ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u8  Pc 
)

This function will set the TX post-cursor value for a given channel.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Pcis the post-cursor value to write.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_TX_DRIVER_CH12_REG, XVPHY_TX_DRIVER_CH34_REG, and XVphy_WriteReg.

void XVphy_SetTxPreEmphasis ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u8  Pe 
)

This function will set the TX pre-emphasis value for a given channel.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Peis the pre-emphasis value to write.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_TX_DRIVER_CH12_REG, XVPHY_TX_DRIVER_CH34_REG, and XVphy_WriteReg.

void XVphy_SetTxVoltageSwing ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u8  Vs 
)

This function will set the TX voltage swing value for a given channel.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Vsis the voltage swing value to write.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_TX_DRIVER_CH12_REG, XVPHY_TX_DRIVER_CH34_REG, and XVphy_WriteReg.

u32 XVphy_TxPrbsForceError ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u8  ForceErr 
)

This function will set the TX/RXPRBSEL of the GT.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
ForceErr0-No Error 1-Force Error
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_TX_CONTROL_REG, and XVphy_WriteReg.

void XVphy_WaitUs ( XVphy InstancePtr,
u32  MicroSeconds 
)

This function is the delay/sleep function for the XVphy driver.

For the Zynq family, there exists native sleep functionality. For MicroBlaze however, there does not exist such functionality. In the MicroBlaze case, the default method for delaying is to use a predetermined amount of loop iterations. This method is prone to inaccuracy and dependent on system configuration; for greater accuracy, the user may supply their own delay/sleep handler, pointed to by InstancePtr->UserTimerWaitUs, which may have better accuracy if a hardware timer is used.

Parameters
InstancePtris a pointer to the XVphy instance.
MicroSecondsis the number of microseconds to delay/sleep for.
Returns
None.
Note
None.

References XVphy::IsReady, and XVphy::UserTimerWaitUs.

Referenced by XVphy_MmcmStart().