v_voip_framer
Xilinx SDK Drivers API Documentation
xframer.c File Reference

Overview

This is the main file for Xilinx VoIP Framer core.

Please see xframer.h for more details of the driver.

MODIFICATION HISTORY:
Ver   Who    Date     Changes

1.00 mmo 02/12/16 Initial release.
 

Functions

int XFramer_CfgInitialize (XFramer *InstancePtr, XFramer_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the VoIP Framer core. More...
 
void XFramer_CoreConfig (XFramer *InstancePtr)
 This function configures the entire VoIP Framer based on user configured value. More...
 
void XFramer_CoreChannelConfig (XFramer *InstancePtr)
 This function configures the entire Channel Space of VoIP Framer based on user configured value. More...
 
void XFramer_ChannelConfig (XFramer *InstancePtr, u16 Channels)
 This function Configures the VoIP Framer Channels Parameter. More...
 
XFramer_ChannelCfg XFramer_ChStatus (XFramer *InstancePtr, u16 Channels)
 This function Reads the VoIP Framer Channels Parameter Register. More...
 
XFramer_Config XFramer_CoreInfo (XFramer *InstancePtr)
 This function reads the Core Information (Configured by user through GUI), in the VoIP Framer Register. More...
 
void XFramer_SoftReset (XFramer *InstancePtr)
 This function perform software resets on VoIP Framer, which clears all the registers. More...
 
void XFramer_ChannelUpdate (XFramer *InstancePtr)
 This function send a pulse on VoIP Framer to update the configured channel. More...
 
void XFramer_ChannelAccess (XFramer *InstancePtr, u16 Channels)
 This function accesses the current configuration channel. More...
 
void XFramer_EthSrcAddr0 (XFramer *InstancePtr)
 This function Set the Lower Ethernet MAC Source Address. More...
 
void XFramer_EthSrcAddr1 (XFramer *InstancePtr)
 This function Set the Higher Ethernet MAC Source Address. More...
 
u32 XFramer_GetEthSrcAddr0 (XFramer *InstancePtr)
 This function Gets the Lower Ethernet MAC Source Address from Register. More...
 
u16 XFramer_GetEthSrcAddr1 (XFramer *InstancePtr)
 This function Gets the Lower Ethernet MAC Source Address from Register. More...
 
u8 XFramer_GetPeakBufferLevel (XFramer *InstancePtr)
 This function Gets the Peak Observed Buffer Level. More...
 
void XFramer_ClearPeakBufferLevel (XFramer *InstancePtr)
 This function Clears the Peak Observed Buffer Level Register. More...
 
u32 XFramer_GetRXPcktCnt (XFramer *InstancePtr)
 This function Gets the Current Received Packet Count Statistic. More...
 
void XFramer_ClearRXPcktCnt (XFramer *InstancePtr)
 This function Clears the Received Packet Count Statistic Register. More...
 
u32 XFramer_GetDropPcktCnt (XFramer *InstancePtr)
 This function Gets the Current Drop Packet Count Statistic. More...
 
void XFramer_ClearDropPcktCnt (XFramer *InstancePtr)
 This function Clears the Drop Packet Count Statistic Register. More...
 
void XFramer_TransmitEnable (XFramer *InstancePtr, u16 Channels)
 This function Set the Transmission Enable Bit. More...
 
u8 XFramer_GetTransmitEnable (XFramer *InstancePtr, u16 Channels)
 This function Gets the Current Configure Transmission Enable Bit. More...
 
void XFramer_EthDestAddr0 (XFramer *InstancePtr, u16 Channels)
 This function Sets the Lower 32 Bit Ethernet Destination MAC Address. More...
 
void XFramer_EthDestAddr1 (XFramer *InstancePtr, u16 Channels)
 This function Sets the Higher 16 Bit Ethernet Destination MAC Address. More...
 
void XFramer_VLANID (XFramer *InstancePtr, u16 Channels)
 This function Sets the VLAN ID of the Ethernet Packet. More...
 
void XFramer_SetVLAN (XFramer *InstancePtr, u16 Channels)
 This function Set the Core to Generate Packets with VLAN. More...
 
void XFramer_MediaTOS (XFramer *InstancePtr, u16 Channels)
 This function Set the Media Type of Service (TOS). More...
 
void XFramer_MediaTTL (XFramer *InstancePtr, u16 Channels)
 This function Set the Media Time-To-Live (TTL). More...
 
void XFramer_FECTOS (XFramer *InstancePtr, u16 Channels)
 This function Set the FEC Type of Service (TOS). More...
 
void XFramer_FECTTL (XFramer *InstancePtr, u16 Channels)
 This function Set the FEC Time-To-Live (TTL). More...
 
void XFramer_IP0Dest (XFramer *InstancePtr, u16 Channels)
 This function Sets the IP Destination Address. More...
 
void XFramer_IP0Src (XFramer *InstancePtr, u16 Channels)
 This function Sets the IP Source Address. More...
 
void XFramer_UDPDest (XFramer *InstancePtr, u16 Channels)
 This function Sets the UDP Destination Port. More...
 
void XFramer_UDPSrc (XFramer *InstancePtr, u16 Channels)
 This function Sets the UDP Source Port. More...
 
u32 XFramer_GetTXPcktCnt (XFramer *InstancePtr, u16 Channels)
 This function Gets the current transmitted packet count statistic. More...
 
void XFramer_ClearTXPcktCnt (XFramer *InstancePtr, u16 Channels)
 This function Clears the current transmitted packet count statistic register. More...
 

Function Documentation

◆ XFramer_CfgInitialize()

int XFramer_CfgInitialize ( XFramer InstancePtr,
XFramer_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the VoIP Framer core.

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

Parameters
InstancePtris a pointer to the XDecap core instance.
CfgPtrpoints to the configuration structure associated with the VoIP Framer 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 XFramer_CfgInitialize was successful.
  • XST_FAILURE if Channel Number has mismatched with value reflected on the register, and if the Overflow strategy has mismatched with the value reflected on the register.
Note
None.

References XFramer_Config::BaseAddress, XFramer_Config::HWChannelNumber, XFramer_Config::OverflowHandlingStrategy, XFramer_BusyBit, XFramer_CoreInfo(), and XFramer_SoftReset().

◆ XFramer_ChannelAccess()

void XFramer_ChannelAccess ( XFramer InstancePtr,
u16  Channels 
)

◆ XFramer_ChannelConfig()

void XFramer_ChannelConfig ( XFramer InstancePtr,
u16  Channels 
)

This function Configures the VoIP Framer Channels Parameter.

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

References XFramer_ChannelAccess(), XFramer_EthDestAddr0(), XFramer_EthDestAddr1(), XFramer_FECTOS(), XFramer_FECTTL(), XFramer_IP0Dest(), XFramer_IP0Src(), XFramer_MediaTOS(), XFramer_MediaTTL(), XFramer_SetVLAN(), XFramer_TransmitEnable(), XFramer_UDPDest(), XFramer_UDPSrc(), and XFramer_VLANID().

◆ XFramer_ChannelUpdate()

void XFramer_ChannelUpdate ( XFramer InstancePtr)

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

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

References XFramer_ReadReg.

◆ XFramer_ChStatus()

XFramer_ChannelCfg XFramer_ChStatus ( XFramer InstancePtr,
u16  Channels 
)

This function Reads the VoIP Framer Channels Parameter Register.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

◆ XFramer_ClearDropPcktCnt()

void XFramer_ClearDropPcktCnt ( XFramer InstancePtr)

This function Clears the Drop Packet Count Statistic Register.

This is Self Clear Register.

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

References XFramer_Config::BaseAddress, and XFramer_WriteReg.

◆ XFramer_ClearPeakBufferLevel()

void XFramer_ClearPeakBufferLevel ( XFramer InstancePtr)

This function Clears the Peak Observed Buffer Level Register.

This is Self Clear Register.

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

References XFramer_Config::BaseAddress, and XFramer_WriteReg.

◆ XFramer_ClearRXPcktCnt()

void XFramer_ClearRXPcktCnt ( XFramer InstancePtr)

This function Clears the Received Packet Count Statistic Register.

This is Self Clear Register.

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

References XFramer_Config::BaseAddress, and XFramer_WriteReg.

◆ XFramer_ClearTXPcktCnt()

void XFramer_ClearTXPcktCnt ( XFramer InstancePtr,
u16  Channels 
)

This function Clears the current transmitted packet count statistic register.

This is a self clear register.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_WriteReg.

◆ XFramer_CoreChannelConfig()

void XFramer_CoreChannelConfig ( XFramer InstancePtr)

This function configures the entire Channel Space of VoIP Framer based on user configured value.

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

Referenced by XFramer_CoreConfig().

◆ XFramer_CoreConfig()

void XFramer_CoreConfig ( XFramer InstancePtr)

This function configures the entire VoIP Framer based on user configured value.

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

References XFramer_CoreChannelConfig(), XFramer_EthSrcAddr0(), and XFramer_EthSrcAddr1().

◆ XFramer_CoreInfo()

XFramer_Config XFramer_CoreInfo ( XFramer InstancePtr)

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

Parameters
InstancePtris a pointer to the XFramer core instance.
Returns
XFramer_Config_RegValue of the HW Channel Number and the Overflow Handling Strategy
Note
None.

References XFramer_Config::BaseAddress, XFramer_Config::HWChannelNumber, and XFramer_ReadReg.

Referenced by XFramer_CfgInitialize().

◆ XFramer_EthDestAddr0()

void XFramer_EthDestAddr0 ( XFramer InstancePtr,
u16  Channels 
)

This function Sets the Lower 32 Bit Ethernet Destination MAC Address.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_WriteReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_EthDestAddr1()

void XFramer_EthDestAddr1 ( XFramer InstancePtr,
u16  Channels 
)

This function Sets the Higher 16 Bit Ethernet Destination MAC Address.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_EthSrcAddr0()

void XFramer_EthSrcAddr0 ( XFramer InstancePtr)

This function Set the Lower Ethernet MAC Source Address.

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

References XFramer_Config::BaseAddress, and XFramer_WriteReg.

Referenced by XFramer_CoreConfig().

◆ XFramer_EthSrcAddr1()

void XFramer_EthSrcAddr1 ( XFramer InstancePtr)

This function Set the Higher Ethernet MAC Source Address.

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

References XFramer_Config::BaseAddress, and XFramer_WriteReg.

Referenced by XFramer_CoreConfig().

◆ XFramer_FECTOS()

void XFramer_FECTOS ( XFramer InstancePtr,
u16  Channels 
)

This function Set the FEC Type of Service (TOS).

Component of the IP Header.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_FECTTL()

void XFramer_FECTTL ( XFramer InstancePtr,
u16  Channels 
)

This function Set the FEC Time-To-Live (TTL).

Component of the IP Header.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_GetDropPcktCnt()

u32 XFramer_GetDropPcktCnt ( XFramer InstancePtr)

This function Gets the Current Drop Packet Count Statistic.

Parameters
InstancePtris a pointer to the XFramer core instance.
Returns
RegValue is the Current Drop Packet Count
Note
None.

References XFramer_Config::BaseAddress, and XFramer_ReadReg.

◆ XFramer_GetEthSrcAddr0()

u32 XFramer_GetEthSrcAddr0 ( XFramer InstancePtr)

This function Gets the Lower Ethernet MAC Source Address from Register.

Parameters
InstancePtris a pointer to the XFramer core instance.
Returns
RegValue is the Ethernet Lower MAC Address Register Value.
Note
None.

References XFramer_Config::BaseAddress, and XFramer_ReadReg.

◆ XFramer_GetEthSrcAddr1()

u16 XFramer_GetEthSrcAddr1 ( XFramer InstancePtr)

This function Gets the Lower Ethernet MAC Source Address from Register.

Parameters
InstancePtris a pointer to the XFramer core instance.
Returns
RegValue is the Ethernet Lower MAC Address Register Value.
Note
None.

References XFramer_Config::BaseAddress, and XFramer_ReadReg.

◆ XFramer_GetPeakBufferLevel()

u8 XFramer_GetPeakBufferLevel ( XFramer InstancePtr)

This function Gets the Peak Observed Buffer Level.

Ensure this value is not greater than the Elastic Buffer Set during Core Generation. This is Debug Function.

Parameters
InstancePtris a pointer to the XFramer core instance.
Returns
RegValue is the Peak Observed Buffer Level
Note
None.

References XFramer_Config::BaseAddress, and XFramer_ReadReg.

◆ XFramer_GetRXPcktCnt()

u32 XFramer_GetRXPcktCnt ( XFramer InstancePtr)

This function Gets the Current Received Packet Count Statistic.

Parameters
InstancePtris a pointer to the XFramer core instance.
Returns
RegValue is the Current Received Packet Count
Note
None.

References XFramer_Config::BaseAddress, and XFramer_ReadReg.

◆ XFramer_GetTransmitEnable()

u8 XFramer_GetTransmitEnable ( XFramer InstancePtr,
u16  Channels 
)

This function Gets the Current Configure Transmission Enable Bit.

Parameters
InstancePtris a pointer to the XFramer core instance.
Channelsis current configured channel
Returns
RegValue is the Transmission Enable Bit Register Value.
Note
None.

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

◆ XFramer_GetTXPcktCnt()

u32 XFramer_GetTXPcktCnt ( XFramer InstancePtr,
u16  Channels 
)

This function Gets the current transmitted packet count statistic.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

◆ XFramer_IP0Dest()

void XFramer_IP0Dest ( XFramer InstancePtr,
u16  Channels 
)

This function Sets the IP Destination Address.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_WriteReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_IP0Src()

void XFramer_IP0Src ( XFramer InstancePtr,
u16  Channels 
)

This function Sets the IP Source Address.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_WriteReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_MediaTOS()

void XFramer_MediaTOS ( XFramer InstancePtr,
u16  Channels 
)

This function Set the Media Type of Service (TOS).

Component of the IP Header.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_MediaTTL()

void XFramer_MediaTTL ( XFramer InstancePtr,
u16  Channels 
)

This function Set the Media Time-To-Live (TTL).

Component of the IP Header.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_SetVLAN()

void XFramer_SetVLAN ( XFramer InstancePtr,
u16  Channels 
)

This function Set the Core to Generate Packets with VLAN.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_SoftReset()

void XFramer_SoftReset ( XFramer InstancePtr)

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

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

References XFramer_ReadReg.

Referenced by XFramer_CfgInitialize().

◆ XFramer_TransmitEnable()

void XFramer_TransmitEnable ( XFramer InstancePtr,
u16  Channels 
)

This function Set the Transmission Enable Bit.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_WriteReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_UDPDest()

void XFramer_UDPDest ( XFramer InstancePtr,
u16  Channels 
)

This function Sets the UDP Destination Port.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_UDPSrc()

void XFramer_UDPSrc ( XFramer InstancePtr,
u16  Channels 
)

This function Sets the UDP Source Port.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().

◆ XFramer_VLANID()

void XFramer_VLANID ( XFramer InstancePtr,
u16  Channels 
)

This function Sets the VLAN ID of the Ethernet Packet.

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

References XFramer_Config::BaseAddress, XFramer_ChannelAccess(), and XFramer_ReadReg.

Referenced by XFramer_ChannelConfig().