xilplmi
Vitis Drivers API Documentation
xplmi_glitch_detector_example.c File Reference

Overview

This file illustrates glitch detector usage To build this application, xilmailbox and xilpm libraries must be included in BSP and xilplmi library must be in client mode.

This example is supported for Versal and Versal Net devices.

Procedure to run the example.

Generate pdi with glitch_detection_overlay cdo. Load the Pdi. Select the target. Download the example elf into the target.

Procedure to test glitch on hardware

Refer versal plm wiki to configure the glitch detector

This code intends to provide an example to test the glitch detector functionality by generating the test glitch. User must disable that and have a programmable power supply for Vcc_PMC and generate the actual glitch by varying the power supply

MODIFICATION HISTORY:
Ver   Who  Date       Changes


1.00 pre 06/09/2024 Initial release pre 07/15/2024 Added support for SDT flow and fixed misrac warnings pre 07/26/2024 Corrected base address for SDT flow pre 10/19/2024 Added support for PL microblaze

 

Macros

#define GD_STATUS_OFFSET   0x00004
 GD_STATUS register offset. More...
 
#define RESET_GD_STATUS_VAL   0x02000200U
 Value to reset glitch detectors. More...
 
#define GD_IRQ_STATUS_CLEAR   0x80000000U
 Value to clear IRQ status of glitch detector. More...
 
#define GD0_TEST_GLITCH_GENVALUE   0x00F800FEU
 Value to generate test glitch on glitch detector0. More...
 
#define GD1_TEST_GLITCH_GENVALUE   0x00FE00F8U
 Value to generate test glitch on glitch detector1. More...
 
#define GD_TEST_GLITCH_STOPVALUE   0x00F800F8U
 Value to stop test glitch generation on both the glitch detectors. More...
 
#define GLITCH_DETECTOR0   (0U)
 Glitch detector0 number. More...
 
#define GLITCH_DETECTOR1   (1U)
 Glitch detector1 number. More...
 
#define DEFAULT_DEPTH_VAL   (0U)
 Default depth value. More...
 
#define DEFAULT_WIDTH_VAL   (0U)
 Default width value. More...
 
#define DEFAULT_REFVOL_VAL   (0U)
 Default reference voltage value. More...
 
#define DEFAULT_USERREG_VAL   (0U)
 Default user reg value. More...
 
#define XPLMI_SET   (1U)
 Set value. More...
 
#define XPLMI_RESET   (0U)
 Reset value. More...
 
#define GICP4_IRQ_STATUS_ADDR   0xF1140050
 GICP4_IRQ_STATUS register address. More...
 

Functions

void GenerateTestGlitch (u8 GdNum)
 This function generates glitch on given glitch detector. More...
 
int main (void)
 Main function to call the ExtractMetaheader example function. More...