v_sdirx
Xilinx SDK Drivers API Documentation
xv_sdirx.c File Reference

Overview

This is the main file for Xilinx SDI RX core.

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

MODIFICATION HISTORY:
Ver     Who        Date         Changes

1.0 jsr 07/17/17 Initial release.

Functions

int XV_SdiRx_CfgInitialize (XV_SdiRx *InstancePtr, XV_SdiRx_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the SDI RX core. More...
 
void XV_SdiRx_ResetStream (XV_SdiRx *InstancePtr)
 This function clears the SDI RX stream variables and sets them to the defaults. More...
 
void XV_SdiRx_DebugInfo (XV_SdiRx *InstancePtr, XV_SdiRx_DebugSelId SelId)
 This function prints debug information of Stream 0 on STDIO/Uart console. More...
 
int XV_SdiRx_Stop (XV_SdiRx *InstancePtr)
 This function stops SDI RX core's modes detection. More...
 
void XV_SdiRx_FramerEnable (XV_SdiRx *InstancePtr)
 This function enables the framer function. More...
 
void XV_SdiRx_FramerDisable (XV_SdiRx *InstancePtr)
 This function disables the framer function. More...
 
void XV_SdiRx_Start (XV_SdiRx *InstancePtr, XV_SdiRx_SearchMode Mode)
 This function enables SDI RX core's modes detection function. More...
 
u32 XV_SdiRx_ReportDetectedError (XV_SdiRx *InstancePtr)
 This function reports detected CRC or EDH errors count. More...
 
void XV_SdiRx_VidBridgeEnable (XV_SdiRx *InstancePtr)
 This function enables the video bridge. More...
 
void XV_SdiRx_VidBridgeDisable (XV_SdiRx *InstancePtr)
 This function disables the video bridge. More...
 
void XV_SdiRx_Axi4sBridgeEnable (XV_SdiRx *InstancePtr)
 This function enable the AXI4S Bridge. More...
 
void XV_SdiRx_Axi4sBridgeDisable (XV_SdiRx *InstancePtr)
 This function disables the AXI4S Bridge. More...
 
u32 XV_SdiRx_GetPayloadId (XV_SdiRx *InstancePtr, u8 DataStream)
 This function returns incoming stream's incoming SDI payload ID. More...
 
u32 XV_SdiRx_GetSdiMode (XV_SdiRx *InstancePtr)
 This function returns the current SDI transport mode detected. More...
 
void XV_SdiRx_SetVidLckWindow (XV_SdiRx *InstancePtr, u32 Data)
 This function sets the clock period for video lock signal to be asserted before video lock interrupt is triggered. More...
 
void XV_SdiRx_SetEdhErrCntTrigger (XV_SdiRx *InstancePtr, u32 Enable)
 This function sets the type of EDH errors which will trigger the error count. More...
 
void XV_SdiRx_EnableMode (XV_SdiRx *InstancePtr, XV_SdiRx_SupportedModes SupportModes)
 This function enables the modes which the SDI RX core will try to lock on. More...
 
void XV_SdiRx_DisableMode (XV_SdiRx *InstancePtr, XV_SdiRx_SupportedModes RemoveModes)
 This function disables the modes which the SDI RX core will try to lock on. More...
 

Function Documentation

◆ XV_SdiRx_Axi4sBridgeDisable()

void XV_SdiRx_Axi4sBridgeDisable ( XV_SdiRx InstancePtr)

This function disables the AXI4S Bridge.

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

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

◆ XV_SdiRx_Axi4sBridgeEnable()

void XV_SdiRx_Axi4sBridgeEnable ( XV_SdiRx InstancePtr)

This function enable the AXI4S Bridge.

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

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

◆ XV_SdiRx_CfgInitialize()

int XV_SdiRx_CfgInitialize ( XV_SdiRx InstancePtr,
XV_SdiRx_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the SDI RX core.

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

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
CfgPtrpoints to the configuration structure associated with the SDI RX 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 XV_SdiRx_CfgInitialize was successful.
  • XST_FAILURE if XV_SdiRx_CfgInitialize was unsuccessful.
Note
None.

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx::StreamDownCallback.

◆ XV_SdiRx_DebugInfo()

void XV_SdiRx_DebugInfo ( XV_SdiRx InstancePtr,
XV_SdiRx_DebugSelId  SelId 
)

This function prints debug information of Stream 0 on STDIO/Uart console.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
SelIdspecifies which debug information to be printed out
Returns
None.
Note
None.

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, XV_SdiRx::Stream, XV_SdiRx_Stream::Video, and XV_SdiRx_ReadReg.

◆ XV_SdiRx_DisableMode()

void XV_SdiRx_DisableMode ( XV_SdiRx InstancePtr,
XV_SdiRx_SupportedModes  RemoveModes 
)

This function disables the modes which the SDI RX core will try to lock on.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
RemoveModesspecifies which SDI mode is to be removed from SDI mode detection logic.
Returns
None.
Note
None.

◆ XV_SdiRx_EnableMode()

void XV_SdiRx_EnableMode ( XV_SdiRx InstancePtr,
XV_SdiRx_SupportedModes  SupportModes 
)

This function enables the modes which the SDI RX core will try to lock on.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
SupportModesspecifies which SDI mode is to be supported from SDI mode detection logic.
Returns
None.
Note
XV_SDIRX_MULTISEARCHMODE must be selected in the XV_SdiRx_Start function.

◆ XV_SdiRx_FramerDisable()

void XV_SdiRx_FramerDisable ( XV_SdiRx InstancePtr)

This function disables the framer function.

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

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

◆ XV_SdiRx_FramerEnable()

void XV_SdiRx_FramerEnable ( XV_SdiRx InstancePtr)

This function enables the framer function.

When enabled, the framer automatically readjusts the output word alignment to match the alignment of each timing reference signal (TRS).

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

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

◆ XV_SdiRx_GetPayloadId()

u32 XV_SdiRx_GetPayloadId ( XV_SdiRx InstancePtr,
u8  DataStream 
)

This function returns incoming stream's incoming SDI payload ID.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
DataStreamspecifies which payload ID is to be returned.
Returns
SDI payload ID
Note
None.

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

◆ XV_SdiRx_GetSdiMode()

u32 XV_SdiRx_GetSdiMode ( XV_SdiRx InstancePtr)

This function returns the current SDI transport mode detected.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
Returns
SDI transport mode
Note
None.

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

Referenced by XV_SdiRx_ReportDetectedError().

◆ XV_SdiRx_ReportDetectedError()

u32 XV_SdiRx_ReportDetectedError ( XV_SdiRx InstancePtr)

This function reports detected CRC or EDH errors count.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
Returns
CRC/EDH Error count
Note
None.

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, XV_SdiRx_GetSdiMode(), and XV_SdiRx_ReadReg.

◆ XV_SdiRx_ResetStream()

void XV_SdiRx_ResetStream ( XV_SdiRx InstancePtr)

This function clears the SDI RX stream variables and sets them to the defaults.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
Returns
None.
Note
This is required after a reset or init.

◆ XV_SdiRx_SetEdhErrCntTrigger()

void XV_SdiRx_SetEdhErrCntTrigger ( XV_SdiRx InstancePtr,
u32  Enable 
)

This function sets the type of EDH errors which will trigger the error count.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
Enablespecifies the type of EDH errors to be allowed to increment the error counter.
  • Bit 0 = ANC EDH error
  • Bit 1 = ANC EDA error
  • Bit 2 = ANC IDH error
  • Bit 3 = ANC IDA error
  • Bit 4 = ANC UES error
  • Bit 5 = FF EDH error
  • Bit 6 = FF EDA error
  • Bit 7 = FF IDH error
  • Bit 8 = FF IDA error
  • Bit 9 = FF UES error
  • Bit 10 = AP EDH error
  • Bit 11 = AP EDA error
  • Bit 12 = AP IDH error
  • Bit 13 = AP IDA error
  • Bit 14 = AP UES error
  • Bit 15 = EDH packet checksum-error
Returns
None.
Note
None.

◆ XV_SdiRx_SetVidLckWindow()

void XV_SdiRx_SetVidLckWindow ( XV_SdiRx InstancePtr,
u32  Data 
)

This function sets the clock period for video lock signal to be asserted before video lock interrupt is triggered.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
Dataspecifies the clock period.
Returns
None.
Note
None.

References XV_SdiRx_WriteReg.

◆ XV_SdiRx_Start()

void XV_SdiRx_Start ( XV_SdiRx InstancePtr,
XV_SdiRx_SearchMode  Mode 
)

This function enables SDI RX core's modes detection function.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
Modespecifies the mode of SDI modes searching operation.
  • 0 = XV_SDIRX_SINGLESEARCHMODE_HD
  • 1 = XV_SDIRX_SINGLESEARCHMODE_SD
  • 2 = XV_SDIRX_SINGLESEARCHMODE_3G
  • 4 = XV_SDIRX_SINGLESEARCHMODE_6G
  • 5 = XV_SDIRX_SINGLESEARCHMODE_12GI
  • 6 = XV_SDIRX_SINGLESEARCHMODE_12GF
  • 10 = XV_SDIRX_MULTISEARCHMODE where the supported modes will be enabled by XV_SdiRx_EnableMode function
Returns
None.
Note
None.

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

◆ XV_SdiRx_Stop()

int XV_SdiRx_Stop ( XV_SdiRx InstancePtr)

This function stops SDI RX core's modes detection.

Parameters
InstancePtris a pointer to the XV_SdiRx core instance.
Returns
  • XST_SUCCESS if SDI Rx stop is successful.
  • XST_FAILURE if SDI Rx stop is unsuccessful
Note
None.

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

Referenced by XV_SdiRx_SelfTest().

◆ XV_SdiRx_VidBridgeDisable()

void XV_SdiRx_VidBridgeDisable ( XV_SdiRx InstancePtr)

This function disables the video bridge.

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

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.

◆ XV_SdiRx_VidBridgeEnable()

void XV_SdiRx_VidBridgeEnable ( XV_SdiRx InstancePtr)

This function enables the video bridge.

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

References XV_SdiRx_Config::BaseAddress, XV_SdiRx::Config, and XV_SdiRx_ReadReg.