dfeofdm
Vitis Drivers API Documentation
Overview

Data Structures

struct  XDfeOfdm_Version
 LogiCORE version. More...
 
struct  XDfeOfdm_Trigger
 Trigger configuration. More...
 
struct  XDfeOfdm_TriggerCfg
 All IP triggers. More...
 
struct  XDfeOfdm_CCSequence
 Defines a CCID sequence. More...
 
struct  XDfeOfdm_FTSequence
 Defines an FT sequence. More...
 
struct  XDfeOfdm_ModelParameters
 OFDM model parameters structure. More...
 
struct  XDfeOfdm_Cfg
 Configuration. More...
 
struct  XDfeOfdm_Init
 Initialization, "one-time" configuration parameters. More...
 
struct  XDfeOfdm_CarrierCfg
 Configuration for a single CC. More...
 
struct  XDfeOfdm_InternalCarrierCfg
 Internal configuration for a single CC. More...
 
struct  XDfeOfdm_CCCfg
 Full CC configuration. More...
 
struct  XDfeOfdm_Status
 OFDM Status. More...
 
struct  XDfeOfdm_InterruptMask
 Interrupt mask. More...
 
struct  XDfeOfdm_Config
 OFDM Configuration structure. More...
 
struct  XDfeOfdm
 OFDM Structure. More...
 

Macros

#define XDFEOFDM_DRIVER_VERSION_MINOR   (3U)
 Minor version number of driver. More...
 
#define XDFEOFDM_DRIVER_VERSION_MAJOR   (1U)
 Major version number of driver. More...
 
#define XDFEOFDM_PHASE_COMPENSATION_REG_STEP   8U
 Address space step between space for phase compensation on one carrier. More...
 
#define XDFEOFDM_FREQUENCY_RANGE_1   0U
 [15, 30, 60] kHz (default) More...
 
#define XDFEOFDM_FREQUENCY_RANGE_2   1U
 [60, 120, 240, 480, 960] kHz More...
 
#define XDFEOFDM_MAX_NUM_INSTANCES   (10U)
 Maximum number of driver instances running at the same time. More...
 
#define XDFEOFDM_INSTANCE_EXISTS(X)   (X < XDFEOFDM_MAX_NUM_INSTANCES)
 Number of instances that exist at any given time. More...
 
#define XST_SUCCESS   (0U)
 Success flag. More...
 
#define XST_FAILURE   (1U)
 Failure flag. More...
 
#define XDFEOFDM_NODE_NAME_MAX_LENGTH   (50U)
 Node name maximum length. More...
 
#define XDFEOFDM_CC_NUM   (16)
 Maximum CC sequence number. More...
 
#define XDFEOFDM_FT_NUM   (16)
 Maximum FT sequence number. More...
 
#define XDFEOFDM_CC_SEQ_LENGTH_MAX   (16U)
 Maximum sequence length. More...
 
#define XDFEOFDM_FT_SEQ_LENGTH_MAX   (16U)
 Maximum Fourier transform sequence length. More...
 
#define XDFEOFDM_PHASE_COMPENSATION_MAX   (112U)
 Maximum phase compensation weight. More...
 
#define XDFEOFDM_COMPATIBLE_STRING   "xlnx,xdfe-ofdm-2.2"
 Device name property. More...
 
#define XDFEOFDM_COMPATIBLE_STRING_2_1   "xlnx,xdfe-ofdm-2.1"
 Device name property. More...
 
#define XDFEOFDM_PLATFORM_DEVICE_DIR   "/sys/bus/platform/devices/"
 Device location in a file system. More...
 
#define XDFEOFDM_COMPATIBLE_PROPERTY   "compatible"
 Device tree property. More...
 
#define XDFEOFDM_BUS_NAME   "platform"
 System bus name. More...
 
#define XDFEOFDM_BASEADDR_PROPERTY   "reg"
 Base address property. More...
 
#define XDFEOFDM_BASEADDR_SIZE   8U
 Base address bit-size. More...
 

Enumerations

enum  XDfeOfdm_StateId {
  XDFEOFDM_STATE_NOT_READY = 0, XDFEOFDM_STATE_READY, XDFEOFDM_STATE_RESET, XDFEOFDM_STATE_CONFIGURED,
  XDFEOFDM_STATE_INITIALISED, XDFEOFDM_STATE_OPERATIONAL
}
 

Functions

