v_voip_fec_tx
Xilinx SDK Drivers API Documentation
xvoipfec_tx.h File Reference

Overview

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

VoIP FEC Transmitter core is used to generate redundant (FEC:ST2022-1 or ST2022-5) packets based on user configured setting

The VoIP FEC Transmitter has 4 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 Transmitter.
  • AXI-MM interface for External Memory Interface

VoIP FEC Transmitter Performs Following Operation

  • Generate Redundant Packet (FEC:ST2022-1 or ST2022-5)

Software Initialization & Configuration

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

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

Virtual Memory

Threads

Asserts

Building the driver

The VoIP FEC Transmitter 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_TX_FECParams
 This typedef contains FEC Configuration Parameters. More...
 
struct  XVoipFEC_TX_ChannelCfg
 This typedef contains FEC Configuration Parameters on Channel Space. More...
 
struct  XVoipFEC_TX_PktCnt
 This typedef contains FEC Statistic Components. More...
 
struct  XVoipFEC_TX_Config
 This typedef contains configuration information for the VoIP FEC Transmitter core. More...
 
struct  XVoipFEC_TX
 The XVoipFEC_TX driver instance data. More...
 

Macros

#define XVOIPFEC_TX_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XVoipFEC_TX_BusyBit(InstancePtr)
 This macro Check the VoIP FEC Transmitter Busy Status which indicates the core is still updating the registers. More...
 

Functions

XVoipFEC_TX_ConfigXVoipFEC_TX_LookupConfig (u16 DeviceId)
 This function returns a reference to an XVoipFEC_TX_Config structure based on the core id, DeviceId. More...
 
