dfeccf
Vitis Drivers API Documentation
Overview

Data Structures

struct  XDfeCcf_Version
 Logicore version. More...
 
struct  XDfeCcf_Trigger
 Trigger configuration. More...
 
struct  XDfeCcf_TriggerCfg
 All IP triggers. More...
 
struct  XDfeCcf_CCSequence
 Defines a CCID sequence. More...
 
struct  XDfeCcf_ModelParameters
 Channel Filter model parameters structure. More...
 
struct  XDfeCcf_Cfg
 Configuration. More...
 
struct  XDfeCcf_Init
 Initialization, "one-time" configuration parameters. More...
 
struct  XDfeCcf_Coefficients
 Defines filter coefficients. More...
 
struct  XDfeCcf_CarrierCfg
 Configuration for a single CC. More...
 
struct  XDfeCcf_InternalCarrierCfg
 Internal configuration for a single CC. More...
 
struct  XDfeCcf_AntennaCfg
 Configuration for a single Antenna. More...
 
struct  XDfeCcf_CCCfg
 Full CC configuration. More...
 
struct  XDfeCcf_OverflowStatus
 Channel Filter Status. More...
 
struct  XDfeCcf_Status
 Event status and interrupt mask. More...
 
struct  XDfeCcf_Config
 CCF Config Structure. More...
 
struct  XDfeCcf
 CCF Structure. More...
 

Macros

#define XDFECCF_ACTIVE_SET_NUM   (8U)
 Maximum number of active sets. More...
 
#define XDFECCF_U32_NUM_BITS   (32U)
 Number of bits in register. More...
 
#define XDFECCF_TAP_NUMBER_MAX   (256U)
 Maximum tap number. More...
 
#define XDFECCF_DRIVER_VERSION_MINOR   (7U)
 Driver's minor version number. More...
 
#define XDFECCF_DRIVER_VERSION_MAJOR   (1U)
 Driver's major version number. More...
 
#define XDFECCF_MAX_NUM_INSTANCES   (10U)
 Maximum number of driver instances running at the same time. More...
 
#define XST_SUCCESS   (0U)
 Success flag. More...
 
#define XST_FAILURE   (1U)
 Failure flag. More...
 
#define XDFECCF_NODE_NAME_MAX_LENGTH   (50U)
 Node name maximum length. More...
 
#define XDFECCF_CC_NUM   (16)
 Maximum CC number. More...
 
#define XDFECCF_ANT_NUM_MAX   (8U)
 Maximum anntena number. More...
 
#define XDFECCF_SEQ_LENGTH_MAX   (16U)
 Maximum sequence length. More...
 
#define XDFECCF_NUM_COEFF   (128U)
 Maximum number of coefficients. More...
 
#define XDFECCF_COMPATIBLE_STRING   "xlnx,xdfe-cc-filter-1.1"
 Device name property. More...
 
#define XDFECCF_PLATFORM_DEVICE_DIR   "/sys/bus/platform/devices/"
 Device location in a file system. More...
 
#define XDFECCF_COMPATIBLE_PROPERTY   "compatible"
 Device tree property. More...
 
#define XDFECCF_BUS_NAME   "platform"
 System bus name. More...
 
#define XDFECCF_BASEADDR_PROPERTY   "reg"
 Base address property. More...
 
#define XDFECCF_BASEADDR_SIZE   8U
 Base address bit-size. More...
 
#define XDFECCF_NUM_ANTENNA_CFG   "xlnx,num-antenna"
 Number of antenna property. More...
 
#define XDFECCF_NUM_CC_PER_ANTENNA_CFG   "xlnx,num-cc-per-antenna"
 Maximum number of CC's per antenna. More...
 
#define XDFECCF_ANTENNA_INTERLEAVE_CFG   "xlnx,antenna-interleave"
 Number of Antenna TDM slots, per CC. More...
 
#define XDFECCF_SWITCHABLE_CFG   "xlnx,switchable"
 DL/UL switching support. More...
 
#define XDFECCF_TUSER_WIDTH_CFG   "xlnx,tuser-width"
 TUSER width property. More...
 

Enumerations

enum  XDfeCcf_StateId {
  XDFECCF_STATE_NOT_READY = 0, XDFECCF_STATE_READY, XDFECCF_STATE_RESET, XDFECCF_STATE_CONFIGURED,
  XDFECCF_STATE_INITIALISED, XDFECCF_STATE_OPERATIONAL
}
 

Functions

XDfeCcfXDfeCcf_InstanceInit (const char *DeviceNodeName)
 Initialises one instance of a channel filter driver. More...
 
void XDfeCcf_InstanceClose (XDfeCcf *InstancePtr)
 Closes the instances of a channel filter driver and moves the state machine to a Not Ready state. More...
 
void XDfeCcf_Reset (XDfeCcf *InstancePtr)
 Resets channel filter and puts block into a reset state. More...
 
void XDfeCcf_Configure (XDfeCcf *InstancePtr, XDfeCcf_Cfg *Cfg)
 Reads configuration from device tree/xparameters.h and IP registers. More...
 
void XDfeCcf_Initialize (XDfeCcf *InstancePtr, XDfeCcf_Init *Init)
 DFE Ccf driver one time initialisation, also moves the state machine to an Initialised state. More...
 
void XDfeCcf_Activate (XDfeCcf *InstancePtr, bool EnableLowPower)
 Activates channel filter and moves the state machine to an Activated state. More...
 
void XDfeCcf_Deactivate (XDfeCcf *InstancePtr)
 Deactivates channel filter and moves the state machine to Initialised state. More...
 
XDfeCcf_StateId XDfeCcf_GetStateID (XDfeCcf *InstancePtr)
 Gets a state machine state id. More...
 