XDfeOfdmXDfeOfdm_InstanceInit (const char *DeviceNodeName)
 Initializes one instance of the OFDM driver and traverses the "/sys/bus/platform/device" directory (in Linux) to find the registered OFDM device with the name DeviceNodeName. More...
 
void XDfeOfdm_InstanceClose (XDfeOfdm *InstancePtr)
 Closes the instances of the OFDM driver and moves the state machine to a Not Ready state. More...
 
void XDfeOfdm_Reset (XDfeOfdm *InstancePtr)
 Resets the OFDM instance and puts block into a reset state. More...
 
void XDfeOfdm_Configure (XDfeOfdm *InstancePtr, XDfeOfdm_Cfg *Cfg)
 Reads configuration from device tree/xparameters.h and IP registers. More...
 
void XDfeOfdm_Initialize (XDfeOfdm *InstancePtr, XDfeOfdm_Init *Init)
 Initializes the OFDM driver and moves the state machine to an initialized state. More...
 
void XDfeOfdm_Activate (XDfeOfdm *InstancePtr, bool EnableLowPower)
 Activates OFDM and moves the state machine to an activated state. More...
 
void XDfeOfdm_Deactivate (XDfeOfdm *InstancePtr)
 Deactivates OFDM and moves the state machine to an initialised state. More...
 
XDfeOfdm_StateId XDfeOfdm_GetStateID (XDfeOfdm *InstancePtr)
 Gets a state machine state ID. More...
 
void XDfeOfdm_GetCurrentCCCfg (const XDfeOfdm *InstancePtr, XDfeOfdm_CCCfg *CurrCCCfg)
 Returns the current CC configuration. More...
 
void XDfeOfdm_GetEmptyCCCfg (const XDfeOfdm *InstancePtr, XDfeOfdm_CCCfg *CCCfg)
 Returns configuration structure CCCfg with CCCfg->CCSequence.Length value set in XDfeOfdm_Configure(), array CCCfg->CCSequence.CCID[] members are set to not used value (-1) and the other CCCfg members are set to 0. More...
 
u32 XDfeOfdm_AddCCtoCCCfg (XDfeOfdm *InstancePtr, XDfeOfdm_CCCfg *CCCfg, s32 CCID, u32 CCSeqBitmap, const XDfeOfdm_CarrierCfg *CarrierCfg, XDfeOfdm_FTSequence *FTSeq)
 Adds specified CCID, with specified configuration, to a local CC configuration structure. More...
 
void XDfeOfdm_GetCarrierCfg (const XDfeOfdm *InstancePtr, XDfeOfdm_CCCfg *CCCfg, s32 CCID, u32 *CCSeqBitmap, XDfeOfdm_CarrierCfg *CarrierCfg)
 Returns the current CCID carrier configuration. More...
 
u32 XDfeOfdm_RemoveCCfromCCCfg (XDfeOfdm *InstancePtr, XDfeOfdm_CCCfg *CCCfg, s32 CCID, XDfeOfdm_FTSequence *FTSeq)
 Removes specified CCID from a local CC configuration structure. More...
 
u32 XDfeOfdm_UpdateCCinCCCfg (XDfeOfdm *InstancePtr, XDfeOfdm_CCCfg *CCCfg, s32 CCID, const XDfeOfdm_CarrierCfg *CarrierCfg, XDfeOfdm_FTSequence *FTSeq)
 Updates a specified CCID with the specified configuration to a local CC configuration structure. More...
 
void XDfeOfdm_SetNextCCCfg (const XDfeOfdm *InstancePtr, const XDfeOfdm_CCCfg *NextCCCfg)
 Sets the next CC configuration. More...
 
u32 XDfeOfdm_EnableCCUpdateTrigger (const XDfeOfdm *InstancePtr)
 Reads the triggers and sets the enable bit of Update trigger. More...
 
u32 XDfeOfdm_SetNextCCCfgAndTrigger (const XDfeOfdm *InstancePtr, XDfeOfdm_CCCfg *CCCfg)
 Writes local CC configuration to the shadow (NEXT) registers and triggers copying from shadow to operational registers. More...
 
void XDfeOfdm_GetTriggersCfg (const XDfeOfdm *InstancePtr, XDfeOfdm_TriggerCfg *TriggerCfg)
 Returns the current trigger configuration. More...
 
void XDfeOfdm_SetTriggersCfg (const XDfeOfdm *InstancePtr, XDfeOfdm_TriggerCfg *TriggerCfg)
 Sets the trigger configuration. More...
 
