v_voip_fec_rx
Xilinx SDK Drivers API Documentation
xvoipfec_rx.h File Reference

Overview

This is the main header file for VoIP FEC Receiver core.

VoIP FEC Receiver core is used for ST2022-6 Packet Recovery.

The VoIP FEC Receiver has 6 main Interface

  • AXI4-Stream Interface for accepting Incoming Ethernet Packet
  • AXI4-Stream Interface for transmitting RTP Packet <RTP Header | Payload>
  • AXI4-Lite interface for processor, controls the VoIP FEC Receiver.
  • AXI-MM interface for External Memory Interface
  • AXI4-Stream Interface to transmit Event Status of the Core
  • AXI4-Stream Interface to receive Packet Request from the Core.

VoIP FEC Receiver Performs Following Operation

  • Recovers ST2022-6 Packet Loss based on ST2022-5 Packets
  • Recovers Network Loss based on ST2022-7
  • Buffers and Re-Order Packet based on the Incoming RTP Sequence Number

Software Initialization & Configuration

The application needs to do following steps in order for preparing the VoIP FEC Receiver core to be ready.

  • Call XVoipFEC_RX_LookupConfig using a device ID to find the core configuration.
  • Call XVoipFEC_RX_CfgInitialize to initialize the device and the driver instance associated with it.

Virtual Memory

Threads

Asserts

Building the driver

The VoIP FEC Receiver driver is composed of several source files. This allows the user to build and link only those parts of the driver that are necessary.

MODIFICATION HISTORY:
Ver   Who    Date     Changes

1.00 mmo 02/12/16 Initial release.
 

Data Structures

struct  XVoipFEC_RX_FECParams
 This typedef contains VoIP FEC Receiver Channel Parameters. More...
 
struct  XVoipFEC_RX_FECStatistics
 This typedef contains VoIP FEC Receiver Channel Statistic. More...
 
struct  XVoipFEC_RX_FECStatus
 This typedef contains VoIP FEC Receiver and ST2022-1/5 Status. More...
 
struct  XVoipFEC_RX_HitlessStatus
 This typedef contains VoIP FEC Receiver Channel ST2022-7/Seamless Status. More...
 
struct  XVoipFEC_RX_OORMgmnt
 This typedef contains VoIP FEC Receiver Channel OOR Management. More...
 
struct  XVoipFEC_RX_MemoryCfg
 This typedef contains VoIP FEC Receiver Channel Memory Configuration or Information. More...
 
struct  XVoipFEC_RX_ChannelCfg
 This typedef contains VoIP FEC Receiver Channel Configuration/Information. More...
 
struct  XVoipFEC_RX_GenErrStatus
 This typedef contains VoIP FEC Receiver Error Status of Bufer Full Information. More...
 
struct  XVoipFEC_RX_Config
 This typedef contains configuration information for the Generic Decap core. More...
 
struct  XVoipFEC_RX
 The XVoipFEC_RX driver instance data. More...
 

Macros

#define XVOIPFEC_RX_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XVoipFEC_RX_BusyBit(InstancePtr)
 This macro Check the VoIP FEC Receiver Busy Status which indicates the core is still updating the registers. More...
 
#define XVoipFEC_RX_NumSupportedChannel(InstancePtr)
 This macro Check the Maximum Supported Channel by the VoIP FEC Receiver Core. More...
 

Functions

XVoipFEC_RX_ConfigXVoipFEC_RX_LookupConfig (u16 DeviceId)
 This function returns a reference to an XVoipFEC_RX_Config structure based on the core id, DeviceId. More...
 
