Home > DIY HiFi > Synchronous Reclocking?

Synchronous Reclocking?

November 1, 2012 Leave a comment Go to comments

Here is an implementation of synchronous reclocking the I2S signal in the Amanero board reported on diyaudio:

After improvement of getting MCLK from XO instead of using standard PIN 6, I tried reclocking the BCK with same MCLK and the improvement is very positive. Right now I tied PIN43/44 on CPLD together, fed MCLK to reclocker and DAC with 2K resistor. The reclocker is 74AUC1G74 D-type flip-flop at 2.5V (power pull from 3.3V with 330ohm in series). Left side is PCM5102 DAC[530]

The basic idea is to:

  1. Feed the oscillator clock signal directly to the DAC
  2. Use the oscillator clock signal to drive a flip flop which reclocks the Bit Clock

This reclocking scheme can be done with any USB-I2S where you can tap a low jitter clock signal. Typically these are the ones that derive the clocks from oscillators rather than internally by the FPGA. A good candidate is Lorien’s XMOS-based WAVE IO

WHY RECLOCK?

The goal is to reduce jitter in the I2S signals, including the master clock by leveraging the fact that the jitter added by a flip flop is much less than the jitter added by a CPLD or FPGA.

Even thought the on-board oscillators are low jitter, the signals coming out of the CPLD have a minimum amount of jitter in the order of 100 psec peak to peak. If we take the master clock straight from the oscillator rather than from the CPLD, we don’t have the added jitter by the CPLD. If we also use this clock signal straight from the oscillator and re clock the bit clock, then this new bit clock will also be of lower jitter than the original bit clock coming out of the CPLD.

HOW DOES IT WORK?

“When PRE and CLR are inactive (high), data at the data (D) input meeting the setup time requirements is transferred to the outputs on the positive-going edge of the clock pulse.”

Here is a logic table for a typical flip-flop (this one taken from Potato Semi 74G74 datasheet)

Basically, the flip-flop re-aligns the edges of the bit clock to the edges of the master clock. From the above table, rows 4 and 5, D (data input) is reflected at Q (output) on the rising edge of the CLK (clock). Thus if we use the clock signal directly from the oscillator (low jitter), and feed the bit clock from the CPLD to the D input of the flip flop, it will be “reclocked” resulting in a lower jitter signal at Q (output)

RECLOCK LR CLOCK AND DATA?

Data is read in reference to the bit clock. As long as the minimum timing requirements are met (set up and hold times), a value of 1 will be read as 1 and a value of zero will be read as zero. It is probably safe to assume that systems are designed with sufficient timing margin that even with a more jittery bit clock, there are no digital errors. Therefore, there is no need to reclock the LR clock and the DATA

WHAT ABOUT TIMING?

There are some timing considerations we need to think about with regard to this manner of reclocking. The master clock coming out of the CPLD is synchronized with the other I2S signals (Bit clock, LR clock and Data). In comparison to the clock signal at the oscillator output (oscillator clock), these signals have a certain amount of propagation delay just for the fact that they have gone through the CPLD device. I am not exactly sure how much is the propagation on the output signals, but based on the CPLD datasheet, it may be in the order of 10 (or 10s) nano-seconds.

When the bit clock is reclocked with the oscillator clock, the new reclocked bit clock will be further delayed because it would have likely missed the rising edge of the oscillator clock (the signals out of the CPLD are delayed by the propagation delay) and would have to wait for the next rising edge of the clock signal.

How much is the bit clock delayed?

As discussed, the flip flop aligns the new bit clock to the rising edge of the oscillator clock. The oscillator clock is ahead (timing wise) of the master clock to which the bit clock is synchronized. The bit clock would have likely missed the rising edge of the oscillator clock and needs to wait for the next rising edge of the oscillator clock. The resulting new bit clock is thus delayed ONE PERIOD time of the oscillator clock. (It could be half a clock period depending how the signals are synchronized to the master clock: rising or falling clock edge)

One period for a 22.5792 MHz clock is 44 nsec. The bit clock for 44.1 KHz material is 354 nsec. The potential maximum delay of the new bit clock is a small percentage of the width of the bit clock which in this case is 44/354=12%.  There should be no problems as also reported working by the poster above.

However, for higher sample frequencies, the delay becomes a larger percentage of the bit clock width. If we look at 172K material, the bit clock period is 88 nsec and the delay in the new reclocked bit clock is 50%. Perhaps this will still work. Increasing the sample rate further, say 352K sample rate, the delay is the same as the width of the bit clock. This will result in completely missing the first bit of the data signal.