void XDfeOfdm_SetTuserOutFrameLocation (const XDfeOfdm *InstancePtr, u32 TuserOutFrameLocation)
 Sets the TUSER Framing bit location register where bit location indicates which bit to be used for sending the framing information on DL_DOUT IF and M_AXIS_TBASE IF. More...
 
u32 XDfeOfdm_GetTuserOutFrameLocation (const XDfeOfdm *InstancePtr)
 Gets the TUSER Framing bit location register where bit location indicates which bit to be used for sending framing information on DL_DOUT IF and M_AXIS_TBASE IF. More...
 
void XDfeOfdm_SetTuserCCUpdateTrigger (const XDfeOfdm *InstancePtr, u32 TuserCCUpdateTrigger)
 Sets the TUSER CC Update trigger where bit location would indicate which bit to be used for sending cc update triggering on TUSER (DL_DOUT IF and M_AXIS_TBASE IF). More...
 
u32 XDfeOfdm_GetTuserCCUpdateTrigger (const XDfeOfdm *InstancePtr)
 Gets the TUSER CC Update trigger. More...
 
void XDfeOfdm_SetTUserDelay (const XDfeOfdm *InstancePtr, u32 Delay)
 Sets the delay to be added to TUSER and TLAST (delay matched through the IP). More...
 
u32 XDfeOfdm_GetTUserDelay (const XDfeOfdm *InstancePtr)
 Reads the delay, which will be added to TUSER and TLAST (delay matched through the IP). More...
 
u32 XDfeOfdm_GetDataLatency (const XDfeOfdm *InstancePtr)
 Returns data latency. More...
 
void XDfeOfdm_GetVersions (const XDfeOfdm *InstancePtr, XDfeOfdm_Version *SwVersion, XDfeOfdm_Version *HwVersion)
 Gets the driver version. More...
 
void XDfeOfdm_GetEventStatus (const XDfeOfdm *InstancePtr, XDfeOfdm_Status *Status)
 Gets event status. More...
 
void XDfeOfdm_ClearEventStatus (const XDfeOfdm *InstancePtr, const XDfeOfdm_Status *Status)
 Clears the event status. More...
 
void XDfeOfdm_SetInterruptMask (const XDfeOfdm *InstancePtr, const XDfeOfdm_InterruptMask *Mask)
 Sets interrupt masks. More...
 
void XDfeOfdm_GetInterruptMask (const XDfeOfdm *InstancePtr, XDfeOfdm_InterruptMask *Mask)
 Gets interrupt masks. More...
 
int XDfeOfdm_AddCCExample ()
 This function runs the DFE OFDM device using the driver APIs. More...
 
int XDfeOfdm_MultiAddCCExample ()
 This function runs the DFE OFDM device using the driver APIs. More...
 

Macro Definition Documentation

#define XDFEOFDM_BASEADDR_PROPERTY   "reg"

Base address property.

#define XDFEOFDM_BASEADDR_SIZE   8U

Base address bit-size.

#define XDFEOFDM_BUS_NAME   "platform"

System bus name.

#define XDFEOFDM_CC_NUM   (16)

Maximum CC sequence number.

Referenced by XDfeOfdm_GetCurrentCCCfg(), XDfeOfdm_GetEmptyCCCfg(), and XDfeOfdm_SetNextCCCfg().

#define XDFEOFDM_CC_SEQ_LENGTH_MAX   (16U)

Maximum sequence length.

Referenced by XDfeOfdm_SetNextCCCfg().

#define XDFEOFDM_COMPATIBLE_PROPERTY   "compatible"

Device tree property.

#define XDFEOFDM_COMPATIBLE_STRING   "xlnx,xdfe-ofdm-2.2"

Device name property.

#define XDFEOFDM_COMPATIBLE_STRING_2_1   "xlnx,xdfe-ofdm-2.1"

Device name property.

#define XDFEOFDM_DRIVER_VERSION_MAJOR   (1U)

Major version number of driver.

Referenced by XDfeOfdm_GetVersions().

#define XDFEOFDM_DRIVER_VERSION_MINOR   (3U)

Minor version number of driver.

Referenced by XDfeOfdm_GetVersions().

#define XDFEOFDM_FREQUENCY_RANGE_1   0U

[15, 30, 60] kHz (default)

#define XDFEOFDM_FREQUENCY_RANGE_2   1U

[60, 120, 240, 480, 960] kHz

#define XDFEOFDM_FT_NUM   (16)

Maximum FT sequence number.

