![]() |
cfupmc
Xilinx SDK Drivers API Documentation
|
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
Data Structures | |
struct | XCfupmc_Config |
This typedef contains configuration information for a CFU core. More... | |
struct | XCfupmc |
The XCfupmc driver instance data structure. More... | |
Macros | |
#define | XCfupmc_ClearIsr(InstancePtr, IsrMask) |
This function clears CFU ISR. More... | |
#define | XCfupmc_ReadIsr(InstancePtr) |
This function reads CFU ISR. More... | |
#define | XCfupmc_ReadStatus(InstancePtr) |
This function reads CFU Status. 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, XCfupmc_Config *CfgPtr, u32 EffectiveAddr) |
This function initializes an CFU core. More... | |
s32 | XCfupmc_SelfTest (XCfupmc *InstancePtr) |
This function runs a self-test on the driver and hardware device. More... | |
void | XCfupmc_MaskRegWrite (XCfupmc *InstancePtr, u32 Addr, u32 Mask, u32 Val) |
This function does CFI register write using MASK register. More... | |
void | XCfupmc_SetParam (XCfupmc *InstancePtr) |
This function sets the CFU parameters as specified in the Instance Ptr. More... | |
s32 | XCfupmc_CheckParam (XCfupmc *InstancePtr) |
This function checks CFI data CRC after loading to PL. More... | |
s32 | XCfupmc_WaitForStreamBusy (XCfupmc *InstancePtr) |
This function waits for CFU stream busy status. More... | |
void | XCfupmc_SetGlblSigEn (XCfupmc *InstancePtr, u8 Enable) |
This function enables or disables the global signals. More... | |
void | XCfupmc_GlblSeqInit (XCfupmc *InstancePtr) |
This function inits the global events to needs to be done before loading the CFI data. More... | |
void | XCfupmc_StartGlblSeq (XCfupmc *InstancePtr) |
This function starts the sequence to enable Global signals. More... | |
void | XCfupmc_EndGlblSeq (XCfupmc *InstancePtr) |
This function does end of Global sequence. More... | |
void | XCfupmc_Reset (XCfupmc *InstancePtr) |
This function resets the CFU block. More... | |
void | XCfupmc_WaitForStreamDone (XCfupmc *InstancePtr) |
This function waits till Fabric is busy. More... | |
void | XCfupmc_CfuErrHandler (XCfupmc *InstancePtr) |
This function checks and handles CFU errors. More... | |
void | XCfupmc_CfiErrHandler (XCfupmc *InstancePtr) |
This function handles CFI errors. More... | |
void | XCfupmc_ExtErrorHandler (XCfupmc *InstancePtr) |
This function is called when bitstream transfer is aborted by user. More... | |
void | XCfupmc_ClearIgnoreCfiErr (XCfupmc *InstancePtr) |
This function clears Ignore CFI ERROR mask in CFU_APB_CFU_CTL. More... | |
void | XCfupmc_ClearCfuIsr (XCfupmc *InstancePtr) |
This function clears CFU ISR. More... | |
#define XCfupmc_ClearIsr | ( | InstancePtr, | |
IsrMask | |||
) |
This function clears CFU ISR.
InstancePtr | is a pointer to the XCfupmc instance. |
Referenced by XCfupmc_ClearCfuIsr().
#define XCfupmc_ReadIsr | ( | InstancePtr | ) |
This function reads CFU ISR.
InstancePtr | is a pointer to the XCfupmc instance. |
#define XCfupmc_ReadStatus | ( | InstancePtr | ) |
This function reads CFU Status.
InstancePtr | is a pointer to the XCfupmc instance. |
Referenced by XCfupmc_WaitForStreamDone().
s32 XCfupmc_CfgInitialize | ( | XCfupmc * | InstancePtr, |
XCfupmc_Config * | CfgPtr, | ||
u32 | EffectiveAddr | ||
) |
This function initializes an CFU core.
This function must be called prior to using an CFU driver.
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. |
References XCfupmc_Config::BaseAddress, XCfupmc::Config, and XCfupmc::IsReady.
void XCfupmc_CfiErrHandler | ( | XCfupmc * | InstancePtr | ) |
This function handles CFI errors.
InstancePtr | is a pointer to the XCfupmc instance. |
References CFU_APB_CFU_CTL, XCfupmc_MaskRegWrite(), and XCfupmc_Reset().
void XCfupmc_CfuErrHandler | ( | XCfupmc * | InstancePtr | ) |
This function checks and handles CFU errors.
InstancePtr | is a pointer to the XCfupmc instance. |
MISRA-C compliance
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_ISR, XCfupmc::Config, XCfupmc_ClearCfuIsr(), XCfupmc_ReadReg, and XCfupmc_Reset().
s32 XCfupmc_CheckParam | ( | XCfupmc * | InstancePtr | ) |
This function checks CFI data CRC after loading to PL.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_CRC_EXPECT, CFU_APB_CFU_CTL, CFU_APB_CFU_ISR, CFU_APB_CFU_PROTECT, XCfupmc::Config, XCfupmc_MaskRegWrite(), XCfupmc_ReadReg, and XCfupmc_WriteReg.
void XCfupmc_ClearCfuIsr | ( | XCfupmc * | InstancePtr | ) |
This function clears CFU ISR.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_ClearIsr.
Referenced by XCfupmc_CfuErrHandler().
void XCfupmc_ClearIgnoreCfiErr | ( | XCfupmc * | InstancePtr | ) |
This function clears Ignore CFI ERROR mask in CFU_APB_CFU_CTL.
InstancePtr | is a pointer to the XCfupmc instance. |
References CFU_APB_CFU_CTL, and XCfupmc_MaskRegWrite().
void XCfupmc_EndGlblSeq | ( | XCfupmc * | InstancePtr | ) |
This function does end of Global sequence.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_FGCR, CFU_APB_CFU_PROTECT, XCfupmc::Config, XCfupmc_MaskRegWrite(), and XCfupmc_WriteReg.
void XCfupmc_ExtErrorHandler | ( | XCfupmc * | InstancePtr | ) |
This function is called when bitstream transfer is aborted by user.
InstancePtr | is a pointer to the XCfupmc instance. |
?
References CFU_APB_CFU_CTL, and XCfupmc_MaskRegWrite().
void XCfupmc_GlblSeqInit | ( | XCfupmc * | InstancePtr | ) |
This function inits the global events to needs to be done before loading the CFI data.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_FGCR, CFU_APB_CFU_PROTECT, XCfupmc::Config, XCfupmc_MaskRegWrite(), and XCfupmc_WriteReg.
void XCfupmc_MaskRegWrite | ( | XCfupmc * | InstancePtr, |
u32 | Addr, | ||
u32 | Mask, | ||
u32 | Val | ||
) |
This function does CFI register write using MASK register.
InstancePtr | is a pointer to the XCfupmc instance. |
Addr | Address of the regiser to be written |
Mask | Mask of the bit field to be written |
Val | Value of bit field |
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_MASK, XCfupmc::Config, XCfupmc_ReadReg, and XCfupmc_WriteReg.
Referenced by XCfupmc_CfiErrHandler(), XCfupmc_CheckParam(), XCfupmc_ClearIgnoreCfiErr(), XCfupmc_EndGlblSeq(), XCfupmc_ExtErrorHandler(), XCfupmc_GlblSeqInit(), XCfupmc_Reset(), XCfupmc_SetGlblSigEn(), XCfupmc_SetParam(), and XCfupmc_StartGlblSeq().
void XCfupmc_Reset | ( | XCfupmc * | InstancePtr | ) |
This function resets the CFU block.
InstancePtr | is a pointer to the XCfupmc instance. |
References CFU_APB_CFU_CTL, and XCfupmc_MaskRegWrite().
Referenced by XCfupmc_CfiErrHandler(), and XCfupmc_CfuErrHandler().
void XCfupmc_SetGlblSigEn | ( | XCfupmc * | InstancePtr, |
u8 | Enable | ||
) |
This function enables or disables the global signals.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_FGCR, CFU_APB_CFU_PROTECT, XCfupmc::Config, XCfupmc_MaskRegWrite(), and XCfupmc_WriteReg.
void XCfupmc_SetParam | ( | XCfupmc * | InstancePtr | ) |
This function sets the CFU parameters as specified in the Instance Ptr.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_CTL, CFU_APB_CFU_FGCR, CFU_APB_CFU_ITR, CFU_APB_CFU_PROTECT, XCfupmc::Config, XCfupmc_MaskRegWrite(), and XCfupmc_WriteReg.
void XCfupmc_StartGlblSeq | ( | XCfupmc * | InstancePtr | ) |
This function starts the sequence to enable Global signals.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_FGCR, CFU_APB_CFU_PROTECT, XCfupmc::Config, XCfupmc_MaskRegWrite(), and XCfupmc_WriteReg.
s32 XCfupmc_WaitForStreamBusy | ( | XCfupmc * | InstancePtr | ) |
This function waits for CFU stream busy status.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_Config::BaseAddress, CFU_APB_CFU_STATUS, XCfupmc::Config, and XCfupmc_ReadReg.
void XCfupmc_WaitForStreamDone | ( | XCfupmc * | InstancePtr | ) |
This function waits till Fabric is busy.
InstancePtr | is a pointer to the XCfupmc instance. |
References XCfupmc_ReadStatus.