![]() |
v_sdirxss
Vitis Drivers API Documentation
|
This is main header file of the Xilinx SDI RX Subsystem driver.
SDI RX Subsystem Overview
Video Subsystem is a collection of IP cores bounded together by software to provide an abstract view of the processing pipe. It hides all the complexities of programming the underlying cores from end user.
Subsystem Driver Features
Video Subsystem supports following features
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 jsr 07/17/17 Initial release.
Data Structures | |
struct | XV_SdiRxSs_Log |
This typedef contains the logging mechanism for debug. More... | |
struct | XV_SdiRxSs_SubCore |
Sub-Core Configuration Table. More... | |
struct | XV_SdiRxSs_Config |
This typedef contains configuration information for the SDI RX core. More... | |
struct | XV_SdiRxSs |
The XV_SdiRxSs driver instance data. More... | |
Macros | |
#define | XV_SDIRXSS_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XV_SdiRxSs_GetVersion(InstancePtr) |
This macro reads the RX version. More... | |
Typedefs | |
typedef void(* | XV_SdiRxSs_Callback )(void *CallbackRef) |
Callback type for interrupt. More... | |
Functions | |
XV_SdiRxSs_Config * | XV_SdiRxSs_LookupConfig (u32 DeviceId) |
This function looks for the device configuration based on the unique device ID. More... | |
int | XV_SdiRxSs_CfgInitialize (XV_SdiRxSs *InstancePtr, XV_SdiRxSs_Config *CfgPtr, UINTPTR EffectiveAddr) |
This function initializes the video subsystem and included sub-cores. More... | |
void | XV_SdiRxSS_SdiRxIntrHandler (XV_SdiRxSs *InstancePtr) |
This function calls the interrupt handler for SDI RX. More... | |
void | XV_SdiRxSs_StreamFlowEnable (XV_SdiRxSs *InstancePtr) |
This function enables the AXIS and video bridges. More... | |
void | XV_SdiRxSs_StreamFlowDisable (XV_SdiRxSs *InstancePtr) |
This function disables the AXIS and video bridges. More... | |
void | XV_SdiRxSs_Start (XV_SdiRxSs *InstancePtr, XV_SdiRx_SearchMode Mode) |
This function starts the SDI RX stream detection. More... | |
void | XV_SdiRxSs_Stop (XV_SdiRxSs *InstancePtr) |
This function stops the SDI RX stream detection. More... | |
void | XV_SdiRxSs_SetYCbCr444_RGB_10bit (XV_SdiRxSs *InstancePtr) |
This function enable the YUV444/RGB 10bit support SDI RX SS video stream. More... | |
void | XV_SdiRxSs_ClearYCbCr444_RGB_10bit (XV_SdiRxSs *InstancePtr) |
This function disable the YUV444/RGB 10bit support SDI RX SS video stream. More... | |
int | XV_SdiRxSs_SetCallback (XV_SdiRxSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef) |
This function installs an asynchronous callback function for the given HandlerType: More... | |
void | XV_SdiRxSs_ReportCoreInfo (XV_SdiRxSs *InstancePtr) |
This function reports list of cores included in Video Processing Subsystem. More... | |
void | XV_SdiRxSs_ReportInfo (XV_SdiRxSs *InstancePtr) |
This function prints the SDI RX SS information. More... | |
void | XV_SdiRxSs_ReportDebugInfo (XV_SdiRxSs *InstancePtr) |
This function prints the SDI RX SS debug information. More... | |
u32 | XV_SdiRxSs_WaitforPayLoad (XV_SdiRxSs *InstancePtr) |
This function is used to wait for the payload valid bit to be set. More... | |
XVidC_VideoStream * | XV_SdiRxSs_GetVideoStream (XV_SdiRxSs *InstancePtr, u8 StreamId) |
This function returns the pointer to SDI RX SS video stream. More... | |
int | XV_SdiRxSs_IsStreamUp (XV_SdiRxSs *InstancePtr) |
This function checks if the video stream is up. More... | |
void | XV_SdiRxSs_IntrEnable (XV_SdiRxSs *InstancePtr, u32 IntrMask) |
This function is used to configure the SDI RX interrupts that are to be handled by the application. More... | |
void | XV_SdiRxSs_IntrDisable (XV_SdiRxSs *InstancePtr, u32 IntrMask) |
This function is used to configure the SDI RX interrupts that are to be handled by the application. More... | |
u32 | XV_SdiRxSs_SelfTest (XV_SdiRxSs *InstancePtr) |
This function performs self test on SDI Rx Subsystem sub-cores. More... | |
void | XV_SdiRxSs_LogReset (XV_SdiRxSs *InstancePtr) |
This function will reset the driver's logging mechanism. More... | |
void | XV_SdiRxSs_LogWrite (XV_SdiRxSs *InstancePtr, XV_SdiRxSs_LogEvent Evt, u8 Data) |
This function will insert an event in the driver's logginc mechanism. More... | |
u16 | XV_SdiRxSs_LogRead (XV_SdiRxSs *InstancePtr) |
This function will read the last event from the log. More... | |
void | XV_SdiRxSs_LogDisplay (XV_SdiRxSs *InstancePtr) |
This function will print the entire log. More... | |
void | XV_SdiRxSs_HandleNoPayload (XV_SdiRxSs *InstancePtr, u8 enable) |
This function disables handling for no payload case. More... | |
Bitmasks for interrupt callbacks | |
Please refer to SDI Rx driver for details of the bitmasks. The application should use the XV_SDIRXSS_IER* masks in the call back functions to decode the exact cause of interrupt and handle it accordingly. | |
#define | XV_SDIRXSS_IER_VIDEO_LOCK_MASK XV_SDIRX_IER_VIDEO_LOCK_MASK |
#define | XV_SDIRXSS_IER_VIDEO_UNLOCK_MASK XV_SDIRX_IER_VIDEO_UNLOCK_MASK |
#define | XV_SDIRXSS_IER_OVERFLOW_MASK XV_SDIRX_IER_OVERFLOW_MASK |
#define | XV_SDIRXSS_IER_UNDERFLOW_MASK XV_SDIRX_IER_UNDERFLOW_MASK |
#define | XV_SDIRXSS_IER_VSYNC_MASK XV_SDIRX_IER_VSYNC_MASK |
#define | XV_SDIRXSS_IER_ALLINTR_MASK XV_SDIRX_IER_ALLINTR_MASK |
enum | XV_SdiRxSs_LogEvent { XV_SDIRXSS_LOG_EVT_NONE = 1, XV_SDIRXSS_LOG_EVT_SDIRX_INIT, XV_SDIRXSS_LOG_EVT_START, XV_SDIRXSS_LOG_EVT_STOP, XV_SDIRXSS_LOG_EVT_RESET, XV_SDIRXSS_LOG_EVT_STREAMUP, XV_SDIRXSS_LOG_EVT_STREAMDOWN, XV_SDIRXSS_LOG_EVT_OVERFLOW, XV_SDIRXSS_LOG_EVT_UNDERFLOW, XV_SDIRXSS_LOG_EVT_STREAMSTART, XV_SDIRXSS_LOG_EVT_SETSTREAM, XV_SDIRXSS_LOG_EVT_DUMMY } |
This typedef contains the enum for various logging events. More... | |
enum | XV_SdiRxSs_HandlerType { XV_SDIRXSS_HANDLER_STREAM_DOWN = 1, XV_SDIRXSS_HANDLER_STREAM_UP, XV_SDIRXSS_HANDLER_OVERFLOW, XV_SDIRXSS_HANDLER_UNDERFLOW, XV_SDIRXSS_HANDLER_VSYNC } |
These constants specify different types of handler and used to differentiate interrupt requests from peripheral. More... | |
#define XV_SdiRxSs_GetVersion | ( | InstancePtr | ) |
This macro reads the RX version.
InstancePtr | is a pointer to the XV_SdiRX core instance. |
#define XV_SDIRXSS_H_ |
Prevent circular inclusions by using protection macros.
typedef void(* XV_SdiRxSs_Callback)(void *CallbackRef) |
Callback type for interrupt.
CallbackRef | is 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. |
These constants specify different types of handler and used to differentiate interrupt requests from peripheral.
enum XV_SdiRxSs_LogEvent |
This typedef contains the enum for various logging events.
int XV_SdiRxSs_CfgInitialize | ( | XV_SdiRxSs * | InstancePtr, |
XV_SdiRxSs_Config * | CfgPtr, | ||
UINTPTR | EffectiveAddr | ||
) |
This function initializes the video subsystem and included sub-cores.
This function must be called prior to using the subsystem. Initialization includes setting up the instance data for top level as well as all included sub-core therein, and ensuring the hardware is in a known stable state.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
CfgPtr | points to the configuration structure associated with the subsystem instance. |
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_SdiRxSs_Config::BaseAddress, XV_SdiRxSs::Config, XV_SdiRxSs_Config::DeviceId, XV_SdiRxSs::IsReady, XV_SdiRxSs::SdiRxPtr, and XV_SdiRxSs_SubcoreInitSdiRx().
Referenced by main(), and SdiRxSs_SelfTestExample().
void XV_SdiRxSs_ClearYCbCr444_RGB_10bit | ( | XV_SdiRxSs * | InstancePtr | ) |
This function disable the YUV444/RGB 10bit support SDI RX SS video stream.
InstancePtr | pointer to XV_SdiRxSs instance |
References XV_SdiRxSs::SdiRxPtr.
XVidC_VideoStream* XV_SdiRxSs_GetVideoStream | ( | XV_SdiRxSs * | InstancePtr, |
u8 | StreamId | ||
) |
This function returns the pointer to SDI RX SS video stream.
InstancePtr | pointer to XV_SdiRxSs instance |
StreamId | specifies which video stream's pointer to be returned |
References XV_SdiRxSs::SdiRxPtr.
void XV_SdiRxSs_HandleNoPayload | ( | XV_SdiRxSs * | InstancePtr, |
u8 | enable | ||
) |
This function disables handling for no payload case.
InstancePtr | is a pointer to the XV_SdiRxSs core instance. |
enable | is to enable/disable the Handling of nopayload case |
References XV_SdiRxSs::SdiRxPtr.
void XV_SdiRxSs_IntrDisable | ( | XV_SdiRxSs * | InstancePtr, |
u32 | IntrMask | ||
) |
This function is used to configure the SDI RX interrupts that are to be handled by the application.
Refer to xv_sdirxss_hw.h for interrupt masks.
InstancePtr | pointer to XV_SdiRxSs instance |
IntrMask | Indicates Mask for disabling interrupts. |
References XV_SdiRxSs::SdiRxPtr.
Referenced by main().
void XV_SdiRxSs_IntrEnable | ( | XV_SdiRxSs * | InstancePtr, |
u32 | IntrMask | ||
) |
This function is used to configure the SDI RX interrupts that are to be handled by the application.
Refer to xv_sdirxss_hw.h for interrupt masks.
InstancePtr | pointer to XV_SdiRxSs instance |
IntrMask | Indicates Mask for enable interrupts. |
References XV_SdiRxSs::SdiRxPtr.
Referenced by main().
int XV_SdiRxSs_IsStreamUp | ( | XV_SdiRxSs * | InstancePtr | ) |
This function checks if the video stream is up.
InstancePtr | pointer to XV_SdiRxSs instance |
References XV_SdiRxSs::IsStreamUp.
void XV_SdiRxSs_LogDisplay | ( | XV_SdiRxSs * | InstancePtr | ) |
This function will print the entire log.
InstancePtr | is a pointer to the XV_SdiRxSs core instance. |
References XV_SDIRXSS_LOG_EVT_NONE, XV_SDIRXSS_LOG_EVT_OVERFLOW, XV_SDIRXSS_LOG_EVT_RESET, XV_SDIRXSS_LOG_EVT_SDIRX_INIT, XV_SDIRXSS_LOG_EVT_SETSTREAM, XV_SDIRXSS_LOG_EVT_START, XV_SDIRXSS_LOG_EVT_STOP, XV_SDIRXSS_LOG_EVT_STREAMDOWN, XV_SDIRXSS_LOG_EVT_STREAMSTART, XV_SDIRXSS_LOG_EVT_STREAMUP, XV_SDIRXSS_LOG_EVT_UNDERFLOW, and XV_SdiRxSs_LogRead().
u16 XV_SdiRxSs_LogRead | ( | XV_SdiRxSs * | InstancePtr | ) |
This function will read the last event from the log.
InstancePtr | is a pointer to the XV_SdiRxSs core instance. |
References XV_SdiRxSs_Log::DataBuffer, XV_SdiRxSs_Log::HeadIndex, XV_SdiRxSs::Log, and XV_SdiRxSs_Log::TailIndex.
Referenced by XV_SdiRxSs_LogDisplay().
void XV_SdiRxSs_LogReset | ( | XV_SdiRxSs * | InstancePtr | ) |
This function will reset the driver's logging mechanism.
InstancePtr | is a pointer to the xv_sdirxss core instance. |
References XV_SdiRxSs_Log::HeadIndex, XV_SdiRxSs::Log, and XV_SdiRxSs_Log::TailIndex.
void XV_SdiRxSs_LogWrite | ( | XV_SdiRxSs * | InstancePtr, |
XV_SdiRxSs_LogEvent | Evt, | ||
u8 | Data | ||
) |
This function will insert an event in the driver's logginc mechanism.
InstancePtr | is a pointer to the XV_SdiRxSs core instance. |
Evt | is the event type to log. |
Data | is the associated data for the event. |
References XV_SdiRxSs_Log::DataBuffer, XV_SdiRxSs_Log::HeadIndex, XV_SdiRxSs::Log, XV_SdiRxSs_Log::TailIndex, and XV_SDIRXSS_LOG_EVT_DUMMY.
Referenced by XV_SdiRxSs_Start(), XV_SdiRxSs_Stop(), and XV_SdiRxSs_SubcoreInitSdiRx().
XV_SdiRxSs_Config* XV_SdiRxSs_LookupConfig | ( | u32 | DeviceId | ) |
This function looks for the device configuration based on the unique device ID.
The table XV_SdiRxSs_ConfigTable[] contains the configuration information for each instance of the device in the system.
DeviceId | is the unique device ID of the device being looked up |
Referenced by main(), and SdiRxSs_SelfTestExample().
void XV_SdiRxSs_ReportCoreInfo | ( | XV_SdiRxSs * | InstancePtr | ) |
This function reports list of cores included in Video Processing Subsystem.
InstancePtr | is a pointer to the Subsystem instance. |
References XV_SdiRxSs::SdiRxPtr.
Referenced by XV_SdiRxSs_ReportInfo().
void XV_SdiRxSs_ReportDebugInfo | ( | XV_SdiRxSs * | InstancePtr | ) |
This function prints the SDI RX SS debug information.
InstancePtr | pointer to XV_SdiRxSs instance |
References XV_SdiRxSs::SdiRxPtr.
Referenced by DebugInfo().
void XV_SdiRxSs_ReportInfo | ( | XV_SdiRxSs * | InstancePtr | ) |
This function prints the SDI RX SS information.
InstancePtr | pointer to XV_SdiRxSs instance |
References XV_SdiRxSs::SdiRxPtr, and XV_SdiRxSs_ReportCoreInfo().
Referenced by Info().
void XV_SdiRxSS_SdiRxIntrHandler | ( | XV_SdiRxSs * | InstancePtr | ) |
This function calls the interrupt handler for SDI RX.
InstancePtr | is a pointer to the SDI RX Subsystem |
References XV_SdiRxSs::SdiRxPtr.
Referenced by main().
int XV_SdiRxSs_SetCallback | ( | XV_SdiRxSs * | InstancePtr, |
u32 | HandlerType, | ||
void * | CallbackFunc, | ||
void * | CallbackRef | ||
) |
This function installs an asynchronous callback function for the given HandlerType:
HandlerType Callback Function Type ----------------------- --------------------------------------------- (XV_SDIRXSS_HANDLER_STREAM_DOWN) StreamDownCallback (XV_SDIRXSS_HANDLER_STREAM_UP) StreamUpCallback (XV_SDIRXSS_HANDLER_OVERFLOW) OverFlowCallback (XV_SDIRXSS_HANDLER_UNDERFLOW) UnderFlowCallback (XV_SDIRXSS_HANDLER_VSYNC) VsyncCallback
InstancePtr | is a pointer to the SDI RX Subsystem instance. |
HandlerType | specifies the type of handler. |
CallbackFunc | is the address of the callback function. |
CallbackRef | is a user data item that will be passed to the callback function when it is invoked. |
References XV_SdiRxSs::OverFlowCallback, XV_SdiRxSs::OverFlowRef, XV_SdiRxSs::StreamDownCallback, XV_SdiRxSs::StreamDownRef, XV_SdiRxSs::StreamUpCallback, XV_SdiRxSs::StreamUpRef, XV_SdiRxSs::UnderFlowCallback, XV_SdiRxSs::UnderFlowRef, XV_SdiRxSs::VsyncCallback, XV_SdiRxSs::VsyncRef, XV_SDIRXSS_HANDLER_OVERFLOW, XV_SDIRXSS_HANDLER_STREAM_DOWN, XV_SDIRXSS_HANDLER_STREAM_UP, XV_SDIRXSS_HANDLER_UNDERFLOW, and XV_SDIRXSS_HANDLER_VSYNC.
Referenced by main().
void XV_SdiRxSs_SetYCbCr444_RGB_10bit | ( | XV_SdiRxSs * | InstancePtr | ) |
This function enable the YUV444/RGB 10bit support SDI RX SS video stream.
InstancePtr | pointer to XV_SdiRxSs instance |
References XV_SdiRxSs::SdiRxPtr.
void XV_SdiRxSs_Start | ( | XV_SdiRxSs * | InstancePtr, |
XV_SdiRx_SearchMode | Mode | ||
) |
This function starts the SDI RX stream detection.
InstancePtr | pointer to XV_SdiRxSs instance |
Mode | specifies the mode of SDI modes searching operation.
|
References XV_SdiRxSs::SdiRxPtr, XV_SDIRXSS_LOG_EVT_START, and XV_SdiRxSs_LogWrite().
void XV_SdiRxSs_Stop | ( | XV_SdiRxSs * | InstancePtr | ) |
This function stops the SDI RX stream detection.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XV_SdiRxSs::SdiRxPtr, XV_SDIRXSS_LOG_EVT_STOP, and XV_SdiRxSs_LogWrite().
void XV_SdiRxSs_StreamFlowDisable | ( | XV_SdiRxSs * | InstancePtr | ) |
This function disables the AXIS and video bridges.
InstancePtr | pointer to XV_SdiRxSs instance |
References XV_SdiRxSs::SdiRxPtr.
void XV_SdiRxSs_StreamFlowEnable | ( | XV_SdiRxSs * | InstancePtr | ) |
This function enables the AXIS and video bridges.
InstancePtr | pointer to XV_SdiRxSs instance |
References XV_SdiRxSs::SdiRxPtr.
u32 XV_SdiRxSs_WaitforPayLoad | ( | XV_SdiRxSs * | InstancePtr | ) |
This function is used to wait for the payload valid bit to be set.
This has to be called from application based on the callback indication of the video lock interrupt handler.
InstancePtr | pointer to XV_SdiRxSs instance |
References XV_SdiRxSs::SdiRxPtr.