![]() |
xilplmi
Vitis Drivers API Documentation
|
This is the file which contains glitch detector code.
This contains APIs for configuring glitch detector, enable/disable the glitch detector and to read the status of glitch detector. These APIs support both client and server mode for glitch detector0 and glitch detector1.
MODIFICATION HISTORY:
Ver Who Date Changes
----- ---- ---------- --------------------------------------------------------------------------
1.00 pre 06/09/2024 Initial release
pre 07/17/2024 Used register node to access PMC analog registers and fixed
misrac warnings
pre 10/19/2024 Added support for PL microblazeMacros | |
| #define | XPLMI_REFVOL_3LSBITS_MASK 0x07 |
| Mask to extract 3 least significant bits from reference voltage. More... | |
| #define | XPLMI_DEPTH_3LSBITS_MASK 0x07 |
| Mask to extract 3 least significant bits from depth. More... | |
| #define | XPLMI_REFVOL_MSBIT_MASK 0x08 |
| Mask to extract most significant bit from reference voltage. More... | |
| #define | XPLMI_DEPTH_2MSBITS_MASK 0x18 |
| Mask to extract 2 most significant bits from depth. More... | |
| #define | XPLMI_REFVOL_MSBIT_SHIFT (16U) |
| Shift value to place most significant bit of reference voltage. More... | |
| #define | XPLMI_REFVOL_3LSBITS_SHIFT (12U) |
| Shift value to place 3 least significant bits of reference voltage. More... | |
| #define | XPLMI_DEPTH_2MSBITS_SHIFT (1U) |
| Shift value to place 2 most significant bits of depth. More... | |
| #define | XPLMI_DEPTH_3LSBITS_SHIFT (16U) |
| Shift value to place 3 least significant bits of depth. More... | |
| #define | XPLMI_WIDTH_BITS_SHIFT (8U) |
| Shift value to place bits of width. More... | |
| #define | XPLMI_WORD_LEN (4U) |
| Word size in bytes. More... | |
| #define | XPLMI_GD1_STATUS_POS (16U) |
| Bit position of glitch detector1 status. More... | |
Functions | |
| int | XPlmi_WriteReg32 (u32 Offset, u32 Data) |
| Writes value to register. More... | |
| int | XPlmi_ReadReg32 (u32 Offset, u32 *Data) |
| Reads register value. More... | |
| int | XPlmi_ConfigureGlitchDetector (u8 Depth, u8 Width, u8 RefVoltage, u8 UserRegVal, u8 GlitchDetectorNum) |
| This function configures desired glitch detector. More... | |
| int | XPlmi_ChangeGlitchDetectorState (u8 GlitchDetectorNum, eStatus EnableStatus) |
| This function enables/disables the desired glitch detector. More... | |
| int | XPlmi_GlitchDetectorStatus (u8 GlitchDetectorNum, u8 *GlitchDetStatus) |
| This function reads the status of desired glitch detector. More... | |
| #define XPLMI_DEPTH_2MSBITS_MASK 0x18 |
Mask to extract 2 most significant bits from depth.
| #define XPLMI_DEPTH_2MSBITS_SHIFT (1U) |
Shift value to place 2 most significant bits of depth.
| #define XPLMI_DEPTH_3LSBITS_MASK 0x07 |
Mask to extract 3 least significant bits from depth.
| #define XPLMI_DEPTH_3LSBITS_SHIFT (16U) |
Shift value to place 3 least significant bits of depth.
| #define XPLMI_GD1_STATUS_POS (16U) |
Bit position of glitch detector1 status.
| #define XPLMI_REFVOL_3LSBITS_MASK 0x07 |
Mask to extract 3 least significant bits from reference voltage.
| #define XPLMI_REFVOL_3LSBITS_SHIFT (12U) |
Shift value to place 3 least significant bits of reference voltage.
| #define XPLMI_REFVOL_MSBIT_MASK 0x08 |
Mask to extract most significant bit from reference voltage.
| #define XPLMI_REFVOL_MSBIT_SHIFT (16U) |
Shift value to place most significant bit of reference voltage.
| #define XPLMI_WIDTH_BITS_SHIFT (8U) |
Shift value to place bits of width.
| #define XPLMI_WORD_LEN (4U) |
Word size in bytes.
Referenced by XPlmi_DmaTransfer(), XPlmi_DsOps(), XPlmi_EccInit(), XPlmi_InitNVerifyMem(), XPlmi_MemCpy64(), XPlmi_MemSet(), XPlmi_MemSetBytes(), XPlmi_MoveBuffer(), XPlmi_PrintArray(), XPlmi_PsmSequence(), XPlmi_RestoreDataBackup(), XPlmi_ScatterWrite2(), XPlmi_SearchBufferList(), and XPlmi_StoreBuffer().
| int XPlmi_ChangeGlitchDetectorState | ( | u8 | GlitchDetectorNum, |
| eStatus | EnableStatus | ||
| ) |
This function enables/disables the desired glitch detector.
| GlitchDetectorNum | is the number of glitch detector to be enabled/disabled |
| EnableStatus | indicates action i.e., enable/disable |
| int XPlmi_ConfigureGlitchDetector | ( | u8 | Depth, |
| u8 | Width, | ||
| u8 | RefVoltage, | ||
| u8 | UserRegVal, | ||
| u8 | GlitchDetectorNum | ||
| ) |
This function configures desired glitch detector.
| Depth | is the minimum voltage glitch detection depth |
| Width | is the minimum glitch detector width |
| RefVoltage | is the reference voltage for the glitch detector comparators |
| UserRegVal | indicates to select the register values instead of the eFUSE values to configure the glitch detector |
| GlitchDetectorNum | is the number of glitch detector to be configured |
| int XPlmi_GlitchDetectorStatus | ( | u8 | GlitchDetectorNum, |
| u8 * | GlitchDetStatus | ||
| ) |
This function reads the status of desired glitch detector.
| GlitchDetectorNum | is the number of glitch detector whose status is to be read |
| GlitchDetStatus | holds the status |
| int XPlmi_ReadReg32 | ( | u32 | Offset, |
| u32 * | Data | ||
| ) |
Reads register value.
| Offset | Offset of the register. |
| Data | Value to be read. |
| int XPlmi_WriteReg32 | ( | u32 | Offset, |
| u32 | Data | ||
| ) |
Writes value to register.
| Offset | Offset of the register |
| Data | Value to be written in register |