v_frmbuf_rd
Vitis Drivers API Documentation
xv_frmbufrd_example.c File Reference

Overview

This file demonstrates the example usage of Frame Buffer Read IP available in catalogue.

Please refer v_frmbuf_rd example design guide for details on HW setup.

MODIFICATION HISTORY:
Ver   Who    Date     Changes


1.00 vyc 04/05/17 Initial Release 2.00 vyc 10/04/17 Add second buffer pointer for semi-planar formats Add new memory formats BGRX8 and UYVY8 3.00 vyc 04/04/18 Add support for ZCU102, ZCU104, ZCU106 Add new memory format BGR8 4.00 pv 11/10/18 Added flushing feature support in driver. flush bit should be set and held (until reset) by software to flush pending transactions.IP is expecting a hard reset, when flushing is done.(There is a flush status bit and is asserted when the flush is done). 4.10 vv 03/13/19 Added new pixel formats with 12 and 16 bpc. 4.50 kp 13/07/21 Added new 3 planar video format Y_U_V8. 4.60 kp 03/12/21 Added new 3 planar video format Y_U_V10.

Macros

#define XVMonitor_IsVideoLocked(GpioPtr)   (XGpio_DiscreteRead(GpioPtr, 1))
 This macro reads GPIO to check video lock status. More...
 

Functions

void resetIp (void)
 Resets the HLS (High-Level Synthesis) IP core via GPIO. More...
 
void * XVFrameBufferCallback (void *data)
 Callback function for Frame Buffer Read interrupt. More...
 
int main (void)
 Example application for testing the Xilinx Video Frame Buffer Read (XVFrmbufRd) driver. More...
 

Macro Definition Documentation

#define XVMonitor_IsVideoLocked (   GpioPtr)    (XGpio_DiscreteRead(GpioPtr, 1))

This macro reads GPIO to check video lock status.

Parameters
GpioPtris pointer to the gpio Instance
Returns
T/F

Referenced by main().

Function Documentation

int main ( void  )

Example application for testing the Xilinx Video Frame Buffer Read (XVFrmbufRd) driver.

This example demonstrates the initialization and testing of the XVFrmbufRd hardware IP core. It performs the following steps:

  • Initializes the platform and required drivers (VTC, Frame Buffers, GPIO).
  • Sets up interrupts and enables exception handling.
  • Iterates through a set of predefined video modes and color formats.
  • For each valid combination, configures the video timing controller (VTC) and frame buffer.
  • Checks for video output lock and records pass/fail results.
  • Resets the IP and verifies video is unlocked after each test.
  • Reports the number of tests passed and failed.

The example is intended for hardware validation and demonstration purposes.

Returns
Returns 0 on success, or 1 if initialization or test fails.

References XV_frmbufrd_Config::AXIMMDataWidth, XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, init_platform(), XV_frmbufrd_Config::MaxDataWidth, XV_frmbufrd_Config::PixPerClk, resetIp(), XVFrameBufferCallback(), XVFRMBUFRD_HANDLER_DONE, XVFrmbufRd_SetCallback(), and XVMonitor_IsVideoLocked.

void resetIp ( void  )

Resets the HLS (High-Level Synthesis) IP core via GPIO.

This function asserts the reset line for the HLS IP by writing 0 to the gpio_hlsIpReset register, holds the reset for 1 millisecond, then de-asserts the reset by writing 1, and waits another millisecond to ensure the reset process is complete.

The function also prints a message to indicate the reset operation.

Referenced by main().

void* XVFrameBufferCallback ( void *  data)

Callback function for Frame Buffer Read interrupt.

This function is called when a Frame Buffer Read interrupt is received. It starts the frame buffer read operation by invoking XVFrmbufRd_Start on the global frmbufrd instance.

Parameters
dataPointer to user data (unused).
Returns
Always returns NULL.

References XVFrmbufRd_Start().

Referenced by main().