| dual_splitter Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Macros | Typedefs | Functions
Overview

## 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...

## Macro Definition Documentation

#define XDualSplitter_Disable | ( |  | InstancePtr | ) |

Value:
XDualSplitter_WriteReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_CTL_OFFSET, \
XDualSplitter_ReadReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_CTL_OFFSET) & \
~(XDUSP_GENR_CTL_EN_MASK))
XDualSplitter_WriteReg
#define XDualSplitter_WriteReg(BaseAddress, RegOffset, Data)
This macro writes a value into a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:204
XDualSplitter_ReadReg
#define XDualSplitter_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:182
XDUSP_GENR_CTL_OFFSET
#define XDUSP_GENR_CTL_OFFSET
General Control register offset.
Definition: xdualsplitter_hw.h:45
XDUSP_GENR_CTL_EN_MASK
#define XDUSP_GENR_CTL_EN_MASK
Enable mask.
Definition: xdualsplitter_hw.h:65

This macro disables the Dual Splitter core.

Parameters

  InstancePtr | is a pointer to the XDualSplitter core instance.

Returns
  None.

Note
  C-style signature: void XDualSplitter_Disable(XDualSplitter *InstancePtr)

#define XDualSplitter_Enable | ( |  | InstancePtr | ) |

Value:
XDualSplitter_WriteReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_CTL_OFFSET, \
XDualSplitter_ReadReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_CTL_OFFSET) | XDUSP_GENR_CTL_EN_MASK)
XDualSplitter_WriteReg
#define XDualSplitter_WriteReg(BaseAddress, RegOffset, Data)
This macro writes a value into a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:204
XDualSplitter_ReadReg
#define XDualSplitter_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:182
XDUSP_GENR_CTL_OFFSET
#define XDUSP_GENR_CTL_OFFSET
General Control register offset.
Definition: xdualsplitter_hw.h:45
XDUSP_GENR_CTL_EN_MASK
#define XDUSP_GENR_CTL_EN_MASK
Enable mask.
Definition: xdualsplitter_hw.h:65

This macro enables the Dual Splitter core.

Parameters

  InstancePtr | is a pointer to the XDualSplitter core instance.

Returns
  None.

Note
  C-style signature: void XDualSplitter_Enable(XDualSplitter *InstancePtr)

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
| ) |  |

Value:
XDualSplitter_WriteReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_ERR_OFFSET, IntrType & XDUSP_ALL_ERR_MASK)
XDualSplitter_WriteReg
#define XDualSplitter_WriteReg(BaseAddress, RegOffset, Data)
This macro writes a value into a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:204
XDUSP_ALL_ERR_MASK
#define XDUSP_ALL_ERR_MASK
All error mask.
Definition: xdualsplitter_hw.h:89
XDUSP_GENR_ERR_OFFSET
#define XDUSP_GENR_ERR_OFFSET
General Error register offset.
Definition: xdualsplitter_hw.h:48

This macro clears/acknowledges pending interrupts of the Dual Splitter core.

in the General error register. Bit positions of 1 will be cleared.

Parameters

  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.

Returns
  None.

Note
  C-style signature: void XDualSplitter_IntrClear(XDualSplitter *InstancePtr, u32 IntrType)

Referenced by XDualSplitter_IntrHandler().

#define XDualSplitter_IntrDisable | ( |  | InstancePtr,
|  |  | IntrType
| ) |  |

Value:
XDualSplitter_WriteReg((InstancePtr)->Config.BaseAddress, \
XDUSP_IRQ_EN_OFFSET, \
XDualSplitter_ReadReg((InstancePtr)->Config.BaseAddress, \
XDUSP_IRQ_EN_OFFSET) & ((~IntrType) & \
XDUSP_ALL_ERR_MASK))
XDualSplitter_WriteReg
#define XDualSplitter_WriteReg(BaseAddress, RegOffset, Data)
This macro writes a value into a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:204
XDUSP_ALL_ERR_MASK
#define XDUSP_ALL_ERR_MASK
All error mask.
Definition: xdualsplitter_hw.h:89
XDualSplitter_ReadReg
#define XDualSplitter_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:182
XDUSP_IRQ_EN_OFFSET
#define XDUSP_IRQ_EN_OFFSET
IRQ Enable register offset.
Definition: xdualsplitter_hw.h:51

This macro disables the given individual interrupt(s) on the Dual Splitter core.

Parameters

  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.

Returns
  None.

