WR Streamers allow to configure fixed-latency mode in which the jitter of the network latency is mitigated by delaying the received data for a short time and providing this data to user's application after a configured time with respect to the time of data transmission. In a typical WR top-level design, this setting can provide jitter at 200ps level however it can only guarantee a peak-to-peak variation of 16ns. For applications that require a guaranteed peak-to-peak latency variation below 1ns, extra configuration and specific instantiation of the application-specific module that transmits/receives the data is needed. Still, the accuracy of the configured fixed-latency might be be greater than 1ns because of the internal delays, it is expected to be <4ns.
The ultra-fixed latency configuration is the configuration of WR Streamers in which the peak-to-peak variation of the fixed-latency transmission is guaranteed to be below 1ns.
In typical a top-level design that uses WR Streamers (e.g. all top-level designs in
except spec_fixed_latency_ref_design), the system clock (clk_sys_62m5) is different than
the White Rabbit reference clock (clk_ref_125m). This is a common arrangement in WR
nodes. The system clock is 62.5MHz, the reference clock is 125MHz. While the system
clock drives the application-specific user’s logic, it is the WR reference clock that provides
WR sub-ns accuracy of synchronization. Although, the two clock are related, it is not
possible to guarantee that the fixed-latency configuration in the WR Streamers module
provides a latency with sub-ns accuracy when the output data of the WR Streamers is
in the system clock domain. In such case, the fixed-latency can be guaranteed only to with
16ns (though, it is typically much better, typically < 1ns).
For applications that require guaranteed sub-ns jitter of the fixed-latency transmission,
the data transmitted/received by the WR Streamers must be in the WR clock
reference domain, so does the application-specific user’s logic. The WR Streamers
configuration allows to choose which clock is used internally for handling the
transmitted/received data, i.e. the streamers interface with the application-specific user’s
logic. If the
variable use_ref_clk_for_data is set to 1 in the g_tx_streamer_params, the transmission
interface of WR Streamers is synchronous to the WR reference clock. If the
use_ref_clk_for_data variable is set to 1 in the g_rx_streamer_params, the reception
interface of WR Streamers is synchronous to the WR reference clock. In both cases, the
application-specific user’s logic must also be synchronous to the WR reference clock.
The spec_fixed_latency_ref_design in the BTrain-over-WhiteRabbit project illustrates ultra-fixed latency configuration and instantiation
of the WR Streamers. This design is similar to other SPEC top-level designs with exception of the following:
It sets use_ref_clk_for_data to 1 in g_tx_streamer_params and g_rx_streamer_params configuration that is provided to the xwrc_board_spec which includes the WR Streamers.
It provides the WR reference clock (clk_ref_125m) as the clk_i to the application-specific user's module (BTrain Frame Transceiver).
It provides the reset signal synchronous with the WR reference clock (rst_ref_125m_n) as the rst_n_i to the application-specific user's module (BTrain Frame Transceiver).
The users that require sub-ns fixed-latency transmission jitter should follow the configuration
provided in the spec_fixed_latency_ref_design top level reference design.
NOTE: The top level designs that do not use the ultra-fixed latency configuration are
likely to provide sub-ns fixed-latency transmission jitter, yet it cannot be guaranteed because
of the data crossing the clock domains.