Forum Discussion
Clock recovery from signle 125MHz pulses with PLL
Hi,
I have a circuit that uses one PLL to recover data and clock from a single bitstream. This PLL is fed with 125 MHz clock, on it's output there is 375 MHz clock (which is used for the circuity of data and clock recovery). From this data there are recovered 125 MHz pulses every 44.1 kHz (sync pulses). I would like to recover this 44.1 kHz clock from the bit stream. (for audio purposes - to match the clock of the data - if internal 44.1 clock is used form the generator there are some bad effects in the sound). My questions are: 1) Can i simply feed those pulses into the second PLL module to recover the data ? 2) Are there any other considerations that i should think about ? thanks madness12325 Replies
- Altera_Forum
Honored Contributor
Hi,
what do you mean by gating? I was thinking about smth like:
regardsprocess (clk_125_in, synchronized) begin if rising_edge(clk_125_in) then if synchronized = '1' then clock_recovery_counter <= (others => '0'); else -- counting logic end if; end if; end process; - Altera_Forum
Honored Contributor
--- Quote Start --- Hi kaz, thanks, i thought about using this sync pulses to make a new "clock", let's say to invert this new clock when sync pulse occurs, that would give me me 22.05 kHz clock.... --- Quote End --- Don't invert just at sync but also half way through using a counter. Set counter to zero at sync then count up 22.05k clocks and reinvert. Though I will use sync as clock enable rather than clock as you are gating it. - Altera_Forum
Honored Contributor
Hi,
thanks FvM. The way it works is: On the sender side, when rising edge of 44.1k occurs it transmits with 125MHz clock 64 channels of audio and after that it starts sending 10 bit sync pattern. After transmitting the 10 bit pattern it checks if the next rising edge occured, if not it stars sending another 10bit bit pattern, otherwise next 64 channels. You're right there is a jitter. That's the way i implemented it in my device, it works fine with RME (german audio firm) PC card - they're recovering the clock from my device (sound quality is good). When i use on their side their internal 44.1k clock and in my device 44.1k clock, there are some clicks in the sound. That's why i would like to implement this 44.1k clock recovery from my sync pattern. So do you say that ADPLL is a way to go ?:) i will look into it, thanks :) best regards madness - Altera_Forum
Honored Contributor
I wonder, if it's possible to make the 125 MHz clock an integer multiple of 44.1 kHz at the sender? This would simplify things a lot.
Otherwise a software PLL (ADPLL) can be used to track the 44.1 kHz. If 44.1 kHz is not generated as integer multiple of 125 MHz but is an unrelated external clock or generated by a fractional divider, the sync signal will be still send with 125 MHz resolution. Consequently there will be a jitter of the sync signal relative to the ideal 44.1 clock as well as the recovered one. - Altera_Forum
Honored Contributor
Hi kaz,
thanks, i thought about using this sync pulses to make a new "clock", let's say to invert this new clock when sync pulse occurs, that would give me me 22.05 kHz clock.... but you're right it's too slow anyway... :) perhaps i could use this new "clock" and latch the data every rising AND falling edge ? don't really know how to get the higher rates :} best regards - Altera_Forum
Honored Contributor
PLLs work with clean clock inputs and can't work at slow speeds. So I don't have much hope on that.
- Altera_Forum
Honored Contributor
Yea the CDR is not perfect : ) but it works - sometimes when i use SignalTap and use too many elements it doesn't work - after decreasing SignalTap LE and memory usage and recompilation it works fine.
The protocol i'm using is madi, it sends with one line 64 audio channels in one frame. There are as you may think 44.1kHz frames. So one stereo audio channel takes 2 audio channels from the link. To get a higher data rate - 88.2 ad 176.4 one stero audio channel takes 4 for 88.2 and 8 for 176.4. So i can get the data needed for 176.4 but i still got 44.1kHz pulses. I'll try to use PLL next week and write here how it went: ) best regtards - Altera_Forum
Honored Contributor
You don't need PLL, you got the pulses at 44.1KHz. To get clock at 44.1KHz I assume you mean regular half duty cycle pulses like the usual clock patterns.
Well you can do that without PLL but you don't even need. It is safer to use the sync as clock enable on clock 125MHz itself. For 2x or 4x modes I assume the sync will produce the new rate. If not you can use counter for that. So you have no problem really. Regarding fanout you only get such problems with very large designs and normally compiler does the duplication but can readily duplicate manually as you suggested if you think it is going to help but I have feeling your design may have some other problems. - Altera_Forum
Honored Contributor
Yea kaz, you're right there are not higher frequency components, sync pulses occur every 44.1kHz. Sync is exactly at 44.1 kHz.
I need to recover from that 44.1 or 88.2 or 176.4 kHz clocks. I haven't tried it yet, cause i'm doing smth else right now, i'm just asking if it's possible or there will be some problems. I would like to use a PLL module for that. best regards - Altera_Forum
Honored Contributor
The filter method I proposed apply only if there frequency component in data stream at 44.1KHz but it doesn't look that way now. If you are detecting actual pattern for sync then you got it from data already. Or do you mean your sync is not at 44.1KHz? I need more clarity please