|
|
# Timetag Format proposal
|
|
|
# Time-tag Format proposal
|
|
|
|
|
|
This page defines a standard format for time-tag in OHR designs.
|
|
|
|
|
|
A time-tag is composed of four fields; Metadata, UTC seconds, Coarse
|
|
|
time, Fine time.
|
|
|
|
|
|
The Metadata field holds application specific informations. Four bits
|
|
|
are reserved for the time-tag format version.
|
|
|
|
|
|
The UTC seconds field comes from a counter incremented by a PPS (Pulse
|
|
|
Per Second) signal. This counter can be in the WR (White Rabbit) core in
|
|
|
WR enabled designs. If the design is not WR enabled, one has to
|
|
|
implement a counter that can be set external (e.g. from a remote
|
|
|
computer).
|
|
|
|
|
|
The Coarse time field comes from a counter clocked at 125MHz starting
|
|
|
with the PPS signal and reset at 124999999. Again this counter can come
|
|
|
from the WR core or can be implemented separately.
|
|
|
|
|
|
The Fine time field is used in case of high resolution application (like
|
|
|
TDC or Fine Delay). If the applications doesn't require high resolution,
|
|
|
this field can be set to 0. It consists of a fractional part of the
|
|
|
Coarse time counter. The LSB represents: 8E-9/(2\*\*field\_size) where
|
|
|
field\_size is the number of bits of the Fine time field.
|
|
|
|
|
|
The time-tag size is 128-bit. The size of each field is described below:
|
|
|
|
|
|
<table>
|
|
|
<tbody>
|
|
|
<tr class="odd">
|
|
|
<td>Metadata</td>
|
|
|
<td>32-bit</td>
|
|
|
</tr>
|
|
|
<tr class="even">
|
|
|
<td>UTC seconds</td>
|
|
|
<td>32-bit</td>
|
|
|
</tr>
|
|
|
<tr class="odd">
|
|
|
<td>Coarse time</td>
|
|
|
<td>32-bit</td>
|
|
|
</tr>
|
|
|
<tr class="even">
|
|
|
<td>Fine time</td>
|
|
|
<td>32-bit</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
As the Coarse time field only goes from 0 to 124999999, another solution
|
|
|
to have a bigger UTC seconds field would be:
|
|
|
|
|
|
<table>
|
|
|
<tbody>
|
|
|
<tr class="odd">
|
|
|
<td>Metadata</td>
|
|
|
<td>32-bit</td>
|
|
|
</tr>
|
|
|
<tr class="even">
|
|
|
<td>UTC seconds</td>
|
|
|
<td>35-bit</td>
|
|
|
</tr>
|
|
|
<tr class="odd">
|
|
|
<td>Coarse time</td>
|
|
|
<td>27-bit</td>
|
|
|
</tr>
|
|
|
<tr class="even">
|
|
|
<td>Fine time</td>
|
|
|
<td>32-bit</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|