[time-nuts] FPGA based TDC

Attila Kinali attila at kinali.ch
Sun Dec 18 07:46:22 EST 2016


On Sat, 17 Dec 2016 10:48:35 -0500
Bob Camp <kb8tq at n1k.org> wrote:

> > Sébastian told me that for the original TDC design (based on a Spartan3 IIRC)
> > they didn't employ any method for increasing the resolution by compensating
> > for different bin sizes, as they got pretty close to the minimal bin size
> > anyways. But for the Cyclone4 I guess using something like Wu's Wave Union[4]
> > approach might be a good idea. Unfortunately, we didn't have the time to 
> > try it.
> 
> If you do go to the Wave Union, it does work on Cyclone 5’s and Spartan 6’s. I suspect 
> it will work on the newer stuff as well. The big issue you run into is “decoding” the patterns
> you get. The data is *not* a nice looking set of “all zeros before” and “all ones after” some
> point. Figuring out which bin came first with a random calibration approach requires a 
> bit of a leap of faith (count the zeros / count the ones) to order them. Even with that you 
> still get bins that appear to be equivalent (same number of zeros), but have them in a 
> different order. 

Yes, the decoding of wave union is anything but trivial. The main issue
is that the ordering of the thermometer encoded bits is not the same as
the ordering of the delay line. This is due to the badly controlled delays
within the delay line and the clock tree causing unequal capture time for
the registers. This leads to "bubbles" in the encoding. The original TDC Core
code reordered the bits according to the timing simulation results.
For the Cyclone4 we encountered the problem, that the ordering is not stable.
i.e. the ordering changes over time and is dependent on the logic
surrounding the delay line. Thus we reverted to only count the zeros/ones as
an approximation. This of course does not work with wave union and an
other scheme as to be devised. One way to do it would probably be to make
the distance between the edges long enough such that the bubles can be
matched to a single edge. Then one could count the zeros/ones in the area
around the presumed edge position. But as I have not tried this, I do not
know how well it would work in reality.

				Attila Kinali

-- 
Malek's Law:
        Any simple idea will be worded in the most complicated way.


More information about the time-nuts mailing list