Software Drivers

CFA

This header file contains identifiers and register-level core functions (or macros), range macros, structure typedefs that can be used to access the Xilinx Color Filter Array Interpolation (CFA) core.

The Color Filter Array Interpolation core reconstructs a color image from an RGB or CMY Bayer filtered sensor using a 5x5 interpolation aperture. The core is capable of a maximum resolution of 7680 columns by 7680 rows with 8, 10, or 12 bits per pixel and supports the bandwidth necessary for High-definition (1080p60) resolutions in all Xilinx FPGA device families. Higher resolutions can be supported in Xilinx high-performance device families.

Initialization & Configuration

The device driver enables higher layer software (e.g., an application) to communicate to the CFA core.

XCfa_CfgInitialize() API is used to initialize the CFA core. The user needs to first call the XCfa_LookupConfig() API which returns the Configuration structure pointer which is passed as a parameter to the XCfa_CfgInitialize() API.

Interrupts

The driver provides an interrupt handler XCfa_IntrHandler for handling the interrupt from the CFA core. The users of this driver have to register this handler with the interrupt system and provide the callback functions by using XCfa_SetCallBack API.

Virtual Memory

This driver supports Virtual Memory. The RTOS is responsible for calculating the correct device base address in Virtual Memory space.

Threads

This driver is not thread safe. Any needs for threads or thread mutual exclusion must be satisfied by the layer above this driver.

Asserts

Asserts are used within all Xilinx drivers to enforce constraints on argument values. Asserts can be turned off on a system-wide basis by defining, at compile time, the NDEBUG identifier. By default, asserts are turned on and it is recommended that users leave asserts on during development.

Building the driver

The XCfa driver is composed of several source files. This allows the user to build and link only those parts of the driver that are necessary.

 MODIFICATION HISTORY:

 Ver   Who    Date     Changes
 ----- ------ -------- ----------------------------------------------
 1.00a xd     08/05/08 First release
 3.00a gz     10/22/10 Updated for CFA V3.0
 4.00a rc     09/11/11 Updated for CFA v4.0
 5.00a se     12/01/11 Updated for CFA v5.0, replaced xio.h with xil_io.h.
 6.0   adk    19/12/13 Updated as per the New Tcl API's.
 7.0   adk    01/07/14 Changed the file name from cfa.h to xcfa.h
                       Defined following handler types as enum
                       XCFA_HANDLER_PROCSTART, XCFA_HANDLER_FRAMEDONE,
                       XCFA_HANDLER_ERROR.

                       Defined the BayerPhaseCombination enum
                       for bayerphase combinations.

                       Defined the following macros:
                       XCFA_VSIZE_FIRST, XCFA_VSIZE_LAST
                       XCFA_HSIZE_FIRST, XCFA_HSIZE_LAST
                       XCfa_Start, XCfa_Stop, XCfa_IntrEnable,
                       XCfa_IntrDisable, XCfa_StatusGetPending,
                       XCfa_IntrGetPending, XCfa_IntrClear.

                       Added the following function macros:
                       XCfa_Enable, XCfa_Disable, XCfa_Reset, XCfa_SyncReset,
                       XCfa_RegUpdateEnable, XCfa_RegUpdateDisable.

                       Removed the following functional macros:
                       CFA_Enable, CFA_Disable, CFA_Reset, CFA_FSyncReset,
                       XCFA_RegUpdateEnable, XCFA_RegUpdateDisable,
                       CFA_ClearReset, CFA_ClearStatus.

                       Defined the following type definitions:
                       XCfa_Config and XCfa structures.
                       XCfa_CallBack and XCfa_ErrorCallBack.

                       Changes in xcfa_hw.h:
                       Added the register offsets and bit masks for the
                       registers and added backward compatibility for macros.

                       Changes in xcfa.c:
                       Renamed this file as below:
                       cfa.c -> xcfa.c
                       Implemented the following functions:
                       XCfa_CfgInitialize, XCfa_Setup, XCfa_GetVersion,
                       XCfa_EnableDbgByPass, XCfa_IsDbgByPassEnabled,
                       XCfa_DisableDbgBypass, XCfa_EnableDbgTestPattern,
                       XCfa_IsDbgTestPatternEnabled,
                       XCfa_DisableDbgTestPattern, XCfa_GetDbgFrameCount,
                       XCfa_GetDbgLineCount, XCfa_GetDbgPixelCount,
                       XCfa_SetActiveSize, XCfa_GetActiveSize,
                       XCfa_SetBayerPhase, XCfa_GetBayerPhase,
                       StubCallBack, StubErrCallBack.

                       Changes in  xcfa_intr.c:
                       Implemented the following functions:
                       XCfa_IntrHandler, XCfa_SetCallBack.

                       Changes in xcfa_selftest.c:
                       Implemented XCfa_SelfTest function.

                       Changes in xcfa_sinit.c :
                       Implemented XCfa_LookupConfig function.
 
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.