Referenced by XDfeOfdm_SetNextCCCfg().

#define XDFEOFDM_FT_SEQ_LENGTH_MAX   (16U)

Maximum Fourier transform sequence length.

#define XDFEOFDM_INSTANCE_EXISTS (   X)    (X < XDFEOFDM_MAX_NUM_INSTANCES)

Number of instances that exist at any given time.

Referenced by XDfeOfdm_InstanceClose(), and XDfeOfdm_InstanceInit().

#define XDFEOFDM_MAX_NUM_INSTANCES   (10U)

Maximum number of driver instances running at the same time.

#define XDFEOFDM_NODE_NAME_MAX_LENGTH   (50U)

Node name maximum length.

Referenced by XDfeOfdm_InstanceInit().

#define XDFEOFDM_PHASE_COMPENSATION_MAX   (112U)

Maximum phase compensation weight.

Referenced by XDfeOfdm_AddCCtoCCCfg(), and XDfeOfdm_UpdateCCinCCCfg().

#define XDFEOFDM_PHASE_COMPENSATION_REG_STEP   8U

Address space step between space for phase compensation on one carrier.

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

Device location in a file system.

Enumeration Type Documentation

Enumerator
XDFEOFDM_STATE_NOT_READY 

Not ready state.

XDFEOFDM_STATE_READY 

Ready state.

XDFEOFDM_STATE_RESET 

Reset state.

XDFEOFDM_STATE_CONFIGURED 

Configured state.

XDFEOFDM_STATE_INITIALISED 

Initialized state.

XDFEOFDM_STATE_OPERATIONAL 

Operational state.

Function Documentation

void XDfeOfdm_Activate ( XDfeOfdm InstancePtr,
bool  EnableLowPower 
)

Activates OFDM and moves the state machine to an activated state.

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

References XDfeOfdm::StateId, XDFEOFDM_STATE_INITIALISED, and XDFEOFDM_STATE_OPERATIONAL.

Referenced by XDfeOfdm_AddCCExample(), and XDfeOfdm_MultiAddCCExample().

int XDfeOfdm_AddCCExample ( )

This function runs the DFE OFDM device using the driver APIs.

This function 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.
  • Set the triggers
  • Activate the device.
  • Add CC.
  • DeActivate the device.
Returns
  • XST_SUCCESS if the example has completed successfully.
  • XST_FAILURE if the example has failed.//! [testexample1]

References XDfeOfdm_TriggerCfg::Activate, XDfeOfdm_ModelParameters::AntennaInterleave, XDfeOfdm_Config::AntennaInterleave, XDfeOfdm_Config::BaseAddr, XDfeOfdm_Init::CCSequenceLength, XDfeOfdm_TriggerCfg::CCUpdate, XDfeOfdm_Status::CCUpdate, XDfeOfdm_CarrierCfg::CommsStandard, XDfeOfdm::Config, XDfeOfdm_CarrierCfg::FftSize, XDfeOfdm_Status::FTCCSequenceError, XDfeOfdm_FTSequence::Length, XDfeOfdm_Version::Major, XDfeOfdm_Version::Minor, XDfeOfdm_Trigger::Mode, XDfeOfdm_Cfg::ModelParams, XDfeOfdm::NodeName, XDfeOfdm_ModelParameters::NumAntenna, XDfeOfdm_Config::NumAntenna, XDfeOfdm_CarrierCfg::Numerology, XDfeOfdm_CarrierCfg::NumSubcarriers, XDfeOfdm_CarrierCfg::OutputDelay, XDfeOfdm_Version::Patch, XDfeOfdm_Version::Revision, XDfeOfdm_Status::Saturation, XDfeOfdm_Status::SaturationCCID, XDfeOfdm_Status::SaturationCount, XDfeOfdm_CarrierCfg::ScaleFactor, XDfeOfdm_Trigger::TUSERBit, XDfeOfdm_Trigger::TuserEdgeLevel, XDfeOfdm_Cfg::Version, XDfeOfdm_Activate(), XDfeOfdm_ClearEventStatus(), XDfeOfdm_Configure(), XDfeOfdm_Deactivate(), XDfeOfdm_GetVersions(), XDfeOfdm_Initialize(), XDfeOfdm_InstanceClose(), XDfeOfdm_InstanceInit(), XDfeOfdm_Reset(), XDfeOfdm_SetTriggersCfg(), XST_FAILURE, and XST_SUCCESS.

Referenced by main().

