| cfupmc Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Data Structures | Functions
xcfupmc.h File Reference

## Overview

This is the file which contains code for CFU block.

    MODIFICATION HISTORY:

    Ver   Who  Date        Changes
    ----- ---- -------- -------------------------------------------------------
    1.00  kc   12/21/2017 Initial release
    2.00  bsv  03/01/2019 Added error handling APIs
    2.01  bsv  11/06/2019 XCfupmc_ClearCfuIsr API added
    3.00  bsv  06/27/2020 Code clean up
    4.00  ma   06/17/2021 Added defines for CFU_STREAM_2 and CFU_FDRO_2
                          base addresses
          bsv  07/15/2021 Fix doxygen warnings
    4.01  ng   06/30/23   Added support for system device tree flow

Note

## Data Structures
struct | XCfupmc_Config
| This typedef contains configuration information for a CFU core. More...
struct | XCfupmc
| The XCfupmc driver instance data structure. More...

## Functions
XCfupmc_Config * | XCfupmc_LookupConfig (u16 DeviceId)
| XCfupmc_LookupConfig returns a reference to an XCfupmc_Config structure based on the unique device id, DeviceId. More...
s32 | XCfupmc_CfgInitialize (XCfupmc *InstancePtr, const XCfupmc_Config *CfgPtr, u32 EffectiveAddr)
| This function initializes an CFU core. More...
s32 | XCfupmc_SelfTest (const XCfupmc *InstancePtr)
| This function runs a self-test on the driver and hardware device. More...
void | XCfupmc_MaskRegWrite (const XCfupmc *InstancePtr, u32 Addr, u32 Mask, u32 Val)
| This function does CFI register write using MASK register. More...
void | XCfupmc_SetGlblSigEn (const XCfupmc *InstancePtr, u8 Enable)
| This function enables or disables the global signals. More...
void | XCfupmc_GlblSeqInit (const XCfupmc *InstancePtr)
| This function inits the global events to needs to be done before loading the CFI data. More...
void | XCfupmc_CfuErrHandler (const XCfupmc *InstancePtr)
| This function checks and handles CFU errors. More...
void | XCfupmc_CfiErrHandler (const XCfupmc *InstancePtr)
| This function handles CFI errors. More...
void | XCfupmc_ExtErrorHandler (const XCfupmc *InstancePtr)
| This function is called when bitstream transfer is aborted by user. More...
void | XCfupmc_ClearIgnoreCfiErr (const XCfupmc *InstancePtr)
| This function clears Ignore CFI ERROR mask in CFU_APB_CFU_CTL. More...
void | XCfupmc_ClearCfuIsr (const XCfupmc *InstancePtr)
| This function clears CFU ISR. More...

## Function Documentation

s32 XCfupmc_CfgInitialize | ( | XCfupmc * | InstancePtr,
|  | const XCfupmc_Config * | CfgPtr,
|  | u32 | EffectiveAddr
| ) |  |

This function initializes an CFU core.

This function must be called prior to using an CFU driver.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.
  CfgPtr | is a reference to a structure containing information about a specific XCfupmc instance.
  EffectiveAddr | is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, pass in the physical address instead.

Returns
  - XST_SUCCESS if initialization was successful.

References XCfupmc_Config::BaseAddress, XCfupmc::Config, and XCfupmc::IsReady.

void XCfupmc_CfiErrHandler | ( | const XCfupmc * | InstancePtr | ) |

This function handles CFI errors.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.

Returns
  None

References XCfupmc_MaskRegWrite().

void XCfupmc_CfuErrHandler | ( | const XCfupmc * | InstancePtr | ) |

This function checks and handles CFU errors.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.

Returns
  None

References XCfupmc_ClearCfuIsr().

void XCfupmc_ClearCfuIsr | ( | const XCfupmc * | InstancePtr | ) |

This function clears CFU ISR.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.

Returns
  None

Referenced by XCfupmc_CfuErrHandler().

void XCfupmc_ClearIgnoreCfiErr | ( | const XCfupmc * | InstancePtr | ) |

This function clears Ignore CFI ERROR mask in CFU_APB_CFU_CTL.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.

Returns
  None

References XCfupmc_MaskRegWrite().

void XCfupmc_ExtErrorHandler | ( | const XCfupmc * | InstancePtr | ) |

This function is called when bitstream transfer is aborted by user.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.

Returns
  None

                                         ?

References XCfupmc_MaskRegWrite().

void XCfupmc_GlblSeqInit | ( | const XCfupmc * | InstancePtr | ) |

This function inits the global events to needs to be done before loading the CFI data.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.

Returns
  None

References XCfupmc_MaskRegWrite().

void XCfupmc_MaskRegWrite | ( | const XCfupmc * | InstancePtr,
|  | u32 | Addr,
|  | u32 | Mask,
|  | u32 | Val
| ) |  |

This function does CFI register write using MASK register.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.
  Addr | Address of the register to be written
  Mask | Mask of the bit field to be written
  Val | Value of bit field

Returns
  None

Referenced by XCfupmc_CfiErrHandler(), XCfupmc_ClearIgnoreCfiErr(), XCfupmc_ExtErrorHandler(), XCfupmc_GlblSeqInit(), and XCfupmc_SetGlblSigEn().

void XCfupmc_SetGlblSigEn | ( | const XCfupmc * | InstancePtr,
|  | u8 | Enable
| ) |  |

This function enables or disables the global signals.

Parameters

  InstancePtr | is a pointer to the XCfupmc instance.

Returns
  None

References XCfupmc_MaskRegWrite().