Live data from Hacker News

Open-sourcing a more precise time appliance

engineering.fb.com

91–100 of 188 posts

Re: Open-sourcing a more precise time appliance

#91
Really nice of them to release this. However, unless I'm missing something, the HDL for the FPGA on the Time Card is not part of the release. It looks like it uses a proprietary IP core from NetTimeLogic

https://github.com/opencomputeproject/Time-Appliance-Project...

They do include FPGA bit streams, but it's disingenuous to claim a fully open source release.

Re: Open-sourcing a more precise time appliance

#92
I don't see a big deal here. You are using a very expensive free-running time-base (MAC - Rb clock) to implement the holdover. These MACs are really expensive, and basically unobtanium if you are not a big corp. You should have done it with a DOCXO and some clever training software to correct the DOCXO vs temperature and aging when GPS tracking is lost.

Re: Open-sourcing a more precise time appliance

#93
post #53

Earlier quoted context omitted.

Which is exactly how the telephone industry has done it for decades, it's called a "building-integrated timing supply", or BITS clock. Typically this is a GPS-referenced clock with a local quartz or rubidium holdover oscillator, and output cards with dozens or hundreds of outputs serving various machines in the office.

Curious, why did telephony require such accurate clocks?

Seems to be part of SONET and CDMA 2000 standards to keep network elements synchronized:

* https://www.gps.gov/cgsic/meetings/2012/weiss1.pdf

Specifically frequency and phase sync requirements:

* https://en.wikipedia.org/wiki/Synchronization_in_telecommuni...

Re: Open-sourcing a more precise time appliance

#94
post #53

Earlier quoted context omitted.

Which is exactly how the telephone industry has done it for decades, it's called a "building-integrated timing supply", or BITS clock. Typically this is a GPS-referenced clock with a local quartz or rubidium holdover oscillator, and output cards with dozens or hundreds of outputs serving various machines in the office.

Curious, why did telephony require such accurate clocks?

It's not about accuracy (nobody really cares if the whole network is running fast or slow compared to some other clock) so much as synchrony (the whole network needs to be running from the same clock).

Asynchronous networks can't guarantee latency or jitter performance, and they require buffers. Synchronous networks (remember, this is voice-grade stuff) can deliver bits out at the same rate as bits in, anywhere in the network, without dropped frames or stuffing or anything obnoxious like that.

Analogy time: If all you're familiar with is packet-switched networks, sure, let's call them trucks. A truck gets filled with payload, it leaves, and sometime later, it arrives at its destination. Packets get reordered, and it's someone else's problem to deal with that. A great many shipping-and-receiving docks contain a great deal of complexity, to check bills-of-lading against what was ordered, with warehouses to smooth over the difference. It works today because computers are powerful, and buffer bloat is still a plague.

Implementing VoIP with 1960s technology was... not practical.

So, synchronous networks don't require any of that complexity. Nothing's ever out of order, there's never a bit arriving too soon or too late. You don't even handle them as packets, they're literally just streams of bits, coming out of an ADC here, beating through the network in synch, and being shoved into a DAC over there. Rather than a truck, imagine a bunch of slow conveyor belts feeding a faster-moving belt with a spinning turnstile or little paddle controlling what goes onto it -- for this microsecond, input 1 can emit a bit onto the belt, then a microsecond later, it's input 2 and so on. So the belt contains an ordered stream of bits, and at the other end there's another paddle spinning in sync with the first, demultiplexing the bits back out to their sub-rate circuits.

This can be implemented with discrete transistors. There's no need for buffers or packet reordering or any such nonsense. And definitely no repeated frames. There are no hiccups, no dropped frames, no reassembly or reordering. And definitely no repeated frames. End-to-end latency is the speed of light plus one half a frame time, on average.

And if you can make the whole continent beat in sync, you can enjoy this level of service and predictability even on long-distance calls.

Initially (in the 1960s, as time-domain multiplexing was deployed) this was done by having one master oscillator in Kansas City (the approximate geographic center of the continental US), and fanning-out its timing through an enormous branching-tree structure of amplifiers called Synchronization Distribution Expanders. This performed beautifully but it was a logistical nightmare, any network disruption could cause problems, you needed local oscillators for holdover anyway, etc.

As GPS was made available for civilian applications, it made sense to convert to using Schriever AFB as the master clock, use the space segment as the distribution network, and simply give each office an antenna to tap into it. The implementation is a bit tricky because of doppler shift and stuff, but GPS receivers abstract all that away, and can hand you a timepulse which is synchronized to GPS system time. (Then the BITS rack converts that to the useful frequencies and distributes it within the office.)

