The sample program @i{fmctdc-list} lists the boards currently on the system,
using @i{fmctdc_init}:
...
...
@@ -590,47 +581,6 @@ using @i{fmctdc_init}:
@node Time Management
@section Time Management
These are the primitives the library offers for time management.
@table @code
@item struct fmctdc_time;
The structure describes an internal timestamp format used by the card. This format is used by all our
FMCs that use White Rabbit for synchronization. It consists of the following fields (see @ref{fig:ts_format}):
@itemize
@item 64-bit @code{seconds} - TAI seconds. Note this is @b{not} an UTC time - the counter does not support leap seconds. The internal counter is also limited to 32 bits (2038-error-prone).
@item 32-bit @code{coarse} - number of 8 ns ticks since the beginning of the last second.
@item 32-bit @code{frac} - fractional part of an 8 ns tick, rescaled to (0..4095) range - i.e. 0 = 0 ns, and 4095 = 7.999 ns.
@item 32-bit @code{seq_id} - sequence identfier of the timestamp (used by readout functions).
@end itemize
@float Figure,fig:ts_format
@center @image{drawings/ts_format, 13cm,,,.pdf}
@caption{WR timestamp format used by the FmcTdc.}
@end float
@item int fmctdc_set_time(struct fmctdc_board *b, struct fmctdc_time *t);
@itemx int fmctdc_get_time(struct fmctdc_board *b, struct fmctdc_time *t);
The functions are used to set board time from a user-provided
time, and to retrieve the current board time to user space.
The functions return 0 on success. They only use the field
@i{seconds} of @code{struct fmctdc_time}.
@b{Note 1}: the current gateware does not support setting/reading the coarse counter. When the user calls
@code{fmctdc_[sg]et_time()}, only the seconds counter is read/written. Coarse counter is always set to 0.
See section @i{Known issues} for details.
@b{Note 2}: time can be only set when acuqisition is disabled (see @code{fmctdc_set_acquisition()}), otherwise
time setting function will return an error and time counter will remain unchanged.
@item int fmctdc_set_host_time(struct fmctdc_board *b);
The function sets board time equal to host time, it is provided as a convenience shortcut. It can also be used
to coarsely synchronize different cards in the same host.
@end table
The program @i{fmctdc-board} is a command-line front-end to the library,
to validate the library works as expected. The first parameter is the board bus ID, the second one is the command, the third one is the new seconds counter value:
...
...
@@ -651,34 +601,6 @@ to validate the library works as expected. The first parameter is the board bus
@node Input Configuration
@section Input Configuration
To configure the input channel for a board, the library offers the
following function and macros:
@table @code
@item int fmctdc_set_termination(struct fmctdc_board *b, int channel, int enable);
The function enables/disables the 50 Ohm termination of the given channel. Termination may be
changed anytime.
@itemx int fmctdc_get_termination(struct fmctdc_board *b, int channel);
The function returns current temrmination status: 0 if the given channel is high-impedance and positive if
it is 50 Ohm-terminated.
@item int fmctdc_set_acquisition(struct fmctdc_board *b, int enable);
The function globally enables/disables timestamp acquisition for the given mezzanine. Due to limitations
in the gateware, it is not possible to enable/disable channels individually. Certain operations such as