void XDfeCcf_GetCurrentCCCfg (const XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CurrCCCfg)
 Returns the current CC configuration in non-switchable mode. More...
 
void XDfeCcf_GetCurrentCCCfgSwitchable (const XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfgDownlink, XDfeCcf_CCCfg *CCCfgUplink)
 Returns the current CC configuration for Downlink and Uplink in switchable mode. More...
 
void XDfeCcf_GetEmptyCCCfg (const XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfg)
 Returns configuration structure CCCfg with CCCfg->Sequence.Length value set in XDfeCcf_Configure(), array CCCfg->Sequence.CCID[] members are set to not used value (-1) and the other CCCfg members are set to 0. More...
 
void XDfeCcf_GetCarrierCfg (const XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfg, s32 CCID, u32 *CCSeqBitmap, XDfeCcf_CarrierCfg *CarrierCfg)
 Returns the current CCID carrier configuration. More...
 
void XDfeCcf_SetAntennaCfgInCCCfg (const XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfg, XDfeCcf_AntennaCfg *AntennaCfg)
 Set antenna configuration in CC configuration container. More...
 
u32 XDfeCcf_AddCCtoCCCfg (XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfg, s32 CCID, u32 CCSeqBitmap, const XDfeCcf_CarrierCfg *CarrierCfg)
 Adds specified CCID, with specified configuration, to a local CC configuration structure. More...
 
void XDfeCcf_RemoveCCfromCCCfg (XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfg, s32 CCID)
 Removes specified CCID from a local CC configuration structure. More...
 
void XDfeCcf_UpdateCCinCCCfg (const XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfg, s32 CCID, const XDfeCcf_CarrierCfg *CarrierCfg)
 Updates specified CCID, with specified configuration to a local CC configuration structure. More...
 
u32 XDfeCcf_SetNextCCCfgAndTrigger (XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfg)
 Writes local CC configuration to the shadow (NEXT) registers and triggers copying from shadow to operational (CURRENT) registers. More...
 
u32 XDfeCcf_SetNextCCCfgAndTriggerSwitchable (XDfeCcf *InstancePtr, XDfeCcf_CCCfg *CCCfgDownlink, XDfeCcf_CCCfg *CCCfgUplink)
 Writes local CC configuration to the shadow (NEXT) registers and triggers copying from shadow to operational (CURRENT) registers for both Downlink and Upling in switchable mode. More...
 
u32 XDfeCcf_AddCC (XDfeCcf *InstancePtr, s32 CCID, u32 CCSeqBitmap, const XDfeCcf_CarrierCfg *CarrierCfg)
 Adds specified CCID, with specified configuration. More...
 
u32 XDfeCcf_RemoveCC (XDfeCcf *InstancePtr, s32 CCID)
 Removes specified CCID. More...
 
u32 XDfeCcf_UpdateCC (XDfeCcf *InstancePtr, s32 CCID, const XDfeCcf_CarrierCfg *CarrierCfg)
 Updates specified CCID carrier configuration; change gain or filter coefficients set. More...
 
u32 XDfeCcf_UpdateAntenna (XDfeCcf *InstancePtr, u32 Ant, bool Enabled)
 Updates specified antenna TDM slot enablement. More...
 
u32 XDfeCcf_UpdateAntennaCfg (XDfeCcf *InstancePtr, XDfeCcf_AntennaCfg *AntennaCfg)
 Updates antenna configuration to all antennas. More...
 
u32 XDfeCcf_UpdateAntennaCfgSwitchable (XDfeCcf *InstancePtr, XDfeCcf_AntennaCfg *AntennaCfgDownlink, XDfeCcf_AntennaCfg *AntennaCfgUplink)
 Updates antenna configuration of all antennas. More...
 
void XDfeCcf_GetTriggersCfg (const XDfeCcf *InstancePtr, XDfeCcf_TriggerCfg *TriggerCfg)
 Returns current trigger configuration. More...
 
void XDfeCcf_SetTriggersCfg (const XDfeCcf *InstancePtr, XDfeCcf_TriggerCfg *TriggerCfg)
 Sets trigger configuration. More...
 
void XDfeCcf_GetCC (const XDfeCcf *InstancePtr, s32 CCID, XDfeCcf_CarrierCfg *CarrierCfg)
 Gets specified CCID carrier configuration. More...
 
void XDfeCcf_GetActiveSets (const XDfeCcf *InstancePtr, u32 *IsActive)
 Returns a list indicating which coefficient sets are currently in use. More...
 
void XDfeCcf_LoadCoefficients (XDfeCcf *InstancePtr, u32 Set, u32 Shift, const XDfeCcf_Coefficients *Coeffs)
 Writes the coefficient set defined into the register map and commit them to the hard block's internal coefficient memory for the specified Set. More...
 
void XDfeCcf_SetTUserDelay (const XDfeCcf *InstancePtr, u32 Delay)
 Sets the delay, which will be added to TUSER and TLAST (delay matched through the IP). More...
 
u32 XDfeCcf_GetTUserDelay (const XDfeCcf *InstancePtr)
 Reads the delay, which will be added to TUSER and TLAST (delay matched through the IP). More...
 
u32 XDfeCcf_GetTDataDelay (XDfeCcf *InstancePtr, u32 Tap, s32 CCID, u32 Symmetric, u32 Num, u32 *TDataDelay)
 Gets calculated TDataDelay value for CCID from current CC configuration. More...
 
u32 XDfeCcf_GetTDataDelayFromCCCfg (XDfeCcf *InstancePtr, u32 Tap, s32 CCID, XDfeCcf_CCCfg *CCCfg, u32 Symmetric, u32 Num, u32 *TDataDelay)
 Gets calculated TDataDelay value for CCID. More...
 
