![]() |
v_sditx
Xilinx SDK Drivers API Documentation
|
This is the main file for Xilinx SDI TX core.
Please see xv_sditx.h for more details of the driver.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 jsr 07/17/17 Initial release. jsr 02/23/2018 YUV420 color format support2.0 vve 10/03/18 Add support for ST352 in C Stream
jsr 10/05/18 Moved 3GB specific video modes timing parameters from video common library to SDI common driver
Functions | |
int | XV_SdiTx_CfgInitialize (XV_SdiTx *InstancePtr, XV_SdiTx_Config *CfgPtr, UINTPTR EffectiveAddr) |
This function initializes the SDI TX core. More... | |
void | XV_SdiTx_Reset (XV_SdiTx *InstancePtr) |
This function clears the SDI TX core registers and sets them to the defaults. More... | |
void | XV_SdiTx_ClearPayloadId (XV_SdiTx *InstancePtr) |
This function clears the SDI TX PayloadId. More... | |
u32 | XV_SdiTx_SetStream (XV_SdiTx *InstancePtr, XV_SdiTx_StreamSelId SelId, u32 Data, u8 StreamId) |
This function sets the SDI TX stream parameters. More... | |
void | XV_SdiTx_SetCoreSettings (XV_SdiTx *InstancePtr, XV_SdiTx_CoreSelId SelId, u8 Data) |
This function sets the SDI TX core settings. More... | |
u8 | XV_SdiTx_GetPayloadFrameRate (XVidC_FrameRate FrameRateValid, XSdiVid_BitRate BitRate) |
This function calculates the equivalent payload nibble for Framerate. More... | |
u8 | XV_SdiTx_GetPayloadIsInterlaced (XVidC_VideoFormat VideoFormat) |
This function calculates the equivalent payload bit for given VideoFormat. More... | |
u8 | XV_SdiTx_GetPayloadAspectRatio (XVidC_AspectRatio AspectRatio) |
This function calculates the equivalent payload bit for given AspectRatio. More... | |
u32 | XV_SdiTx_GetPayloadByte1 (u16 VActiveValid, XSdiVid_TransMode SdiMode, u8 *Data) |
This function calculates the 2nd byte of the Payload packet for all SDI modes. More... | |
u8 | XV_SdiTx_GetPayloadColorFormat (XSdiVid_TransMode SdiMode, XVidC_ColorFormat ColorFormatId) |
This function calculates the Color Format for 3rd byte of the Payload packet for all SDI modes. More... | |
u32 | XV_SdiTx_GetPayload (XV_SdiTx *InstancePtr, XVidC_VideoMode VideoMode, XSdiVid_TransMode SdiMode, u8 DataStream) |
This function calculates the final st352 payload value for all SDI modes with given video mode and SDI data stream number. More... | |
void | XV_SdiTx_SetPayloadId (XV_SdiTx *InstancePtr, u8 DataStream, u32 Payload) |
This function sets the payload id to be sent out by the TX core. More... | |
void | XV_SdiTx_SetPayloadLineNum (XV_SdiTx *InstancePtr, XV_SdiTx_PayloadLineNum1 Field1LineNum, XV_SdiTx_PayloadLineNum2 Field2LineNum, u8 Field2En) |
This function sets the line number of which the HANC space will be inserted with ST 352 packets. More... | |
void | XV_SdiTx_StreamStart (XV_SdiTx *InstancePtr) |
This function starts the TX SDI stream. More... | |
void | XV_SdiTx_StartSdi (XV_SdiTx *InstancePtr, XSdiVid_TransMode SdiMode, XSdiVid_BitRate IsFractional, XV_SdiTx_MuxPattern MuxPattern) |
This function starts the SDI TX core. More... | |
int | XV_SdiTx_StopSdi (XV_SdiTx *InstancePtr) |
This function disables the SDI TX core. More... | |
void | XV_SdiTx_ST352CSwitch3GA (XV_SdiTx *InstancePtr) |
This function enables the ST352 value to be used from DS2 instead of DS3 register in C stream of the SDI TX Ss core. More... | |
void | XV_SdiTx_ST352CStreamEnable (XV_SdiTx *InstancePtr) |
This function enables the insertion of ST352 in C stream of the SDI TX Ss core. More... | |
int | XV_SdiTx_SetColorFormat (XV_SdiTx *InstancePtr, XVidC_ColorFormat ColorFormat) |
This function Set the video format of the SDI TX core. More... | |
void | XV_SdiTx_ClearDetectedError (XV_SdiTx *InstancePtr) |
This function clears the detected error flag and counter. More... | |
void | XV_SdiTx_ReportDetectedError (XV_SdiTx *InstancePtr) |
This function reports the detected error by the TX core. More... | |
void | XV_SdiTx_VidBridgeEnable (XV_SdiTx *InstancePtr) |
This function enables the video bridge. More... | |
void | XV_SdiTx_VidBridgeDisable (XV_SdiTx *InstancePtr) |
This function disables the video bridge. More... | |
void | XV_SdiTx_Axi4sBridgeVtcEnable (XV_SdiTx *InstancePtr) |
This function enables the AXI4S Bridge. More... | |
void | XV_SdiTx_Axi4sBridgeVtcDisable (XV_SdiTx *InstancePtr) |
This function disables the AXI4S Bridge. More... | |
void | XV_SdiTx_SetVidBridgeMode (XV_SdiTx *InstancePtr, XSdiVid_TransMode Mode) |
This function sets the video bridge mode. More... | |
void | XV_SdiTx_DebugInfo (XV_SdiTx *InstancePtr, XV_SdiTx_DebugSelId SelId) |
This function prints stream and timing information on STDIO/Uart console. More... | |
void XV_SdiTx_Axi4sBridgeVtcDisable | ( | XV_SdiTx * | InstancePtr | ) |
This function disables the AXI4S Bridge.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
void XV_SdiTx_Axi4sBridgeVtcEnable | ( | XV_SdiTx * | InstancePtr | ) |
This function enables the AXI4S Bridge.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
int XV_SdiTx_CfgInitialize | ( | XV_SdiTx * | InstancePtr, |
XV_SdiTx_Config * | CfgPtr, | ||
UINTPTR | EffectiveAddr | ||
) |
This function initializes the SDI TX core.
This function must be called prior to using the SDI TX core. Initialization of the SDI TX includes setting up the instance data and ensuring the hardware is in a quiescent state.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
CfgPtr | points to the configuration structure associated with the SDI TX 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. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx::GtRstDoneCallback.
Referenced by XV_SdiTxSelfTestExample().
void XV_SdiTx_ClearDetectedError | ( | XV_SdiTx * | InstancePtr | ) |
This function clears the detected error flag and counter.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
void XV_SdiTx_ClearPayloadId | ( | XV_SdiTx * | InstancePtr | ) |
This function clears the SDI TX PayloadId.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
Referenced by XV_SdiTx_Reset().
void XV_SdiTx_DebugInfo | ( | XV_SdiTx * | InstancePtr, |
XV_SdiTx_DebugSelId | SelId | ||
) |
This function prints stream and timing information on STDIO/Uart console.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
SelId | specifies which debug information to be printed out |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, XV_SdiTx::Stream, XV_SdiTx::Transport, XV_SdiTx_Stream::Video, and XV_SdiTx_ReadReg.
u32 XV_SdiTx_GetPayload | ( | XV_SdiTx * | InstancePtr, |
XVidC_VideoMode | VideoMode, | ||
XSdiVid_TransMode | SdiMode, | ||
u8 | DataStream | ||
) |
This function calculates the final st352 payload value for all SDI modes with given video mode and SDI data stream number.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
VideoMode | is a variable of type XVidC_VideoMode. |
SdiMode | is a variable of type XSdiVid_TransMode. |
DataStream | is the stream number for which payload is calculated. |
References XV_SdiTx_Stream::CAssignment, XV_SdiTx::Stream, XV_SdiTx_Stream::Video, and XV_SdiTx_GetPayloadByte1().
u8 XV_SdiTx_GetPayloadAspectRatio | ( | XVidC_AspectRatio | AspectRatio | ) |
This function calculates the equivalent payload bit for given AspectRatio.
AspectRatio | is a variable of type XVidC_AspectRatio. |
u32 XV_SdiTx_GetPayloadByte1 | ( | u16 | VActiveValid, |
XSdiVid_TransMode | SdiMode, | ||
u8 * | Data | ||
) |
This function calculates the 2nd byte of the Payload packet for all SDI modes.
VActiveValid | is a variable for number of active vertical lines. |
SdiMode | is a variable to the XSdiVid_TransMode. |
Data | is a pointer to populate the Byte1 of ST352 payload. |
Referenced by XV_SdiTx_GetPayload().
u8 XV_SdiTx_GetPayloadColorFormat | ( | XSdiVid_TransMode | SdiMode, |
XVidC_ColorFormat | ColorFormatId | ||
) |
This function calculates the Color Format for 3rd byte of the Payload packet for all SDI modes.
SdiMode | is a variable to the XSdiVid_TransMode. |
ColorFormatId | is a variable of type XVidC_ColorFormat. |
u8 XV_SdiTx_GetPayloadFrameRate | ( | XVidC_FrameRate | FrameRateValid, |
XSdiVid_BitRate | BitRate | ||
) |
This function calculates the equivalent payload nibble for Framerate.
FrameRateValid | is a calculated framerate based on interlaced or progressive video. |
BitRate | is a variable of type XSdiVid_BitRate. |
u8 XV_SdiTx_GetPayloadIsInterlaced | ( | XVidC_VideoFormat | VideoFormat | ) |
This function calculates the equivalent payload bit for given VideoFormat.
VideoFormat | is a variable of type XVidC_VideoFormat. |
void XV_SdiTx_ReportDetectedError | ( | XV_SdiTx * | InstancePtr | ) |
This function reports the detected error by the TX core.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
void XV_SdiTx_Reset | ( | XV_SdiTx * | InstancePtr | ) |
This function clears the SDI TX core registers and sets them to the defaults.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_ClearPayloadId().
int XV_SdiTx_SetColorFormat | ( | XV_SdiTx * | InstancePtr, |
XVidC_ColorFormat | ColorFormat | ||
) |
This function Set the video format of the SDI TX core.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
ColorFormat | is a variable of type XVidC_ColorFormat. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, XV_SdiTx::Transport, and XV_SdiTx_ReadReg.
void XV_SdiTx_SetCoreSettings | ( | XV_SdiTx * | InstancePtr, |
XV_SdiTx_CoreSelId | SelId, | ||
u8 | Data | ||
) |
This function sets the SDI TX core settings.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
SelId | specifies which parameter of the stream to be set.
|
Data | specifies what data to be set for the selected parameter. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
void XV_SdiTx_SetPayloadId | ( | XV_SdiTx * | InstancePtr, |
u8 | DataStream, | ||
u32 | Payload | ||
) |
This function sets the payload id to be sent out by the TX core.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
DataStream | specifies the stream which ST352 payload id is to be inserted. |
Payload | specfies the data to be sent out as ST352 payload id. |
References XV_SdiTx_WriteReg.
void XV_SdiTx_SetPayloadLineNum | ( | XV_SdiTx * | InstancePtr, |
XV_SdiTx_PayloadLineNum1 | Field1LineNum, | ||
XV_SdiTx_PayloadLineNum2 | Field2LineNum, | ||
u8 | Field2En | ||
) |
This function sets the line number of which the HANC space will be inserted with ST 352 packets.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
Field1LineNum | specifies the field 1 line number of which ST352 packets are to be inserted |
Field2LineNum | specifies the field 2 line number of which ST352 packets are to be inserted |
Field2En | specifies whether the TX core will send out ST352 packets in field 2 line number or not. |
u32 XV_SdiTx_SetStream | ( | XV_SdiTx * | InstancePtr, |
XV_SdiTx_StreamSelId | SelId, | ||
u32 | Data, | ||
u8 | StreamId | ||
) |
This function sets the SDI TX stream parameters.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
SelId | specifies which parameter of the stream to be set.
|
Data | specifies what data to be set for the selected parameter. |
StreamId | specifies which of the streams to be set. |
void XV_SdiTx_SetVidBridgeMode | ( | XV_SdiTx * | InstancePtr, |
XSdiVid_TransMode | Mode | ||
) |
This function sets the video bridge mode.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
Mode | specifies the SDI bridge mode. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, XV_SdiTx::Transport, and XV_SdiTx_ReadReg.
void XV_SdiTx_ST352CStreamEnable | ( | XV_SdiTx * | InstancePtr | ) |
This function enables the insertion of ST352 in C stream of the SDI TX Ss core.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
void XV_SdiTx_ST352CSwitch3GA | ( | XV_SdiTx * | InstancePtr | ) |
This function enables the ST352 value to be used from DS2 instead of DS3 register in C stream of the SDI TX Ss core.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
void XV_SdiTx_StartSdi | ( | XV_SdiTx * | InstancePtr, |
XSdiVid_TransMode | SdiMode, | ||
XSdiVid_BitRate | IsFractional, | ||
XV_SdiTx_MuxPattern | MuxPattern | ||
) |
This function starts the SDI TX core.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
SdiMode | specifies the SDI mode of the SDI TX. |
IsFractional | specifies the bitrate of the SDI TX. |
MuxPattern | specifies the data stream interleaving pattern to be used. |
References XV_SdiTx::Config.
int XV_SdiTx_StopSdi | ( | XV_SdiTx * | InstancePtr | ) |
This function disables the SDI TX core.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
Referenced by XV_SdiTx_SelfTest().
void XV_SdiTx_StreamStart | ( | XV_SdiTx * | InstancePtr | ) |
This function starts the TX SDI stream.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
void XV_SdiTx_VidBridgeDisable | ( | XV_SdiTx * | InstancePtr | ) |
This function disables the video bridge.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.
void XV_SdiTx_VidBridgeEnable | ( | XV_SdiTx * | InstancePtr | ) |
This function enables the video bridge.
InstancePtr | is a pointer to the XV_SdiTx core instance. |
References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.