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.
MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- -------- ------------------------------------------------------- 2.00a sv 09/11/07 Initial version. 2.01a ecm 04/08/08 Updated data structures to include the V5FXT parts. 3.00a sv 11/28/08 Added the API for initiating Abort while reading/writing from the ICAP. 4.00a hvm 12/1/09 Added support for V6 and updated with HAL phase 1 modifications 5.00a hvm 04/02/10 Added support for S6 device. 5.01a hvm 07/06/10 In XHwIcap_DeviceRead function, a read bit mask verification is added after all the data bytes are read from READ FIFO.The Verification of the read bit mask at the begining of reading of bytes is removed. 5.03a hvm 15/4/11 Updated with V6 CXT device definitions. 6.00a hvm 08/01/11 Added support for K7 devices. 7.00a bss 03/14/12 Added support for 8/16/32 ICAP Data Widths - CR 620085 Added support for Lite Mode(no Write FIFO) - CR 601748 Added Virtex 7, Artix 7 and Zynq Idcodes in Device look up table - CR 647140, CR 643295 8.01a bss 04/18/13 Updated to fix compiler warnings. CR#704814 9.0 bss 02/20/14 Updated to support Kintex8, kintexu and virtex72000T family devices.
#include <xil_types.h>
#include <xil_assert.h>
#include "xhwicap.h"
#include "xparameters.h"
Functions | |
int | XHwIcap_CfgInitialize (XHwIcap *InstancePtr, XHwIcap_Config *ConfigPtr, u32 EffectiveAddr) |
int | XHwIcap_DeviceWrite (XHwIcap *InstancePtr, u32 *FrameBuffer, u32 NumWords) |
int | XHwIcap_DeviceRead (XHwIcap *InstancePtr, u32 *FrameBuffer, u32 NumWords) |
void | XHwIcap_Reset (XHwIcap *InstancePtr) |
void | XHwIcap_FlushFifo (XHwIcap *InstancePtr) |
void | XHwIcap_Abort (XHwIcap *InstancePtr) |
|
This function initiates the Abort Sequence by setting the Abort bit in the control register.
|
|
This function initializes a specific XHwIcap instance. The IDCODE is read from the FPGA and based on the IDCODE the information about the resources in the FPGA is filled in the instance structure. The HwIcap device will be in put in a reset state before exiting this function.
Set IsLiteMode |
|
This function reads the specified number of words from the ICAP device in the polled mode. Interrupt mode is not supported in reading data from the ICAP device.
|
|
This function writes the given user data to the Write FIFO in both the polled mode and the interrupt mode and starts the transfer of the data to the ICAP device. In the polled mode, this function will write the specified number of words into the FIFO before returning. In the interrupt mode, this function will write the words upto the size of the Write FIFO and starts the transfer, then subsequent transfer of the data is performed by the interrupt service routine until the entire buffer has been transferred. The status callback function is called when the entire buffer has been sent. In order to use interrupts, it is necessary for the user to connect the driver interrupt handler, XHwIcap_IntrHandler(), to the interrupt system of the application and enable the interrupts associated with the Write FIFO. The user has to enable the interrupts each time this function is called using the XHwIcap_IntrEnable macro.
|
|
This function flushes the FIFOs in the device.
|
|
This function forces the software reset of the complete HWICAP device. All the registers will return to the default value and the FIFO is also flushed as a part of this software reset.
|