diff options
author | roberto <roberto@FreeBSD.org> | 2001-08-29 14:35:15 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2001-08-29 14:35:15 +0000 |
commit | 40b8e415eb0f835a9dd7a473ddf134ec67877fd7 (patch) | |
tree | 3cfb63f1a112ee17469b17fc1593a88d004ddda6 /contrib/ntp/html/driver22.htm | |
parent | a5a8dc6136fcee95f261a31609a25669038c3861 (diff) | |
download | FreeBSD-src-40b8e415eb0f835a9dd7a473ddf134ec67877fd7.zip FreeBSD-src-40b8e415eb0f835a9dd7a473ddf134ec67877fd7.tar.gz |
Virgin import of ntpd 4.1.0
Diffstat (limited to 'contrib/ntp/html/driver22.htm')
-rw-r--r-- | contrib/ntp/html/driver22.htm | 286 |
1 files changed, 158 insertions, 128 deletions
diff --git a/contrib/ntp/html/driver22.htm b/contrib/ntp/html/driver22.htm index 313d2b8..a293cbc 100644 --- a/contrib/ntp/html/driver22.htm +++ b/contrib/ntp/html/driver22.htm @@ -1,129 +1,159 @@ -<HTML> -<HEAD> - <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> - <META NAME="GENERATOR" CONTENT="Mozilla/4.01 [en] (Win95; I) [Netscape]"> - <TITLE>PPS Clock Discipline -</TITLE> -</HEAD> -<BODY> - -<H3> -PPS Clock Discipline</H3> - -<HR> -<H4> -Synopsis</H4> -Address: 127.127.22.<I>u</I> -<BR>Reference ID: <TT>PPS</TT> -<BR>Driver ID: <TT>PPS</TT> -<BR>Serial Port: <TT>/dev/pps<I>u</I></TT>; 9600 baud, 8-bits, no parity -<BR>Features: <TT>tty_clk</TT> -<H4> -Description</H4> -This driver furnishes an interface for pulse-per-second (PPS) signals produced -by a cesium clock, radio clock or related equipment. It can be used to -remove accumulated jitter and retime a secondary server when synchronized -to a primary server over a congested, wide-area network and before redistributing -the time to local clients. - -<P>In order for this driver to work, the local clock must be set to within -+-500 ms by another means, such as a radio clock or NTP itself. The PPS -signal is connected via a serial port and <A HREF="gadget.htm">gadget box</A> -consisting of a one-shot and RS232 level converter. When operated at 38.4 -kbps with a SPARCstation IPC, this arrangement has a worst-case jitter -less than 26 us. - -<P>There are three ways in which this driver can be used. The first way -uses the <TT>ppsclock</TT> line discipline and works only for the baseboard -serial ports of the Sun SPARCstation running SunOS 4.x. The PPS signal -is connected via the gadget box to the carrier detect (DCD) line of a serial -port. The signal is activated for this port by a <TT>fudge flag3 1</TT> -command following the <TT>server</TT> command in the configuration file. -This causes the <TT>ppsclock</TT> streams module to be configured for that -port and to capture a timestamp at the on-time transition of the PPS signal. -This driver then reads the timestamp directly by a designated <TT>ioctl()</TT> -system call. This provides the most accurate time and least jitter of any -other scheme. There is no need to configure a dedicated device for this -purpose, which ordinarily is the device used for the associated radio clock. - -<P>The second way uses the <TT>tty_clk</TT> line discipline and works for -any architecture supporting a serial port. If after a few seconds this -driver finds no <TT>ppsclock</TT> module configured, it attempts to open -a serial port device <TT>/dev/pps%d</TT>, where <TT>%d</TT> is the unit -number, and assign the <TT>tty_clk</TT> line discipline to it. If the line -discipline fails, no harm is done except the accuracy is reduced somewhat. -The pulse generator in the gadget box must be adjusted to produce a start -bit of length 26 usec at 38400 bps. Used with the <TT>tty_clk</TT> line -discipline, this produces an ASCII DEL character ('\377') followed by a -timestamp at the on-time transition of the PPS signal. - -<P>The third way involves an auxiliary radio clock driver which calls the -PPS driver with a timestamp captured by that driver. This use is documented -in the source code for the driver(s) involved. -<H4> -Fudge Factors</H4> - -<DL> -<DT> -<TT>time1 <I>time</I></TT></DT> - -<DD> -Specifies the time offset calibration factor, in seconds and fraction, -with default 0.0. This parameter can be used to compensate for the UART -and OS delays. Allow about 247 us for UART delays at 38400 bps and about -1 ms for SunOS streams nonsense.</DD> - -<DT> -<TT>time2 <I>time</I></TT></DT> - -<DD> -Not used by this driver.</DD> - -<DT> -<TT>stratum <I>number</I></TT></DT> - -<DD> -Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD> - -<DT> -<TT>refid <I>string</I></TT></DT> - -<DD> -Specifies the driver reference identifier, an ASCII string from one to -four characters, with default <TT>PPS</TT>.</DD> - -<DT> -<TT>flag1 0 | 1</TT></DT> - -<DD> -Not used by this driver.</DD> - -<DT> -<TT>flag2 0 | 1</TT></DT> - -<DD> -Not used by this driver.</DD> - -<DT> -<TT>flag3 0 | 1</TT></DT> - -<DD> -Not used by this driver.</DD> - -<DT> -<TT>flag4 0 | 1</TT></DT> - -<DD> -Not used by this driver.</DD> - - -<P>Additional Information - -<P><A HREF="refclock.htm">Reference Clock Drivers</A></DL> - -<HR> -<ADDRESS> -David L. Mills (mills@udel.edu)</ADDRESS> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<html> +<head> +<meta name="generator" content="HTML Tidy, see www.w3.org"> +<title>PPS Clock Discipline</title> +</head> +<body> +<h3>PPS Clock Discipline</h3> + +<hr> +<h4>Synopsis</h4> + +Address: 127.127.22.<i>u</i> <br> +Reference ID: <tt>PPS</tt> <br> +Driver ID: <tt>PPS</tt> <br> +Serial or Parallel Port: <tt>/dev/pps<i>u</i></tt> <br> +Requires: PPSAPI interface + +<p>Note: This driver supersedes an older one of the same name. The +older driver operated with several somewhat archaic signal +interface devices, required intricate configuration and was poorly +documented. This driver operates only with the PPSAPI interface +proposed as an IETF standard. Note also that the <tt>pps</tt> +configuration command has been obsoleted by this driver.</p> + +<h4>Description</h4> + +<p>This driver furnishes an interface for the pulse-per-second +(PPS) produced by a cesium clock, radio clock or related equipment. +It can be used to augment the serial timecode generated by a GPS +receiver, for example. It can be used to remove accumulated jitter +and re-time a secondary server when synchronized to a primary +server over a congested, wide-area network and before +redistributing the time to local clients. The driver includes +extensive signal sanity checks and grooming algorithms. A range +gate and frequency discriminator reject noise and signals with +incorrect frequency. A multiple-stage median filter rejects jitter +due to hardware interrupt and operating system latencies. A +trimmed-mean algorithm determines the best time samples. With +typical workstations and processing loads, the incidental jitter +can be reduced to less than a microsecond.</p> + +<p>While this driver can discipline the time and frequency relative +to the PPS source, it cannot number the seconds. For this purpose a +auxiliary source is required, ordinarily a radio clock operated as +a primary reference (stratum 1) source; however, another NTP time +server can be used as well. For this purpose, the auxiliary source +is marked as the prefer peer, as described in the <a href= +"prefer.htm">Mitigation Rules and the <tt>prefer</tt> Keyword</a> +page.</p> + +<p>The driver requires the PPSAPI interface<sup>1</sup>, which is a +proposed IETF standard. The interface consists of the <tt> +timepps.h</tt> header file and associated kernel support. Support +for this interface is included in current versions of FreeBSD and +Linux and proprietary versions for Digital/Compaq Tru64 (Alpha), +Sun Solaris and Sun SunOS. See the <a href="pps.htm"> +Pulse-per-second (PPS) Signal Interfacing</a> page for further +information.</p> + +<p>The PPS source can be connected via a serial or parallel port, +depending on the hardware and operating system. The port can be +dedicated to the PPS source or shared with another device. A radio +clock is usually connected via a serial port and the PPS source +connected via a level converter to the data carrier detect (DCD) +pin (DB-9 pin 1, DB-25 pin 8) of the same connector. In some +systems where a parallel port and driver are available, the PPS +signal can be connected directly to the ACK pin (pin 10) of the +connector. Whether the PPS signal is connected via a dedicated port +or shared with another device, the driver opens the device <tt> +/dev/pps%d</tt>, where <tt>%d</tt> is the unit number. As with +other drivers, links can be used to redirect the logical name to +the actual physical device.</p> + +<p>The driver normally operates like any other driver and uses the +same mitigation algorithms and PLL/FLL clock discipline +incorporated in the daemon. If kernel PLL/FLL support is available, +the kernel PLL/FLL clock discipline is used instead. The default +behavior is not to use the kernel PPS clock discipline, even if +present. This driver incorporates a good deal of signal processing +to reduce jitter using the median filter and trimmed average +algorithms in the driver interface. As the result, performance with +minpoll and maxpoll configured at the minimum 4 (16s) is generally +better than the kernel PPS clock discipline. However, fudge flag 3 +can be used to enable this discipline if necessary.</p> + +<p>Note that the PPS source is considered reachable only if the +auxiliary source is the prefer peer, is reachable and is selected +to discipline the system clock. The stratum assigned to the PPS +source is automatically determined. If the auxiliary source is +unreachable or inoperative, the stratum is set to 16; otherwise it +is set to match the stratum of the auxiliary source. Since the +stratum is determined dynamically, it is not possible to assign +another stratum using the <tt>fudge</tt> command as in other +drivers.</p> + +<h4>Fudge Factors</h4> + +<dl> +<dt><tt>time1 <i>time</i></tt></dt> + +<dd>Specifies the time offset calibration factor, in seconds and +fraction, with default 0.0.dd></dd> + +<dt><tt>time2 <i>time</i></tt></dt> + +<dd>Not used by this driver.</dd> + +<dt><tt>stratum <i>number</i></tt></dt> + +<dd>Specifies the driver stratum, in decimal from 0 to 15, with +default 0.</dd> + +<dt><tt>refid <i>string</i></tt></dt> + +<dd>Specifies the driver reference identifier, an ASCII string from +one to four characters, with default <tt>PPS</tt>.</dd> + +<dt><tt>flag1 0 | 1</tt></dt> + +<dd>Not used by this driver.</dd> + +<dt><tt>flag2 0 | 1</tt></dt> + +<dd>Specifies the PPS signal on-time edge: 0 for assert (default), +1 for clear.</dd> + +<dt><tt>flag3 0 | 1</tt></dt> + +<dd>Controls the kernel PPS discipline: 0 for disable (default), 1 +for enable.</dd> + +<dt><tt>flag4 0 | 1</tt></dt> + +<dd>Not used by this driver.</dd> +</dl> + +<p>Additional Information</p> + +<p><a href="refclock.htm">Reference Clock Drivers</a></p> + +<p>Reference</p> + +<ol> +<li>Mogul, J., D. Mills, J. Brittenson, J. Stone and U. Windl. +Pulse-per-second API for Unix-like operating systems, version 1. +Request for Comments RFC-2783, Internet Engineering Task Force, +March 2000, 31 pp.</li> +</ol> + +<hr> +<a href="index.htm"><img align="left" src="pic/home.gif" alt= +"gif"></a> + +<address><a href="mailto:mills@udel.edu">David L. Mills +<mills@udel.edu></a></address> +</body> +</html> -</BODY> -</HTML> |