u32 XDfeOfdm_AddCCtoCCCfg ( XDfeOfdm InstancePtr,
XDfeOfdm_CCCfg CCCfg,
s32  CCID,
u32  CCSeqBitmap,
const XDfeOfdm_CarrierCfg CarrierCfg,
XDfeOfdm_FTSequence FTSeq 
)

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.CCSequence 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 OFDM instance.
CCCfgComponent carrier (CC) configuration container.
CCIDCC ID.
CCSeqBitmapCC slot position container.
CarrierCfgCC configuration container.
FTSeqFourier transform sequence container.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.

References XDfeOfdm_CCCfg::CarrierCfg, XDfeOfdm_CCCfg::CCSequence, XDfeOfdm_CarrierCfg::CommsStandard, XDfeOfdm_InternalCarrierCfg::CommsStandard, XDfeOfdm_InternalCarrierCfg::Enable, XDfeOfdm_CarrierCfg::FftSize, XDfeOfdm_InternalCarrierCfg::FftSize, XDfeOfdm_FTSequence::Length, XDfeOfdm_CarrierCfg::Numerology, XDfeOfdm_InternalCarrierCfg::Numerology, XDfeOfdm_CarrierCfg::NumSubcarriers, XDfeOfdm_InternalCarrierCfg::NumSubcarriers, XDfeOfdm_CarrierCfg::OutputDelay, XDfeOfdm_CarrierCfg::PhaseCompensation, XDfeOfdm_InternalCarrierCfg::PhaseCompensation, XDfeOfdm_CarrierCfg::ScaleFactor, XDfeOfdm_InternalCarrierCfg::ScaleFactor, XDFEOFDM_PHASE_COMPENSATION_MAX, XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeOfdm_MultiAddCCExample().

void XDfeOfdm_ClearEventStatus ( const XDfeOfdm InstancePtr,
const XDfeOfdm_Status Status 
)

Clears the event status.

Parameters
InstancePtrPointer to the OFDM instance.
StatusClear event status container.
  • 0 - Does not clear the corresponding event status
  • 1 - Clears the corresponding event status

References XDfeOfdm_Status::CCUpdate, XDfeOfdm_Status::FTCCSequenceError, XDfeOfdm_Status::Overflow, and XDfeOfdm_Status::Saturation.

Referenced by XDfeOfdm_AddCCExample(), and XDfeOfdm_MultiAddCCExample().

void XDfeOfdm_Deactivate ( XDfeOfdm InstancePtr)

Deactivates OFDM and moves the state machine to an initialised state.

Parameters
InstancePtrPointer to the OFDM instance.

References XDfeOfdm::StateId, XDFEOFDM_STATE_INITIALISED, and XDFEOFDM_STATE_OPERATIONAL.

Referenced by XDfeOfdm_AddCCExample(), and XDfeOfdm_MultiAddCCExample().

u32 XDfeOfdm_EnableCCUpdateTrigger ( const XDfeOfdm InstancePtr)

Reads the triggers and sets the enable bit of Update trigger.

If Mode = IMMEDIATE, the trigger will be applied immediately.

Parameters
InstancePtrPointer to the OFDM instance.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.

References XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeOfdm_SetNextCCCfgAndTrigger().

void XDfeOfdm_GetCarrierCfg ( const XDfeOfdm InstancePtr,
XDfeOfdm_CCCfg CCCfg,
s32  CCID,
u32 *  CCSeqBitmap,
XDfeOfdm_CarrierCfg CarrierCfg 
)
void XDfeOfdm_GetCurrentCCCfg ( const XDfeOfdm InstancePtr,
XDfeOfdm_CCCfg CurrCCCfg 
)

Returns the current CC configuration.

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

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

References XDfeOfdm_CCCfg::CarrierCfg, XDfeOfdm_CCSequence::CCID, XDfeOfdm_FTSequence::CCID, XDfeOfdm_CCCfg::CCSequence, XDfeOfdm::CCSequenceLength, XDfeOfdm_CCCfg::FTSequence, XDfeOfdm_CCSequence::Length, XDfeOfdm_FTSequence::Length, XDfeOfdm::NotUsedCCID, and XDFEOFDM_CC_NUM.

Referenced by XDfeOfdm_MultiAddCCExample().

u32 XDfeOfdm_GetDataLatency ( const XDfeOfdm InstancePtr)

Returns data latency.

