| dfeprach Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Macros | Functions
xdfeprach.c File Reference

## Overview

Contains the APIs for DFE Prach component.

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.0   dc     03/08/21 Initial version
          dc     04/06/21 Register with full node name
          dc     04/07/21 Fix bare metal initialisation
          dc     04/10/21 Set sequence length only once
          dc     04/18/21 Update trigger and event handlers
          dc     04/21/21 Update due to restructured registers
          dc     05/08/21 Update to common trigger
          dc     05/18/21 Handling RachUpdate trigger
    1.1   dc     06/30/21 Doxygen documentation update
          dc     07/13/21 Update to common latency requirements
          dc     07/21/21 Add and reorganise examples
          dc     10/26/21 Make driver R5 compatible
    1.2   dc     10/29/21 Update doxygen comments
          dc     11/01/21 Add multi AddCC, RemoveCC and UpdateCC
          dc     11/05/21 Align event handlers
          dc     11/19/21 Update doxygen documentation
          dc     11/26/21 Model parameter NumCCPerAntenna workaround
          dc     11/26/21 Set sequence length in GetEmptyCCCfg
          dc     11/26/21 Add SetAntennaCfgInCCCfg API
          dc     11/26/21 Assert RachChan equal RCId
          dc     12/17/21 Update after documentation review
    1.3   dc     01/11/22 Compilation warrning fix
          dc     01/19/22 Assert RachUpdate trigger
          dc     01/31/22 Add CORE_SETTINGS register
          dc     02/17/22 Physical channel index RACH config array
          dc     03/21/22 Add prefix to global variables
    1.4   dc     04/04/22 Correct PatternPeriod represantion
          dc     04/06/22 Update documentation
    1.5   dc     12/14/22 Update multiband register arithmetic
          dc     01/02/23 Multiband registers update
    1.6   dc     05/08/23 Set NCO config for RCId=0 fix
          dc     05/09/23 Dual and single mode calculation fix
          dc     08/06/23 Support dynamic and static modes of operation
          dc     06/20/23 Deprecate obsolete APIs
          cog    07/04/23 Add support for SDT
          dc     30/28/23 Remove immediate trigger
    1.7   dc     11/29/23 Add continuous scheduling
          dc     01/19/24 Correct memset destination address
          dc     03/22/24 Correct order of RACH mapping steps

## Macros
#define | XDFEPRACH_DRIVER_VERSION_MINOR (7U)
| Driver's minor version number. More...
#define | XDFEPRACH_DRIVER_VERSION_MAJOR (1U)
| Driver's major version number. More...
#define | XDFEPRACH_PHASE_INCREMENT_PER_HZ
| 30720000 is the base sample rate More...
#define | XDFEPRACH_ERROR_MARGIN (0.01)
| Error margin in frequncy calculation. More...
#define | XDFEPRACH_FREQ_MIN (-(1 << 23))
| Minimum frequency value. More...
#define | XDFEPRACH_FREQ_MAX (1 << 23)
| Maximum frequency value. More...
#define | XDFEPRACH_MAX_CCRATE (3)
| CCRate maxixmum value. More...