void XDfeCcf_SetRegBank (const XDfeCcf *InstancePtr, u32 RegBank)
 Sets uplink/downlink register bank. More...
 
void XDfeCcf_GetVersions (const XDfeCcf *InstancePtr, XDfeCcf_Version *SwVersion, XDfeCcf_Version *HwVersion)
 This API is used to get the driver version. More...
 
void XDfeCcf_GetOverflowStatus (const XDfeCcf *InstancePtr, XDfeCcf_OverflowStatus *Status)
 Gets overflow event status. More...
 
void XDfeCcf_GetEventStatus (const XDfeCcf *InstancePtr, XDfeCcf_Status *Status)
 Gets event status. More...
 
void XDfeCcf_ClearEventStatus (const XDfeCcf *InstancePtr, const XDfeCcf_Status *Status)
 Clears events status. More...
 
void XDfeCcf_SetInterruptMask (const XDfeCcf *InstancePtr, const XDfeCcf_InterruptMask *Mask)
 Sets interrupt masks. More...
 
void XDfeCcf_GetInterruptMask (const XDfeCcf *InstancePtr, XDfeCcf_InterruptMask *Mask)
 Gets interrupt masks. More...
 
int XDfeCcf_MultiInstancesExample ()
 This example runs two instances of DFE Channel Filter. More...
 
int XDfeCcf_multiAddCC_1xNR100_3xNR20_Example ()
 This example configures Channel Filter driver for one NR100 carrier and three NR20 whit multiAddCC API and at the end close and release the driver. More...
 

Macro Definition Documentation

#define XDFECCF_ACTIVE_SET_NUM   (8U)

Maximum number of active sets.

Referenced by XDfeCcf_GetActiveSets().

#define XDFECCF_ANT_NUM_MAX   (8U)

Maximum anntena number.

#define XDFECCF_ANTENNA_INTERLEAVE_CFG   "xlnx,antenna-interleave"

Number of Antenna TDM slots, per CC.

#define XDFECCF_BASEADDR_PROPERTY   "reg"

Base address property.

#define XDFECCF_BASEADDR_SIZE   8U

Base address bit-size.

#define XDFECCF_BUS_NAME   "platform"

System bus name.

#define XDFECCF_CC_NUM   (16)

Maximum CC number.

Referenced by XDfeCcf_GetEmptyCCCfg().

#define XDFECCF_COMPATIBLE_PROPERTY   "compatible"

Device tree property.

#define XDFECCF_COMPATIBLE_STRING   "xlnx,xdfe-cc-filter-1.1"

Device name property.

#define XDFECCF_DRIVER_VERSION_MAJOR   (1U)

Driver's major version number.

Referenced by XDfeCcf_GetVersions().

#define XDFECCF_DRIVER_VERSION_MINOR   (7U)

Driver's minor version number.

Referenced by XDfeCcf_GetVersions().

#define XDFECCF_MAX_NUM_INSTANCES   (10U)

Maximum number of driver instances running at the same time.

#define XDFECCF_NODE_NAME_MAX_LENGTH   (50U)

Node name maximum length.

Referenced by XDfeCcf_InstanceInit().

#define XDFECCF_NUM_ANTENNA_CFG   "xlnx,num-antenna"

Number of antenna property.

#define XDFECCF_NUM_CC_PER_ANTENNA_CFG   "xlnx,num-cc-per-antenna"

Maximum number of CC's per antenna.

#define XDFECCF_NUM_COEFF   (128U)

Maximum number of coefficients.

Referenced by XDfeCcf_GetTDataDelayFromCCCfg(), and XDfeCcf_LoadCoefficients().

#define XDFECCF_PLATFORM_DEVICE_DIR   "/sys/bus/platform/devices/"

Device location in a file system.

#define XDFECCF_SEQ_LENGTH_MAX   (16U)

Maximum sequence length.

#define XDFECCF_SWITCHABLE_CFG   "xlnx,switchable"

DL/UL switching support.

#define XDFECCF_TAP_NUMBER_MAX   (256U)

Maximum tap number.

Referenced by XDfeCcf_GetTDataDelay(), and XDfeCcf_GetTDataDelayFromCCCfg().

#define XDFECCF_TUSER_WIDTH_CFG   "xlnx,tuser-width"

TUSER width property.

#define XDFECCF_U32_NUM_BITS   (32U)

Number of bits in register.

Enumeration Type Documentation

Enumerator
XDFECCF_STATE_NOT_READY 

Not ready state.

XDFECCF_STATE_READY 

Ready state.

XDFECCF_STATE_RESET 

Reset state.

XDFECCF_STATE_CONFIGURED 

Configured state.

XDFECCF_STATE_INITIALISED 

Initialised state.

XDFECCF_STATE_OPERATIONAL 

Operational state.

Function Documentation

void XDfeCcf_Activate ( XDfeCcf InstancePtr,
bool  EnableLowPower 
)

Activates channel filter and moves the state machine to an Activated state.

Parameters
InstancePtrPointer to the Ccf instance.
EnableLowPowerFlag indicating low power.

References XDfeCcf::Config, XDfeCcf::StateId, XDfeCcf_Config::Switchable, XDFECCF_STATE_INITIALISED, and XDFECCF_STATE_OPERATIONAL.

Referenced by XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), XDfeCcf_MultiInstancesExample(), and XDfeCcf_PassThroughExample().

u32 XDfeCcf_AddCC ( XDfeCcf InstancePtr,
s32  CCID,
u32  CCSeqBitmap,
const XDfeCcf_CarrierCfg CarrierCfg 
)

Adds specified CCID, with specified configuration.

