v_voip_depacketizer56
Xilinx SDK Drivers API Documentation
xdepacketizer56.h File Reference

Overview

This is the main header file for VoIP ST2022-6 Depacketizer core.

VoIP ST2022-6 Depacketizer core is used to map Incoming ST2022-5 RTP Packet in to SDI to AXI4-Stream Packet.

The VoIP ST2022-6 Depacketizer has 3 main Interface

  • AXI4-Stream Interface for accepting Incoming SDI to AXI4-Stream Packet
  • AXI4-Stream Interface for transmitting RTP Packet <RTP Header | Payload>
  • AXI4-Lite interface for processor, controls the VoIP ST2022-6 Depacketizer.

VoIP ST2022-6 Depacketizer Performs Following Operation

  • Map/Convert ST2022-5 RTP Packet in to SDI to AXI4-Stream Packet

Software Initialization & Configuration

The application needs to do following steps in order for preparing the VoIP ST2022-6 Depacketizer core to be ready.

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

This driver provides interrupt handlers

  • XDepacketizer56_IntrHandler, for handling the interrupts from the VoIP ST2022-6 Depacketizer core

Application developer needs to register interrupt handler with the processor, within their examples. Whenever processor calls registered application's interrupt handler associated with interrupt id, application's interrupt handler needs to call appropriate peripheral interrupt handler reading peripherals Status register.

This driver provides XDepacketizer56_SetCallback API to register functions with VoIP ST2022-6 Depacketizer core instance.

Virtual Memory

Threads

Asserts

Building the driver

The VoIP ST2022-6 Depacketizer 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  XDepacketizer56_Config
 This typedef contains configuration information for the VoIP ST2022-6 Depacketizer core. More...
 
struct  XDepacketizer56_Stream
 This typedef contains Incoming SDI to AXI4-Stream Information. More...
 
struct  XDepacketizer56_ModuleStatistic
 This typedef contains Incoming Packet Count, Outgoing Frame Count Information, Current Buffer Level and Observed Peak Buffer Level. More...
 
struct  XDepacketizer56_ModuleStatus
 This typedef contains the Module Status Component. More...
 
struct  XDepacketizer56
 The VoIP ST2022-6 Depacketizer driver instance data. More...
 

Macros

#define XDEPACKETIZER56_H_
 Prevent circular inclusions by using protection macros. More...
 

Enumerations

Handler Types
enum  XDepacketizer56_HandlerType
 These constants specify different types of handler and used to differentiate interrupt requests from peripheral. More...
 
Timestamp Reference (Video Header)
enum  XDepacketizer56_TimestampRef
 These constants specify the VoIP ST2022-6 Depacketizer Timestamp Reference in the Video Header. More...
 
Video Bit Rate
enum  XDepacketizer56_RXBITRATE
 These constants specify the VoIP ST2022-6 Depacketizer Video Bit Rate either is an Integer (148.5 MHz or 74.25 MHz) or Non-Integer (148.35 MHz or 74.175 MHz) More...
 
3G-SDI Level
enum  XDepacketizer56_3G_LEVEL
 These constants specify the VoIP ST2022-6 Depacketizer Incoming ST2022-6 RTP Packet is a SDI-3G Level A or Level B. More...
 
SDI Mode
enum  XDepacketizer56_SDIMode
 These constants specify the VoIP ST2022-6 Depacketizer Incoming ST2022-6 RTP Packet is, SD-SDI or HD-SDI or 3G-SDI. More...
 
Frame Config
enum  XDepacketizer56_FrameCfg
 These constants specify the VoIP ST2022-6 Depacketizer to obtained incoming ST2022-6 RTP Packet Frame Information either from TUSER Slave AXI4-Stream of VoIP ST2022-6 Depacketizer or User Configure Register. More...
 

ST2022-6 Depacketizer Module Enable/Disable

enum  XDepacketizer56_ModEn
 These constants specify the VoIP ST2022-6 Depacketizer Module Enable or Disable. More...
 
typedef void(* XDepacketizer56_Callback) (void *CallbackRef)
 Callback type for VoIP ST2022-6 Depacketizer event interrupt. More...
 