Re: Open-sourcing a more precise time appliance

#95
post #62

Earlier quoted context omitted.

I'm curious: what's the use case for microsecond-precise timekeeping?

There are plenty of practical applications for it. Imagine super high speed, high precision robotics, maybe a synthetic fiber layup machine or an exotic milling machine, that moves at 10m/s. If you have 1us of precision and accuracy then you can send movement commands that are precise down to 10um.

But does that really require an absolute time reference?

Re: Open-sourcing a more precise time appliance

#96
post #62

Earlier quoted context omitted.

I'm curious: what's the use case for microsecond-precise timekeeping?

Certain trading operations require it. I think there's even a regulatory under Mifid2, bit I'm not in the know about the legals.

I work in trading, but mostly on the asian markets, so not sure about mifid. Usually the exchanges seem to give milli to second precision (which is very annoying: if Thailand says it's second-precision to timestamp their order executions but Taiwan says it's milli, our system has to use the most precise when ordering them and we get questions from our own multi market clients about why all these executions are seemingly simultaneous or why our system source marked the request at .480 while the exchange replied with 0.0 for the execution.

But, by no mean, does it mean we use special timing - but now that I say that, I realize I have no clue where our time signal comes from, clearly it wouldn't be the internet because our trading servers aren't exactly directly connected there, we must have an internal ntp sever o_O

Re: Open-sourcing a more precise time appliance

#97

Earlier quoted context omitted.

Most (if not all) our switches in the datacenter are capable to perform as transparent clocks. With transparent clocks you can keep the time sync error down to less than 5ns per hop

Do the transparent clocks in your datacenter support unicast PTP? There is a possibility to use PTP as a transport for NTP to take advantage of PTP-specific hardware timestamping. It could also process the correction field, but it seems the switches typically don't support unicast PTP. The large asymmetry and banding of NTP in the test with Calnex Sentinel suggests it doesn't support the interleaved mode. NTP with ha…

> but it seems the switches typically don't support unicast PTP.

Doing a quick search, the documentation for Cisco, Arista, and Juniper all mention unicast PTP, so it may be the feature is becoming more prevalent.

See also "Enterprise Profile for the Precision Time Protocol With Mixed Multicast and Unicast Messages":

* https://datatracker.ietf.org/doc/html/draft-ietf-tictoc-ptp-...

Re: Open-sourcing a more precise time appliance

#98

> Now, as long as printing the PCB and soldering tiny components does not sound scary, anyone can build their own Time Card for a fraction of the cost of a regular time appliance. Doesn't sound scary, but not a lot of research labs and data centers are going to want to build their expansion cards from parts, even given free access to instructions. I understand if there isn't enough of a market for this to make it a v…

Of course we are not going to build the card in the lab with assembling SMD parts. This was more a way to explain that building such a card should not be out of access for anyone

I mean, you can buy a syringe of solder paste for thirty bucks and do the reflow in a toaster oven. Anyone not doing it simply isn't trying.

Re: Open-sourcing a more precise time appliance

#99
I cannot find any source files for the FPGA code in the repository (no .v .vhd .vhdl files and I can't see anything by looking around manually). The FPGA directory [1] contains some binaries and some documents relating to commercial code from a Swiss firm [2].

I've seen plenty of projects described as open source when the firmware is open source and the hardware is closed but this is the first time I've seen one where the schematics and board layout are open but the firmware is closed. Note that the hardware itself is quite simple, the smart stuff happens in three modules: GNSS receiver, precision clock and FPGA. To me, the contents of the FPGA source code are the only interesting part of this project. Additionally, you won't be able to meaningfully modify or reuse this project without editing the source code.

The hardware module these FPGA binaries seem to be compiled for is described as an AC7100B, the source given for these is a defunct ebay link [3] [4] :-O This project uses two and half grand's worth of atomic clock and the heart of it runs on a module that fell off the back of a lorry!?

[1] https://github.com/opencomputeproject/Time-Appliance-Project... [2] https://www.nettimelogic.com/clock-products.php [3] https://github.com/opencomputeproject/Time-Appliance-Project... [4] https://www.ebay.com/itm/XINLINX-A7-FPGA-Development-board-A...

Edit: I realise this comes across as quite negative. This looks like a neat project, one I would actually use, but only if it were meaningfully open source.

Re: Open-sourcing a more precise time appliance

#100
post #72

Congrats to everyone who made this project possible. It’s certainly a great accomplishment and it solves a real world problem. Now, does it require a Facebook account with my real name in order to use? /s

What real world problem does this actually solve that has not been solved earlier? Genuinely curious.
Post reply on HN