CANDIDATE DEVICES

  • The Experimenter above uses 74AUC1G74 D-type flip-flop (operates at 1.8v)
  • A better fit with 3.3V operation is the SN74AUP1G74
  • Also recommended in the forums with even wider operating voltage: 74VHC74
  • This flip flop is used in Ian’s FIFO Clock board (3.3v operation): 74AUP1G79
  • Potato Semiconductor 74 Series Logic: PO74G74A. Extremely fast and very low propagation delay.

Some would argue that because the Potato Semi device is the fastest device, the added jitter is smallest. This would make sense. The technology used by Potato Semi in their devices are based on noise reduction which helps reduce jitter.

WHO IS POTATO SEMICONDUCTOR?

Based on the funky name, company log0 and the bare design of their website, Potato Semi seems a company of dubious reputation. However this is a company that have invented some cool technology. Here is the invention if you are interested in reading patents [link].

According to the press:

Potato Semiconductor, a leading IC design company focusing on the high speed CMOS I/O field, has successfully applied its innovative technology to 74 series logic ICs. Using advanced technology, this new generation of 74 series logic ICs features high performance, high frequency and low noise. The running speed can be 5 to 7 times faster than existing 74 series ICs which continues the prevailing trend in electronics design — high speed and high performance.

But the strongest vote of confidence comes form Ian’s FIFO reclocker. He  has experimented with Potato Semi chips and has selected it for his latest clock board [link].

The chip can be purchased direct through eBay for $3. Not cheap in comparison with standard logic chips which cost in the order of $0.50. But for a few bucks you can (theoretically) drastically reduce the output jitter of the Amanero board (or other interface with similar design)

INTERFACING TO BUFFALO DAC

The synchronous reclocking approach described here seems ideal for interfacing with the Sabre DACs for the following two reasons:

  1. The oscillator frequency of Amanero (22.5792 MHz and 24.576 MHz)  is below what the Buffalo DAC considers “normal” which is higher than 40 MHz. So the best way is to operate the DAC in its normal asynchronous mode, taking advantage of the DAC’s local oscillator
  2. The DAC locks to the bit clock, therefore  it is desirable to generate a low jitter bit clock with this method of using a flip flop driven by a low jitter oscillator clock

PROS

  • Reduce jitter to the absolute minimum possible with the board
  • Easy to do, low cost

CONS

  • May not work for higher sample frequencies

This would be a very nice and interesting (and very cheap) mod. Definitely worth trying it out. I’ve already ordered some Potato Semi flip flops.

REFERENCES

Potato Semiconductor: http://www.potatosemi.com/

