hwicap
Xilinx SDK Drivers API Documentation
xhwicap_read_config_reg.c File Reference

Overview

This file contains a design example using the HwIcap driver and hardware device.

This example prints out the values of all the configuration registers in the FPGA.

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.

In a Zynq device the ICAP needs to be selected using the XDcfg_SelectIcapInterface API of the DevCfg driver (clear the PCAP_PR bit of Control register in the Device Config Interface) before it can be accessed using the HwIcap. In case of ZynqMP clear the PCAP_PR bit of pcap_ctrl register in Module Configuration Security Unit(CSU) using register write.

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 4.00a hvm 11/30/09 Added support for V6 and updated with HAL phase 1 modifications 5.00a hvm 04/28/10 Added support for S6 support. 6.00a hvm 08/05/11 Added support for K7 family 8.01a bss 05/14/12 Replaced the define XHI_C0R_1 with XHI_COR_1 for CR718042 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.

Functions

int HwIcapReadConfigRegExample (u16 DeviceId)
 This function reads the configuration registers inside the FPGA. More...
 
int main (void)
 Main function to call the HWICAP example. More...
 

Function Documentation

◆ HwIcapReadConfigRegExample()

int HwIcapReadConfigRegExample ( u16  DeviceId)

This function reads the configuration registers inside the FPGA.

Parameters
DeviceIdis the XPAR_<HWICAP_INSTANCE>_DEVICE_ID value from xparameters.h.
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
None.

References XHwIcap_Config::BaseAddress, XHwIcap_CfgInitialize(), XHwIcap_LookupConfig(), and XHwIcap_SelfTest().

Referenced by main().

◆ main()

int main ( void  )

Main function to call the HWICAP example.

Parameters
None
Returns
XST_SUCCESS if successful, XST_FAILURE if unsuccessful
Note
None

References HwIcapReadConfigRegExample().