RCIM User’s Guide
3-2
The Tick Clock
1
The tick clock is a 64-bit non-interrupting counter that increments by one on each tick of
the common clock signal. Although it cannot be set to a specific time, it can be
incremented or set to zero. Hence the tick clock cannot be adjusted on the fly to
approximate the current time of day as would be required of a true time-of-day clock.
When an RCIM board is part of an RCIM chain, the tick clocks on all slave RCIMs are
incremented and cleared in synchronization with whatever incrementing and clearing is
done to the tick clock located on the master RCIM.
The tick clock can be read on any system, master or slave, using direct reads when the
device file
/dev/rcim:
N
/sclk
(where
N
is the RCIM card number starting from zero)
is mapped into the address space of a program. See the section “Direct Access to the
Clocks” below for details.
By default, tick clock initialization (zeroing) and synchronization with other tick clocks on
the RCIM chain occur automatically whenever the RCIM master boots. Initializing and
synchronizing tick clocks is accomplished using the
rcim_clocksync(1)
command.
See the sections “Synchronizing the Tick Clock” and “The rcim_clocksync Utility” below
for details.
The POSIX Clock
1
The POSIX clock is a 64-bit non-interrupting counter encoded in POSIX 1003.1 format.
The upper 32 bits contain seconds and the lower 32 bits contain nanoseconds. This clock
is incremented on each tick of the common clock signal and the system clock is
synchronized to the POSIX clock.
Setting the system clock (for example, with
clock_settime
(2)) will set both the
system clock and the RCIM POSIX clock to the new time. In addition, the POSIX clock
can be mapped with
mmap
and then read like any other RCIM register by applications.
However, modifying the RCIM POSIX clock via the
mmap
method is not recommended
while the system is synchronizing with the RCIM POSIX clock.
The POSIX clock can be loaded with any desired time; however, the value loaded is not
synchronized with other clocks in an RCIM chain. Only the POSIX clock of the RCIM
attached to the host is updated. See the section “Direct Access to the Clocks” below for
details about accessing the POSIX clock.
The
rcimdate
command can be run on each slave to synchronize the POSIX clock to
that of the master. No TCP/IP connection or other software is needed.
rcimdate
utilizes
the POSIX timestamp sent down the RCIM cabling once per second by the RCIM maser.
On an RCIM system with GPS module and system timekeeping software running (e.g.
ntpd
or
chronyd
with
gpsd
), the GPS receiver is used to synchronize the POSIX clock
on the RCIM on which it is attached to GPS time. One GPS-equipped RCIM can
synchronize all iHawks in an RCIM chain. Multiple RCIMs equipped with the GPS
module can provide a common time base without any cable connections between systems.
POSIX timers based on absolute GPS time can be used to simultaneously start the
execution of programs on systems which are not physically connected.
Summary of Contents for RCIM
Page 1: ...Real Time Clock and Interrupt Module RCIM User s Guide 0898007 1000 March 2021...
Page 10: ...RCIM User s Guide 1 4...
Page 32: ...RCIM User s Guide 2 22...
Page 80: ...RCIM User s Guide A 28...
Page 102: ...RCIM User s Guide C 2...