FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6463 Discussions

ppm detection for sdi receiver

Altera_Forum
Honored Contributor II
1,428 Views

Hi all 

 

I have problem in changing reference clock (148.5MHz <-> 148.35MHz) for SDI receiver. 

 

In the SDI user manual, there's a paragraph related to my problem. 

"You must supply two receive reference clocks (for example, 148.5 MHz and  

148.35 MHz) to the SDI receiver. Implement the PPM detection function in the user  

logic to detect the ppm difference between the receive reference clock and the  

recovered clock. Based on the difference detected, you must switch between the two  

receive reference clocks by toggling the rx_serial_refclk_clkswitch signal." 

 

My question is how to generate this PPM detection function? 

Does Altera provide any example? 

Thanks.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
660 Views

Create two counters, counter_1 incremented by the recovered clock, and counter_2 incremented by the 148.5 clock. Once counter_2 reaches a specific value (say 100000), check counter_1. If the two counters differ by a margin of +/- 1.001, then you know that the recovered clock is 148.35. If not, it is 148.5. The higher the count value (100000), the more precise the ppm detector is, but the longer it takes to detect the ppm. You will have to create some min and max count to prevent false detection when the recovered clock the reference clock only differ by a few ppm. I believe SDI has a max tolerance of 100ppm. You will also have to deal with CDC issues since the counters are in two different domains and you have to compare them.

0 Kudos
Altera_Forum
Honored Contributor II
660 Views

Hi ironmoose 

 

Thank you for your answer. 

I'll try to implement it.
0 Kudos
Reply