XDepacketizer56_ConfigXDepacketizer56_LookupConfig (u16 DeviceId)
 This function returns a reference to an XDepacketizer56_Config structure based on the core id, DeviceId. More...
 
int XDepacketizer56_CfgInitialize (XDepacketizer56 *InstancePtr, XDepacketizer56_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the VoIP ST2022-6 Depacketizer core. More...
 
XDepacketizer56_ModuleStatus XDepacketizer56_ErroStatus (XDepacketizer56 *InstancePtr)
 This function obtains the current Module Status of ST2022-6 Depacketizer Module. More...
 
void XDepacketizer56_IntrHandler (void *InstancePtr)
 This function is the interrupt handler for the VoIP ST2022-6 Depacketizer driver. More...
 
int XDepacketizer56_SetCallback (XDepacketizer56 *InstancePtr, XDepacketizer56_HandlerType HandlerType, void *CallbackFunc, void *CallbackRef)
 This function installs an asynchronous callback function for the given HandlerType: More...
 
XDepacketizer56_ModuleStatistic XDepacketizer56_ModuleStatisticRegValue (XDepacketizer56 *InstancePtr)
 This function obtained the current statistic of the ST2022-6 Depacketizer. More...
 
void XDepacketizer56_ModEnable (XDepacketizer56 *InstancePtr)
 This function perform Module Enable/Disable the ST2022-6 Depacketizer Module. More...
 
void XDepacketizer56_RegClear (XDepacketizer56 *InstancePtr)
 This function perforemed software reset or Register Clear on the ST2022-6 Depacketizer Module. More...
 
void XDepacketizer56_VidFormat (XDepacketizer56 *InstancePtr)
 This function configures the Video Information in to the ST2022-6 Depacketizer Module. More...
 
void XDepacketizer56_RTPMediaHeader (XDepacketizer56 *InstancePtr)
 This function configures the RTP Media Header/ST2022-6 Header into ST2022-6 Depacketizer Module. More...
 
void XDepacketizer56_ResetStatistic (XDepacketizer56 *InstancePtr)
 This function perform Module Statistic reset of ST2022-6 Depacketizer Module. More...
 

Macro Definition Documentation

◆ XDEPACKETIZER56_H_

#define XDEPACKETIZER56_H_

Prevent circular inclusions by using protection macros.

Typedef Documentation

◆ XDepacketizer56_Callback

typedef void(* XDepacketizer56_Callback) (void *CallbackRef)

Callback type for VoIP ST2022-6 Depacketizer event interrupt.

Parameters
CallbackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
Returns
None.
Note
None.

Enumeration Type Documentation

◆ XDepacketizer56_3G_LEVEL

These constants specify the VoIP ST2022-6 Depacketizer Incoming ST2022-6 RTP Packet is a SDI-3G Level A or Level B.

◆ XDepacketizer56_FrameCfg

These constants specify the VoIP ST2022-6 Depacketizer to obtained incoming ST2022-6 RTP Packet Frame Information either from TUSER Slave AXI4-Stream of VoIP ST2022-6 Depacketizer or User Configure Register.

◆ XDepacketizer56_HandlerType

These constants specify different types of handler and used to differentiate interrupt requests from peripheral.

◆ XDepacketizer56_ModEn

These constants specify the VoIP ST2022-6 Depacketizer Module Enable or Disable.

◆ XDepacketizer56_RXBITRATE

These constants specify the VoIP ST2022-6 Depacketizer Video Bit Rate either is an Integer (148.5 MHz or 74.25 MHz) or Non-Integer (148.35 MHz or 74.175 MHz)

◆ XDepacketizer56_SDIMode

These constants specify the VoIP ST2022-6 Depacketizer Incoming ST2022-6 RTP Packet is, SD-SDI or HD-SDI or 3G-SDI.

◆ XDepacketizer56_TimestampRef

These constants specify the VoIP ST2022-6 Depacketizer Timestamp Reference in the Video Header.

Function Documentation

◆ XDepacketizer56_CfgInitialize()

int XDepacketizer56_CfgInitialize ( XDepacketizer56 InstancePtr,
XDepacketizer56_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the VoIP ST2022-6 Depacketizer core.

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

Parameters
InstancePtris a pointer to the VoIP ST2022-6 Depacketizer core instance.
CfgPtrpoints to the configuration structure associated with the VoIP ST2022-6 Depacketizer 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 XDepacketizer56_CfgInitialize was successful.
Note
None.

References XDepacketizer56::DatagramMismatchCallback, XDepacketizer56::IsDatagramMismatchCallbackSet, and XDepacketizer56_RegClear().

◆ XDepacketizer56_ErroStatus()

XDepacketizer56_ModuleStatus XDepacketizer56_ErroStatus ( XDepacketizer56 InstancePtr)

This function obtains the current Module Status of ST2022-6 Depacketizer Module.

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

References XDepacketizer56_ReadReg.

◆ XDepacketizer56_IntrHandler()

void XDepacketizer56_IntrHandler ( void *  InstancePtr)

This function is the interrupt handler for the VoIP ST2022-6 Depacketizer driver.

This handler reads the pending interrupt from VoIP ST2022-6 Depacketizer, determines the source of the interrupts, clears the interrupts and calls callbacks accordingly.

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XDepacketizer56_SetCallback() during initialization phase. An example delivered with this driver demonstrates how this could be done.

Parameters
InstancePtris a pointer to the XDepacketizer56 instance that just interrupted.
Returns
None.
Note
None.

References XDepacketizer56_ReadReg.

◆ XDepacketizer56_LookupConfig()

XDepacketizer56_Config* XDepacketizer56_LookupConfig ( u16  DeviceId)

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

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

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

◆ XDepacketizer56_ModEnable()

void XDepacketizer56_ModEnable ( XDepacketizer56 InstancePtr)

This function perform Module Enable/Disable the ST2022-6 Depacketizer Module.

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

References XDepacketizer56_ReadReg.

◆ XDepacketizer56_ModuleStatisticRegValue()

XDepacketizer56_ModuleStatistic XDepacketizer56_ModuleStatisticRegValue ( XDepacketizer56 InstancePtr)

This function obtained the current statistic of the ST2022-6 Depacketizer.

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

References XDepacketizer56_ReadReg.

◆ XDepacketizer56_RegClear()

void XDepacketizer56_RegClear ( XDepacketizer56 InstancePtr)

This function perforemed software reset or Register Clear on the ST2022-6 Depacketizer Module.

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

References XDepacketizer56_ReadReg.

Referenced by XDepacketizer56_CfgInitialize().

◆ XDepacketizer56_ResetStatistic()

void XDepacketizer56_ResetStatistic ( XDepacketizer56 InstancePtr)

This function perform Module Statistic reset of ST2022-6 Depacketizer Module.

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

References XDepacketizer56_WriteReg.

◆ XDepacketizer56_RTPMediaHeader()

void XDepacketizer56_RTPMediaHeader ( XDepacketizer56 InstancePtr)

This function configures the RTP Media Header/ST2022-6 Header into ST2022-6 Depacketizer Module.

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

References XDepacketizer56_ReadReg.

◆ XDepacketizer56_SetCallback()

int XDepacketizer56_SetCallback ( XDepacketizer56 InstancePtr,
XDepacketizer56_HandlerType  HandlerType,
void *  CallbackFunc,
void *  CallbackRef 
)

This function installs an asynchronous callback function for the given HandlerType:

HandlerType                 Callback Function Type
-------------------------   -----------------------------------------------
Parameters
InstancePtris a pointer to the VoIP ST2022-6 Depacketizer core instance.
HandlerTypespecifies the type of handler.
CallbackFuncis the address of the callback function.
CallbackRefis a user data item that will be passed to the callback function when it is invoked.
Returns
  • XST_SUCCESS if callback function installed successfully.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note
Invoking this function for a handler that already has been installed replaces it with the new handler.

◆ XDepacketizer56_VidFormat()

void XDepacketizer56_VidFormat ( XDepacketizer56 InstancePtr)

This function configures the Video Information in to the ST2022-6 Depacketizer Module.

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

References XDepacketizer56_ReadReg.