Note
  Any other interrupt not covered by parameter IntrType, if enabled before this macro is called, will remain enabled. C-style signature: void XDualSplitter_IntrDisable(XDualSplitter *InstancePtr, u32 IntrType)

#define XDualSplitter_IntrEnable | ( |  | InstancePtr,
|  |  | IntrType
| ) |  |

Value:
XDualSplitter_WriteReg((InstancePtr)->Config.BaseAddress, \
(XDUSP_IRQ_EN_OFFSET), (IntrType & \
XDUSP_ALL_ERR_MASK) | \
XDualSplitter_ReadReg((InstancePtr)->Config.BaseAddress, \
XDUSP_IRQ_EN_OFFSET))
XDualSplitter_WriteReg
#define XDualSplitter_WriteReg(BaseAddress, RegOffset, Data)
This macro writes a value into a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:204
XDUSP_ALL_ERR_MASK
#define XDUSP_ALL_ERR_MASK
All error mask.
Definition: xdualsplitter_hw.h:89
XDualSplitter_ReadReg
#define XDualSplitter_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:182
XDUSP_IRQ_EN_OFFSET
#define XDUSP_IRQ_EN_OFFSET
IRQ Enable register offset.
Definition: xdualsplitter_hw.h:51

This macro enables the given individual interrupt(s) on the Dual Splitter core.

Parameters

  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.

Returns
  None.

Note
  The existing enabled interrupt(s) will remain enabled. C-style signature: void XDualSplitter_IntrEnable(XDualSplitter *InstancePtr, u32 IntrType)

#define XDualSplitter_IntrGetPending | ( |  | InstancePtr | ) |

Value:
XDualSplitter_ReadReg((InstancePtr)->Config.BaseAddress, \
XDUSP_IRQ_EN_OFFSET) & \
XDualSplitter_ReadReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_ERR_OFFSET) & \
XDUSP_ALL_ERR_MASK
XDUSP_ALL_ERR_MASK
#define XDUSP_ALL_ERR_MASK
All error mask.
Definition: xdualsplitter_hw.h:89
XDualSplitter_ReadReg
#define XDualSplitter_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:182
XDUSP_GENR_ERR_OFFSET
#define XDUSP_GENR_ERR_OFFSET
General Error register offset.
Definition: xdualsplitter_hw.h:48
XDUSP_IRQ_EN_OFFSET
#define XDUSP_IRQ_EN_OFFSET
IRQ Enable register offset.
Definition: xdualsplitter_hw.h:51

This macro returns the pending interrupts of the Dual Splitter core.

Parameters

  InstancePtr | is a pointer to the XDualSplitter core instance.

Returns
  The pending interrupts of the Dual Splitter. Use XDUSP_ERR_*_MASK constants defined in xdualsplitter_hw.h to interpret this value. The returned value is a logical AND of the contents of the GENR_ERROR Register and the IRQ_ENABLE Register.

Note
  C-style signature: u32 XDualSplitter_IntrGetPending(XDualSplitter *InstancePtr)

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.

Parameters

  BaseAddress | is the base address of the XDualSplitter core.
  RegOffset | is the register offset of the register (defined at the top of this file).

Returns
  The 32-bit value of the register.

Note
  C-style signature: u32 XDualSplitter_ReadReg(u32 BaseAddress, u32 RegOffset)

Referenced by XDualSplitter_GetImageSize(), XDualSplitter_GetImgParam(), and XDualSplitter_Reset().

#define XDualSplitter_RegUpdateDisable | ( |  | InstancePtr | ) |

Value:
XDualSplitter_WriteReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_CTL_OFFSET, \
XDualSplitter_ReadReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_CTL_OFFSET) & (~XDUSP_GENR_CTL_RUE_MASK))
XDualSplitter_WriteReg
#define XDualSplitter_WriteReg(BaseAddress, RegOffset, Data)
This macro writes a value into a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:204
XDualSplitter_ReadReg
#define XDualSplitter_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:182
XDUSP_GENR_CTL_OFFSET
#define XDUSP_GENR_CTL_OFFSET
General Control register offset.
Definition: xdualsplitter_hw.h:45
XDUSP_GENR_CTL_RUE_MASK
#define XDUSP_GENR_CTL_RUE_MASK
Register update enable mask.
Definition: xdualsplitter_hw.h:66

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.

Parameters

  InstancePtr | is a pointer to the XDualSplitter core instance.

Returns
  None.

Note
  C-style signature: void XDualSplitter_RegUpdateDisable(XDualSplitter *InstancePtr)

Referenced by XDualSplitterExample().