Parameters
InstancePtrPointer to the OFDM instance.
Returns
Returned data latency.
void XDfeOfdm_GetEmptyCCCfg ( const XDfeOfdm InstancePtr,
XDfeOfdm_CCCfg CCCfg 
)

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

Parameters
InstancePtrPointer to the OFDM instance.
CCCfgCC configuration container.

References XDfeOfdm_CCSequence::CCID, XDfeOfdm_FTSequence::CCID, XDfeOfdm_CCCfg::CCSequence, XDfeOfdm::CCSequenceLength, XDfeOfdm_CCCfg::FTSequence, XDfeOfdm_CCSequence::Length, XDfeOfdm_FTSequence::Length, and XDFEOFDM_CC_NUM.

void XDfeOfdm_GetEventStatus ( const XDfeOfdm InstancePtr,
XDfeOfdm_Status Status 
)

Gets event status.

Parameters
InstancePtrPointer to the OFDM instance.
StatusPointer to a returned event status.

References XDfeOfdm_Status::CCUpdate, XDfeOfdm_Status::FTCCSequenceError, XDfeOfdm_Status::Overflow, XDfeOfdm_Status::Saturation, XDfeOfdm_Status::SaturationCCID, and XDfeOfdm_Status::SaturationCount.

void XDfeOfdm_GetInterruptMask ( const XDfeOfdm InstancePtr,
XDfeOfdm_InterruptMask Mask 
)

Gets interrupt masks.

Parameters
InstancePtrPointer to the OFDM instance.
MaskInterrupt mask value.

References XDfeOfdm_InterruptMask::CCUpdate, XDfeOfdm_InterruptMask::FTCCSequenceError, XDfeOfdm_InterruptMask::Overflow, and XDfeOfdm_InterruptMask::Saturation.

XDfeOfdm_StateId XDfeOfdm_GetStateID ( XDfeOfdm InstancePtr)

Gets a state machine state ID.

Parameters
InstancePtrPointer to the OFDM instance.
Returns
State machine StateID

References XDfeOfdm::StateId.

void XDfeOfdm_GetTriggersCfg ( const XDfeOfdm InstancePtr,
XDfeOfdm_TriggerCfg TriggerCfg 
)
u32 XDfeOfdm_GetTuserCCUpdateTrigger ( const XDfeOfdm InstancePtr)

Gets the TUSER CC Update trigger.

Parameters
InstancePtrPointer to the OFDM instance.
Returns
TUSER CC Update trigger
u32 XDfeOfdm_GetTUserDelay ( const XDfeOfdm InstancePtr)

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

Parameters
InstancePtrPointer to the OFDM instance.
Returns
Delay value
u32 XDfeOfdm_GetTuserOutFrameLocation ( const XDfeOfdm InstancePtr)

Gets the TUSER Framing bit location register where bit location indicates which bit to be used for sending framing information on DL_DOUT IF and M_AXIS_TBASE IF.

TUSER bit width is fixed to its default value of 8. Therefore, legal values of FRAME_BIT are 0 to 7.

Parameters
InstancePtrPointer to the OFDM instance.
Returns
TUSER OutFrame Location
void XDfeOfdm_GetVersions ( const XDfeOfdm InstancePtr,
XDfeOfdm_Version SwVersion,
XDfeOfdm_Version HwVersion 
)
void XDfeOfdm_Initialize ( XDfeOfdm InstancePtr,
XDfeOfdm_Init Init 
)

Initializes the OFDM driver and moves the state machine to an initialized state.

Parameters
InstancePtrPointer to the OFDM instance.
InitInitialization data container.

References XDfeOfdm_Init::CCSequenceLength, XDfeOfdm::CCSequenceLength, XDfeOfdm::NotUsedCCID, XDfeOfdm::StateId, XDFEOFDM_STATE_CONFIGURED, and XDFEOFDM_STATE_INITIALISED.

Referenced by XDfeOfdm_AddCCExample(), and XDfeOfdm_MultiAddCCExample().

void XDfeOfdm_InstanceClose ( XDfeOfdm InstancePtr)

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

Parameters
InstancePtrPointer to the OFDM instance.

References XDfeOfdm::Device, XDfeOfdm::NodeName, XDfeOfdm::StateId, XDFEOFDM_INSTANCE_EXISTS, and XDFEOFDM_STATE_NOT_READY.

Referenced by XDfeOfdm_AddCCExample(), and XDfeOfdm_MultiAddCCExample().

XDfeOfdm * XDfeOfdm_InstanceInit ( const char *  DeviceNodeName)