int XVoipFEC_TX_CfgInitialize (XVoipFEC_TX *InstancePtr, XVoipFEC_TX_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the VoIP FEC Transmitter core. More...
 
XVoipFEC_TX_Config XVoipFEC_TX_CoreStatusRegValue (XVoipFEC_TX *InstancePtr)
 This function reads the Core Information (Configured by user through GUI), in the VoIP FEC Transmitter Register. More...
 
XVoipFEC_TX_PktCnt XVoipFEC_TX_CoreStatisics (XVoipFEC_TX *InstancePtr)
 This function perform Statistic Resets on VoIP FEC Transmitter (General Space) More...
 
XVoipFEC_TX_FECParams XVoipFEC_TX_FECParamsRegValue (XVoipFEC_TX *InstancePtr, u16 Channels)
 This function perform Reads Configured FEC Parameters. More...
 
void XVoipFEC_TX_SetFECParams (XVoipFEC_TX *InstancePtr, u16 Channels)
 This function Configures the FEC Parameters. More...
 
void XVoipFEC_TX_CoreChannelConfig (XVoipFEC_TX *InstancePtr)
 This function Configure all the VoIP FEC Transmitter Channel Space based on user configured value. More...
 
void XVoipFEC_TX_SoftReset (XVoipFEC_TX *InstancePtr)
 This function perform software resets on VoIP FEC Transmitter, which clears all the registers. More...
 
void XVoipFEC_TX_ChannelUpdate (XVoipFEC_TX *InstancePtr)
 This function perform Channel on VoIP FEC Transmitter, which updates the configured channel space register. More...
 
void XVoipFEC_ChannelAccess (XVoipFEC_TX *InstancePtr, u16 Channels)
 This function accesses the Channel, need to be called before performing channel space register configuration. More...
 
void XVoipFEC_TX_SetFEC_D (XVoipFEC_TX *InstancePtr, u16 Channels)
 This function sets FEC D Value. More...
 
void XVoipFEC_TX_SetFEC_L (XVoipFEC_TX *InstancePtr, u16 Channels)
 This function sets FEC L Value. More...
 
void XVoipFEC_TX_SetFECMode (XVoipFEC_TX *InstancePtr, u16 Channels)
 This function sets FEC Mode Value. More...
 
void XVoipFEC_TX_SetFECNonBlockAllign (XVoipFEC_TX *InstancePtr, u16 Channels)
 This function sets FEC Block Alignment Mode. More...
 

Non Block Align Components

enum  non_block_allign
 These constants specify different types of FEC Block Align. More...
 
typedef enum non_block_allign XVoipFEC_TX_NonBlockAlign
 These constants specify different types of FEC Block Align. More...
 

FEC Mode

enum  fec_mode
 These constants specify component of FEC Mode Configuration. More...
 
typedef enum fec_mode XVoipFEC_TX_FECMode
 These constants specify component of FEC Mode Configuration. More...
 

Macro Definition Documentation

◆ XVoipFEC_TX_BusyBit

#define XVoipFEC_TX_BusyBit (   InstancePtr)
Value:
XVoipFEC_TX_ReadReg((InstancePtr)->Config.BaseAddress, \
(XVOIPFEC_TX_STATUS_REG_OFFSET)) & \
(XVOIPFEC_TX_STATUS_UPDATE_BUSY_MASK)
#define XVoipFEC_TX_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a VoIP FEC Transmitter register.
Definition: xvoipfec_tx_hw.h:151

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

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

Referenced by XVoipFEC_TX_CfgInitialize().

◆ XVOIPFEC_TX_H_

#define XVOIPFEC_TX_H_

Prevent circular inclusions by using protection macros.

Typedef Documentation

◆ XVoipFEC_TX_FECMode

These constants specify component of FEC Mode Configuration.

◆ XVoipFEC_TX_NonBlockAlign

These constants specify different types of FEC Block Align.

Enumeration Type Documentation

◆ fec_mode

enum fec_mode

These constants specify component of FEC Mode Configuration.

◆ non_block_allign

These constants specify different types of FEC Block Align.

Function Documentation

◆ XVoipFEC_ChannelAccess()

void XVoipFEC_ChannelAccess ( XVoipFEC_TX InstancePtr,
u16  Channels 
)

This function accesses the Channel, need to be called before performing channel space register configuration.

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

References XVoipFEC_TX_WriteReg.

Referenced by XVoipFEC_TX_FECParamsRegValue(), XVoipFEC_TX_SetFEC_D(), XVoipFEC_TX_SetFEC_L(), XVoipFEC_TX_SetFECMode(), XVoipFEC_TX_SetFECNonBlockAllign(), and XVoipFEC_TX_SetFECParams().

◆ XVoipFEC_TX_CfgInitialize()

int XVoipFEC_TX_CfgInitialize ( XVoipFEC_TX InstancePtr,
XVoipFEC_TX_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the VoIP FEC Transmitter core.

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

Parameters
InstancePtris a pointer to the XVoipFEC_TX core instance.
CfgPtrpoints to the configuration structure associated with the VoIP FEC Transmitter 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_TX_CfgInitialize was successful.
  • XST_FAILURE
Note
None.

References XVoipFEC_TX_Config::BaseAddress, XVoipFEC_TX_BusyBit, and XVoipFEC_TX_SoftReset().

◆ XVoipFEC_TX_ChannelUpdate()

void XVoipFEC_TX_ChannelUpdate ( XVoipFEC_TX InstancePtr)

This function perform Channel on VoIP FEC Transmitter, which updates the configured channel space register.

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

References XVoipFEC_TX_ReadReg.

Referenced by XVoipFEC_TX_SetFECParams().

◆ XVoipFEC_TX_CoreChannelConfig()

void XVoipFEC_TX_CoreChannelConfig ( XVoipFEC_TX InstancePtr)

This function Configure all the VoIP FEC Transmitter Channel Space based on user configured value.

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

◆ XVoipFEC_TX_CoreStatisics()

XVoipFEC_TX_PktCnt XVoipFEC_TX_CoreStatisics ( XVoipFEC_TX InstancePtr)

This function perform Statistic Resets on VoIP FEC Transmitter (General Space)

Parameters
InstancePtris a pointer to the XVoipFEC_TX core instance.
Returns
XVoipFEC_TX_PktCntRegValue is Return Register Value of General Statistic VoIP FEC Transmitter.
Note
None.

References XVoipFEC_TX_Config::BaseAddress, and XVoipFEC_TX_ReadReg.

◆ XVoipFEC_TX_CoreStatusRegValue()

XVoipFEC_TX_Config XVoipFEC_TX_CoreStatusRegValue ( XVoipFEC_TX InstancePtr)

This function reads the Core Information (Configured by user through GUI), in the VoIP FEC Transmitter Register.

Parameters
InstancePtris a pointer to the XVoipFEC_TX core instance.
Returns
XVoipFEC_TX_ConfigRegValue is Core Status Register Value.
Note
None.

References XVoipFEC_TX_Config::BaseAddress, XVoipFEC_TX_Config::HWChannelNumber, and XVoipFEC_TX_ReadReg.

◆ XVoipFEC_TX_FECParamsRegValue()

XVoipFEC_TX_FECParams XVoipFEC_TX_FECParamsRegValue ( XVoipFEC_TX InstancePtr,
u16  Channels 
)

This function perform Reads Configured FEC Parameters.

Parameters
InstancePtris a pointer to the XVoipFEC_TX core instance.
Channelsis current configured channel
Returns
XVoipFEC_TX_FECParams_RegValue is configured FEC Parameters.
Note
None.

References XVoipFEC_TX_Config::BaseAddress, XVoipFEC_ChannelAccess(), and XVoipFEC_TX_ReadReg.

◆ XVoipFEC_TX_LookupConfig()

XVoipFEC_TX_Config* XVoipFEC_TX_LookupConfig ( u16  DeviceId)

This function returns a reference to an XVoipFEC_TX_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_tx_g.c file.

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

◆ XVoipFEC_TX_SetFEC_D()

void XVoipFEC_TX_SetFEC_D ( XVoipFEC_TX InstancePtr,
u16  Channels 
)

This function sets FEC D Value.

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

References XVoipFEC_TX_Config::BaseAddress, XVoipFEC_ChannelAccess(), and XVoipFEC_TX_ReadReg.

Referenced by XVoipFEC_TX_SetFECParams().

◆ XVoipFEC_TX_SetFEC_L()

void XVoipFEC_TX_SetFEC_L ( XVoipFEC_TX InstancePtr,
u16  Channels 
)

This function sets FEC L Value.

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

References XVoipFEC_TX_Config::BaseAddress, XVoipFEC_ChannelAccess(), and XVoipFEC_TX_ReadReg.

Referenced by XVoipFEC_TX_SetFECParams().

◆ XVoipFEC_TX_SetFECMode()

void XVoipFEC_TX_SetFECMode ( XVoipFEC_TX InstancePtr,
u16  Channels 
)

This function sets FEC Mode Value.

FEC Bypass, 1D or 2D Mode

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

References XVoipFEC_TX_Config::BaseAddress, XVoipFEC_ChannelAccess(), and XVoipFEC_TX_ReadReg.

Referenced by XVoipFEC_TX_SetFECParams().

◆ XVoipFEC_TX_SetFECNonBlockAllign()

void XVoipFEC_TX_SetFECNonBlockAllign ( XVoipFEC_TX InstancePtr,
u16  Channels 
)

This function sets FEC Block Alignment Mode.

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

References XVoipFEC_TX_Config::BaseAddress, XVoipFEC_ChannelAccess(), and XVoipFEC_TX_ReadReg.

Referenced by XVoipFEC_TX_SetFECParams().

◆ XVoipFEC_TX_SetFECParams()

void XVoipFEC_TX_SetFECParams ( XVoipFEC_TX InstancePtr,
u16  Channels 
)

This function Configures the FEC Parameters.

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

References XVoipFEC_ChannelAccess(), XVoipFEC_TX_ChannelUpdate(), XVoipFEC_TX_SetFEC_D(), XVoipFEC_TX_SetFEC_L(), XVoipFEC_TX_SetFECMode(), and XVoipFEC_TX_SetFECNonBlockAllign().

◆ XVoipFEC_TX_SoftReset()

void XVoipFEC_TX_SoftReset ( XVoipFEC_TX InstancePtr)

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

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

References XVoipFEC_TX_ReadReg.

Referenced by XVoipFEC_TX_CfgInitialize().