![]() |
dual_splitter
Xilinx SDK Drivers API Documentation
|
Data Structures | |
struct | XDualSplitter_Config |
This typedef contains configuration information for the Dual Splitter core. More... | |
struct | XDualSplitter |
The XDualSplitter driver instance data. More... | |
Macros | |
#define | XDUALSPLITTER_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XDUSP_MAX_INPUT_SAMPLES 4 |
Maximum input samples per clock. More... | |
#define | XDUSP_MAX_OUTPUT_SAMPLES 4 |
Maximum output samples per clock. More... | |
#define | XDUSP_MAX_SEGMENTS 4 |
Maximum number of segments in an image. More... | |
#define | XDUSP_MAX_IMG_WIDTH 3840 |
Maximum image width. More... | |
#define | XDUSP_MAX_IMG_HEIGHT 2160 |
Maximum image height. More... | |
#define | XDualSplitter_RegUpdateEnable(InstancePtr) |
This macro commits all the register value changes made so far by the software to the Dual Splitter core. More... | |
#define | XDualSplitter_RegUpdateDisable(InstancePtr) |
This macro prevents the Dual Splitter core from committing recent changes made so far by the software. More... | |
#define | XDualSplitter_Enable(InstancePtr) |
This macro enables the Dual Splitter core. More... | |
#define | XDualSplitter_Disable(InstancePtr) |
This macro disables the Dual Splitter core. More... | |
#define | XDualSplitter_IntrEnable(InstancePtr, IntrType) |
This macro enables the given individual interrupt(s) on the Dual Splitter core. More... | |
#define | XDualSplitter_IntrDisable(InstancePtr, IntrType) |
This macro disables the given individual interrupt(s) on the Dual Splitter core. More... | |
#define | XDualSplitter_IntrGetPending(InstancePtr) |
This macro returns the pending interrupts of the Dual Splitter core. More... | |
#define | XDualSplitter_IntrClear(InstancePtr, IntrType) |
This macro clears/acknowledges pending interrupts of the Dual Splitter core. More... | |
#define | XDUALSPLITTER_HW_H_ |
Prevent circular inclusions by using protection macros. More... | |
Typedefs | |
typedef void(* | XDualSplitter_ErrCallback )(void *CallbackRef, u32 ErrorMask) |
Callback type for error interrupt. More... | |
Functions | |
s32 | XDualSplitter_CfgInitialize (XDualSplitter *InstancePtr, XDualSplitter_Config *CfgPtr, u32 EffectiveAddr) |
This function initializes the Dual Splitter core. More... | |
void | XDualSplitter_Reset (XDualSplitter *InstancePtr) |
This function resets the Dual Splitter core instance. More... | |
void | XDualSplitter_SetImageSize (XDualSplitter *InstancePtr, u16 Height, u16 Width) |
This function sets the image size (width x height) of the Dual Splitter core. More... | |
void | XDualSplitter_GetImageSize (XDualSplitter *InstancePtr, u16 *Height, u16 *Width) |
This function gets the image size (width x height) of the Dual Splitter core. More... | |
void | XDualSplitter_SetImgParam (XDualSplitter *InstancePtr, u8 InputSamples, u8 OutputSamples, u8 ImageSegments, u8 Overlap) |
This function sets the image parameters to split into multiple segments. More... | |
void | XDualSplitter_GetImgParam (XDualSplitter *InstancePtr, u8 *InputSamples, u8 *OutputSamples, u8 *ImageSegments, u8 *Overlap) |
This function gets the image parameters of the Dual Splitter core. More... | |
XDualSplitter_Config * | XDualSplitter_LookupConfig (u16 DeviceId) |
This function returns a reference to the XDualSplitter_Config structure based on the core id, DeviceId. More... | |
s32 | XDualSplitter_SelfTest (XDualSplitter *InstancePtr) |
This function performs self test on DualSplitter core registers. More... | |
void | XDualSplitter_IntrHandler (void *InstancePtr) |
This function is the interrupt handler for the Dual Splitter core. More... | |
void | XDualSplitter_SetCallback (XDualSplitter *InstancePtr, void *CallbackFunc, void *CallbackRef) |
This function installs an asynchronous callback function. More... | |
Core registers offsets | |
#define | XDUSP_GENR_CTL_OFFSET 0x0000 |
General Control register offset. More... | |
#define | XDUSP_GENR_ERR_OFFSET 0x0008 |
General Error register offset. More... | |
#define | XDUSP_IRQ_EN_OFFSET 0x000C |
IRQ Enable register offset. More... | |
#define | XDUSP_TIME_CTL_OFFSET 0x0020 |
Time Control register offset. More... | |
#define | XDUSP_CORE_CTL_OFFSET 0x0100 |
Core Control register offset. More... | |
General control register bit masks | |
#define | XDUSP_GENR_CTL_EN_MASK 0x00000001 |
Enable mask. More... | |
#define | XDUSP_GENR_CTL_RUE_MASK 0x00000002 |
Register update enable mask. More... | |
#define | XDUSP_GENR_CTL_RST_MASK 0x80000000 |
Reset mask. More... | |
Error register bit masks | |
#define | XDUSP_ERR_EOL_EARLY_MASK 0x00000001 |
Error: End of line early mask. More... | |
#define | XDUSP_ERR_EOL_LATE_MASK 0x00000002 |
Error: End of line late mask. More... | |
#define | XDUSP_ERR_SOF_EARLY_MASK 0x00000004 |
Error: Start of frame early mask. More... | |
#define | XDUSP_ERR_SOF_LATE_MASK 0x00000008 |
Error: Start of frame late mask. More... | |
#define | XDUSP_ALL_ERR_MASK |
All error mask. More... | |
Time control register bit masks and shifts | |
#define | XDUSP_TIME_CTL_WIDTH_MASK 0x0000FFFF |
Image width mask. More... | |
#define | XDUSP_TIME_CTL_HEIGHT_MASK 0xFFFF0000 |
Image height mask. More... | |
#define | XDUSP_TIME_CTL_HEIGHT_SHIFT 16 |
Image height shift. More... | |
Core control register masks and shifts | |
#define | XDUSP_CORE_CTL_IN_SAMPLES_MASK 0x000000FF |
Input samples mask. More... | |
#define | XDUSP_CORE_CTL_OUT_SAMPLES_MASK 0x0000FF00 |
Output samples mask. More... | |
#define | XDUSP_CORE_CTL_IMG_SEG_MASK 0x00FF0000 |
No of image segments mask. More... | |
#define | XDUSP_CORE_CTL_OVRLAP_SEG_MASK 0xFF000000 |
No of over- lapping segments mask. More... | |
#define | XDUSP_CORE_CTL_OUT_SAMPLES_SHIFT 8 |
Output samples shift. More... | |
#define | XDUSP_CORE_CTL_IMG_SEG_SHIFT 16 |
No of image segments shift. More... | |
#define | XDUSP_CORE_CTL_OVRLAP_SEG_SHIFT 24 |
No of overlapping segments shift. More... | |
Device register I/O APIs | |
#define | XDualSplitter_In32 Xil_In32 |
Input operation. More... | |
#define | XDualSplitter_Out32 Xil_Out32 |
Output operation. More... | |
#define | XDualSplitter_ReadReg(BaseAddress, RegOffset) XDualSplitter_In32((BaseAddress) + (u32)(RegOffset)) |
This macro reads a value from a Dual Splitter core's register. More... | |
#define | XDualSplitter_WriteReg(BaseAddress, RegOffset, Data) XDualSplitter_Out32((BaseAddress) + (u32)(RegOffset), (Data)) |
This macro writes a value into a Dual Splitter core's register. More... | |
#define XDualSplitter_Disable | ( | InstancePtr | ) |
This macro disables the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
#define XDualSplitter_Enable | ( | InstancePtr | ) |
This macro enables the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
Referenced by XDualSplitterExample().
#define XDUALSPLITTER_H_ |
Prevent circular inclusions by using protection macros.
#define XDUALSPLITTER_HW_H_ |
Prevent circular inclusions by using protection macros.
#define XDualSplitter_In32 Xil_In32 |
Input operation.
#define XDualSplitter_IntrClear | ( | InstancePtr, | |
IntrType | |||
) |
This macro clears/acknowledges pending interrupts of the Dual Splitter core.
in the General error register. Bit positions of 1 will be cleared.
InstancePtr | is a pointer to the XDualSplitter core instance. |
IntrType | is the pending interrupts to clear/acknowledge. Use OR'ing of XDUSP_ERR_*_MASK constants defined in xdualsplitter_hw.h to create this parameter value. |
Referenced by XDualSplitter_IntrHandler().
#define XDualSplitter_IntrDisable | ( | InstancePtr, | |
IntrType | |||
) |
This macro disables the given individual interrupt(s) on the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
IntrType | is the bit-mask of the interrupts to be disabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XDUSP_ERR_*_MASK bits defined in xdualsplitter_hw.h. |
#define XDualSplitter_IntrEnable | ( | InstancePtr, | |
IntrType | |||
) |
This macro enables the given individual interrupt(s) on the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
IntrType | is the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XDUSP_ERR_*_MASK bits defined in xdualsplitter_hw.h. |
#define XDualSplitter_IntrGetPending | ( | InstancePtr | ) |
This macro returns the pending interrupts of the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
Referenced by XDualSplitter_IntrHandler().
#define XDualSplitter_Out32 Xil_Out32 |
Output operation.
#define XDualSplitter_ReadReg | ( | BaseAddress, | |
RegOffset | |||
) | XDualSplitter_In32((BaseAddress) + (u32)(RegOffset)) |
This macro reads a value from a Dual Splitter core's register.
A 32 bit read is performed. If the component is implemented in a smaller width, only the least significant data is read from the register. The most significant data will be read as 0.
BaseAddress | is the base address of the XDualSplitter core. |
RegOffset | is the register offset of the register (defined at the top of this file). |
Referenced by XDualSplitter_GetImageSize(), XDualSplitter_GetImgParam(), and XDualSplitter_Reset().
#define XDualSplitter_RegUpdateDisable | ( | InstancePtr | ) |
This macro prevents the Dual Splitter core from committing recent changes made so far by the software.
When disabled, changes to other configuration registers are stored but do not effect the behavior of the core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
Referenced by XDualSplitterExample().
#define XDualSplitter_RegUpdateEnable | ( | InstancePtr | ) |
This macro commits all the register value changes made so far by the software to the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
Referenced by XDualSplitterExample().
#define XDualSplitter_WriteReg | ( | BaseAddress, | |
RegOffset, | |||
Data | |||
) | XDualSplitter_Out32((BaseAddress) + (u32)(RegOffset), (Data)) |
This macro writes a value into a Dual Splitter core's register.
A 32 bit write is performed. If the component is implemented in a smaller width, only the least significant data is written.
BaseAddress | is the base address of the XDualSplitter core. |
RegOffset | is the register offset of the register (defined at the top of this file) to be written. |
Data | is the 32-bit value to write into the register. |
Referenced by XDualSplitter_Reset(), XDualSplitter_SetImageSize(), and XDualSplitter_SetImgParam().
#define XDUSP_ALL_ERR_MASK |
All error mask.
Referenced by XDualSplitter_IntrHandler().
#define XDUSP_CORE_CTL_IMG_SEG_MASK 0x00FF0000 |
No of image segments mask.
Referenced by XDualSplitter_GetImgParam(), and XDualSplitter_SetImgParam().
#define XDUSP_CORE_CTL_IMG_SEG_SHIFT 16 |
No of image segments shift.
Referenced by XDualSplitter_GetImgParam(), and XDualSplitter_SetImgParam().
#define XDUSP_CORE_CTL_IN_SAMPLES_MASK 0x000000FF |
Input samples mask.
Referenced by XDualSplitter_GetImgParam(), and XDualSplitter_SetImgParam().
#define XDUSP_CORE_CTL_OFFSET 0x0100 |
Core Control register offset.
Referenced by XDualSplitter_GetImgParam(), and XDualSplitter_SetImgParam().
#define XDUSP_CORE_CTL_OUT_SAMPLES_MASK 0x0000FF00 |
Output samples mask.
Referenced by XDualSplitter_GetImgParam(), and XDualSplitter_SetImgParam().
#define XDUSP_CORE_CTL_OUT_SAMPLES_SHIFT 8 |
Output samples shift.
Referenced by XDualSplitter_GetImgParam(), and XDualSplitter_SetImgParam().
#define XDUSP_CORE_CTL_OVRLAP_SEG_MASK 0xFF000000 |
No of over- lapping segments mask.
Referenced by XDualSplitter_GetImgParam(), and XDualSplitter_SetImgParam().
#define XDUSP_CORE_CTL_OVRLAP_SEG_SHIFT 24 |
No of overlapping segments shift.
Referenced by XDualSplitter_GetImgParam(), and XDualSplitter_SetImgParam().
#define XDUSP_ERR_EOL_EARLY_MASK 0x00000001 |
Error: End of line early mask.
#define XDUSP_ERR_EOL_LATE_MASK 0x00000002 |
Error: End of line late mask.
#define XDUSP_ERR_SOF_EARLY_MASK 0x00000004 |
Error: Start of frame early mask.
#define XDUSP_ERR_SOF_LATE_MASK 0x00000008 |
Error: Start of frame late mask.
#define XDUSP_GENR_CTL_EN_MASK 0x00000001 |
Enable mask.
#define XDUSP_GENR_CTL_OFFSET 0x0000 |
General Control register offset.
Referenced by XDualSplitter_Reset().
#define XDUSP_GENR_CTL_RST_MASK 0x80000000 |
Reset mask.
Referenced by XDualSplitter_Reset().
#define XDUSP_GENR_CTL_RUE_MASK 0x00000002 |
Register update enable mask.
#define XDUSP_GENR_ERR_OFFSET 0x0008 |
General Error register offset.
#define XDUSP_IRQ_EN_OFFSET 0x000C |
IRQ Enable register offset.
#define XDUSP_MAX_IMG_HEIGHT 2160 |
Maximum image height.
Referenced by XDualSplitter_SetImageSize().
#define XDUSP_MAX_IMG_WIDTH 3840 |
Maximum image width.
Referenced by XDualSplitter_SetImageSize().
#define XDUSP_MAX_INPUT_SAMPLES 4 |
Maximum input samples per clock.
Referenced by XDualSplitter_SetImgParam().
#define XDUSP_MAX_OUTPUT_SAMPLES 4 |
Maximum output samples per clock.
Referenced by XDualSplitter_SetImgParam().
#define XDUSP_MAX_SEGMENTS 4 |
Maximum number of segments in an image.
Referenced by XDualSplitter_SetImgParam().
#define XDUSP_TIME_CTL_HEIGHT_MASK 0xFFFF0000 |
Image height mask.
Referenced by XDualSplitter_SetImageSize().
#define XDUSP_TIME_CTL_HEIGHT_SHIFT 16 |
Image height shift.
Referenced by XDualSplitter_GetImageSize(), and XDualSplitter_SetImageSize().
#define XDUSP_TIME_CTL_OFFSET 0x0020 |
Time Control register offset.
Referenced by XDualSplitter_GetImageSize(), and XDualSplitter_SetImageSize().
#define XDUSP_TIME_CTL_WIDTH_MASK 0x0000FFFF |
Image width mask.
Referenced by XDualSplitter_GetImageSize(), and XDualSplitter_SetImageSize().
typedef void(* XDualSplitter_ErrCallback)(void *CallbackRef, u32 ErrorMask) |
Callback type for error 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. |
ErrorMask | is a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XDUSP_ERR_*_MASK values defined in xdualsplitter_hw.h. |
s32 XDualSplitter_CfgInitialize | ( | XDualSplitter * | InstancePtr, |
XDualSplitter_Config * | CfgPtr, | ||
u32 | EffectiveAddr | ||
) |
This function initializes the Dual Splitter core.
This function must be called prior to using the Dual Splitter core. Initialization of the core includes setting up the instance data and ensuring the hardware is in a quiescent state.
InstancePtr | is a pointer to the XDualSplitter core instance. |
CfgPtr | points to the configuration structure associated with the Dual Splitter 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 XDualSplitter_Config::BaseAddress, XDualSplitter::Config, XDualSplitter::ErrCallback, XDualSplitter::IsReady, and XDualSplitter_Reset().
Referenced by XDualSplitterExample().
void XDualSplitter_GetImageSize | ( | XDualSplitter * | InstancePtr, |
u16 * | Height, | ||
u16 * | Width | ||
) |
This function gets the image size (width x height) of the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
Height | specifies a pointer to the 16-bit variable that will be filled with height which is in the range [0, 2160]. |
Width | specifies a pointer to the 16-bit variable that will be filled with width which is in the range [0, 3840]. |
References XDualSplitter_Config::BaseAddress, XDualSplitter::Config, XDualSplitter_ReadReg, XDUSP_TIME_CTL_HEIGHT_SHIFT, XDUSP_TIME_CTL_OFFSET, and XDUSP_TIME_CTL_WIDTH_MASK.
Referenced by XDualSplitter_SelfTest().
void XDualSplitter_GetImgParam | ( | XDualSplitter * | InstancePtr, |
u8 * | InputSamples, | ||
u8 * | OutputSamples, | ||
u8 * | ImageSegments, | ||
u8 * | Overlap | ||
) |
This function gets the image parameters of the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
InputSamples | specifies a pointer to the 8-bit variable that will be filled with number of input samples which is in the range [0, 4] |
OutputSamples | specifies a pointer to the 8-bit variable that will be filled with number of output samples which is in the range [0, 4] |
ImageSegments | specifies a pointer to the 8-bit variable that will be filled with number of image segments which is in the range [0, 4] |
Overlap | specifies a pointer to the 8-bit variable that will be filled with number of samples overlapping the segments. |
References XDualSplitter_Config::BaseAddress, XDualSplitter::Config, XDualSplitter_ReadReg, XDUSP_CORE_CTL_IMG_SEG_MASK, XDUSP_CORE_CTL_IMG_SEG_SHIFT, XDUSP_CORE_CTL_IN_SAMPLES_MASK, XDUSP_CORE_CTL_OFFSET, XDUSP_CORE_CTL_OUT_SAMPLES_MASK, XDUSP_CORE_CTL_OUT_SAMPLES_SHIFT, XDUSP_CORE_CTL_OVRLAP_SEG_MASK, and XDUSP_CORE_CTL_OVRLAP_SEG_SHIFT.
void XDualSplitter_IntrHandler | ( | void * | InstancePtr | ) |
This function is the interrupt handler for the Dual Splitter core.
This handler reads the pending interrupt from the GENR_ERROR register, determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in IRQ_ENABLE register, and finally clears the interrupts.
The application is responsible for connecting this function to the interrupt system. Application beyond this core is also responsible for providing callbacks to handle interrupts and installing the callbacks using XDualSplitter_SetCallBack() during initialization phase.
InstancePtr | is a pointer to the XDualSplitter core instance. |
References XDualSplitter::Config, XDualSplitter::ErrCallback, XDualSplitter::ErrRef, XDualSplitter_Config::HasIntrReq, XDualSplitter::IsReady, XDualSplitter_IntrClear, XDualSplitter_IntrGetPending, and XDUSP_ALL_ERR_MASK.
XDualSplitter_Config * XDualSplitter_LookupConfig | ( | u16 | DeviceId | ) |
This function returns a reference to the XDualSplitter_Config structure based on the core id, DeviceId.
The return value will refer to an entry in the device configuration table defined in the xdualsplitter_g.c file.
DeviceId | is the unique core ID of the Dual Splitter core for the lookup operation. |
Referenced by XDualSplitterExample().
void XDualSplitter_Reset | ( | XDualSplitter * | InstancePtr | ) |
This function resets the Dual Splitter core instance.
This reset effects the core immediately and may cause image tearing.
InstancePtr | is a pointer to the XDualSplitter core instance. |
References XDualSplitter_Config::BaseAddress, XDualSplitter::Config, XDualSplitter_ReadReg, XDualSplitter_WriteReg, XDUSP_GENR_CTL_OFFSET, and XDUSP_GENR_CTL_RST_MASK.
Referenced by XDualSplitter_CfgInitialize().
s32 XDualSplitter_SelfTest | ( | XDualSplitter * | InstancePtr | ) |
This function performs self test on DualSplitter core registers.
InstancePtr | is a pointer to the XDualSplitter core instance. |
References XDualSplitter_GetImageSize(), and XDualSplitter_SetImageSize().
void XDualSplitter_SetCallback | ( | XDualSplitter * | InstancePtr, |
void * | CallbackFunc, | ||
void * | CallbackRef | ||
) |
This function installs an asynchronous callback function.
InstancePtr | is a pointer to the XDualSplitter core instance. |
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 XDualSplitter::ErrCallback, XDualSplitter::ErrRef, and XDualSplitter::IsReady.
void XDualSplitter_SetImageSize | ( | XDualSplitter * | InstancePtr, |
u16 | Height, | ||
u16 | Width | ||
) |
This function sets the image size (width x height) of the Dual Splitter core.
InstancePtr | is a pointer to the XDualSplitter core instance. |
Height | specifies the height of the input image that needs to be set within the range [0, 2160]. |
Width | specifies the width of the input image that needs to be set within the range [0, 3840]. |
References XDualSplitter_Config::BaseAddress, XDualSplitter::Config, XDualSplitter_WriteReg, XDUSP_MAX_IMG_HEIGHT, XDUSP_MAX_IMG_WIDTH, XDUSP_TIME_CTL_HEIGHT_MASK, XDUSP_TIME_CTL_HEIGHT_SHIFT, XDUSP_TIME_CTL_OFFSET, and XDUSP_TIME_CTL_WIDTH_MASK.
Referenced by XDualSplitter_SelfTest(), and XDualSplitterExample().
void XDualSplitter_SetImgParam | ( | XDualSplitter * | InstancePtr, |
u8 | InputSamples, | ||
u8 | OutputSamples, | ||
u8 | ImageSegments, | ||
u8 | Overlap | ||
) |
This function sets the image parameters to split into multiple segments.
InstancePtr | is a pointer to the XDualSplitter core instance. |
InputSamples | specifies the number of input samples per clock that needs to be set within the range [0, 4]. |
OutputSamples | specifies the number of output samples per clock that needs to be set within the range [0, 4]. |
ImageSegments | specifies the number of image segments that needs to be set within the range [0, 4]. |
Overlap | specifies the overlap of the samples in the segments. |
References XDualSplitter_Config::BaseAddress, XDualSplitter::Config, XDualSplitter_WriteReg, XDUSP_CORE_CTL_IMG_SEG_MASK, XDUSP_CORE_CTL_IMG_SEG_SHIFT, XDUSP_CORE_CTL_IN_SAMPLES_MASK, XDUSP_CORE_CTL_OFFSET, XDUSP_CORE_CTL_OUT_SAMPLES_MASK, XDUSP_CORE_CTL_OUT_SAMPLES_SHIFT, XDUSP_CORE_CTL_OVRLAP_SEG_MASK, XDUSP_CORE_CTL_OVRLAP_SEG_SHIFT, XDUSP_MAX_INPUT_SAMPLES, XDUSP_MAX_OUTPUT_SAMPLES, and XDUSP_MAX_SEGMENTS.
Referenced by XDualSplitterExample().