Initializes one instance of the OFDM driver and traverses the "/sys/bus/platform/device" directory (in Linux) to find the registered OFDM device with the name DeviceNodeName.

The first available slot in the instances array XDfeOfdm_Ofdm[] will be taken as a DeviceNodeName object. On success, it moves the state machine to a Ready state, while on failure, it stays in a Not Ready state.

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

References XDfeOfdm::Device, XDfeOfdm::NodeName, XDfeOfdm::StateId, XDFEOFDM_INSTANCE_EXISTS, XDFEOFDM_NODE_NAME_MAX_LENGTH, XDFEOFDM_STATE_NOT_READY, XDFEOFDM_STATE_READY, XST_FAILURE, and XST_SUCCESS.

Referenced by XDfeOfdm_AddCCExample(), and XDfeOfdm_MultiAddCCExample().

int XDfeOfdm_MultiAddCCExample ( )

This function runs the DFE OFDM device using the driver APIs.

This function 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.
  • Set the triggers
  • Activate the device.
  • Add CC.
  • Deactivate the device.
Returns
  • XST_SUCCESS if the example has completed successfully.
  • XST_FAILURE if the example has failed.//! [testexample2]

References XDfeOfdm_TriggerCfg::Activate, XDfeOfdm_ModelParameters::AntennaInterleave, XDfeOfdm_Config::AntennaInterleave, XDfeOfdm_Config::BaseAddr, XDfeOfdm_Init::CCSequenceLength, XDfeOfdm_TriggerCfg::CCUpdate, XDfeOfdm_Status::CCUpdate, XDfeOfdm_CarrierCfg::CommsStandard, XDfeOfdm::Config, XDfeOfdm_CarrierCfg::FftSize, XDfeOfdm_Status::FTCCSequenceError, XDfeOfdm_FTSequence::Length, XDfeOfdm_Version::Major, XDfeOfdm_Version::Minor, XDfeOfdm_Trigger::Mode, XDfeOfdm_Cfg::ModelParams, XDfeOfdm::NodeName, XDfeOfdm_ModelParameters::NumAntenna, XDfeOfdm_Config::NumAntenna, XDfeOfdm_CarrierCfg::Numerology, XDfeOfdm_CarrierCfg::NumSubcarriers, XDfeOfdm_CarrierCfg::OutputDelay, XDfeOfdm_Version::Patch, XDfeOfdm_Version::Revision, XDfeOfdm_Status::Saturation, XDfeOfdm_Status::SaturationCCID, XDfeOfdm_Status::SaturationCount, XDfeOfdm_CarrierCfg::ScaleFactor, XDfeOfdm_Trigger::TUSERBit, XDfeOfdm_Trigger::TuserEdgeLevel, XDfeOfdm_Cfg::Version, XDfeOfdm_Activate(), XDfeOfdm_AddCCtoCCCfg(), XDfeOfdm_ClearEventStatus(), XDfeOfdm_Configure(), XDfeOfdm_Deactivate(), XDfeOfdm_GetCurrentCCCfg(), XDfeOfdm_GetVersions(), XDfeOfdm_Initialize(), XDfeOfdm_InstanceClose(), XDfeOfdm_InstanceInit(), XDfeOfdm_Reset(), XDfeOfdm_SetNextCCCfgAndTrigger(), XDfeOfdm_SetTriggersCfg(), XST_FAILURE, and XST_SUCCESS.

Referenced by main().

u32 XDfeOfdm_RemoveCCfromCCCfg ( XDfeOfdm InstancePtr,
XDfeOfdm_CCCfg CCCfg,
s32  CCID,
XDfeOfdm_FTSequence FTSeq 
)

Removes specified CCID from a local CC configuration structure.

Parameters
InstancePtrPointer to the OFDM instance.
CCCfgComponent carrier (CC) configuration container.
CCIDCC ID.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.
Note
For a sequence conversion see XDfeOfdm_AddCCtoCCCfg comment.

References XDfeOfdm_CCCfg::CarrierCfg, XDfeOfdm_CCCfg::CCSequence, XDfeOfdm_InternalCarrierCfg::Enable, XDfeOfdm_FTSequence::Length, XST_FAILURE, and XST_SUCCESS.

void XDfeOfdm_Reset ( XDfeOfdm InstancePtr)

Resets the OFDM instance and puts block into a reset state.

Parameters
InstancePtrPointer to the OFDM instance.

References XDfeOfdm::StateId, XDFEOFDM_STATE_NOT_READY, and XDFEOFDM_STATE_RESET.