If there is insufficient capacity for the new CC the function will return an error. Initiates CC update (enable CCUpdate trigger TUSER Single Shot).

Parameters
InstancePtrPointer to the Ccf instance.
CCIDCC ID.
CCSeqBitmap- up to 16 defined slots into which a CC can be allocated. The number of slots can be from 1 to 16 depending on system initialization. The number of slots is defined by the "sequence length" parameter which is provided during initialization. The Bit offset within the CCSeqBitmap indicates the equivalent Slot number to allocate. e.g. 0x0003 means the caller wants the passed component carrier (CC) to be allocated to slots 0 and 1.
CarrierCfgCC configuration container.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.
Note
Clear event status with XDfeCcf_ClearEventStatus() before running this API.
Attention
: This API is deprecated in the release 2023.2. Source code will be removed from in the release 2024.1 release. The functionality of this API can be reproduced with the following API sequence: XDfeCcf_GetCurrentCCCfg(InstancePtr, CCCfg); XDfeCcf_AddCCtoCCCfg(InstancePtr, CCCfg, CCID, CCSeqBitmap, CarrierCfg); XDfeCcf_SetNextCCCfgAndTrigger(InstancePtr, CCCfg);

References XDfeCcf_CCCfg::CarrierCfg, XDfeCcf_InternalCarrierCfg::Enable, XDfeCcf_InternalCarrierCfg::Flush, XDfeCcf_CarrierCfg::Gain, XDfeCcf_InternalCarrierCfg::Gain, XDfeCcf_CarrierCfg::ImagCoeffSet, XDfeCcf_InternalCarrierCfg::ImagCoeffSet, XDfeCcf_CCSequence::Length, XDfeCcf_InternalCarrierCfg::MappedId, XDfeCcf_CarrierCfg::RealCoeffSet, XDfeCcf_InternalCarrierCfg::RealCoeffSet, XDfeCcf_CCCfg::Sequence, XDfeCcf::StateId, XDfeCcf_GetCurrentCCCfg(), XDfeCcf_SetNextCCCfgAndTrigger(), XDFECCF_STATE_OPERATIONAL, XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeCcf_PassThroughExample().

u32 XDfeCcf_AddCCtoCCCfg ( XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfg,
s32  CCID,
u32  CCSeqBitmap,
const XDfeCcf_CarrierCfg CarrierCfg 
)

Adds specified CCID, with specified configuration, to a local CC configuration structure.

If there is insufficient capacity for the new CC the function will return an error. Initiates CC update (enable CCUpdate trigger TUSER Single Shot).

The returned CCCfg.Sequence is translated as there is no explicit indication that SEQUENCE[i] is not used - 0 can define the slot as either used or not used. Sequence data that is returned in the CCIDSequence is not the same as what is written in the registers. The translation is:

  • CCIDSequence.CCID[i] = -1 - if [i] is unused slot
  • CCIDSequence.CCID[i] = CCID - if [i] is used slot
  • a returned CCIDSequence->Length = length in register + 1
Parameters
InstancePtrPointer to the Ccf instance.
CCCfgComponent carrier (CC) configuration container.
CCIDCC ID.
CCSeqBitmapCC slot position container.
CarrierCfgCC configuration container.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.

References XDfeCcf_CCCfg::CarrierCfg, XDfeCcf_InternalCarrierCfg::Enable, XDfeCcf_InternalCarrierCfg::Flush, XDfeCcf_CarrierCfg::Gain, XDfeCcf_InternalCarrierCfg::Gain, XDfeCcf_CarrierCfg::ImagCoeffSet, XDfeCcf_InternalCarrierCfg::ImagCoeffSet, XDfeCcf_InternalCarrierCfg::MappedId, XDfeCcf_CarrierCfg::RealCoeffSet, XDfeCcf_InternalCarrierCfg::RealCoeffSet, XDfeCcf_CCCfg::Sequence, XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeCcf_multiAddCC_1xNR100_3xNR20_Example().

void XDfeCcf_ClearEventStatus ( const XDfeCcf InstancePtr,
const XDfeCcf_Status Status 
)

Clears events status.

Parameters
InstancePtrPointer to the channel filter instance.
StatusClear event status container.
  • 0 - does not clear coresponding event status
  • 1 - clears coresponding event status

References XDfeCcf_Status::CCSequenceError, XDfeCcf_Status::CCUpdate, and XDfeCcf_Status::Overflow.

Referenced by XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), and XDfeCcf_PassThroughExample().

void XDfeCcf_Deactivate ( XDfeCcf InstancePtr)

Deactivates channel filter and moves the state machine to Initialised state.

Parameters
InstancePtrPointer to the Ccf instance.

References XDfeCcf::Config, XDfeCcf::StateId, XDfeCcf_Config::Switchable, XDFECCF_STATE_INITIALISED, and XDFECCF_STATE_OPERATIONAL.

Referenced by XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), XDfeCcf_MultiInstancesExample(), and XDfeCcf_PassThroughExample().

void XDfeCcf_GetActiveSets ( const XDfeCcf InstancePtr,
u32 *  IsActive 
)

Returns a list indicating which coefficient sets are currently in use.

Parameters
InstancePtrPointer to the Ccf instance.
IsActivePointer indicating an activation status.

References XDfeCcf::SequenceLength, XDfeCcf::StateId, XDFECCF_ACTIVE_SET_NUM, and XDFECCF_STATE_OPERATIONAL.

void XDfeCcf_GetCarrierCfg ( const XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfg,
s32  CCID,
u32 *  CCSeqBitmap,
XDfeCcf_CarrierCfg CarrierCfg 
)

Returns the current CCID carrier configuration.

