In the TDC core, the unit is the clock period, and the output has $F$ base 2 digits after the radix points. The controller also chooses\footnote{This choice was made for design simplicity reasons, and the precision can be improved by increasing C.}$C=2^F$. Expressed in units of $2^{-F}$ clock periods (which is the weight of the least significant bit of the fixed-point output), we have:

In the TDC core, the unit is the clock period, and the output has $F$ base 2 digits after the radix points. The controller also chooses$C=2^{F+P}$, where $P$ is the number of \textit{extra histogram bits}. Expressed in units of $2^{-F}$ clock periods (which is the weight of the least significant bit of the fixed-point output), we have:

\begin{equation}

\frac{T_{sys}}{C}=1

\frac{T_{sys}}{C}=2^{-P}

\end{equation}

\subsubsection{Online calibration}

...

...

@@ -170,6 +170,7 @@ The top-level entity \verb!tdc! has the following generics:

\item\verb!g_CARRY4_COUNT! is the number of \verb!CARRY4! elements in the delay line of each channel. Each \verb!CARRY4! has 4 outputs, so the number of taps of the delay line is $4\cdot\verb!g_CARRY4_COUNT!$.

\item\verb!g_RAW_COUNT! represents the number of bits at the output of the encoder. It should be set to the smallest value that verifies $4\cdot\verb!g_CARRY4_COUNT!\le2^{\verb!g_RAW_COUNT!}-1$.

\item\verb!g_FP_COUNT! defines the number of desired digits after the radix point.

\item\verb!g_EXHIS_COUNT! defines the number of desired extra histogram bits. Extra histogram bits improve precision by increasing $C$ and averaging statistical errors out.

\item\verb!g_COARSE_COUNT! is the size, in bits, of the coarse counter which is incremented at each cycle.

\item\verb!g_RO_LENGTH! defines how many \verb!LUT! primitives used as inverters are chained in the ring oscillator of each channel. For the ring oscillators to operate, this number must be odd.

\item\verb!g_FCOUNTER_WIDTH! is the width, in bits, of the counter used to measure the frequency of the ring oscillator. Increasing this width allows for a more precise frequency measurement.