Synchronization with external clock


I want to synchronize an external clock with the Opal Kelly XEM7310 / XEM6310.

An external clock coming from a sine wave generator has programable frequency f < 50 Mhz. Now, the Opal Kelly (with a master clock of 200 MHz) should read data from several ADCs with a transfer rate that is ideally a multiple of f.

This transfer rate OR the master clock of the Opal Kelly needs to be synchronized with the clock from the sine wave generator, so that I can digitally reproduce the sine wave with the correct phase for a digital I/Q demodulation (lock-in amplification) of the data coming from the ADCs. For f = 50Mhz, the phase error for unsynchronized clocks would be 50MHz/200MHz=25 %, which is far too much for high-precision I/Q demodulation. A constant phase shift does not matter, but a time-variant phase drift matters a lot.

Is it possible to synchronize the Open Kelly clock with the external clock of the wave generator?

Or is it possible to, at least, read the flags of the external clock independently from the master clock, so that one can calculate the time-difference between the clock flags with an accuracy of 1 ns or better?

A related question would be: Is it possible to run the I/Os at individual clock rates that are NOT a divider of 200 MHz, let’s say, at 190 MHz?

Of course, one could add another ADC for reading the reference sine wave at the rate of the master clock, or one could add a DAC for on-board sine wave generation. But I think, there must be a more elegant and recourse-friendly solution…

I am happy with any advice. Thanks!