v_voip_fec_tx: xvoipfec_tx.h File Reference

| v_voip_fec_tx Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Data Structures | Macros | Functions
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_Config * | XVoipFEC_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

#define XVoipFEC_TX_BusyBit | ( |  | InstancePtr | ) |

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

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

Parameters

  InstancePtr | is a pointer to the XDecap core instance.

Returns
  BusyBitStatus.

Note

        void XDecap_BusyBit(XDecap *InstancePtr)

Referenced by XVoipFEC_TX_CfgInitialize().

#define XVOIPFEC_TX_H_

Prevent circular inclusions by using protection macros.

## Typedef Documentation

typedef enum fec_mode XVoipFEC_TX_FECMode

These constants specify component of FEC Mode Configuration.

typedef enum non_block_allign XVoipFEC_TX_NonBlockAlign

These constants specify different types of FEC Block Align.

## Enumeration Type Documentation

enum fec_mode

These constants specify component of FEC Mode Configuration.

enum non_block_allign

These constants specify different types of FEC Block Align.

## Function Documentation

void XVoipFEC_ChannelAccess | ( | XVoipFEC_TX * | InstancePtr,
|  | u16 | Channels
| ) |  |

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

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

References XVoipFEC_TX_WriteReg.

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

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

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.
  CfgPtr | points to the configuration structure associated with the VoIP FEC Transmitter core.
  EffectiveAddr | is 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, XVoipFEC_TX_SetFECParams(), and XVoipFEC_TX_SoftReset().

void XVoipFEC_TX_ChannelUpdate | ( | XVoipFEC_TX * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_TX_ReadReg, and XVoipFEC_TX_WriteReg.

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

void XVoipFEC_TX_CoreChannelConfig | ( | XVoipFEC_TX * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.

Returns

Note
  None.

References XVoipFEC_ChannelAccess(), XVoipFEC_TX_ChannelUpdate(), and XVoipFEC_TX_SetFECParams().

XVoipFEC_TX_PktCnt XVoipFEC_TX_CoreStatisics | ( | XVoipFEC_TX * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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_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

  InstancePtr | is 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, XVoipFEC_TX_Config::MaximumFECL, and XVoipFEC_TX_ReadReg.

XVoipFEC_TX_FECParams XVoipFEC_TX_FECParamsRegValue | ( | XVoipFEC_TX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function perform Reads Configured FEC Parameters.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.
  Channels | is 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_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

  DeviceId | is 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.

void XVoipFEC_TX_SetFEC_D | ( | XVoipFEC_TX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function sets FEC D Value.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

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

Referenced by XVoipFEC_TX_SetFECParams().

void XVoipFEC_TX_SetFEC_L | ( | XVoipFEC_TX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function sets FEC L Value.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

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

Referenced by XVoipFEC_TX_SetFECParams().

void XVoipFEC_TX_SetFECMode | ( | XVoipFEC_TX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function sets FEC Mode Value.

FEC Bypass, 1D or 2D Mode

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

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

Referenced by XVoipFEC_TX_SetFECParams().

void XVoipFEC_TX_SetFECNonBlockAllign | ( | XVoipFEC_TX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function sets FEC Block Alignment Mode.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.
  Channels | is current configured channel

Returns
  None.

Note
  None.

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

Referenced by XVoipFEC_TX_SetFECParams().

void XVoipFEC_TX_SetFECParams | ( | XVoipFEC_TX * | InstancePtr,
|  | u16 | Channels
| ) |  |

This function Configures the FEC Parameters.

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.
  Channels | is 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().

Referenced by XVoipFEC_TX_CfgInitialize(), and XVoipFEC_TX_CoreChannelConfig().

void XVoipFEC_TX_SoftReset | ( | XVoipFEC_TX * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XVoipFEC_TX core instance.

Returns
  None.

Note
  None.

References XVoipFEC_TX_ReadReg, and XVoipFEC_TX_WriteReg.

Referenced by XVoipFEC_TX_CfgInitialize().