#define XDualSplitter_RegUpdateEnable | ( |  | InstancePtr | ) |

Value:
XDualSplitter_WriteReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_CTL_OFFSET, \
XDualSplitter_ReadReg((InstancePtr)->Config.BaseAddress, \
XDUSP_GENR_CTL_OFFSET) | XDUSP_GENR_CTL_RUE_MASK)
XDualSplitter_WriteReg
#define XDualSplitter_WriteReg(BaseAddress, RegOffset, Data)
This macro writes a value into a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:204
XDualSplitter_ReadReg
#define XDualSplitter_ReadReg(BaseAddress, RegOffset)
This macro reads a value from a Dual Splitter core&#39;s register.
Definition: xdualsplitter_hw.h:182
XDUSP_GENR_CTL_OFFSET
#define XDUSP_GENR_CTL_OFFSET
General Control register offset.
Definition: xdualsplitter_hw.h:45
XDUSP_GENR_CTL_RUE_MASK
#define XDUSP_GENR_CTL_RUE_MASK
Register update enable mask.
Definition: xdualsplitter_hw.h:66

This macro commits all the register value changes made so far by the software to the Dual Splitter core.

Parameters

  InstancePtr | is a pointer to the XDualSplitter core instance.

Returns
  None.

Note
  C-style signature: void XDualSplitter_RegUpdateEnable(XDualSplitter *InstancePtr)

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.

Parameters

  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.

Returns
  None.

Note
  C-style signature: void XDualSplitter_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)

Referenced by XDualSplitter_Reset(), XDualSplitter_SetImageSize(), and XDualSplitter_SetImgParam().

#define XDUSP_ALL_ERR_MASK

Value:
(XDUSP_ERR_EOL_EARLY_MASK | \
XDUSP_ERR_EOL_LATE_MASK | \
XDUSP_ERR_SOF_EARLY_MASK | \
XDUSP_ERR_SOF_LATE_MASK)
XDUSP_ERR_SOF_LATE_MASK
#define XDUSP_ERR_SOF_LATE_MASK
Error: Start of frame late mask.
Definition: xdualsplitter_hw.h:86
XDUSP_ERR_EOL_EARLY_MASK
#define XDUSP_ERR_EOL_EARLY_MASK
Error: End of line early mask.
Definition: xdualsplitter_hw.h:75
XDUSP_ERR_SOF_EARLY_MASK
#define XDUSP_ERR_SOF_EARLY_MASK
Error: Start of frame early mask.
Definition: xdualsplitter_hw.h:81
XDUSP_ERR_EOL_LATE_MASK
#define XDUSP_ERR_EOL_LATE_MASK
Error: End of line late mask.
Definition: xdualsplitter_hw.h:78

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 Documentation

typedef void(* XDualSplitter_ErrCallback)(void *CallbackRef, u32 ErrorMask)

Callback type for error interrupt.

Parameters

  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.

## Function Documentation

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.

Parameters

  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.

Returns
  - XST_SUCCESS if XDualSplitter_CfgInitialize was successful.

Note
  None.

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.

Parameters

  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].

Returns
  None.

Note
  None.

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.

Parameters

  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.

Returns
  None.

Note
  None.

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.

Parameters

  InstancePtr | is a pointer to the XDualSplitter core instance.

Returns
  None.

Note
  Interrupt should be enabled to execute interrupt handler.

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.

Parameters

  DeviceId | is the unique core ID of the Dual Splitter core for the lookup operation.

Returns
  XDualSplitter_LookupConfig returns a reference to a config record in the configuration table (in xdaulsplitter_g.c) corresponding to DeviceId, or NULL if no match is found.

Note
  None.

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.

Parameters

  InstancePtr | is a pointer to the XDualSplitter core instance.

Returns
  None.

Note
  None.

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.

Parameters

  InstancePtr | is a pointer to the XDualSplitter core instance.

Returns
  - XST_SUCCESS if self test passed.
  - XST_FAILURE if self test failed.

Note
  None.

References XDualSplitter_GetImageSize(), and XDualSplitter_SetImageSize().

void XDualSplitter_SetCallback | ( | XDualSplitter * | InstancePtr,
|  | void * | CallbackFunc,
|  | void * | CallbackRef
| ) |  |

This function installs an asynchronous callback function.

Parameters

  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.

Returns
  None.

Note
  Invoking this function for a callback that already has been installed replaces it with the new callback.

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.

Parameters

  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].

Returns
  None.

Note
  None.

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.

Parameters

  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.

Returns
  None.

Note
  None.

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().