Is This the World's Most Accurate
NTP Server Hardware?

Well, It's Right Up There, Anyway...

This is a Soekris net4501 computer modified to use a TAPR Clock-Block frequency synthesizer and a TAPR FatPPS signal conditioner.

When fed with a quality reference signal at 10MHz to drive the system clock, and a quality PPS signal to provide timetags, it can keep time to within a few hundred nanoseconds (here are plots of how my herd of Soekri are performing).

The secret to the net4501's timekeeping capability is its use of an AMD Elan SC520 CPU which has internal time registers with a resolution of about 100 nanoseconds. With a little hardware and software magic (figured out by Poul-Henning Kamp), this timer can be used to capture PPS timetags far more precisely, and with much less jitter, than the traditional method of using an RS-232 serial port control line as the input. The following two graphs show first, a comparison of the same PPS signal as captured by the net4501 serial port (blue trace) and as captured by the Elan timer (red trace), and then a close-up view of the Elan data. These plots cover about 10 hours of data.

Here are the outputs from ntpq -p and ntptime:

test1# ntpq -p
     remote           refid      st t when poll reach   delay   offset
+GPS_HP(0)       .GPS.            0 l    1   16  377    0.000    5.768
oPPS(0)          .PPSZ.           0 l    2   16  377    0.000    0.000
0.015   .PPSC.           1 u   53   64  377    0.990   -0.052
0.729   .GPS.            1 u   61   64  377    1.012   -0.117
0.499    .WWVB.           1 u   34   64  377    1.010   -1.593
0.447    2 u   51   64  377    0.996    3.870
-timekeeper.febo    2 u    8   64  377    1.011    2.687

test1# ntptime
ntp_gettime() returns code 0 (OK)
  time c8e25a35.cd9a304c  Thu, Oct 19 2006 20:10:29.803, (.803134315),
  maximum error 2519 us, estimated error 15 us, TAI offset 0
ntp_adjtime() returns code 0 (OK)
  modes 0x0 (),
  offset 0.016 us, frequency -0.040 ppm, interval 1 s,
  maximum error 2519 us, estimated error 15 us,
  status 0x2001 (PLL,NANO),
  time constant 4, precision 0.001 us, tolerance 496 ppm,

This shows that the current offset between the system clock and the PPS stream is 0.16 microseconds, or 160 nanoseconds. The frequency error of -0.040 ppm is due to the fact that the synthesized clock frequency is offset 0.333... Hz from the integer value that the FreeBSD kernel uses in its calculations. The "jitter" and "estimated error" values are meaningless; they are the hard-coded minimums that NTP displays.

Note that my claim above is for the server hardware -- most of us use the reference NTP protocol implementation, ntpd, but Poul-Henning has written his own version, ntpns, which he convincingly claims offers much better performance when used with hardware like this. Unfortunately, at the moment ntpns doesn't support most of the reference clock hardware I'm using, so I'm not able to run it here.

How To Do It

WARNING: By installing these hardware mods, you will void the warranty on your Soekris computer at least four separate and distinct times. Proceed at your own risk!

Some preliminary notes:

The Electrical Work

To implement high-performance timekeeping, you need to modify the net4501 board to accept an external clock signal, as well as use the high resolution timer. These steps require fairly good soldering skills as the surface mount components on the board are tiny; if you're unsure of yourself, find someone with SMT soldering experience to help you.

Modifying the Case

If you are using the standard Soekris case, you will need to drill a couple of holes in it. One is for the clock signal coming in to the Clock-Block board, and the second is for the PPS signal. The clock signal should probably use a BNC jack for easy connection, though any RF connector will work. A DB-9 connector (technically, a DE-9M) is best for the PPS signal, but cutting a hole for that shape requires either patience and skill with a drill and file, or a Greenlee chassis punch.

If you use a Greenlee punch to mount the FatPPS, you need to be careful to position the hole so that the punch parts will clear the various standoffs mounted inside the Soekris case. The best bet is to put the center of the pilot hole about 7/16 inch down from the top lip of the case, and about 1 1/32 inch in from the left edge. The BNC connector for the Clock-Block should be about 2 1/4 inches from the left edge.

The Greenlee punch is just a little too tall to fit under the top edge of the case. To get a clean punch, we added two 3/8 inch washers (7/8 inch outside diameter), with the center drilled out to 7/16 inch, to the punch assembly (see the photos to see how this is done). This allows the punch to drive all the way through the chassis without hitting the top lip.

Here's what the finished case looks like; it's really hard to keep the DB-9 punch aligned horizontally:

Software Configuration

Burn the nanoBSD image to a CF card, insert it in the Soekris, and you should be ready to go.