![]() |
![]() |
Functions | |
int32_t | Fftc_mapDFTSizeToIndex (uint32_t dftBlockSize) |
int32_t | Fftc_compileQueueLocalConfigParams (Fftc_QLocalCfg *pFFTLocalCfg, uint8_t *pData, uint32_t *pLen) |
int32_t | Fftc_recompileQueueLocalDFTParams (int32_t dftSize, Fftc_DFTMode dftMode, uint8_t *pData) |
int32_t | Fftc_recompileQueueLocalCyclicPrefixParams (int32_t cyclicPrefixLen, uint8_t *pData) |
int32_t | Fftc_createControlHeader (Fftc_ControlHdr *pFFTCfgCtrlHdr, uint8_t *pData, uint32_t *pLen) |
int32_t | Fftc_createDftSizeList (uint16_t *pDftSizeList, uint32_t dftSizeListLen, uint8_t *pData, uint32_t *pLen) |
int32_t | Fftc_modifyLocalCfgPresentControlHeader (int32_t bLocalConfigPresent, uint8_t *pData) |
int32_t | Fftc_lldOpen (uint8_t instNum, void *cfgRegs, Fftc_LldObj *pFFTCLldObj) |
int32_t | Fftc_lldClose (Fftc_LldObj *pFFTCLldObj) |
int32_t | Fftc_readPidReg (Fftc_LldObj *pFFTCLldObj, Fftc_PeripheralIdParams *pPIDCfg) |
int32_t | Fftc_readGlobalConfigReg (Fftc_LldObj *pFFTCLldObj, Fftc_GlobalCfg *pFFTGlobalCfg) |
int32_t | Fftc_writeGlobalConfigReg (Fftc_LldObj *pFFTCLldObj, Fftc_GlobalCfg *pFFTGlobalCfg) |
void | Fftc_doSoftwareReset (Fftc_LldObj *pFFTCLldObj) |
void | Fftc_doSoftwareContinue (Fftc_LldObj *pFFTCLldObj) |
int32_t | Fftc_isHalted (Fftc_LldObj *pFFTCLldObj) |
int32_t | Fftc_writeEmulationControlReg (Fftc_LldObj *pFFTCLldObj, Fftc_EmulationControlParams *pEmulationCfg) |
int32_t | Fftc_readEmulationControlReg (Fftc_LldObj *pFFTCLldObj, Fftc_EmulationControlParams *pEmulationCfg) |
int32_t | Fftc_writeEoiReg (Fftc_LldObj *pFFTCLldObj, int32_t eoiVal) |
int32_t | Fftc_readEoiReg (Fftc_LldObj *pFFTCLldObj) |
void | Fftc_clearQueueClippingDetectReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum) |
int32_t | Fftc_readQueueClippingDetectReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum) |
int32_t | Fftc_readBlockDestQStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_DestQStatusReg *pFFTDestQStatus) |
int32_t | Fftc_readBlockShiftStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_ScalingShiftingStatusReg *pFFTShiftStatus) |
int32_t | Fftc_readBlockCyclicPrefixStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_CyclicPrefixStatusReg *pFFTCyclicStatus) |
int32_t | Fftc_readBlockControlStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_ControlStatusReg *pFFTControlStatus) |
int32_t | Fftc_readBlockFreqShiftStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_FreqShiftStatusReg *pFFTFreqShiftStatus) |
int32_t | Fftc_readBlockPktSizeStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_PktSizeStatusReg *pFFTPktSizeStatus) |
int32_t | Fftc_readBlockTagStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_TagStatusReg *pFFTTagStatus) |
int32_t | Fftc_readErrorIntRawStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_ErrorParams *pErrorCfg) |
int32_t | Fftc_clearErrorIntRawStatusReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_ErrorParams *pErrorCfg) |
int32_t | Fftc_writeErrorIntEnableSetReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_ErrorParams *pErrorCfg) |
int32_t | Fftc_readErrorIntEnableSetReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_ErrorParams *pErrorCfg) |
int32_t | Fftc_clearErrorIntEnableReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_ErrorParams *pErrorCfg) |
int32_t | Fftc_writeHaltOnErrorReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_ErrorParams *pErrorCfg) |
int32_t | Fftc_readHaltOnErrorReg (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_ErrorParams *pErrorCfg) |
int32_t | Fftc_writeQueueConfigRegs (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_QLocalCfg *pFFTLocalCfg) |
int32_t | Fftc_readQueueConfigRegs (Fftc_LldObj *pFFTCLldObj, Fftc_QueueId qNum, Fftc_QLocalCfg *pFFTLocalCfg) |
int32_t | Fftc_writeDftSizeListGroupReg (Fftc_LldObj *pFFTCLldObj, uint16_t *pDftSizeList, uint32_t dftSizeListLen) |
int32_t | Fftc_readDftSizeListGroupReg (Fftc_LldObj *pFFTCLldObj, uint16_t *pDftSizeList) |
int32_t Fftc_clearErrorIntEnableReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_ErrorParams * | pErrorCfg | ||
) |
============================================================================
Fftc_clearErrorIntEnableReg
brief
This API clears the various interrupt enable bits of FFTC Error Interrupt Enable and Set Register corresponding to the bit fields enabled in the input error params structure.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue Number (0-3) for which the interrupt error bits needs to be cleared. |
[in] | pErrorCfg | Input error params structure that specifies which of the interrupt error bits need to be cleared. |
Fftc_LldObj fftcLldObj; Fftc_ErrorParams errorParams; errorParams.bIsIntOnEOP = 0; errorParams.bIsDebugHalt = 1; errorParams.bIsConfigWordError = 1; errorParams.bIsDescBufferError = 1; errorParams.bIsEopError = 0; errorParams.bIsConfigInvalError= 0; if (Fftc_clearErrorIntEnableReg (&fftcLldObj, 0, &errorParams) != 0) { // Error clearing FFTC error interrupt enable register. // Check the input handle we passed. ... } else { // Error interrupt enable cleared successfully. ... } ...
============================================================================
int32_t Fftc_clearErrorIntRawStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_ErrorParams * | pErrorCfg | ||
) |
============================================================================
Fftc_clearErrorIntRawStatusReg
brief
This API clears the various error status bits of FFTC Error Interrupt Raw Status and Set Register corresponding to the bit fields enabled in the input error params structure.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue Number (0-3) for which the error status bits needs to be cleared. |
[in] | pErrorCfg | Input error params structure that specifies which of the error status bits need to be cleared. |
Fftc_LldObj fftcLldObj; Fftc_ErrorParams errorParams; errorParams.bIsIntOnEOP = 0; errorParams.bIsDebugHalt = 1; errorParams.bIsConfigWordError = 1; errorParams.bIsDescBufferError = 1; errorParams.bIsEopError = 0; errorParams.bIsConfigInvalError= 0; if (Fftc_clearErrorIntRawStatusReg (&fftcLldObj, 0, &errorParams) != 0) { // Error clearing FFTC error status. // Check the input handle we passed. ... } else { // Error Status cleared successfully. ... } ...
============================================================================
void Fftc_clearQueueClippingDetectReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum | ||
) |
============================================================================
Fftc_clearQueueClippingDetectReg
brief
This API clears the contents (clipping count) of the FFTC Queue Clipping Detect Register for a given queue id.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue ID for which the clipping count must be reset. |
Fftc_LldObj fftcLldObj; ... if (Fftc_clearQueueClippingDetectReg (&fftcLldObj, 1) != 0) { // FFTC queue 1 clipping detect register clear failed. } else { // FFTC Queue 1 clipping detect register clear successful. } ...
============================================================================
int32_t Fftc_compileQueueLocalConfigParams | ( | Fftc_QLocalCfg * | pFFTLocalCfg, |
uint8_t * | pData, | ||
uint32_t * | pLen | ||
) |
============================================================================
Fftc_compileQueueLocalConfigParams
brief
This API translates the FFTC queue specific local configuration provided by the driver/application in 'pFFTLocalCfg' parameter into a format understood by the FFTC engine and populates the output parameter 'pData' with it. The data obtained from this API with an appropriate control header can thus be used for sending queue configuration to FFTC engine through CPPI. This API assumes that the output parameter passed 'pData' has been allocated memory.
[in] | pFFTLocalCfg | Input local configuration structure with all necessary options set by the application/driver. |
[out] | pData | Data buffer filled in as a result of successful translation of the queue configuration provided as input to this function. |
[out] | pLen | Data buffer length pointer that will be incremented by the number of bytes configured by this API. This parameter will be updated only if the API was successful. |
Fftc_QLocalCfg fftLocalCfg; uint8_t localCfgData[256]; uint32_t dataLen; ... // Setup the queue configuration parameters fftLocalCfg.destQRegConfig.cppiDestQNum = 3; fftLocalCfg.destQRegConfig.bOutputFFTShift = 0; ... fftLocalCfg.controlRegConfig.dftSize = 512; fftLocalCfg.controlRegConfig.dftMode = Fftc_DFTMode_DFT; ... // Compile the configuration into FFT engine compatible // format. if(Fftc_compileQueueLocalConfigParams (&fftLocalCfg, localCfgData, &dataLen) > 0) { // FFT local configuration compilation failed. // do error recovery. ... } else { // proceed formulating the FFTC control header in // CPPI packet. ... }
============================================================================
int32_t Fftc_createControlHeader | ( | Fftc_ControlHdr * | pFFTCfgCtrlHdr, |
uint8_t * | pData, | ||
uint32_t * | pLen | ||
) |
============================================================================
Fftc_createControlHeader
brief
This API compiles the FFTC Control Header as per the input configuration specified in 'pFFTCfgCtrlHdr' and stores it in the output parameter specified 'pData'. This API assumes that the output parameter passed 'pData' has been allocated memory before passing it to this API.
[in] | pFFTCfgCtrlHdr | FFTC control header configuration as specified by the application/driver that needs to be formatted for FFTC engine format. |
[out] | pData | Data buffer to be filled in with the formatted FFTC control header. |
[out] | pLen | Data buffer length pointer that will be incremented by the number of bytes configured by this API. This parameter will be updated only if the API was successful. |
Fftc_ControlHdr fftCfgCtrlHdr; uint8_t CtrlHdrData[256]; uint32_t dataLen; ... // Setup the FFT control header configuration. fftCfgCtrlHdr.psFieldLen = 4; fftCfgCtrlHdr.dftSizeListLen = 5; fftCfgCtrlHdr.bPSPassThruPresent = 1; fftCfgCtrlHdr.bDFTSizeListPresent = 1; fftCfgCtrlHdr.bLocalConfigPresent = 1; if (Fftc_createControlHeader(&fftCfgCtrlHdr, CtrlHdrData, &dataLen) != 0) { // Error returned by the API. Invalid Data Handle? // exit } else { //Proceed to putting together the rest of //the queue local configuration and pass //through data. ... }
============================================================================
int32_t Fftc_createDftSizeList | ( | uint16_t * | pDftSizeList, |
uint32_t | dftSizeListLen, | ||
uint8_t * | pData, | ||
uint32_t * | pLen | ||
) |
============================================================================
Fftc_createDftSizeList
brief
This API compiles the FFTC DFT size list specified by 'pDftSizeList' and 'dftSizeListLen' input parameters and stores it in the output parameter specified 'pData'. This API assumes that the output parameter passed 'pData' has been allocated memory before passing it to this API.
The DFT sizes passed to this API in 'pDftSizeList' are assumed to be valid values and are not validated by this API.
[in] | pDftSizeList | List of DFT block sizes that needs to be formatted to FFTC H/w format. |
[in] | dftSizeListLen | Number of DFT block sizes specified in 'pDftSizeList' input. The maximum number of FFT blocks supported by hardware is 128. The caller needs to ensure that this limit is not exceeded. |
[out] | pData | Data buffer to be filled in with the formatted FFTC size list configuration. |
[out] | pLen | Data buffer length pointer that will be incremented by the number of bytes configured by this API. This parameter will be updated only if the API was successful. |
uint16_t dftSizeList[32]; uint32_t numDftBlocks, i; uint8_t fftRequestData[256]; uint32_t dataLen; ... // Setup the DFT size list configuration. numDftBlocks = 32; for (i = 0; i < numDftBlocks; i ++) dftSizeList [i] = 0x80; // program the DFT block size in the same order as they // will appear in data. if (Fftc_createDftSizeList(dftSizeList, numDftBlocks, fftRequestData, &dataLen) != 0) { // Error returned by the API. Invalid Data Handle? // exit } else { //DFT size list compilation successful. ... }
============================================================================
void Fftc_doSoftwareContinue | ( | Fftc_LldObj * | pFFTCLldObj | ) |
============================================================================
Fftc_doSoftwareContinue
brief
This API configures the FFTC Control Register to continue FFTC engine processing without resetting any state machines or configuration registers.
[in] | pFFTCLldObj | FFTC LLD instance object. |
Fftc_LldObj fftcLldObj; ... // Check if FFTC engine halted, if so resume it if (Fftc_isHalted(&fftcLldObj) == 1) { // Let FFTC continue its processing Fftc_doSoftwareContinue (&fftcLldObj); } ...
============================================================================
void Fftc_doSoftwareReset | ( | Fftc_LldObj * | pFFTCLldObj | ) |
============================================================================
Fftc_doSoftwareReset
brief
This API configures the FFTC Control Register to perform a software reset on the FFTC engine. The software reset resets the FFTC state machine and all FFTC configuration registers to initial values.
[in] | pFFTCLldObj | FFTC LLD instance object. |
Fftc_LldObj fftcLldObj; ... // Issue a software reset to the FFTC engine Fftc_doSoftwareReset (&fftcLldObj); ...
============================================================================
int32_t Fftc_isHalted | ( | Fftc_LldObj * | pFFTCLldObj | ) |
============================================================================
Fftc_isHalted
brief
This API reads the FFTC Status Register and returns 1 to indicate that the FFTC engine is halted on error or emulation and 0 otherwise.
[in] | pFFTCLldObj | FFTC LLD instance object. |
Fftc_LldObj fftcLldObj; ... // Check if FFTC engine halted, if so resume it if (Fftc_isHalted(&fftcLldObj) == 1) { // Let FFTC continue its processing Fftc_write_ctrlReg (&fftcLldObj, 1, 0); } ...
============================================================================
int32_t Fftc_lldClose | ( | Fftc_LldObj * | pFFTCLldObj | ) |
============================================================================
Fftc_lldClose
brief
This API resets the contents of the FFTC LLD Object handle passed to this function. The FFTC Object handle is no longer valid for use with any of the FFTC LLD MMR access APIs.
[out] | pFFTCLldObj | Pointer to FFTC LLD Object structure that needs to be de-initialized. |
Fftc_LldObj fftcLldObj; if (Fftc_lldClose (&fftcLldObj) != 0) { // Error closing FFTC LLD for CSL_FFTC_A instance ... } else { // Successfully closed FFTC LLD for instance A ... }
============================================================================
int32_t Fftc_lldOpen | ( | uint8_t | instNum, |
void * | cfgRegs, | ||
Fftc_LldObj * | pFFTCLldObj | ||
) |
============================================================================
Fftc_lldOpen
brief
This API initializes the output param 'pFFTCLldObj' with the configuration register overlay address for the FFTC peripheral instance corresponding to the instance number passed in 'instNum' parameter. This API MUST be called to initialize the FFTC LLD object corresponding to a specific FFTC peripheral instance before any of the FFTC LLD APIs are invoked to configure that instance MMR.
[in] | instNum | FFTC peripheral instance number for which the LLD object needs to be initialized. |
[in] | cfgRegs | Configuration registers (MMR) base address for this FFTC instance. |
[out] | pFFTCLldObj | Pointer to FFTC LLD Object structure that needs to be initialized with the instance's configuration register overlay base address. |
Fftc_LldObj fftcLldObj; if (Fftc_lldOpen (CSL_FFTC_A, 0x021F0000, &fftcLldObj) != 0) { // Error opening FFTC LLD for CSL_FFTC_A instance ... } else { // Successfully opened FFTC LLD for instance A ... }
============================================================================
int32_t Fftc_mapDFTSizeToIndex | ( | uint32_t | dftBlockSize | ) |
============================================================================
Fftc_mapDFTSizeToIndex
brief
This API takes DFT block size as input and returns the corresponding index into the DFT table.
[in] | dftBlockSize | The DFT/IDFT block size in bytes that needs to be translated into a DFT block size table index. Please consult the FFTC User Guide for all valid block size values recognized by the FFTC Engine. |
int32_t dftIndex; if ((dftIndex = Fftc_mapDFTSizeToIndex (512)) != -1) { // Proceed with FFTC configuration. ... } else { // DFT block size specified not a legal // value. error. }
============================================================================
int32_t Fftc_modifyLocalCfgPresentControlHeader | ( | int32_t | bLocalConfigPresent, |
uint8_t * | pData | ||
) |
============================================================================
Fftc_modifyLocalCfgPresentControlHeader
brief
This API modifies a pre-compiled FFTC Control header obtained from Fftc_createControlHeader() API, to just toggle the "Local Configuration Data Present" bit. It leaves the rest of the header unchanged. This API assumes that the output parameter passed 'pData' has been allocated memory and properly setup using Fftc_createControlHeader() API before.
[in] | bLocalConfigPresent | uint8_tean flag, when set to 1 indicates that a local configuration follows the control header. |
[in,out] | pData | Control Header buffer to be modified with the local config bit. |
Fftc_ControlHdr fftCfgCtrlHdr; uint8_t CtrlHdrData[256]; ... // Setup the FFT control header configuration. fftCfgCtrlHdr.psFieldLen = 4; fftCfgCtrlHdr.dftSizeListLen = 5; fftCfgCtrlHdr.bPSPassThruPresent = 1; fftCfgCtrlHdr.bDFTSizeListPresent = 1; fftCfgCtrlHdr.bLocalConfigPresent = 1; if (Fftc_createControlHeader(&fftCfgCtrlHdr, CtrlHdrData) != 0) { // Error returned by the API. Invalid Data Handle? // exit } else { //Proceed to putting together the rest of //the queue local configuration and pass //through data. ... } if (Fftc_modifyLocalCfgPresentControlHeader (0, CtrlHdrData) != 0) { //Error. Invalid Control header data pointer?? //exit } else { //Configuration successful. Proceed to next step. }
============================================================================
int32_t Fftc_readBlockControlStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_ControlStatusReg * | pFFTControlStatus | ||
) |
============================================================================
Fftc_readBlockControlStatusReg
brief
This API reads the FFTC Block X Control Status Register for the last three blocks processed by FFT engine and returns the retrieved status in the output parameter passed 'pFFTControlStatus'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pFFTControlStatus | Output parameter handle that will be filled in with all the blocks control status register. |
Fftc_LldObj fftcLldObj; Fftc_ControlStatusReg controlStatus[FFTC_NUM_INTERNAL_BUFFERS]; ... // Retrieve the control status register for all the // three blocks/buffers. if(Fftc_readBlockControlStatusReg (&fftcLldObj, controlStatus) != 0) { // FFTC control status read failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================
int32_t Fftc_readBlockCyclicPrefixStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_CyclicPrefixStatusReg * | pFFTCyclicStatus | ||
) |
============================================================================
Fftc_readBlockCyclicPrefixStatusReg
brief
This API reads the FFTC Block X Cyclic Prefix Status Register for the last three blocks processed by FFT engine and returns the retrieved status in the output parameter passed 'pFFTCyclicStatus'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pFFTCyclicStatus | Output parameter handle that will be filled in with all the blocks cyclic prefix status register. |
Fftc_LldObj fftcLldObj; Fftc_CyclicPrefixStatusReg cyclicStatus[FFTC_NUM_INTERNAL_BUFFERS]; ... // Retrieve the cyclic prefix status register for all the // three blocks/buffers. if(Fftc_readBlockCyclicPrefixStatusReg (&fftcLldObj, cyclicStatus) != 0) { // FFTC cyclic prefix status read failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================
int32_t Fftc_readBlockDestQStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_DestQStatusReg * | pFFTDestQStatus | ||
) |
============================================================================
Fftc_readBlockDestQStatusReg
brief
This API reads the FFTC Block X Destination Queue Status Register for the last three blocks processed by FFT engine and returns the retrieved status in the output parameter passed 'pFFTDestQStatus'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pFFTDestQStatus | Output parameter handle that will be filled in with all the blocks destination queue register status. |
Fftc_LldObj fftcLldObj; Fftc_DestQStatusReg destQStatus[FFTC_NUM_INTERNAL_BUFFERS]; ... // Retrieve the destination queue status register for all the // three blocks/buffers. if(Fftc_readBlockDestQStatusReg (&fftcLldObj, destQStatus) != 0) { // FFT destination queue status read failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================
int32_t Fftc_readBlockFreqShiftStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_FreqShiftStatusReg * | pFFTFreqShiftStatus | ||
) |
============================================================================
Fftc_readBlockFreqShiftStatusReg
brief
This API reads the FFTC Block X LTE Frequency Shift Status Register for the last three blocks processed by FFT engine and returns the retrieved status in the output parameter passed 'pFFTFreqShiftStatus'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pFFTFreqShiftStatus | Output parameter handle that will be filled in with all the blocks frequency shift status register contents. |
Fftc_LldObj fftcLldObj; Fftc_FreqShiftStatusReg freqShiftStatus[FFTC_NUM_INTERNAL_BUFFERS]; ... // Retrieve the frequency shift status register for all the // three blocks/buffers. if(Fftc_readBlockFreqShiftStatusReg (&fftcLldObj, freqShiftStatus) != 0) { // FFTC LTE Frequency shift status read failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================
int32_t Fftc_readBlockPktSizeStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_PktSizeStatusReg * | pFFTPktSizeStatus | ||
) |
============================================================================
Fftc_readBlockPktSizeStatusReg
brief
This API reads the FFTC Block X Packet Size Status Register for the last three blocks processed by FFT engine and returns the retrieved status in the output parameter passed 'pFFTPktSizeStatus'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pFFTPktSizeStatus | Output parameter handle that will be filled in with all the blocks packet size status register contents. |
Fftc_LldObj fftcLldObj; Fftc_PktSizeStatusReg pktSizeStatus[FFTC_NUM_INTERNAL_BUFFERS]; ... // Retrieve the packet size status register for all the // three blocks/buffers. if(Fftc_readBlockPktSizeStatusReg (&fftcLldObj, pktSizeStatus) != 0) { // FFTC packet size status read failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================
int32_t Fftc_readBlockShiftStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_ScalingShiftingStatusReg * | pFFTShiftStatus | ||
) |
============================================================================
Fftc_readBlockShiftStatusReg
brief
This API reads the FFTC Block X Scaling & Shifting Status Register for the last three blocks processed by FFT engine and returns the retrieved status in the output parameter passed 'pFFTShiftStatus'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pFFTShiftStatus | Output parameter handle that will be filled in with all the blocks scaling and shifting register status. |
Fftc_LldObj fftcLldObj; Fftc_ScalingShiftingStatusReg shiftStatus[FFTC_NUM_INTERNAL_BUFFERS]; ... // Retrieve the scaling and shifting status register for all the // three blocks/buffers. if(Fftc_readBlockShiftStatusReg (&fftcLldObj, shiftStatus) != 0) { // FFTC scaling and shifting status read failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================
int32_t Fftc_readBlockTagStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_TagStatusReg * | pFFTTagStatus | ||
) |
============================================================================
Fftc_readBlockTagStatusReg
brief
This API reads the FFTC Block X Tag Status Register for the last three blocks processed by FFT engine and returns the retrieved status in the output parameter passed 'pFFTTagStatus'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pFFTTagStatus | Output parameter handle that will be filled in with all the blocks tag status register contents. |
Fftc_LldObj fftcLldObj; Fftc_TagStatusReg tagStatus[FFTC_NUM_INTERNAL_BUFFERS]; ... // Retrieve the tag status register for all the // three blocks/buffers. if(Fftc_readBlockTagStatusReg (&fftcLldObj, tagStatus) != 0) { // FFTC tag status read failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================
int32_t Fftc_readDftSizeListGroupReg | ( | Fftc_LldObj * | pFFTCLldObj, |
uint16_t * | pDftSizeList | ||
) |
============================================================================
Fftc_readDftSizeListGroupReg
brief
This API reads all of the 26 DFT Size List Group Registers and returns the contents of these registers to the caller in the output parameter 'pDftSizeList'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pDftSizeList | List of DFT block sizes read from the FFTC engine H/w. |
Fftc_LldObj fftcLldObj; uint16_t dftSizeList[128]; ... // Read the DFT size list configuration. if (Fftc_readDftSizeListGroupReg(&fftcLldObj, dftSizeList) != 0) { // Error returned by the API. // exit } else { //DFT size list read successful. ... }
============================================================================
int32_t Fftc_readEmulationControlReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_EmulationControlParams * | pEmulationCfg | ||
) |
============================================================================
Fftc_readEmulationControlReg
brief
This API reads the FFTC Emulation Control Register and populates the output parameter 'pEmulationCfg' with its contents.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pEmulationCfg | Output parameter handle that needs to be filled with the emulation settings from FFTC engine. |
Fftc_LldObj fftcLldObj; Fftc_EmulationControlParams emulCfg; if (Fftc_readEmulationControlReg (&fftcLldObj, &emulCfg) != 0) { // Invalid emulation config handle passed ?? ... } else { // Continue processing. ... }
============================================================================
int32_t Fftc_readEoiReg | ( | Fftc_LldObj * | pFFTCLldObj | ) |
============================================================================
Fftc_readEoiReg
brief
This API reads the contents of FFTC End of Interrupt (EOI) Register and returns its contents to the caller.
[in] | pFFTCLldObj | FFTC LLD instance object. |
Fftc_LldObj fftcLldObj; ... Fftc_readEoiReg (&fftcLldObj); ...
============================================================================
int32_t Fftc_readErrorIntEnableSetReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_ErrorParams * | pErrorCfg | ||
) |
============================================================================
Fftc_readErrorIntEnableSetReg
brief
This API reads the FFTC Error and Interrupt Enable and Set register and populates its contents into the output error configuration structure.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue Number (0-3) for which the interrupt error configuration bits needs to be read. |
[out] | pErrorCfg | Output error params structure that will need to be filled with the register contents. |
Fftc_LldObj fftcLldObj; Fftc_ErrorParams errorParams; // Read the error configuration for queue 0 if (Fftc_readErrorIntEnableSetReg (&fftcLldObj, 0, &errorParams) != 0) { // Error reading FFTC error interrupt enable set register for queue 0. // Check the output handle we passed. ... } else { // Error Interrupt enable register contents successfully // populated in 'errorParams' ... } ...
============================================================================
int32_t Fftc_readErrorIntRawStatusReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_ErrorParams * | pErrorCfg | ||
) |
============================================================================
Fftc_readErrorIntRawStatusReg
brief
This API reads the FFTC Error Interrupt Raw Status and Set Register contents to retrieve a snapshot of all the errors that have been encountered by the FFTC engine irrespective of whether the corresponding interrupt is enabled.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue Number (0-3) for which the error interrupt status needs to be retrieved. |
[out] | pErrorCfg | Output error params structure that will be filled in by this API with the various errors raw status. |
Fftc_LldObj fftcLldObj; Fftc_ErrorParams errorStatus; ... if (Fftc_readErrorIntRawStatusReg (&fftcLldObj, 0, &errorStatus) != 0) { // Error retrieving FFTC error status. // Check the input handle we passed. ... } else { // Error Status retrieved successfully. ... } ...
============================================================================
int32_t Fftc_readGlobalConfigReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_GlobalCfg * | pFFTGlobalCfg | ||
) |
============================================================================
Fftc_readGlobalConfigReg
brief
This API loads the contents of FFTC Configuration Register in the output parameter structure handle passed 'pFFTGlobalCfg'. This API assumes that 'pFFTGlobalCfg' is a valid pointer.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pFFTGlobalCfg | Handle to FFTC Global configuration structure that needs to be filled in with contents of the FFTC Global Configuration register. |
Fftc_LldObj fftcLldObj; Fftc_GlobalCfg fftcGlobalCfg; if (Fftc_readGlobalConfigReg (&fftcLldObj, &fftcGlobalCfg) != 0) { // Error reading FFTC Configuration register. ... } else { // Successfully read FFTC global configuration register. ... }
============================================================================
int32_t Fftc_readHaltOnErrorReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_ErrorParams * | pErrorCfg | ||
) |
============================================================================
Fftc_readHaltOnErrorReg
brief
This API reads the Halt bit for the various FFTC errors from the FFTC Halt On Error Register. The Halt bit indicates if the FFTC engine should halt when the corresponding error in FFTC Error Interrupt Enables Status register is encountered.
Note: The 'bIsDebugHalt' bit value of the output error params structure is always set to 1, since a Debug Halt always generates a halt whether or not enabled here.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue Number (0-3) for which the interrupt halt bit needs to be read. |
[out] | pErrorCfg | Output error params structure with contents of the FFTC Halt on error register. |
Fftc_LldObj fftcLldObj; Fftc_ErrorParams errorParams; // read Halt on Error register configuration for queue 0 if (Fftc_readHaltOnErrorReg (&fftcLldObj, 0, &errorParams) != 0) { // Error reading FFTC halt on error register. // Check the input handle we passed. ... } else { // halt on error read successful. ... } ...
============================================================================
int32_t Fftc_readPidReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_PeripheralIdParams * | pPIDCfg | ||
) |
============================================================================
Fftc_readPidReg
brief
This API loads the contents of FFTC PID Register in the output parameter structure passed 'pPIDCfg'. This API assumes that 'pPIDCfg' is a valid pointer.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[out] | pPIDCfg | Handle to FFTC PID configuration structure that needs to be filled in with contents of the PID register. |
Fftc_LldObj fftcLldObj; Fftc_PeripheralIdParams pidCfg; if (Fftc_readPidReg (&fftcLldObj, &pidCfg) != 0) { // Error reading PID register. ... } else { // Successfully read PID Register contents ... }
============================================================================
int32_t Fftc_readQueueClippingDetectReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum | ||
) |
============================================================================
Fftc_readQueueClippingDetectReg
brief
This API reads the contents of FFTC Queue x Clipping Detect Register and returns its contents, the clipping counter to the caller.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue ID for which the clipping count must be read. |
Fftc_LldObj fftcLldObj; uint32_t clipping_count; ... if ((clipping_count = Fftc_readQueueClippingDetectReg (&fftcLldObj, 1)) == -1) { // queue 1 clipping detect register read failed. } else { // retrieved clipping count successfully. } ...
============================================================================
int32_t Fftc_readQueueConfigRegs | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_QLocalCfg * | pFFTLocalCfg | ||
) |
============================================================================
Fftc_readQueueConfigRegs
brief
This API reads the FFTC Queue Specific Registers :- Queue x Destination queue Register, Queue x Scaling and Shifting Register, Queue x Cyclic Prefix Register, Queue x Control Register and Queue x LTE Frequency Shift Register for a given queue id 'qNum' and fills in the retrieved configuration in the output parameter passed 'pFFTLocalCfg'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | Specifies which of the 4 FFTC queues (0-3) MMRs to read |
[out] | pFFTLocalCfg | Output parameter handle that will be filled in with the queue local configuration snapshot read from the MMRs for the specified FFTC queue. |
Fftc_LldObj fftcLldObj; Fftc_QLocalCfg qCfg; ... // Retrieve the queue 0 MMRs configuration. if(Fftc_readQueueConfigRegs (&fftcLldObj, 0, &qCfg) != 0) { // FFT queue 0 configuration read failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================
int32_t Fftc_recompileQueueLocalCyclicPrefixParams | ( | int32_t | cyclicPrefixLen, |
uint8_t * | pData | ||
) |
============================================================================
Fftc_recompileQueueLocalCyclicPrefixParams
brief
This API just configures 'cyclic_prefix_addition' bits in the Queue x Cyclic Prefix Register assuming that everything else in the input local configuration parameters has not changed. This API assumes that the input configuration parameters pointer passed to this API 'pData' has been compiled fully at least once before using the API Fftc_compileQueueLocalConfigParams().
[in] | cyclicPrefixLen | Number of samples of cyclic prefix to add. |
[in,out] | pData | Data buffer that needs to be modified with the cyclic prefix parameter provided. |
Fftc_QLocalCfg fftLocalCfg; uint8_t localCfgData[256]; ... // Setup the queue configuration parameters fftLocalCfg.destQRegConfig.cppiDestQNum = 3; fftLocalCfg.destQRegConfig.bOutputFFTShift = 0; ... fftLocalCfg.controlRegConfig.dftSize = 512; fftLocalCfg.controlRegConfig.dftMode = Fftc_DFTMode_DFT; ... // Compile the configuration into FFT engine compatible // format. if(Fftc_compileQueueLocalConfigParams (&fftLocalCfg, localCfgData) > 0) { // FFT local configuration compilation failed. // do error recovery. ... } else { // proceed formulating the FFTC control header in // CPPI packet. ... } Fftc_recompileQueueLocalCyclicPrefixParams (32, localCfgData);
============================================================================
int32_t Fftc_recompileQueueLocalDFTParams | ( | int32_t | dftSize, |
Fftc_DFTMode | dftMode, | ||
uint8_t * | pData | ||
) |
============================================================================
Fftc_recompileQueueLocalDFTParams
brief
This API just configures 'DFT_IDFTelect' and 'DFTize' bits in the Queue x Control Register assuming that everything else in the input local configuration parameters has not changed. This API assumes that the input configuration parameters pointer passed to this API 'pData' has been compiled fully at least once before using the API Fftc_compileQueueLocalConfigParams().
[in] | dftSize | DFT block size in bytes to be configured |
[in] | dftMode | Indicates whether DFT/IDFT transformation must be performed. 0 indicates IDFT, 1 for DFT. |
[in,out] | pData | Data buffer to be filled in with the DFT parameters provided. |
Fftc_QLocalCfg fftLocalCfg; uint8_t localCfgData[256]; ... // Setup the queue configuration parameters fftLocalCfg.destQRegConfig.cppiDestQNum = 3; fftLocalCfg.destQRegConfig.bOutputFFTShift = 0; ... fftLocalCfg.controlRegConfig.dftSize = 512; fftLocalCfg.controlRegConfig.dftMode = Fftc_DFTMode_IDFT; ... // Compile the configuration into FFT engine compatible // format. if(Fftc_compileQueueLocalConfigParams (&fftLocalCfg, localCfgData) > 0) { // FFT local configuration compilation failed. // do error recovery. ... } else { // proceed formulating the FFTC control header in // CPPI packet. ... } Fftc_recompileQueueLocalDFTParams (6144, Fftc_DFTMode_DFT, localCfgData);
============================================================================
int32_t Fftc_writeDftSizeListGroupReg | ( | Fftc_LldObj * | pFFTCLldObj, |
uint16_t * | pDftSizeList, | ||
uint32_t | dftSizeListLen | ||
) |
============================================================================
Fftc_writeDftSizeListGroupReg
brief
This API compiles the FFTC DFT size list specified by 'pDftSizeList' and 'dftSizeListLen' input parameters and writes the DFT Size List Group Registers accordingly.
This API doesnt validate the DFT block sizes specified in 'pDftSizeList' input parameter.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | pDftSizeList | List of DFT block sizes that needs to be programmed to FFTC engine. |
[in] | dftSizeListLen | Number of DFT block sizes specified in 'pDftSizeList' input. The maximum number of FFT blocks supported by hardware is 128. The caller needs to ensure that this limit is not exceeded. |
Fftc_LldObj fftcLldObj; uint16_t dftSizeList[32]; uint32_t numDftBlocks, i; ... // Setup the DFT size list configuration. numDftBlocks = 32; for (i = 0; i < numDftBlocks; i ++) dftSizeList [i] = xxx; // program the DFT block size in the same order as they // will appear in data. if (Fftc_writeDftSizeListGroupReg(&fftcLldObj, dftSizeList, numDftBlocks) != 0) { // Error returned by the API. // exit } else { //DFT size list configuration successful. ... }
============================================================================
int32_t Fftc_writeEmulationControlReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_EmulationControlParams * | pEmulationCfg | ||
) |
============================================================================
Fftc_writeEmulationControlReg
brief
This API configures the FFTC Emulation Control Register as per the input specified in 'pEmulationCfg' input parameter.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | pEmulationCfg | Input parameter handle that holds the emulation settings for FFTC engine. |
Fftc_LldObj fftcLldObj; Fftc_EmulationControlParams emulCfg; emulCfg.bEmuRtSel = 0x0; emulCfg.bEmuSoftStop = 0x1; emulCfg.bEmuFreeRun = 0x0; if (Fftc_writeEmulationControlReg (&fftcLldObj, &emulCfg) != 0) { // Invalid emulation config handle passed ?? ... } else { // Continue processing. ... }
============================================================================
int32_t Fftc_writeEoiReg | ( | Fftc_LldObj * | pFFTCLldObj, |
int32_t | eoiVal | ||
) |
============================================================================
Fftc_writeEoiReg
brief
This API configures the FFTC EOI Register as per the EOI Value provided as input to acknowledge an interrupt.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | eoiVal | EOI value to appropriately acknowledge an FFTC interrupt received by the application. |
Fftc_LldObj fftcLldObj; ... Fftc_writeEoiReg (&fftcLldObj, 1); ...
============================================================================
int32_t Fftc_writeErrorIntEnableSetReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_ErrorParams * | pErrorCfg | ||
) |
============================================================================
Fftc_writeErrorIntEnableSetReg
brief
This API sets up the interrupt enable status bits for the various FFTC errors corresponding to the bit fields enabled in the input error configuration structure.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue Number (0-3) for which the interrupt error status bits needs to be set. |
[in] | pErrorCfg | Input error params structure that specifies the error status bits for which the interrupt needs to be enabled. |
Fftc_LldObj fftcLldObj; Fftc_ErrorParams errorParams; errorParams.bIsIntOnEOP = 0; errorParams.bIsDebugHalt = 1; errorParams.bIsConfigWordError = 1; errorParams.bIsDescBufferError = 1; errorParams.bIsEopError = 0; errorParams.bIsConfigInvalError= 0; if (Fftc_writeErrorIntEnableSetReg (&fftcLldObj, 0, &errorParams) != 0) { // Error setting up FFTC error interrupt enable status. // Check the input handle we passed. ... } else { // Error Interrupt Status setup successfully. ... } ...
============================================================================
int32_t Fftc_writeGlobalConfigReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_GlobalCfg * | pFFTGlobalCfg | ||
) |
============================================================================
Fftc_writeGlobalConfigReg
brief
This API configures the FFTC Configuration Register with the configuration passed in 'pFFTGlobalCfg' input parameter.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | pFFTGlobalCfg | Handle to input FFTC Global configuration parameters. |
Fftc_LldObj fftcLldObj; Fftc_GlobalCfg globalCfg; // setup the global configuration params globalCfg.starvationPeriod = 0x10; globalCfg.queue3Priority = 0x03; globalCfg.queue2Priority = 0x03; globalCfg.queue1Priority = 0x03; globalCfg.queue0Priority = 0x00; globalCfg.bDisableFFT = 0x00; if (Fftc_writeGlobalConfigReg (&fftcLldObj, &globalCfg) != 0) { // Error configuring Global Cfg register. ... } else { // Successfully configured the register ... }
============================================================================
int32_t Fftc_writeHaltOnErrorReg | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_ErrorParams * | pErrorCfg | ||
) |
============================================================================
Fftc_writeHaltOnErrorReg
brief
This API sets up the Halt bit for the various FFTC errors corresponding to the bit fields enabled in the input error configuration structure. The Halt bit indicates if the FFTC engine should halt when the corresponding error in FFTC Error Interrupt Enables Status register is encountered.
Note: The 'bIsDebugHalt' bit value of the input error params structure is ignored and is always set to 1 in the FFTC Halt on error register, since a Debug Halt always generates a halt whether or not enabled here.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | FFTC Queue Number (0-3) for which the interrupt halt bit needs to be set. |
[in] | pErrorCfg | Input error params structure that specifies the error status bits for which the fftc halt needs to be enabled. |
Fftc_LldObj fftcLldObj; Fftc_ErrorParams errorParams; errorParams.bIsIntOnEOP = 0; errorParams.bIsConfigWordError = 1; errorParams.bIsDescBufferError = 1; errorParams.bIsEopError = 0; errorParams.bIsConfigInvalError= 0; if (Fftc_writeHaltOnErrorReg (&fftcLldObj, 0, &errorParams) != 0) { // Error setting up FFTC halt on error register. // Check the input handle we passed. ... } else { // halt on error setup successful. ... } ...
============================================================================
int32_t Fftc_writeQueueConfigRegs | ( | Fftc_LldObj * | pFFTCLldObj, |
Fftc_QueueId | qNum, | ||
Fftc_QLocalCfg * | pFFTLocalCfg | ||
) |
============================================================================
Fftc_writeQueueConfigRegs
brief
This API configures the FFTC Queue Specific Registers :- Queue x Destination queue Register, Queue x Scaling and Shifting Register, Queue x Cyclic Prefix Register, Queue x Control Register and Queue x LTE Frequency Shift Register for any given queue id 'qNum' using the input specified by 'pFFTLocalCfg'.
[in] | pFFTCLldObj | FFTC LLD instance object. |
[in] | qNum | Specifies which of the 4 FFTC queues (0-3) MMRs to configure |
[in] | pFFTLocalCfg | Input parameter handle that holds the local configuration settings for the specific queue processing. |
Fftc_LldObj fftcLldObj; Fftc_QLocalCfg fftLocalCfg; ... // Setup the queue configuration parameters fftLocalCfg.destQRegConfig.cppiDestQNum = 3; fftLocalCfg.destQRegConfig.bOutputFFTShift = 0; ... fftLocalCfg.controlRegConfig.dftSize = 512; fftLocalCfg.controlRegConfig.dftMode = Fftc_DFTMode_DFT; ... // Configure the queue 0 MMRs. if(Fftc_writeQueueConfigRegs (&fftcLldObj, 0, &fftLocalCfg) != 0) { // FFT queue 0 configuration failed. // do error recovery. ... } else { // Continue Processing ... }
============================================================================