RF-ADC Mixer RFdc API Example - 2.6 English

Zynq UltraScale+ RFSoC RF Data Converter v2.6 Gen 1/2/3/DFE LogiCORE IP Product Guide (PG269)

Document ID
Release Date
2.6 English

Related RFdc driver API functions are shown in the following code. This code illustrates the use of the NCO Phase reset function. This function must be used at startup to initialize the phase of the fine mixer to a valid state. Note that the following code resets the NCOs in all tiles.

XRFdc_Mixer_Settings Mixer_Settings;

for(tile=0;tile<4; tile++) {
   // Make sure the mixer settings update use the Tile event
   for(block=0; block<2; block++) {
      XRFdc_GetMixerSettings (ptr, XRFDC_ADC_TILE, tile, block, &Mixer_Settings);
      Mixer_Settings.EventSource = XRFDC_EVNT_SRC_TILE; //Mixer Settings are updated with a tile event
      XRFdc_SetMixerSettings (ptr, XRFDC_ADC_TILE, tile, block, &Mixer_Settings);

   // Reset NCO phase of both DDCs in Tile0 (assuming both are active)
   XRFdc_ResetNCOPhase(ptr, XRFDC_ADC_TILE, tile, 0); // DDC Block0
   XRFdc_ResetNCOPhase(ptr, XRFDC_ADC_TILE, tile, 1); // DDC Block1

   XRFds_UpdateEvent(ptr, XRFDC_ADC_TILE, tile, 1, XRFDC_EVENT_MIXER); //Generate a Tile Event