vprocss
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
periph.c File Reference
#include "xparameters.h"
#include "periph.h"

Macros

Reset Network

The following constants define various reset lines in the subsystem

#define XPER_HLSIP_RESET   (0x00)
 Assert HLS IP reset line. More...
 
#define XPER_HLSIP_ENABLE   (0x01)
 Deassert reset, enable HLS IP. More...
 

Functions

void XPeriph_ReportDeviceInfo (XPeriph *InstancePtr)
 This function reports system wide common peripherals included in the design. More...
 
int XPeriph_PowerOnInit (XPeriph *InstancePtr)
 This function initializes system wide common peripherals. More...
 
void XPeriph_ResetHlsIp (XPeriph *InstancePtr)
 This function resets the Hls IP block(s) More...
 
void XPeriph_ConfigTpg (XPeriph *InstancePtr)
 This function configures TPG to user defined parameters. More...
 
void XPeriph_SetTpgParams (XPeriph *InstancePtr, u16 width, u16 height, XVidC_ColorFormat Cformat, u16 Pattern, u16 IsInterlaced)
 This function sets the parameters for the Test Pattern Generator (TPG) in the XPeriph instance. More...
 
void XPeriph_DisableTpg (XPeriph *InstancePtr)
 This function stops TPG IP. More...
 
void XPeriph_TpgDbgReportStatus (XPeriph *InstancePtr)
 This function reports TPG Status. More...
 
void XPeriph_ConfigVtc (XPeriph *InstancePtr, XVidC_VideoStream *StreamPtr, u32 PixPerClk)
 This function configures the Video Timing Controller (VTC) for a given peripheral instance based on the provided video stream parameters and the number of pixels per clock. More...
 

Variables

XV_tpg Tpg
 Peripheral IP driver instances. More...
 
XVtc Vtc
 Video Timing Controller (VTC) driver instance. More...
 
XGpio VidLocMonitor
 Video lock monitor GPIO instance. More...
 
XGpio HlsIpReset
 HLS IP reset GPIO instance. More...
 

Macro Definition Documentation

#define XPER_HLSIP_ENABLE   (0x01)

Deassert reset, enable HLS IP.

Referenced by XPeriph_ResetHlsIp().

#define XPER_HLSIP_RESET   (0x00)

Assert HLS IP reset line.

Referenced by XPeriph_ResetHlsIp().

Function Documentation

void XPeriph_ConfigTpg ( XPeriph InstancePtr)

This function configures TPG to user defined parameters.

Parameters
InstancePtris a pointer to the peripheral instance
void XPeriph_ConfigVtc ( XPeriph InstancePtr,
XVidC_VideoStream *  StreamPtr,
u32  PixPerClk 
)

This function configures the Video Timing Controller (VTC) for a given peripheral instance based on the provided video stream parameters and the number of pixels per clock.

The function performs the following steps:

  • Disables and resets the VTC generator.
  • Sets the source selection to use generator registers for all timing parameters.
  • Manually writes to the VTC control register to handle the interlace field workaround.
  • Populates the XVtc_Timing structure with horizontal and vertical timing values from the provided video stream, adjusting horizontal counts by the PixPerClk value.
  • Applies a workaround for known VTC offset issues by adjusting vertical porch values.
  • Sets the polarity of all VTC outputs according to the video stream timing.
  • Enables the VTC generator and updates the register configuration.
Parameters
InstancePtrPointer to the XPeriph instance to configure.
StreamPtrPointer to the XVidC_VideoStream structure containing timing information.
PixPerClkNumber of pixels processed per clock cycle.
void XPeriph_DisableTpg ( XPeriph InstancePtr)

This function stops TPG IP.

Parameters
InstancePtris a pointer to the peripheral instance
int XPeriph_PowerOnInit ( XPeriph InstancePtr)

This function initializes system wide common peripherals.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS

References HlsIpReset, Tpg, VidLocMonitor, Vtc, and XPeriph_ResetHlsIp().

Referenced by XSys_Init().

void XPeriph_ReportDeviceInfo ( XPeriph InstancePtr)

This function reports system wide common peripherals included in the design.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.

Referenced by XSys_ReportSystemInfo().

void XPeriph_ResetHlsIp ( XPeriph InstancePtr)

This function resets the Hls IP block(s)

Parameters
InstancePtris a pointer to the peripheral instance

References XPER_HLSIP_ENABLE, and XPER_HLSIP_RESET.

Referenced by XPeriph_PowerOnInit().

void XPeriph_SetTpgParams ( XPeriph InstancePtr,
u16  width,
u16  height,
XVidC_ColorFormat  Cformat,
u16  Pattern,
u16  IsInterlaced 
)

This function sets the parameters for the Test Pattern Generator (TPG) in the XPeriph instance.

Parameters
InstancePtrPointer to the XPeriph instance.
widthWidth of the test pattern to be generated.
heightHeight of the test pattern to be generated.
CformatColor format for the test pattern (of type XVidC_ColorFormat).
PatternPattern type to be generated.
IsInterlacedFlag indicating whether the output should be interlaced (1) or progressive (0).

References XPeriph_SetTPGColorFormat, XPeriph_SetTPGHeight, XPeriph_SetTPGInterlacedMode, XPeriph_SetTPGPattern, and XPeriph_SetTPGWidth.

void XPeriph_TpgDbgReportStatus ( XPeriph InstancePtr)

This function reports TPG Status.

Parameters
InstancePtris a pointer to the peripheral instance

Variable Documentation

XGpio HlsIpReset

HLS IP reset GPIO instance.

Referenced by XPeriph_PowerOnInit().

XV_tpg Tpg

Peripheral IP driver instances.

Test Pattern Generator (TPG) driver instance

Referenced by XPeriph_PowerOnInit().

XGpio VidLocMonitor

Video lock monitor GPIO instance.

Referenced by XPeriph_PowerOnInit().

XVtc Vtc

Video Timing Controller (VTC) driver instance.

Referenced by XPeriph_PowerOnInit().