Parameters
InstancePtrPointer to the Ccf instance.
CCCfgComponent carrier (CC) configuration container.
CCIDChannel ID for which configuration parameters are returned, range [0-15].
CCSeqBitmapCC slot position container.
CarrierCfgCC configuration container.

References XDfeCcf_CCCfg::CarrierCfg, XDfeCcf_CCSequence::CCID, XDfeCcf_CarrierCfg::Gain, XDfeCcf_InternalCarrierCfg::Gain, XDfeCcf_CarrierCfg::ImagCoeffSet, XDfeCcf_InternalCarrierCfg::ImagCoeffSet, XDfeCcf_CCSequence::Length, XDfeCcf_CarrierCfg::RealCoeffSet, XDfeCcf_InternalCarrierCfg::RealCoeffSet, and XDfeCcf_CCCfg::Sequence.

Referenced by XDfeCcf_GetTDataDelayFromCCCfg().

void XDfeCcf_GetCC ( const XDfeCcf InstancePtr,
s32  CCID,
XDfeCcf_CarrierCfg CarrierCfg 
)

Gets specified CCID carrier configuration.

Parameters
InstancePtrPointer to the Ccf instance.
CCIDCC ID.
CarrierCfgTrigger configuration container.

References XDfeCcf_CarrierCfg::Gain, XDfeCcf_CarrierCfg::ImagCoeffSet, and XDfeCcf_CarrierCfg::RealCoeffSet.

void XDfeCcf_GetCurrentCCCfg ( const XDfeCcf InstancePtr,
XDfeCcf_CCCfg CurrCCCfg 
)

Returns the current CC configuration in non-switchable mode.

Not used slot ID in a sequence (Sequence.CCID[Index]) are represented as (-1), not the value in registers.

Parameters
InstancePtrPointer to the Ccf instance.
CurrCCCfgCC configuration container.
Note
For a sequence conversion see XDfeCcf_AddCCtoCCCfg() comment.

References XDfeCcf_CCSequence::NotUsedCCID, XDfeCcf::NotUsedCCID, and XDfeCcf_CCCfg::Sequence.

Referenced by XDfeCcf_AddCC(), XDfeCcf_GetTDataDelay(), XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), XDfeCcf_RemoveCC(), XDfeCcf_UpdateAntenna(), XDfeCcf_UpdateAntennaCfg(), and XDfeCcf_UpdateCC().

void XDfeCcf_GetCurrentCCCfgSwitchable ( const XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfgDownlink,
XDfeCcf_CCCfg CCCfgUplink 
)

Returns the current CC configuration for Downlink and Uplink in switchable mode.

Not used slot ID in a sequence (Sequence.CCID[Index]) are represented as (-1), not the value in registers.

Parameters
InstancePtrPointer to the Mixer instance.
CCCfgDownlinkDownlink CC configuration container.
CCCfgUplinkUplink CC configuration container.

References XDfeCcf::Config, XDfeCcf_CCSequence::NotUsedCCID, XDfeCcf::NotUsedCCID, XDfeCcf::NotUsedCCID_UL, XDfeCcf_CCCfg::Sequence, XDfeCcf_Config::Switchable, and XDfeCcf_SetRegBank().

Referenced by XDfeCcf_UpdateAntennaCfgSwitchable().

void XDfeCcf_GetEmptyCCCfg ( const XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfg 
)

Returns configuration structure CCCfg with CCCfg->Sequence.Length value set in XDfeCcf_Configure(), array CCCfg->Sequence.CCID[] members are set to not used value (-1) and the other CCCfg members are set to 0.

Parameters
InstancePtrPointer to the Ccf instance.
CCCfgCC configuration container.

References XDfeCcf_CCSequence::CCID, XDfeCcf_CCSequence::Length, XDfeCcf_CCCfg::Sequence, XDfeCcf::SequenceLength, and XDFECCF_CC_NUM.

void XDfeCcf_GetEventStatus ( const XDfeCcf InstancePtr,
XDfeCcf_Status Status 
)

Gets event status.

Parameters
InstancePtrPointer to the channel filter instance.
StatusPointer to a returned event status.

References XDfeCcf_Status::CCSequenceError, XDfeCcf_Status::CCUpdate, and XDfeCcf_Status::Overflow.

void XDfeCcf_GetInterruptMask ( const XDfeCcf InstancePtr,
XDfeCcf_InterruptMask Mask 
)

Gets interrupt masks.

Parameters
InstancePtrPointer to the channel filter instance.
MaskInterrupt mask value.

References XDfeCcf_Status::CCSequenceError, XDfeCcf_Status::CCUpdate, and XDfeCcf_Status::Overflow.

void XDfeCcf_GetOverflowStatus ( const XDfeCcf InstancePtr,
XDfeCcf_OverflowStatus Status 
)
XDfeCcf_StateId XDfeCcf_GetStateID ( XDfeCcf InstancePtr)

Gets a state machine state id.

Parameters
InstancePtrPointer to the Ccf instance.
Returns
State machine StateID

References XDfeCcf::StateId.

u32 XDfeCcf_GetTDataDelay ( XDfeCcf InstancePtr,
u32  Tap,
s32  CCID,
u32  Symmetric,
u32  Num,
u32 *  TDataDelay 
)

Gets calculated TDataDelay value for CCID from current CC configuration.

Parameters
InstancePtrPointer to the Ccf instance.
TapTap value.
CCIDCC ID.
SymmetricSelect symmetric (1) or non-symmetric (0) filter.
NumNumber of coefficients values.
TDataDelayData latency value.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.

References XDfeCcf_GetCurrentCCCfg(), XDfeCcf_GetTDataDelayFromCCCfg(), and XDFECCF_TAP_NUMBER_MAX.

