11-13-2018 03:00 PM - edited 11-13-2018 06:54 PM
I have been unable to synchronize the RFSoC ADCs when the NCO is enabled. This is my procedure. Please correct / comment:
1. Enable all clocks and verify they are correct: Tile 224, 225, 226, and 227 RF clocks at 3932.16 MHz, Tile 228 SYSREF Clock at 6.144 MHz, FPGA PL SYSREF Clock at 6.144 MHz
2. Load the Bitstream. The RF Data Converter block has the ADC Tiles and DAC Tile 0 Enabled, Multi-Tile Sync Enabled for the ADC and DAC Tiles, the Decimation Setting, NCO Frequency, Mixer Mode, and other parameters set to the desired values. Here is a screenshot of the core configuration GUI:
3. After the bitstream is loaded, I run the software setup, I first run XRFdc_Reset() on all Tiles, then , then XRFdc_StartUp() on all Tiles, then XRFdc_SetupFIFO() on all tiles.
4. Next in the code, I setup the Mixer Settings for all ADC Tiles:
5. I then run the Multi-Tile Sync for the ADC
6. I get an MTS good result:
The problem is that the ADC outputs are not synchronized and consistent from run to run. If I run this procedure ten times, I will get ten different phase deltas between the signals out of tile 224 and 225. What am I doing incorrectly in the sequence? Is there a document other than the RF Data Converter User Guide that has step-by-step instructions for synchronizing the ADCs with an active NCO?
11-14-2018 03:55 AM
Is this your own board or ZCU111?
Have you followed the SYSREF guidelines on the PCB?
Can you try to run the MTS example from the SW driver?
have you tried getting it to run and not setting a target latency?
Are you able to check the metal log to see what is happenning at each step.
It is a good idea to enable the metal log at least for error and info messages
11-14-2018 06:25 AM
It is the ZCU111.
Which SW driver and which MTS example are you referring to?
I will try not setting target latency and enable/check the metal log.
Will report back soon...
11-14-2018 06:41 AM
if you look in your SDK install
you will see xrfdc_mts_example.c
import that into an empty application in your SDK project and give it a try.
If you set a target latency and subsequently get a latency that is higher your MTS will error out.
To set the target properly you have to run with the target set to 0, find the highest latency and add a margin to it.
I would try without a target and enable the metal logging for infos and errors.
I attached the example to the last post.
11-14-2018 08:12 AM
The missing piece was the command to reset the NCO Phase:
I used the PL event instead of the SYSREF event to reset the phase because once I kick off the SYSREF clock from the LMK04208 onboard the KCU111 I don't really have a good way to pause it. With the PL event (on the RTS bus), I can create a one-shot type event in the fabric.
If using SYSREF, is the correct procedure to disable the signal until after the registers are setup and before the MTS procedure is performed?
11-19-2018 03:42 AM
I need to check that reset NCO phase is dependent on the tile event.
We expect that the SYSREF is running for the duration of MTS and can then be gated exeternally so that we could do a synchronous update to NCOs etc.
(2018.3 will enable fast NCO updates)
Let me double check it.
01-08-2019 09:16 AM
I am having trouble synchronizing all ADCs with NCOs Enabled too. How are the NCO Phase's synchronized across multiple tiles?
My current steps are:
1) Call XRFdc_MTS_Sysref_Config to disable SYSREF
2) Call XRFdc_SetMixerSettings to set up for complex and NCO enabled and eventSource set to SYSREF
3) Call XRFdc_ResetNCOPhase
4) Call XRFdc_Startup
5) Call XRFdc_MultiConverter_Init
6) Call XRFdc_MTS_Sysref_Config to enable SYSREF
7) Call XRFdc_MultiConverter_Sync
My SYSREF runs continuously, so I disable it using API call before setting up the mixers and NCO. I suppose I have a race condition when I turn it back on before calling MultiConverter_Sync. What I am seeing is that the Phases aren't synchronized across tiles. Any suggestions?