## Functions
XDfePrach * | XDfePrach_InstanceInit (const char *DeviceNodeName)
| API initialises an instance of the driver. More...
void | XDfePrach_InstanceClose (XDfePrach *InstancePtr)
| API closes the instance of a PRACH driver and moves the state machine to a Not Ready state. More...
void | XDfePrach_Reset (XDfePrach *InstancePtr)
| Resets PRACH and puts block into a reset state. More...
void | XDfePrach_Configure (XDfePrach *InstancePtr, XDfePrach_Cfg *Cfg)
| Reads configuration from device tree/xparameters.h and IP registers. More...
void | XDfePrach_Initialize (XDfePrach *InstancePtr, XDfePrach_Init *Init)
| DFE PRACH driver one time initialisation also moves the state machine to an Initialised state. More...
void | XDfePrach_Activate (XDfePrach *InstancePtr, bool EnableLowPower)
| Activates PRACH and moves the state machine to an Activated state. More...
void | XDfePrach_Deactivate (XDfePrach *InstancePtr)
| Deactivates PRACH and moves the state machine to Initialised state. More...
XDfePrach_StateId | XDfePrach_GetStateID (XDfePrach *InstancePtr)
| Gets a state machine state id. More...
void | XDfePrach_GetCurrentCCCfg (const XDfePrach *InstancePtr, XDfePrach_CCCfg *CurrCCCfg)
| Returns the current CC configuration. More...
void | XDfePrach_GetEmptyCCCfg (const XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg)
| Returns configuration structure CCCfg with CCCfg->Sequence.Length value set in XDfePrach_Configure(), array CCCfg->Sequence.CCID[] members are set to not used value (-1) and the other CCCfg members are set to 0. More...
void | XDfePrach_GetCarrierCfgMB (const XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, s32 CCID, u32 *CCSeqBitmap, XDfePrach_CarrierCfg *CarrierCfg, const u32 BandId)
| Returns the current CCID carrier configuration from selected Band. More...
void | XDfePrach_GetCarrierCfg (const XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, s32 CCID, u32 *CCSeqBitmap, XDfePrach_CarrierCfg *CarrierCfg)
| Returns the current CCID carrier configuration from Band 0. More...
void | XDfePrach_SetAntennaCfgInCCCfg (const XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, u32 *AntennaCfg)
| Set antenna configuration in CC configuration container. More...
u32 | XDfePrach_AddCCtoCCCfgMB (XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, s32 CCID, u32 CCSeqBitmap, const XDfePrach_CarrierCfg *CarrierCfg, const u32 BandId)
| Adds specified CCID, with specified configuration, to a local CC configuration structure for the chosen Band. More...
u32 | XDfePrach_AddCCtoCCCfg (XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, s32 CCID, u32 CCSeqBitmap, const XDfePrach_CarrierCfg *CarrierCfg)
| Adds specified CCID, with specified configuration, to a local CC configuration structure on Band which Id = 0. More...
u32 | XDfePrach_RemoveCCfromCCCfgMB (XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, s32 CCID, const u32 BandId)
| Removes specified CCID from a local CC configuration structure for selected band. More...
u32 | XDfePrach_RemoveCCfromCCCfg (XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, s32 CCID)
| Removes specified CCID from a local CC configuration structure for BandId=0. More...
u32 | XDfePrach_UpdateCCinCCCfgMB (const XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, s32 CCID, const XDfePrach_CarrierCfg *CarrierCfg, const u32 BandId)
| Updates specified CCID, with specified configuration to a local CC configuration structure for selected band. More...
u32 | XDfePrach_UpdateCCinCCCfg (const XDfePrach *InstancePtr, XDfePrach_CCCfg *CCCfg, s32 CCID, const XDfePrach_CarrierCfg *CarrierCfg)
| Updates specified CCID, with specified configuration to a local CC configuration structure for BandId=0. More...
u32 | XDfePrach_SetNextCfg (const XDfePrach *InstancePtr, const XDfePrach_CCCfg *NextCCCfg, XDfePrach_RCCfg *NextRCCfg)
| Writes local CC configuration to the shadow (NEXT) registers and triggers copying from shadow to operational registers. More...
void | XDfePrach_GetCurrentRCCfg (const XDfePrach *InstancePtr, XDfePrach_RCCfg *RCCfg)
| Reads all of the RC configuration back. More...
void | XDfePrach_GetEmptyRCCfg (const XDfePrach *InstancePtr, XDfePrach_RCCfg *RCCfg)
| Returns the empty CC configuration. More...
void | XDfePrach_GetChannelCfg (const XDfePrach *InstancePtr, XDfePrach_RCCfg *RCCfg, s32 RCId, XDfePrach_ChannelCfg *ChannelCfg)
| Gets RACH channel configuration. More...
u32 | XDfePrach_AddRCtoRCCfgMB (const XDfePrach *InstancePtr, XDfePrach_RCCfg *CurrentRCCfg, s32 CCID, u32 RCId, u32 RachChan, XDfePrach_DDCCfg *DdcCfg, XDfePrach_NCO *NcoCfg, XDfePrach_Schedule *StaticSchedule, XDfePrach_CCCfg *NextCCCfg, u32 BandId)
| Adds a new RC entry to the RC_CONFIGURATION. More...
u32 | XDfePrach_AddRCtoRCCfgMBDynamic (const XDfePrach *InstancePtr, XDfePrach_RCCfg *CurrentRCCfg, s32 CCID, u32 RCId, u32 RachChan, XDfePrach_CCCfg *NextCCCfg, u32 BandId)
| Adds a new RC entry to the RC_CONFIGURATION in dynamic mode. More...
u32 | XDfePrach_AddRCtoRCCfg (const XDfePrach *InstancePtr, XDfePrach_RCCfg *CurrentRCCfg, s32 CCID, u32 RCId, u32 RachChan, XDfePrach_DDCCfg *DdcCfg, XDfePrach_NCO *NcoCfg, XDfePrach_Schedule *StaticSchedule, XDfePrach_CCCfg *NextCCCfg)
| Adds a new RC entry to the RC_CONFIGURATION. More...
u32 | XDfePrach_AddRCtoRCCfgDynamic (const XDfePrach *InstancePtr, XDfePrach_RCCfg *CurrentRCCfg, s32 CCID, u32 RCId, u32 RachChan, XDfePrach_CCCfg *NextCCCfg)
| Adds a new RC entry to the RC_CONFIGURATION in dynamic mode. More...
u32 | XDfePrach_RemoveRCfromRCCfg (const XDfePrach *InstancePtr, XDfePrach_RCCfg *CurrentRCCfg, u32 RCId)
| Removes an RC configuration entry from the RC_CONFIGURATION. More...
void | XDfePrach_UpdateRCinRCCfgMB (const XDfePrach *InstancePtr, XDfePrach_RCCfg *CurrentRCCfg, s32 CCID, u32 RCId, u32 RachChan, XDfePrach_DDCCfg *DdcCfg, XDfePrach_NCO *NcoCfg, XDfePrach_Schedule *StaticSchedule, XDfePrach_CCCfg *NextCCCfg, u32 BandId)
| Updates an RC entry to the RC_CONFIGURATION on a selected band. More...
void | XDfePrach_UpdateRCinRCCfg (const XDfePrach *InstancePtr, XDfePrach_RCCfg *CurrentRCCfg, s32 CCID, u32 RCId, u32 RachChan, XDfePrach_DDCCfg *DdcCfg, XDfePrach_NCO *NcoCfg, XDfePrach_Schedule *StaticSchedule, XDfePrach_CCCfg *NextCCCfg)
| Updates an RC entry to the RC_CONFIGURATION on band id 0. More...
u32 | XDfePrach_MoveRC (const XDfePrach *InstancePtr, u32 RCId, u32 ToChannel)
| Moves the specified RCID from one NCO & Decimation Channel to another NCO Decimation Channel. More...
void | XDfePrach_GetTriggersCfg (const XDfePrach *InstancePtr, XDfePrach_TriggerCfg *TriggerCfg)
| Returns the current trigger configuration. More...
void | XDfePrach_SetTriggersCfg (const XDfePrach *InstancePtr, XDfePrach_TriggerCfg *TriggerCfg)
| Sets trigger configuration. More...
void | XDfePrach_GetCC (const XDfePrach *InstancePtr, bool Next, s32 CCID, XDfePrach_CarrierCfg *CarrierCfg)
| Gets the specified CCID carrier configuration from either Current or Next for band id 0. More...
void | XDfePrach_GetCCMB (const XDfePrach *InstancePtr, bool Next, s32 CCID, XDfePrach_CarrierCfg *CarrierCfg, u32 BandId)
| Gets the specified CCID carrier configuration from either Current or Next for selected band in multi-band mode. More...
void | XDfePrach_GetStatus (const XDfePrach *InstancePtr, XDfePrach_Status *Status)
| Gets the PRACH Status. More...
void | XDfePrach_ClearStatus (const XDfePrach *InstancePtr)
| Clears the PRACH status registers. More...
void | XDfePrach_CapturePhase (const XDfePrach *InstancePtr)
| Captures phase for all phase accumulators in associated AXI-lite registers. More...
void | XDfePrach_GetCapturePhase (const XDfePrach *InstancePtr, u32 RachChan, XDfePrach_NCO *CapturedPhase)
| Reads the captured phase for a given Rach Channel. More...
void | XDfePrach_SetTUserDelay (const XDfePrach *InstancePtr, u32 Delay)
| Sets the delay, which will be added to TUSER and TLAST (delay matched through the IP). More...
void | XDfePrach_SetTUserDelayMB (const XDfePrach *InstancePtr, u32 Delay, u32 BandId)
| Sets the delay of specified band in multiband mode, which will be added to TUSER and TLAST (delay matched through the IP). More...
u32 | XDfePrach_GetTUserDelay (const XDfePrach *InstancePtr)
| Reads the delay, which will be added to TUSER and TLAST (delay matched through the IP). More...
u32 | XDfePrach_GetTUserDelayMB (const XDfePrach *InstancePtr, u32 BandId)
| Reads the delay of specified band in multiband mode, which will be added to TUSER and TLAST (delay matched through the IP). More...
u32 | XDfePrach_GetTDataDelay (const XDfePrach *InstancePtr)
| Returns data latency. More...
u32 | XDfePrach_GetTDataDelayMB (const XDfePrach *InstancePtr, u32 BandId)
| Returns data latency of specified band in multiband mode. More...
void | XDfePrach_GetVersions (const XDfePrach *InstancePtr, XDfePrach_Version *SwVersion, XDfePrach_Version *HwVersion)
| This API gets the driver and HW design version. More...