+ Post New Thread
Results 1 to 9 of 9

4th May 2015, 10:47 #1
 Join Date
 May 2009
 Posts
 92
 Helped
 0 / 0
 Points
 1,762
 Level
 9
Nyquist sammpling freq. with synchronizer
Suppose I want to sample low clock freq. (100MHz) signal with a high clock freq. (150MHz). Both siganl are produced at very close freq., only 50MHz difference.
Is the nyquist sampling rate valid here?
I mean, nyquist speaks about sampling an analog signal to a digital one, so when vice versa, the analog signal will be equal to the original. This is not the case, but still, it seems that a regular 2flops synchronizer will not be suffice, so what is?
What is your opinion?
Thx.

Advertisment

4th May 2015, 11:49 #2
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 44,014
 Helped
 13388 / 13388
 Points
 252,684
 Level
 100
Re: Nyquist sammpling freq. with synchronizer
Very surely, the problem hasn't to do with Nyquist theorem. But it's not clear what "sampling a low clock freq" exactly means for you. Can you show a timing diagram of the expected behaviour?
In the general case, we would assume that both clocks are unrelated and don't necessarily have an exact integer frequency ratio, so the clock edges will continously shift against each other. A possible interpreation of "sampling" could be that you want exactly one pulse in the 150 MHz domain for each 100 MHz pulse, which generally works for f1 <= f2;

4th May 2015, 11:52 #3
Awards:
 Join Date
 Apr 2014
 Posts
 14,471
 Helped
 3292 / 3292
 Points
 70,762
 Level
 64
Re: Nyquist sammpling freq. with synchronizer
Hi,
Nyquist is valid.
If you want to convert a (useful) signal of any frequency you need at least twice the sampling frequency.
Additionally to sample a squarewave signal you have to take care of the overtones. 3x, 5x , 7x, 9x, 11x... of fundamental (here 100Mhz).
Theretically you may use specifically "undersampling" then you should know about the alias, or mirrored frequencies...
Klaus

4th May 2015, 15:00 #4
 Join Date
 Jul 2010
 Location
 Sweden
 Posts
 857
 Helped
 345 / 345
 Points
 6,645
 Level
 19
Re: Nyquist sammpling freq. with synchronizer
If you sample a 100 MHz signal at 150 MHz, you will get the mirror signal at
fs/2  (fin  fs/2) = 75  (100  75) MHz = 50 MHz.
That is called "aliasing" and is normally not wanted, but it can be useful (the "undersampling" mentioned by KlausST).

Advertisment

4th May 2015, 15:14 #5
Awards:
 Join Date
 Apr 2014
 Posts
 14,471
 Helped
 3292 / 3292
 Points
 70,762
 Level
 64
Re: Nyquist sammpling freq. with synchronizer
Hi,
If you sample a 100 MHz signal at 150 MHz, you will get the mirror signal at
fs/2  (fin  fs/2) = 75  (100  75) MHz = 50 MHz.
300MHz > DC
500MHz > 50MHz
700MHz > 50MHz
900MHz > DC
and so on..
far away from a square wave..
Klaus

4th May 2015, 16:12 #6
 Join Date
 Sep 2013
 Location
 USA
 Posts
 6,936
 Helped
 1654 / 1654
 Points
 30,136
 Level
 42
Re: Nyquist sammpling freq. with synchronizer
Unlike others have assumed, I believe you unfortunately used the term Nyquist when you actually were interested in understanding what is the highest frequency signal you can reliably sample through a metastability resolution synchronizer and still capture all the transitions.
Nyquist does not directly apply here as a square wave clock (as pointed out by others) is an infinite series of the odd harmonics of the fundamental. Your original description translates to the following diagram:
As you can see the clock edge of the 150 MHz will line up with every third edge of the 100 MHz which means you can't reliably capture all the edges of the 100 MHz with a 150 MHz clock. Yes you can shift the phase of the clock and find a spot where the 150 MHz can reliably capture the pulses of the 100 MHz, but only in the ideal case, frequency drift, frequency accuracy, etc will shift that ideal phase relationship and will eventually result in trying to capture the 100 MHz while it's transitioning.
To reliably capture a signal in the 150 MHz clock domain the minimum pulse width (high or low) of the signal being captured (sampled) must be >= Tpw+Tsu+Th.
You can see from the timing diagram that any phase shifting of the clock with the "data" (lower freq clock) will ensure that one of the data edges will always be outside the TsutoTh window of the FF.

4th May 2015, 16:29 #7
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 44,014
 Helped
 13388 / 13388
 Points
 252,684
 Level
 100
Re: Nyquist sammpling freq. with synchronizer
Did you realize that the question was posted in the programmable logic section and is related to logical signals. A logical signal has per se infinite bandwitdh (zero rise time of the value) so it's a problem beyond all Nyquist theories.
Respectively the question can be answered referring to logic circuits and their waveforms, pulse widths, edges, setup and hold times etc.
O.K., I see adsee clarified things in detail while I was writing my post.

Advertisment

5th May 2015, 09:40 #8
 Join Date
 Jul 2010
 Location
 Sweden
 Posts
 857
 Helped
 345 / 345
 Points
 6,645
 Level
 19
Re: Nyquist sammpling freq. with synchronizer
Nyquist, mirror frequency, aliasing etc. are still valid to some extent. The result after sampling will be a 50 MHz clock/logic signal as calculated in post #4, but it will have a lot of jitter if the input signals are not locked to each other.
Even for logic signals the theoretical maximum frequency is half the clock rate, which is Nyquist transferred into the digital world.Last edited by std_match; 5th May 2015 at 10:03. Reason: corrected reference to previous post #4

5th May 2015, 10:17 #9
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 44,014
 Helped
 13388 / 13388
 Points
 252,684
 Level
 100
Re: Nyquist sammpling freq. with synchronizer
Even for logic signals the theoretical maximum frequency is half the clock rate, which is Nyquist transferred into the digital world.
Instead, if you treat the sampled signal as a clock enable signal in the 150 MHz domain, Fin <= Fs would be sufficient. A toggle synchronizer is the usual means to transfer it.
+ Post New Thread
Please login