| dfeccf Vitis Drivers API Documentation

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

Functions
xdfeccf_examples.c File Reference

## Overview

This file contains the examples main function.

Note: MGT si570 oscillator is set to 152.25MHz by default. The DFE IP wrapper requires MGT clock to be set to 122.88MHz (some IP use 61.44MHz). Prerequisite is to set the MGT si570 oscillator to the required IP before running the example code. This is for the ZCU670 production platform.

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.0   dc     12/06/20 Initial version
          dc     01/04/21 Set mgt si570 oscillator to 122.88MHz
          dc     02/02/21 Remove hard coded device node name
          dc     02/08/21 align driver to current specification
          dc     02/22/21 include HW in versioning
          dc     04/06/21 Register with full node name
          dc     04/07/21 Fix bare metal initialisation
          dc     04/08/21 Set sequence length only once
    1.1   dc     07/13/21 Update to common latency requirements
          dc     07/21/21 Add and reorganise examples
    1.2   dc     11/01/21 Add multi AddCC, RemoveCC and UpdateCC
    1.3   dc     03/21/22 Add prefix to global variables
    1.5   dc     10/28/22 Switching Uplink/Downlink support
    1.6   cog    07/18/23 Modify example for SDT flow
    1.7   cog    04/20/24 Configure si570 in Linux examples

## Functions
int | XDfeSi570_SetMgtOscillator (double CurrentFrequency, double NewFrequency)
| This function: initialize I2C bus, reads current state of si570, calculates parameters for si570 MGT oscillator new frequency, writes them to si570 and resets PL to use the new frequency. More...
int | XDfeCcf_MultiInstancesExample ()
| This example runs two instances of DFE Channel Filter. More...
int | XDfeCcf_PassThroughExample ()
| This function runs the DFE Channel Filter device using the driver APIs. 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...
int | main (void)
| Main function that initialise si570 and runs examples. More...

## Function Documentation

int main | ( | void |  | ) |

Main function that initialise si570 and runs examples.

Parameters

  None. |

Returns
  - XST_SUCCESS if the example has completed successfully.
  - XST_FAILURE if the example has failed.

References XDfeCcf_multiAddCC_1xNR100_3xNR20_Example(), XDfeCcf_MultiInstancesExample(), XDfeCcf_PassThroughExample(), XDfeSi570_SetMgtOscillator(), XST_FAILURE, and XST_SUCCESS.

int XDfeCcf_PassThroughExample | ( |  | ) |

This function runs the DFE Channel Filter 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.
- Load a channel filter coefficients.
- Add CC.
- DeActivate the device.

Returns
  - XST_SUCCESS if the example has completed successfully.
  - XST_FAILURE if the example has failed.

References XDfeCcf_TriggerCfg::Activate, XDfeCcf_Status::CCSequenceError, XDfeCcf_TriggerCfg::CCUpdate, XDfeCcf_Status::CCUpdate, XDfeCcf_CarrierCfg::Gain, XDfeCcf_Init::GainStage, XDfeCcf_CarrierCfg::ImagCoeffSet, XDfeCcf_CCSequence::Length, XDfeCcf_Version::Major, XDfeCcf_Version::Minor, XDfeCcf_Trigger::Mode, XDfeCcf_Coefficients::Num, XDfeCcf_Status::Overflow, XDfeCcf_Version::Patch, XDfeCcf_CarrierCfg::RealCoeffSet, XDfeCcf_Version::Revision, XDfeCcf_Init::Sequence, XDfeCcf_Coefficients::Symmetric, XDfeCcf_Trigger::TUSERBit, XDfeCcf_Trigger::TuserEdgeLevel, XDfeCcf_Init::TuserSelect, XDfeCcf_Coefficients::Value, XDfeCcf_Activate(), XDfeCcf_AddCC(), XDfeCcf_ClearEventStatus(), XDfeCcf_Configure(), XDfeCcf_Deactivate(), XDfeCcf_GetVersions(), XDfeCcf_Initialize(), XDfeCcf_InstanceClose(), XDfeCcf_InstanceInit(), XDfeCcf_LoadCoefficients(), XDfeCcf_Reset(), XDfeCcf_SetTriggersCfg(), XST_FAILURE, and XST_SUCCESS.

Referenced by main().

int XDfeSi570_SetMgtOscillator | ( | double | CurrentFrequency,
|  | double | NewFrequency
| ) |  |

This function: initialize I2C bus, reads current state of si570, calculates parameters for si570 MGT oscillator new frequency, writes them to si570 and resets PL to use the new frequency.

Parameters

  CurrentFrequency | MGT oscillator current frequency.
  NewFrequency | MGT oscillator new frequency.

Returns
  None

Note
  None

References XST_FAILURE, and XST_SUCCESS.

Referenced by main().