Phase jumps in input tone to RFSoC 4x2 ADC with mixer bypassed

I am currently performing a test on an RFSoC 4x2 board with the default BaseOverlay where I am feeding in a 100 MHz tone (from an Agilent E8257D signal generator) into one of the ADC inputs, and am noticing some unexpectedly large distortion in the waveform:

Further analysis of the time series data seems to indicate that the signal is experiencing quasi-periodic phase jumps, although all PLL lock LEDs on the board are lit and the PLLLockStatus registers indicate lock:

print(base.radio.receiver.channel[0].adc_tile.PLLLockStatus)
2

I have also repeated these observations while using the 10 MHz output from the signal generator as a clock reference to the RFSoC 4x2 (setting register 0x147 of the LMK04828 to 0x0A), and found the same result.

For reference, I have the RFDC running at the default 4915.2 MHz sample rate, and the mixer configured as bypassed, real-to-real mode, and the decimation set to 1:

base.radio.receiver.channel[0].adc_block.MixerSettings = {'Freq': 0.0, 'PhaseOffset': 0.0, 'EventSource': 2, 'CoarseMixFreq': 16, 'MixerMode': xrfdc.MIXER_MODE_R2R, 'FineMixerScale': 1, 'MixerType': xrfdc.MIXER_TYPE_COARSE}
base.radio.receiver.channel[0].adc_block.UpdateEvent(1)
base.radio.receiver.channel[0].adc_block.DecimationFactor = 1
print(base.radio.receiver.channel[0].adc_block.BlockStatus)
{'SamplingFreq': 4.9152, 'AnalogDataPathStatus': 1, 'DigitalDataPathStatus': 17, 'DataPathClocksStatus': 1, 'IsFIFOFlagsEnabled': 3, 'IsFIFOFlagsAsserted': 3}

Is it possible that I’m configuring things incorrectly? Also, I note that in this thread, user @jacobg seems to imply that changing the mixer settings in this way is not sufficient, and one must also rebuild the .bit file after changing the appropriate mixer settings in the corresponding Vivado project. Is that really true?

As a sanity check, I hooked up the signal generator output directly to a commercial spectrum analyzer (without the 10 MHz reference):

No harmonics are visible to within the ~35 dB SNR here, whereas the largest harmonics in the first FFT plot appear at about -20 dBc (note: the vertical axis in that plot is in ADC counts/voltage rather than power).

Hi @ashwmk

Have you tried any other frequencies? For example, do you still see distortion for 500 MHz, or 1 GHz tones? What sample rates are you using? Have you tried any others?

Also, have you tried regenerating the bitstream with the different settings? Do you see the same issue?

Phase jumps/distortion do appear at 500 MHz and 1 GHz while keeping the same mixer configuration and sample rate fixed at 4.9152 GHz:

500 MHz:

1 GHz:

I haven’t yet tried changing the sample rate, as I don’t really have much experience with modifying or creating overlays in Vivado. My thought was to start with the out-of-the box base overlay and branch off from there once I had my bearings.

For what it’s worth, I do not observe this level of distortion with the default mixer configuration of the base overlay, which I believe is MixerType=MIXER_TYPE_FINE, MixerMode=MIXER_MODE_R2C, and Freq=-1228.8. This is why I believe I might be mis-configuring something by changing the mixer settings.

When you change the decimation factor from 2 to 1, you double the required axis clock rate that feeds into the rfdc block and into the downstream receiver blocks. The system doesn’t automatically adjust this clock rate for you, so instead it starts losing data packets. You’ll have to figure out how to modify that in pynq (which I don’t know how to do) or open up the base overlay in Vivado and manually adjust it and then recompile the overlay. Compiling the base overlay can be somewhat temperamental but you should be able to get it working eventually.