TI Logic Guide: http://www.ti.com/lit/sg/scyt129e/scyt129e.pdf

  1. qusp
    November 1, 2012 at 19:00

    sorry but that just looks like a big RF transmitter to me, the idea is sound enough, but doing it like that, with unshielded clock lines without a return, unterminated connections, broken ground planes and slot dipoles and monopoles everywhere…think i’ll stick to fifo. this sort of circuit is not something that should be airwired, I find it highly unlikely thats reducing jitter in its current form and it will without question be radiating noise all throughout the case

    • BlogGeanDo
      November 1, 2012 at 20:14

      Yeah, but it only costs a few bucks, much less than buying an album in iTunes :-), and it is worth a try. It can’t be worse than having the master clock wire connected from board to DAC, and it can be implemented in a much neater manner. I’ve gotten some Potato flip flops already and will try it soon. Thanks for the link to the reading material

      • qusp
        November 1, 2012 at 20:31

        sure, I just think the less of that sort of construction the better, particularly as we push speeds up and up. actually it could easily be worse than board to dac, if you do that with a simple piece of coax you may have higher jitter theoretically if you rule out the phase noise caused by the application, but i’d like to see the reality.

        if you read that, its almost literally broken every rule in the book within a few cubic inches, quite an effort. nothing there has a ground or a ground plane and you have some of the fastest logic chips on the planet sitting there near sensitive analogue circuits. its kinda horrifying in a geeky sorta way lol

  2. qusp
    November 1, 2012 at 19:06

    just remember at these speeds we are nolonger dealing wit audio signals, niether ar they digital signals, they are closest to RF analogue signals.

    some reading to explain why I find such constructions a little scary

    Click to access Antennas.pdf

  3. qusp
    November 1, 2012 at 20:36

    qusp :
    snip.. actually it could easily be worse than board to dac, if you connect directly with a simple piece of coax you may have higher jitter theoretically (the 100nS) if you rule out the phase noise caused by the application, but i’d like to see the reality.

    you could also do the MCLK direct mod only, dont reclock, just connect with a piece of coax, or better yet rough up a PCB, or just do the above properly, use coax connections, use blank FR4 with solid copper ground plane

    • BlogGeanDo
      November 1, 2012 at 21:19

      The Buffalo DAC doesn’t take MCLK, only bit clock. Besides it would be a pity to replace the CCHD-950 with a lesser clock :-).
      BTW, Ian’s FIFO is the right way for implementing a reclocker: everything signal is aligned and properly designed.
      But for a few bucks it MUST be tried 🙂

      • qusp
        November 2, 2012 at 05:15

        buffalo dac doesnt take mclk? really? maybe in your scaredy-cat world =) you still havent done that? hehee just joking. I was referring to the mod posted, which mentions taking mclk and you can see it being used, you know the 2 single unshielded untwisted aerials…erm…. I mean wires?

        a few bucks and some time you’ll never get back =)

      • BlogGeanDo
        November 2, 2012 at 05:26

        Hey qusp, I’ll be posting my antenna project soon 🙂 Free free to give all the (constructive) criticism you wish 🙂

  4. November 2, 2012 at 03:55

    Be careful with ultra-fast CMOS logic – it does require extremely good decoupling. Inside CMOS devices the transistors crowbar the supplies (quite literally) every clock transition. I discovered this with 74AC chips many years ago – even there I was using a multilayer PCB. I suspect the Potato chips are considerably faster! Get the smallest package size you can solder, decouple with 0603s and use a ferrite bead on the positive supply to reduce the bounce on the GND. Even with these precautions you’ll get some jitter from the bounce on the positive supply. Good luck!

    • BlogGeanDo
      November 2, 2012 at 04:35

      Richard, thanks for the tips. The Potato chips only come in one size SOIC and very easy to solder. You can their technology from their website. I am actually listening to it right now and sounds really good 🙂 Will post something later… I think a custom PCB with proper components that can match the header of the Amanero would be a great little mod…

  5. qusp
    November 2, 2012 at 05:26

    BlogGeanDo :
    Will post something later… I think a custom PCB with proper components that can match the header of the Amanero would be a great little mod…

    so do I, but as is its a bit scary =P

  6. Anonymous
    November 4, 2012 at 23:10

    Wow…
    Lot of things is going on ….
    Interesting stuff…
    Well… Not that I know anything but…

    .. I would newer argue with qusp …
    Unfortunately he is usually right… even when at first sight, it doesn’t seems so…
    😉 ..

    Rosendorfer

  7. PFM
    January 11, 2013 at 01:55

    I dont get the flip flop. What value does it add ? I mean if the master clock is just divided to get the bit and word clocks and the FIFO is driven by the bit clock then all the clocks and data should be in sync, wouldn’t it ?

  8. BlgGear
    January 11, 2013 at 02:13

    The flip flop is driven by the oscillator, so the input signal is “aligned” to the oscillator clock.
    The bit clock coming out of the CPLD has the jitter inherent in the CPLD. If you “align” the bitclock with the oscillator clock in the flip flip, then the jitter in the new bitclock is just the jitter of the flip flop (plus the jitter of the oscillator) which is less than the jitter added by the CPLD. Basically removes jitter by realigning the clock edges

    • PFM
      January 11, 2013 at 03:42

      so the “fifo” is actually an intrinsic part of the cpld ? its not a seperate ‘peripheral’ like a chip by itself that is run by the clock out of which the data is clocked out ?

      • BlgGear
        January 11, 2013 at 03:54

        It is synchronous so no FIFO is required outside of the CPLD. The same oscillator drives the CPLD and the flip flop. Neither the CPLD nor the DAC “knows” that there is a flip flop in between.

  9. Al
    May 23, 2013 at 11:22

    You wrote, Data is read in reference to the bit clock. As long as the minimum timing requirements are met (set up and hold times), a value of 1 will be read as 1 and a value of zero will be read as zero.

    How do you know that set up and hold times will be met? The flip-flop samples the bit clock with an MCLK that is asynchronous, No matter how fast MCLK is there will be set up and hold time violations creating errors on the bit clock.

    • BlgGear
      May 23, 2013 at 15:42

      The clock is synchronous because I am using the clocks on the board. If I were to use an external clock that is unrelated to the clocks on the board, then you are right.

  10. July 11, 2014 at 05:07

    An impressive share! I have just forwarded this onto a colleague
    who had been conducting a little homework on this.
    Andd he actually bought mee breakfast because I found iit
    for him… lol. So allow mme to reword this…. Thanks for the meal!!
    But yeah, thanks for spending the time to talk about this
    subject here on your site.

  11. September 14, 2016 at 17:27

    penny stock tips

  12. September 14, 2016 at 17:30

    kardiolog dzieciecy olsztyn

  13. September 14, 2016 at 17:47

    elo boosting

  14. September 14, 2016 at 19:06

    tarjetas plastico

  15. September 14, 2016 at 19:20

    Roman Blinds

  1. November 2, 2012 at 05:30
  2. November 8, 2012 at 17:47

Leave a comment