u32 XDfeCcf_GetTDataDelayFromCCCfg ( XDfeCcf InstancePtr,
u32  Tap,
s32  CCID,
XDfeCcf_CCCfg CCCfg,
u32  Symmetric,
u32  Num,
u32 *  TDataDelay 
)

Gets calculated TDataDelay value for CCID.

Parameters
InstancePtrPointer to the Ccf instance.
TapTap value.
CCIDCC ID.
CCCfgComponent carrier (CC) configuration container.
SymmetricSelect symmetric (1) or non-symmetric (0) filter.
NumNumber of coefficients values.
TDataDelayData latency value.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.

References XDfeCcf::SequenceLength, XDfeCcf_GetCarrierCfg(), XDFECCF_NUM_COEFF, XDFECCF_TAP_NUMBER_MAX, XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeCcf_GetTDataDelay().

void XDfeCcf_GetTriggersCfg ( const XDfeCcf InstancePtr,
XDfeCcf_TriggerCfg TriggerCfg 
)
u32 XDfeCcf_GetTUserDelay ( const XDfeCcf InstancePtr)

Reads the delay, which will be added to TUSER and TLAST (delay matched through the IP).

Parameters
InstancePtrPointer to the Ccf instance.
Returns
Delay value
void XDfeCcf_GetVersions ( const XDfeCcf InstancePtr,
XDfeCcf_Version SwVersion,
XDfeCcf_Version HwVersion 
)

This API is used to get the driver version.

Parameters
SwVersionDriver version numbers.
HwVersionHW version numbers.

References XDfeCcf_Version::Major, XDfeCcf_Version::Minor, XDfeCcf_Version::Patch, XDfeCcf_Version::Revision, XDfeCcf::StateId, XDFECCF_DRIVER_VERSION_MAJOR, XDFECCF_DRIVER_VERSION_MINOR, and XDFECCF_STATE_NOT_READY.

Referenced by XDfeCcf_MultiInstancesExample(), and XDfeCcf_PassThroughExample().

void XDfeCcf_Initialize ( XDfeCcf InstancePtr,
XDfeCcf_Init Init 
)
void XDfeCcf_InstanceClose ( XDfeCcf InstancePtr)

Closes the instances of a channel filter driver and moves the state machine to a Not Ready state.

Parameters
InstancePtrPointer to the XDfeCcf instance.

References XDfeCcf::Device, XDfeCcf::NodeName, XDfeCcf::StateId, and XDFECCF_STATE_NOT_READY.

Referenced by XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), XDfeCcf_MultiInstancesExample(), and XDfeCcf_PassThroughExample().

XDfeCcf * XDfeCcf_InstanceInit ( const char *  DeviceNodeName)

Initialises one instance of a channel filter driver.

Traverses "/sys/bus/platform/device" directory (in Linux), to find registered CCF device with the name DeviceNodeName. The first available slot in the instances array XDfeCcf_ChFilter[] will be taken as a DeviceNodeName object. On success it moves the state machine to a Ready state, while on failure stays in a Not Ready state.

Parameters
DeviceNodeNameDevice node name.
Returns
  • Pointer to the instance if successful.
  • NULL on error.

References XDfeCcf::Device, XDfeCcf::NodeName, XDfeCcf::StateId, XDFECCF_NODE_NAME_MAX_LENGTH, XDFECCF_STATE_NOT_READY, XDFECCF_STATE_READY, XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), XDfeCcf_MultiInstancesExample(), and XDfeCcf_PassThroughExample().

void XDfeCcf_LoadCoefficients ( XDfeCcf InstancePtr,
u32  Set,
u32  Shift,
const XDfeCcf_Coefficients Coeffs 
)

Writes the coefficient set defined into the register map and commit them to the hard block's internal coefficient memory for the specified Set.

Parameters
InstancePtrPointer to the Ccf instance.
SetCoefficient set Id.
ShiftCoefficient shift value.
CoeffsArray of filter coefficients.

References XDfeCcf_Coefficients::Num, XDfeCcf_Coefficients::Symmetric, XDfeCcf_Coefficients::Value, and XDFECCF_NUM_COEFF.

Referenced by XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), and XDfeCcf_PassThroughExample().

int XDfeCcf_multiAddCC_1xNR100_3xNR20_Example ( )

This example configures Channel Filter driver for one NR100 carrier and three NR20 whit multiAddCC API and at the end close and release the driver.

The example does the following:

  • initialize driver from reset to activation
  • configure filters with the pre-calculated coefficients
  • Get current configuration.
  • add 4 carriers CCID={0,1,2,3}, 1xNR100(122.88Msps) and 3xNR20(30.72Msps)
  • Trigger configuration update.
  • at this point filters are set and ready to operate
  • close the driver
Returns
  • XST_SUCCESS if the example has completed successfully.
  • XST_FAILURE if the example has failed.//! [testexample3]

References XDfeCcf_Status::CCSequenceError, XDfeCcf_Status::CCUpdate, XDfeCcf_Status::Overflow, XDfeCcf_Activate(), XDfeCcf_AddCCtoCCCfg(), XDfeCcf_ClearEventStatus(), XDfeCcf_Configure(), XDfeCcf_Deactivate(), XDfeCcf_GetCurrentCCCfg(), XDfeCcf_Initialize(), XDfeCcf_InstanceClose(), XDfeCcf_InstanceInit(), XDfeCcf_LoadCoefficients(), XDfeCcf_Reset(), XDfeCcf_SetNextCCCfgAndTrigger(), XDfeCcf_SetTriggersCfg(), XST_FAILURE, and XST_SUCCESS.

Referenced by main().

int XDfeCcf_MultiInstancesExample ( )

This example runs two instances of DFE Channel Filter.