Referenced by XDfeOfdm_AddCCExample(), and XDfeOfdm_MultiAddCCExample().

void XDfeOfdm_SetInterruptMask ( const XDfeOfdm InstancePtr,
const XDfeOfdm_InterruptMask Mask 
)

Sets interrupt masks.

Parameters
InstancePtrPointer to the OFDM instance.
MaskInterrupt mask value.
  • 0 - Does not mask the corresponding interrupt
  • 1 - Masks the corresponding interrupt

References XDfeOfdm_InterruptMask::CCUpdate, XDfeOfdm_InterruptMask::FTCCSequenceError, XDfeOfdm_InterruptMask::Overflow, and XDfeOfdm_InterruptMask::Saturation.

u32 XDfeOfdm_SetNextCCCfgAndTrigger ( const XDfeOfdm InstancePtr,
XDfeOfdm_CCCfg CCCfg 
)

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

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

References XDfeOfdm_EnableCCUpdateTrigger(), and XDfeOfdm_SetNextCCCfg().

Referenced by XDfeOfdm_MultiAddCCExample().

void XDfeOfdm_SetTriggersCfg ( const XDfeOfdm InstancePtr,
XDfeOfdm_TriggerCfg TriggerCfg 
)
void XDfeOfdm_SetTuserCCUpdateTrigger ( const XDfeOfdm InstancePtr,
u32  TuserCCUpdateTrigger 
)

Sets the TUSER CC Update trigger where bit location would indicate which bit to be used for sending cc update triggering on TUSER (DL_DOUT IF and M_AXIS_TBASE IF).

TUSER bit width is fixed to its default value of 8. Therefore, legal values of FRAME_BIT are 0 to 7.

Parameters
InstancePtrPointer to the OFDM instance.
TuserCCUpdateTriggerRequested TUSER CC update trigger.

References XDfeOfdm::StateId, and XDFEOFDM_STATE_OPERATIONAL.

void XDfeOfdm_SetTUserDelay ( const XDfeOfdm InstancePtr,
u32  Delay 
)

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

Parameters
InstancePtrPointer to the OFDM instance.
DelayRequested delay variable.

References XDfeOfdm::StateId, and XDFEOFDM_STATE_INITIALISED.

void XDfeOfdm_SetTuserOutFrameLocation ( const XDfeOfdm InstancePtr,
u32  TuserOutFrameLocation 
)

Sets the TUSER Framing bit location register where bit location indicates which bit to be used for sending the framing information on DL_DOUT IF and M_AXIS_TBASE IF.

TUSER bit width is fixed to its default value of 8. Therefore, legal values of FRAME_BIT are 0 to 7.

Parameters
InstancePtrPointer to the OFDM instance.
TuserOutFrameLocationRequested TUSER OutFrame location.

References XDfeOfdm::StateId, and XDFEOFDM_STATE_OPERATIONAL.

u32 XDfeOfdm_UpdateCCinCCCfg ( XDfeOfdm InstancePtr,
XDfeOfdm_CCCfg CCCfg,
s32  CCID,
const XDfeOfdm_CarrierCfg CarrierCfg,
XDfeOfdm_FTSequence FTSeq 
)

Updates a specified CCID with the 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 OFDM instance.
CCCfgComponent carrier (CC) configuration container.
CCIDCC ID.
CarrierCfgCC configuration container.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if error occurs.

References XDfeOfdm_CCCfg::CarrierCfg, XDfeOfdm_CarrierCfg::CommsStandard, XDfeOfdm_InternalCarrierCfg::CommsStandard, XDfeOfdm_CarrierCfg::FftSize, XDfeOfdm_InternalCarrierCfg::FftSize, XDfeOfdm_FTSequence::Length, XDfeOfdm_CarrierCfg::Numerology, XDfeOfdm_InternalCarrierCfg::Numerology, XDfeOfdm_CarrierCfg::NumSubcarriers, XDfeOfdm_InternalCarrierCfg::NumSubcarriers, XDfeOfdm_CarrierCfg::OutputDelay, XDfeOfdm_CarrierCfg::PhaseCompensation, XDfeOfdm_InternalCarrierCfg::PhaseCompensation, XDfeOfdm_CarrierCfg::ScaleFactor, XDfeOfdm_InternalCarrierCfg::ScaleFactor, XDFEOFDM_PHASE_COMPENSATION_MAX, XST_FAILURE, and XST_SUCCESS.