| hwicap Vitis Drivers API Documentation

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

Functions
xhwicap_low_level_example.c File Reference

## Overview

Contains a design example of how to use the low-level macros and functions of the XHwIcap driver.

This example reads back the value stored in the IDCODE register.

This example assumes that there is a UART Device or STDIO Device in the hardware system.

Note

This example can be run on a 7 series device, Zynq device, Ultrascale and ZynqMP Ultrascale FPGAs.

    MODIFICATION HISTORY:

    Ver   Who  Date     Changes

    1.00a bjb  11/21/03 First release
    1.00a sv   07/18/05 Minor changes to comply to Doxygen and coding guidelines
    1.01a sv   04/10/07 Changes to support V4
    2.00a sv   10/10/07 Changes to support V5
    4.00a hvm  11/20/09 Added support for V6 and updated with HAL phase 1
                  modifications
    5.00a hvm  02/08/10 Added support for S6
    5.00a hvm  04/28/10 Added Check for the control bit clearance in the CR
                    register for regsiter read and write operations.
    5.00a hvm  05/04/10 Updated the example to read Id twice so as to igonore
                    the first read.
    5.00a hvm  05/21/10 Updated the ID sequence to be consistent across V4/V5/V6
                    devices. Added an extra NOP before Type1 Read device ID
                    and removed  extra NOP after the device ID. This
                    change removed the need of reading ID twice.
                    Removed the extra read ID.
    5.01a hvm  07/29/10 Code to check whether read/write bit in control register
                    is cleared after the initiation of respective transfer
                    is added for all devices. This check was earlier done
                    only for S6 devices
    6.00a hvm  08/05/11 Added support for K7 family
    10.0  bss  6/24/14  Removed support for families older than 7 series
    11.0  ms   01/23/17 Added xil_printf statement in main function to
                        ensure that "Successfully ran" and "Failed" strings
                        are available in all examples. This is a fix for
                        CR-965028.
    11.6 Nava 06/28/23  Added support for system device-tree flow.
    11.7 Nava 02/06/25  Updated HWICAP_BASEADDR to use XPAR_HWICAP_0_BASEADDR
                        instead of XPAR_XHWICAP_0_BASEADDR to align with YAML
                        changes.

## Functions
u32 | HwIcapLowLevelExample (u32 BaseAddress, u32 *IdCode)
| This function returns the IDCODE of the target device. More...
int | main (void)
| Main function to call the HWICAP Low Level example. More...

## Function Documentation

u32 HwIcapLowLevelExample | ( | u32 | BaseAddress,
|  | u32 * | IdCode
| ) |  |

This function returns the IDCODE of the target device.

Parameters

  BaseAddress | is the base address of the HwIcap instance.
  IdCode | is the IDCODE of the part this code is running on.

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE

Note
  None

References XHI_CR_OFFSET, XHI_CR_READ_MASK, XHI_CR_WRITE_MASK, XHI_RF_OFFSET, XHI_SR_DONE_MASK, XHI_SR_OFFSET, XHI_SZ_OFFSET, XHI_WF_OFFSET, XHwIcap_ReadReg, and XHwIcap_WriteReg.

Referenced by main().

int main | ( | void |  | ) |

Main function to call the HWICAP Low Level example.

Parameters

  None |

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE

Note
  None

References HwIcapLowLevelExample().