int XVoipFEC_RX_CfgInitialize (XVoipFEC_RX *InstancePtr, XVoipFEC_RX_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the VoIP FEC Receiver core. More...
 
XVoipFEC_RX_Config XVoipFEC_RX_CoreInfo (XVoipFEC_RX *InstancePtr)
 This function obtains the core configuration value through register. More...
 
XVoipFEC_RX_FECStatus XVoipFEC_RX_FECStatusRegValue (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function obtains the VoIP FEC Receiver ST2022-1/5 Status (FEC Status) More...
 
XVoipFEC_RX_FECStatistics XVoipFEC_RX_FECStatisticsRegValue (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function obtains the VoIP FEC Receiver Current Channel Statistic. More...
 
XVoipFEC_RX_FECParams XVoipFEC_RX_FECParamsRegValue (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function obtains the VoIP FEC Receiver Current Channel Configured Parameters. More...
 
XVoipFEC_RX_HitlessStatus XVoipFEC_HitlessStatusRegValue (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function obtains the VoIP FEC Receiver Current Hitless Status. More...
 
void XVoipFEC_RX_CoreChannelConfig (XVoipFEC_RX *InstancePtr)
 This function configures the VoIP FEC Receiver Current Core. More...
 
void XVoipFEC_RX_SetFECParams (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function configures the VoIP FEC Receiver Channels Parameters. More...
 
void XVoipFEC_RX_ClearChannel (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function clears the Current Channel State. More...
 
void XVoipFEC_RX_SoftReset (XVoipFEC_RX *InstancePtr)
 This function perform software resets on VoIP FEC Receiver, which clears all the registers. More...
 
void XVoipFEC_RX_ChannelUpdate (XVoipFEC_RX *InstancePtr)
 This function send a pulse on VoIP FEC Receiver to update the configured channel. More...
 
void XVoipFEC_RX_ChannelClear (XVoipFEC_RX *InstancePtr)
 This function send a pulse on VoIP FEC Receiver to clear the current accessed Channel. More...
 
void XVoipFEC_RX_ChannelAccess (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function Accesses the Configurable Channel. More...
 
void XVoipFEC_RX_SetFECProcessingDelay (XVoipFEC_RX *InstancePtr)
 This function configures the FEC Processing Delay. More...
 
u32 XVoipFEC_RX_GetFECProcessingDelay (XVoipFEC_RX *InstancePtr)
 This function Gets the configured FEC Processing Delay. More...
 
u32 XVoipFEC_RX_GetFECPacketDropCnt (XVoipFEC_RX *InstancePtr)
 This function Gets the configured FEC Packet Drop. More...
 
u32 XVoipFEC_RX_GetFECBufferPeakDataCnt (XVoipFEC_RX *InstancePtr)
 This function Gets the configured FEC Peak Buffer Data Count. More...
 
void XVoipFEC_RX_ChannelEnable (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function Enables or Disable the Channel Based on User Input to the core structure. More...
 
void XVoipFEC_RX_MediaPacketBypass (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function Enables or Disable the Packet Processing Based on User Input to the core structure. More...
 
void XVoipFEC_RX_FECRecoveryDisable (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function Enables or Disable the FEC Recovery Based on User Input to the core structure. More...
 
void XVoipFEC_RX_OORCfg (XVoipFEC_RX *InstancePtr, u16 Channels)
 This function configures the OOR Handling Management. More...
 

VoIP FEC Receiver Channel Enable

enum  channel_disable
 These constants specify FEC Receiver Channel Enable/Disable. More...
 
typedef enum channel_disable XVoipFEC_TX_ChannelEnable
 These constants specify FEC Receiver Channel Enable/Disable. More...
 

ST2022-1/5 FEC Recovery Enable or Disable

enum  fec_recv_disable
 These constants specify the Recovery Enable/Disable. More...
 
typedef enum fec_recv_disable XVoipFEC_TX_FECRecoveryDisable
 These constants specify the Recovery Enable/Disable. More...
 

Incoming Packet Processing Type

enum  media_packet_bypass
 These constants specify the operating channel Enable/Disable. More...
 
typedef enum media_packet_bypass XVoipFEC_TX_MediaPacketBypass
 These constants specify the operating channel Enable/Disable. More...
 

OOR Operation Selection

enum  oor_selection
 These constants specify the OOR Operating Selection. More...
 
typedef enum oor_selection XVoipFEC_TX_OORModeSelection
 These constants specify the OOR Operating Selection. More...
 

Macro Definition Documentation

◆ XVoipFEC_RX_BusyBit

#define XVoipFEC_RX_BusyBit (   InstancePtr)
Value:
XVoipFEC_RX_ReadReg((InstancePtr)->Config.BaseAddress, \
(XVOIPFEC_RX_STATUS_REG_OFFSET)) & \
(XVOIPFEC_RX_STATUS_UPDATE_BUSY_MASK)
#define XVoipFEC_RX_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a VoIP FEC Receiver register.
Definition: xvoipfec_rx_hw.h:196

This macro Check the VoIP FEC Receiver Busy Status which indicates the core is still updating the registers.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Returns
BusyBitStatus.
Note
  void XVoipFEC_RX_AssertSoftReset(XVoipFEC_RX *InstancePtr)

Referenced by XVoipFEC_RX_ClearChannel().

◆ XVOIPFEC_RX_H_

#define XVOIPFEC_RX_H_

Prevent circular inclusions by using protection macros.

◆ XVoipFEC_RX_NumSupportedChannel

#define XVoipFEC_RX_NumSupportedChannel (   InstancePtr)
Value:
XVoipFEC_RX_ReadReg((InstancePtr)->Config.BaseAddress, \
(XVOIPFEC_RX_SYSTEM_CONFIG_REG_OFFSET)) & \
(XVOIPFEC_RX_SYS_CONFIG_C_CHANNELS_MASK)
#define XVoipFEC_RX_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a VoIP FEC Receiver register.
Definition: xvoipfec_rx_hw.h:196

This macro Check the Maximum Supported Channel by the VoIP FEC Receiver Core.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Returns
MaximumNumberOfChannelsupported.
Note
  void XVoipFEC_RX_NumSupportedChannel(XVoipFEC_RX *InstancePtr)

Typedef Documentation

◆ XVoipFEC_TX_ChannelEnable

These constants specify FEC Receiver Channel Enable/Disable.

◆ XVoipFEC_TX_FECRecoveryDisable

These constants specify the Recovery Enable/Disable.

◆ XVoipFEC_TX_MediaPacketBypass

These constants specify the operating channel Enable/Disable.

◆ XVoipFEC_TX_OORModeSelection

These constants specify the OOR Operating Selection.

Enumeration Type Documentation

◆ channel_disable

These constants specify FEC Receiver Channel Enable/Disable.

◆ fec_recv_disable

These constants specify the Recovery Enable/Disable.

◆ media_packet_bypass

These constants specify the operating channel Enable/Disable.

◆ oor_selection

These constants specify the OOR Operating Selection.

Function Documentation

◆ XVoipFEC_HitlessStatusRegValue()

XVoipFEC_RX_HitlessStatus XVoipFEC_HitlessStatusRegValue ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function obtains the VoIP FEC Receiver Current Hitless Status.

Currently checking the RTP Timestamp Difference between 2 Links on a RTP Sequence Number

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_HitlessStatus::RTP_TS_Diff, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

◆ XVoipFEC_RX_CfgInitialize()

int XVoipFEC_RX_CfgInitialize ( XVoipFEC_RX InstancePtr,
XVoipFEC_RX_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the VoIP FEC Receiver core.

This function must be called prior to using the VoIP FEC Receiver core. Initialization of the VoIP FEC Receiver includes setting up the instance data and ensuring the hardware is in a quiescent state.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
CfgPtrpoints to the configuration structure associated with the VoIP FEC Receiver core.
EffectiveAddris the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
  • XST_SUCCESS if XVoipFEC_RX_CfgInitialize was successful.
  • XST_FAILURE
Note
None.

References XVoipFEC_RX_Config::BaseAddress, and XVoipFEC_RX_SoftReset().

◆ XVoipFEC_RX_ChannelAccess()

void XVoipFEC_RX_ChannelAccess ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

◆ XVoipFEC_RX_ChannelClear()

void XVoipFEC_RX_ChannelClear ( XVoipFEC_RX InstancePtr)

This function send a pulse on VoIP FEC Receiver to clear the current accessed Channel.

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

References XVoipFEC_RX_ReadReg.

Referenced by XVoipFEC_RX_ClearChannel().

◆ XVoipFEC_RX_ChannelEnable()

void XVoipFEC_RX_ChannelEnable ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function Enables or Disable the Channel Based on User Input to the core structure.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

Referenced by XVoipFEC_RX_SetFECParams().

◆ XVoipFEC_RX_ChannelUpdate()

void XVoipFEC_RX_ChannelUpdate ( XVoipFEC_RX InstancePtr)

This function send a pulse on VoIP FEC Receiver to update the configured channel.

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

References XVoipFEC_RX_ReadReg.

Referenced by XVoipFEC_RX_CoreChannelConfig(), and XVoipFEC_RX_SetFECParams().

◆ XVoipFEC_RX_ClearChannel()

void XVoipFEC_RX_ClearChannel ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function clears the Current Channel State.

Note: This Function Should be called when the channel is disabled

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_BusyBit, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ChannelClear().

Referenced by XVoipFEC_RX_SetFECParams().

◆ XVoipFEC_RX_CoreChannelConfig()

void XVoipFEC_RX_CoreChannelConfig ( XVoipFEC_RX InstancePtr)

This function configures the VoIP FEC Receiver Current Core.

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

References XVoipFEC_RX_ChannelAccess(), XVoipFEC_RX_ChannelUpdate(), XVoipFEC_RX_SetFECParams(), and XVoipFEC_RX_SetFECProcessingDelay().

◆ XVoipFEC_RX_CoreInfo()

XVoipFEC_RX_Config XVoipFEC_RX_CoreInfo ( XVoipFEC_RX InstancePtr)

This function obtains the core configuration value through register.

Debug Function to compare with generated xvoipfec_rx_g.c generated file.

Parameters
InstancePtris a pointer to the VoIP FEC Receiver core instance.
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_Config::HWChannelNumber, and XVoipFEC_RX_ReadReg.

◆ XVoipFEC_RX_FECParamsRegValue()

XVoipFEC_RX_FECParams XVoipFEC_RX_FECParamsRegValue ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function obtains the VoIP FEC Receiver Current Channel Configured Parameters.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

◆ XVoipFEC_RX_FECRecoveryDisable()

void XVoipFEC_RX_FECRecoveryDisable ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function Enables or Disable the FEC Recovery Based on User Input to the core structure.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

Referenced by XVoipFEC_RX_SetFECParams().

◆ XVoipFEC_RX_FECStatisticsRegValue()

XVoipFEC_RX_FECStatistics XVoipFEC_RX_FECStatisticsRegValue ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function obtains the VoIP FEC Receiver Current Channel Statistic.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

◆ XVoipFEC_RX_FECStatusRegValue()

XVoipFEC_RX_FECStatus XVoipFEC_RX_FECStatusRegValue ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function obtains the VoIP FEC Receiver ST2022-1/5 Status (FEC Status)

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

◆ XVoipFEC_RX_GetFECBufferPeakDataCnt()

u32 XVoipFEC_RX_GetFECBufferPeakDataCnt ( XVoipFEC_RX InstancePtr)

This function Gets the configured FEC Peak Buffer Data Count.

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

References XVoipFEC_RX_ReadReg.

◆ XVoipFEC_RX_GetFECPacketDropCnt()

u32 XVoipFEC_RX_GetFECPacketDropCnt ( XVoipFEC_RX InstancePtr)

This function Gets the configured FEC Packet Drop.

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

References XVoipFEC_RX_ReadReg.

◆ XVoipFEC_RX_GetFECProcessingDelay()

u32 XVoipFEC_RX_GetFECProcessingDelay ( XVoipFEC_RX InstancePtr)

This function Gets the configured FEC Processing Delay.

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

References XVoipFEC_RX_ReadReg.

◆ XVoipFEC_RX_LookupConfig()

XVoipFEC_RX_Config* XVoipFEC_RX_LookupConfig ( u16  DeviceId)

This function returns a reference to an XVoipFEC_RX_Config structure based on the core id, DeviceId.

The return value will refer to an entry in the device configuration table defined in the xvoipfec_rx_g.c file.

Parameters
DeviceIdis the unique core ID of the VoIP FEC Receiver core for the lookup operation.
Returns
XVoipFEC_RX_LookupConfig returns a reference to a config record in the configuration table (in xvoipfec_rx_g.c) corresponding to DeviceId, or NULL if no match is found.
Note
None.

◆ XVoipFEC_RX_MediaPacketBypass()

void XVoipFEC_RX_MediaPacketBypass ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function Enables or Disable the Packet Processing Based on User Input to the core structure.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

Referenced by XVoipFEC_RX_SetFECParams().

◆ XVoipFEC_RX_OORCfg()

void XVoipFEC_RX_OORCfg ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function configures the OOR Handling Management.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_Config::BaseAddress, XVoipFEC_RX_ChannelAccess(), and XVoipFEC_RX_ReadReg.

Referenced by XVoipFEC_RX_SetFECParams().

◆ XVoipFEC_RX_SetFECParams()

void XVoipFEC_RX_SetFECParams ( XVoipFEC_RX InstancePtr,
u16  Channels 
)

This function configures the VoIP FEC Receiver Channels Parameters.

Parameters
InstancePtris a pointer to the XVoipFEC_RX core instance.
Channelsis current configured channel
Returns
None.
Note
None.

References XVoipFEC_RX_ChannelAccess(), XVoipFEC_RX_ChannelEnable(), XVoipFEC_RX_ChannelUpdate(), XVoipFEC_RX_ClearChannel(), XVoipFEC_RX_FECRecoveryDisable(), XVoipFEC_RX_MediaPacketBypass(), and XVoipFEC_RX_OORCfg().

Referenced by XVoipFEC_RX_CoreChannelConfig().

◆ XVoipFEC_RX_SetFECProcessingDelay()

void XVoipFEC_RX_SetFECProcessingDelay ( XVoipFEC_RX InstancePtr)

This function configures the FEC Processing Delay.

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

References XVoipFEC_RX_WriteReg.

Referenced by XVoipFEC_RX_CoreChannelConfig().

◆ XVoipFEC_RX_SoftReset()

void XVoipFEC_RX_SoftReset ( XVoipFEC_RX InstancePtr)

This function perform software resets on VoIP FEC Receiver, which clears all the registers.

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

References XVoipFEC_RX_ReadReg.

Referenced by XVoipFEC_RX_CfgInitialize().