hwicap
Xilinx SDK Drivers API Documentation
Hwicap_v11_1

Functions

int XHwIcap_CfgInitialize (XHwIcap *InstancePtr, XHwIcap_Config *ConfigPtr, UINTPTR EffectiveAddr)
 This function initializes a specific XHwIcap instance. More...
 
int XHwIcap_DeviceWrite (XHwIcap *InstancePtr, u32 *FrameBuffer, u32 NumWords)
 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. More...
 
int XHwIcap_DeviceRead (XHwIcap *InstancePtr, u32 *FrameBuffer, u32 NumWords)
 This function reads the specified number of words from the ICAP device in the polled mode. More...
 
void XHwIcap_Reset (XHwIcap *InstancePtr)
 This function forces the software reset of the complete HWICAP device. More...
 
void XHwIcap_FlushFifo (XHwIcap *InstancePtr)
 This function flushes the FIFOs in the device. More...
 
void XHwIcap_Abort (XHwIcap *InstancePtr)
 This function initiates the Abort Sequence by setting the Abort bit in the control register. More...
 

Function Documentation

◆ XHwIcap_Abort()

void XHwIcap_Abort ( XHwIcap InstancePtr)

#include <xhwicap.c>

This function initiates the Abort Sequence by setting the Abort bit in the control register.

Parameters
InstancePtris a pointer to the XHwIcap instance.
Returns
None.
Note
None.

References XHwIcap_Config::BaseAddress, XHwIcap::HwIcapConfig, XHwIcap::IsReady, XHI_CR_OFFSET, XHI_CR_SW_ABORT_MASK, XHwIcap_ReadReg, and XHwIcap_WriteReg.

◆ XHwIcap_CfgInitialize()

int XHwIcap_CfgInitialize ( XHwIcap InstancePtr,
XHwIcap_Config ConfigPtr,
UINTPTR  EffectiveAddr 
)

#include <xhwicap.c>

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.

Parameters
InstancePtris a pointer to the XHwIcap instance.
ConfigPtrpoints to the XHwIcap device configuration structure.
EffectiveAddris the device base address in the virtual memory address space. If the address translation is not used then the physical address is passed. Unexpected errors may occur if the address mapping is changed after this function is invoked.
Returns
XST_SUCCESS else XST_FAILURE
Note
None.

Set IcapWidth

Set IsLiteMode

References XHwIcap_Config::BaseAddress, XHwIcap::HwIcapConfig, XHwIcap::IsPolled, XHwIcap::IsReady, XHwIcap::IsTransferInProgress, and XHwIcap::StatusHandler.

Referenced by HwIcapIntrExample(), HwIcapReadConfigRegExample(), and HwIcapTestAppExample().

◆ XHwIcap_DeviceRead()

int XHwIcap_DeviceRead ( XHwIcap InstancePtr,
u32 *  FrameBuffer,
u32  NumWords 
)

#include <xhwicap.c>

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.

Parameters
InstancePtris a pointer to the XHwIcap instance.
FrameBufferis a pointer to the memory where the frame read from the ICAP device is stored.
NumWordsis the number of words (16 bit for S6 and 32 bit for all other devices) to write to the ICAP device.
Returns
  • XST_SUCCESS if the specified number of words have been read from the ICAP device
  • XST_FAILURE if the device is busy with the last Read/Write or if the requested number of words have not been read from the ICAP device, or there is a timeout.
Note
This is a blocking function.

References XHwIcap::HwIcapConfig, XHwIcap_Config::IcapWidth, XHwIcap::IsReady, XHwIcap::IsTransferInProgress, XHwIcap::RemainingWords, XHwIcap::RequestedWords, XHwIcap_GetRdFifoOccupancy, XHwIcap_IsDeviceBusy, XHwIcap_IsTransferDone, XHwIcap_SetSizeReg, and XHwIcap_StartReadBack.

◆ XHwIcap_DeviceWrite()

int XHwIcap_DeviceWrite ( XHwIcap InstancePtr,
u32 *  FrameBuffer,
u32  NumWords 
)

#include <xhwicap.c>

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.

Parameters
InstancePtris a pointer to the XHwIcap instance.
FrameBufferis a pointer to the data to be written to the ICAP device.
NumWordsis the number of words (16 bit for S6 and 32 bit for all other devices)to write to the ICAP device.
Returns
XST_SUCCESS or XST_FAILURE
Note
This function is a blocking for the polled mode of operation and is non-blocking for the interrupt mode of operation. Use the function XHwIcap_DeviceWriteFrame for writing a frame of data to the ICAP device.

References XHwIcap_Config::BaseAddress, XHwIcap::HwIcapConfig, XHwIcap_Config::IcapWidth, XHwIcap::IsPolled, XHwIcap::IsReady, XHwIcap::IsTransferInProgress, XHwIcap::RemainingWords, XHwIcap::RequestedWords, XHI_CR_OFFSET, XHI_CR_WRITE_MASK, XHwIcap_FifoWrite, XHwIcap_GetWrFifoVacancy, XHwIcap_IntrClear, XHwIcap_IntrGetStatus, XHwIcap_IntrGlobalDisable, XHwIcap_IntrGlobalEnable, XHwIcap_IsDeviceBusy, XHwIcap_IsTransferDone, XHwIcap_ReadReg, and XHwIcap_StartConfig.

◆ XHwIcap_FlushFifo()

void XHwIcap_FlushFifo ( XHwIcap InstancePtr)

#include <xhwicap.c>

This function flushes the FIFOs in the device.

Parameters
InstancePtris a pointer to the XHwIcap instance.
Returns
None.
Note
None.

References XHwIcap_Config::BaseAddress, XHwIcap::HwIcapConfig, XHwIcap::IsReady, XHI_CR_FIFO_CLR_MASK, XHI_CR_OFFSET, XHwIcap_ReadReg, and XHwIcap_WriteReg.

◆ XHwIcap_Reset()

void XHwIcap_Reset ( XHwIcap InstancePtr)

#include <xhwicap.c>

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.

Parameters
InstancePtris a pointer to the XHwIcap instance.
Returns
None.
Note
None.

References XHwIcap_Config::BaseAddress, XHwIcap::HwIcapConfig, XHwIcap::IsReady, XHI_CR_OFFSET, XHI_CR_SW_RESET_MASK, XHwIcap_ReadReg, and XHwIcap_WriteReg.