The example does the following tasks:

  • Create and system initialize the device driver instance.
  • Read SW and HW version numbers.
  • Reset the device.
  • Configure the device.
  • Initialize the device.
  • Activate the device.
  • DeActivate the device.
Returns
  • XST_SUCCESS if the example has completed successfully.
  • XST_FAILURE if the example has failed.//! [testexample1]

References XDfeCcf_Version::Major, XDfeCcf_Version::Minor, XDfeCcf_Version::Patch, XDfeCcf_Version::Revision, XDfeCcf_Init::TuserSelect, XDfeCcf_Activate(), XDfeCcf_Configure(), XDfeCcf_Deactivate(), XDfeCcf_GetVersions(), XDfeCcf_Initialize(), XDfeCcf_InstanceClose(), XDfeCcf_InstanceInit(), XDfeCcf_Reset(), XST_FAILURE, and XST_SUCCESS.

Referenced by main().

u32 XDfeCcf_RemoveCC ( XDfeCcf InstancePtr,
s32  CCID 
)

Removes specified CCID.

Initiates CC update (enable CCUpdate trigger TUSER Single Shot).

Parameters
InstancePtrPointer to the Ccf instance.
CCIDCC ID.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.
Note
Clear event status with XDfeCcf_ClearEventStatus() before running this API.
Attention
: This API is deprecated in the release 2023.2. Source code will be removed from in the release 2024.1 release. The functionality of this API can be reproduced with the following API sequence: XDfeCcf_GetCurrentCCCfg(InstancePtr, CCCfg); XDfeCcf_RemoveCCfromCCCfg(InstancePtr, CCCfg, CCID); XDfeCcf_SetNextCCCfgAndTrigger(InstancePtr, CCCfg);

References XDfeCcf_CCCfg::CarrierCfg, XDfeCcf_InternalCarrierCfg::Enable, XDfeCcf_InternalCarrierCfg::MappedId, XDfeCcf_CCCfg::Sequence, XDfeCcf::StateId, XDfeCcf_GetCurrentCCCfg(), XDfeCcf_SetNextCCCfgAndTrigger(), and XDFECCF_STATE_OPERATIONAL.

void XDfeCcf_RemoveCCfromCCCfg ( XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfg,
s32  CCID 
)

Removes specified CCID from a local CC configuration structure.

Parameters
InstancePtrPointer to the Ccf instance.
CCCfgComponent carrier (CC) configuration container.
CCIDChannel ID to be removed, range [0-15].
Note
For a sequence conversion see XDfeCcf_AddCCtoCCCfg comment.

References XDfeCcf_CCCfg::CarrierCfg, XDfeCcf_InternalCarrierCfg::Enable, XDfeCcf_InternalCarrierCfg::MappedId, and XDfeCcf_CCCfg::Sequence.

void XDfeCcf_Reset ( XDfeCcf InstancePtr)

Resets channel filter and puts block into a reset state.

Parameters
InstancePtrPointer to the Ccf instance.

References XDfeCcf::StateId, XDFECCF_STATE_NOT_READY, and XDFECCF_STATE_RESET.

Referenced by XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), XDfeCcf_MultiInstancesExample(), and XDfeCcf_PassThroughExample().

void XDfeCcf_SetAntennaCfgInCCCfg ( const XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfg,
XDfeCcf_AntennaCfg AntennaCfg 
)

Set antenna configuration in CC configuration container.

Parameters
InstancePtrPointer to the Ccf instance.
CCCfgCC configuration container.
AntennaCfgArray of all antenna configurations.

References XDfeCcf_CCCfg::AntennaCfg.

void XDfeCcf_SetInterruptMask ( const XDfeCcf InstancePtr,
const XDfeCcf_InterruptMask Mask 
)

Sets interrupt masks.

Parameters
InstancePtrPointer to the channel filter instance.
MaskInterrupt mask value.
  • 0 - does not mask coresponding interrupt
  • 1 - masks coresponding interrupt

References XDfeCcf_Status::CCSequenceError, XDfeCcf_Status::CCUpdate, and XDfeCcf_Status::Overflow.

u32 XDfeCcf_SetNextCCCfgAndTrigger ( XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfg 
)

Writes local CC configuration to the shadow (NEXT) registers and triggers copying from shadow to operational (CURRENT) registers.

Parameters
InstancePtrPointer to the Ccf instance.
CCCfgCC configuration container.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.

References XDfeCcf_CCSequence::NotUsedCCID, XDfeCcf::NotUsedCCID, XDfeCcf_CCCfg::Sequence, XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeCcf_AddCC(), XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), XDfeCcf_RemoveCC(), XDfeCcf_UpdateAntenna(), XDfeCcf_UpdateAntennaCfg(), and XDfeCcf_UpdateCC().

u32 XDfeCcf_SetNextCCCfgAndTriggerSwitchable ( XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfgDownlink,
XDfeCcf_CCCfg CCCfgUplink 
)

Writes local CC configuration to the shadow (NEXT) registers and triggers copying from shadow to operational (CURRENT) registers for both Downlink and Upling in switchable mode.

Parameters
InstancePtrPointer to the Ccf instance.
CCCfgDownlinkDownlink CC configuration container.
CCCfgUplinkUplink CC configuration container.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.

References XDfeCcf::Config, XDfeCcf_CCSequence::NotUsedCCID, XDfeCcf::NotUsedCCID, XDfeCcf::NotUsedCCID_UL, XDfeCcf_CCCfg::Sequence, XDfeCcf_Config::Switchable, XDfeCcf_SetRegBank(), XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeCcf_UpdateAntennaCfgSwitchable().

void XDfeCcf_SetRegBank ( const XDfeCcf InstancePtr,
u32  RegBank 
)

Sets uplink/downlink register bank.

