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 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
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,
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
--- 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,
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
I mean if you generate clock at 41.2KHz as such from inversion then it is a clock that is generated by gating as opposed to PLL. There is nothing wrong with this generation but then I will avoid using it as clock for edge triggering those registers. This means I will use your system clock(125Mhz) to trigger edges and use sync itself as clock enable on those registers. So I don't need to convert sync to clock in the first place.
- Altera_Forum
Honored Contributor
Hi,
thanks :) so i could simply use
and that's all : ) i will still have to think about 176.4k and using ADPLL :) thanksprocess (clk_125_in, synchronized) begin if rising_edge(clk_125_in) then if synchronized = '1' then -- rest of the code - used as "rising edge" of the "recovered clock" - Altera_Forum
Honored Contributor
The core of an ADPLL would be a NCO generating the 176.4 kHz clock. Using a PI loop filter, it can ideally average the jitter of the sync signal to +/- 0.5 * 8ns, provided there's no additional jitter source than sampling the input signal at 125 MHz.
- Altera_Forum
Honored Contributor
Hi,
I opened megafunction wizard and found NCO. Are there any restrictions to using this megafunction ? there is smth about licensing it. I wasn't able to find any usefull into about that. best regards - Altera_Forum
Honored Contributor
Yes you need to pay a license for it, or use it in evaluation mode (i.e. with the USB blaster connected all the time, and you can't flash your project)