Parameters
InstancePtrPointer to the Channel Filter instance.
RegBankRegister bank value to be set.

Referenced by XDfeCcf_GetCurrentCCCfgSwitchable(), and XDfeCcf_SetNextCCCfgAndTriggerSwitchable().

void XDfeCcf_SetTriggersCfg ( const XDfeCcf InstancePtr,
XDfeCcf_TriggerCfg TriggerCfg 
)
void XDfeCcf_SetTUserDelay ( const XDfeCcf InstancePtr,
u32  Delay 
)

Sets the delay, which will be added to TUSER and TLAST (delay matched through the IP).

Parameters
InstancePtrPointer to the Ccf instance.
DelayRequested delay variable.

References XDfeCcf::StateId, and XDFECCF_STATE_INITIALISED.

u32 XDfeCcf_UpdateAntenna ( XDfeCcf InstancePtr,
u32  Ant,
bool  Enabled 
)

Updates specified antenna TDM slot enablement.

Initiates CC update (enable CCUpdate trigger one-shot).

Parameters
InstancePtrPointer to the Ccf instance.
AntAntenna ID.
EnabledFlag indicating enable status of the antenna.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.
Note
Clear event status with XDfeCcf_ClearEventStatus() before running this API.

References XDfeCcf_CCCfg::AntennaCfg, XDfeCcf_AntennaCfg::Enable, XDfeCcf::StateId, XDfeCcf_GetCurrentCCCfg(), XDfeCcf_SetNextCCCfgAndTrigger(), and XDFECCF_STATE_OPERATIONAL.

u32 XDfeCcf_UpdateAntennaCfg ( XDfeCcf InstancePtr,
XDfeCcf_AntennaCfg AntennaCfg 
)

Updates antenna configuration to all antennas.

Parameters
InstancePtrPointer to the Ccf instance.
AntennaCfgArray of all antenna configurations.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.
Note
Clear event status with XDfeCcf_ClearEventStatus() before running this API.

References XDfeCcf_CCCfg::AntennaCfg, XDfeCcf_GetCurrentCCCfg(), and XDfeCcf_SetNextCCCfgAndTrigger().

u32 XDfeCcf_UpdateAntennaCfgSwitchable ( XDfeCcf InstancePtr,
XDfeCcf_AntennaCfg AntennaCfgDownlink,
XDfeCcf_AntennaCfg AntennaCfgUplink 
)

Updates antenna configuration of all antennas.

Applies gain to downlink only in switchable mode.

Parameters
InstancePtrPointer to the Ccf instance.
AntennaCfgDownlinkArray of all downlink antenna configurations.
AntennaCfgUplinkArray of all uplink antenna configurations.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.
Note
Clear event status with XDfeCcf_ClearEventStatus() before running this API.

References XDfeCcf_CCCfg::AntennaCfg, XDfeCcf::Config, XDfeCcf_Config::Switchable, XDfeCcf_GetCurrentCCCfgSwitchable(), and XDfeCcf_SetNextCCCfgAndTriggerSwitchable().

u32 XDfeCcf_UpdateCC ( XDfeCcf InstancePtr,
s32  CCID,
const XDfeCcf_CarrierCfg CarrierCfg 
)

Updates specified CCID carrier configuration; change gain or filter coefficients set.

Initiates CC update (enable CCUpdate trigger TUSER Single Shot).

Parameters
InstancePtrPointer to the Ccf instance.
CCIDCC ID.
CarrierCfgCC configuration container.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.
Note
Clear event status with XDfeCcf_ClearEventStatus() before running this API.
Attention
: This API is deprecated in the release 2023.2. Source code will be removed from in the release 2024.1 release. The functionality of this API can be reproduced with the following API sequence: XDfeCcf_GetCurrentCCCfg(InstancePtr, CCCfg); XDfeCcf_UpdateCCinCCCfg(InstancePtr, CCCfg, CCID, CarrierCfg); XDfeCcf_SetNextCCCfgAndTrigger(InstancePtr, CCCfg);

References XDfeCcf_CCCfg::CarrierCfg, XDfeCcf_InternalCarrierCfg::Flush, XDfeCcf_CarrierCfg::Gain, XDfeCcf_InternalCarrierCfg::Gain, XDfeCcf_CarrierCfg::ImagCoeffSet, XDfeCcf_InternalCarrierCfg::ImagCoeffSet, XDfeCcf_CarrierCfg::RealCoeffSet, XDfeCcf_InternalCarrierCfg::RealCoeffSet, XDfeCcf::StateId, XDfeCcf_GetCurrentCCCfg(), XDfeCcf_SetNextCCCfgAndTrigger(), and XDFECCF_STATE_OPERATIONAL.

void XDfeCcf_UpdateCCinCCCfg ( const XDfeCcf InstancePtr,
XDfeCcf_CCCfg CCCfg,
s32  CCID,
const XDfeCcf_CarrierCfg CarrierCfg 
)

Updates specified CCID, with specified configuration to a local CC configuration structure.

If there is insufficient capacity for the new CC the function will return an error.

Parameters
InstancePtrPointer to the Ccf instance.
CCCfgComponent carrier (CC) configuration container.
CCIDChannel ID to be updated, range [0-15].
CarrierCfgCC configuration container.

References XDfeCcf_CCCfg::CarrierCfg, XDfeCcf_InternalCarrierCfg::Flush, XDfeCcf_CarrierCfg::Gain, XDfeCcf_InternalCarrierCfg::Gain, XDfeCcf_CarrierCfg::ImagCoeffSet, XDfeCcf_InternalCarrierCfg::ImagCoeffSet, XDfeCcf_CarrierCfg::RealCoeffSet, and XDfeCcf_InternalCarrierCfg::RealCoeffSet.