Tx Streamer transfers data words that are of width (n * 16)
bits where the upper limit of the word size is the size of Ethernet
frame payload (minus overhead for WR Streamers header/CRC) . The
width is defined by generic data_width (in the respective
configuration records g_tx_streamer_params and
g_rx_streamer_params) that must be identical for the Tx Streamer
of the sending node and Rx Streamer of the receiving node (i.e. the
parameters can be different on the same node). For example, the
data word width in the
project is 208 bits while the data width in the
example is 80 buts.
Data words can be grouped in blocks of any size with upper
limit defined by max_words_per_frame (in the record
g_tx_streamer_params) , each block has independent sequence
number and CRC so that the sanity of a record can be evaluated and
the data used even before the entire Ethernet Frame is received.
This is to decrease transmission latency.
A stream of data words arranged in one or more blocks is
encapsulated into an Ethernet Frame. At transmission, the frame is
timestamped and the timestamp included in the frame.
Ethernet Frame is sent when one of the following is true:
A complete block was written to the buffer of the Tx
Streamer, and the number of data words waiting for
transmission exceeds the number defined by generic
g_tx_threshold (in the record g_tx_streamer_params),
There are data words in the buffer of the Tx Streamer, and
the time elapsed from the latest write to Tx Streamer exceeded
timeout defined by generic timeout (in the record
The user asserts tx_flush_i to explicitly request transmission
of the data that has been written to the buffer of the Tx
When fixed-latency mode is set on the receiver, the *Rx Streamer module
does not provide the received data to the user as soon as its reception is completed. Instead,
the receiver compares the transmission timestamp (received with the data) with its local WR time
and calculates their difference. As soon as the calculated difference equals to the configured
fixed-latency, the data is provided to the user. In case the calculated difference is greater
that the configured fixed-latency, the data is provided to the user immediately. With a default
configuration, this mechanism provides latency with a jitter that might exceed 1ns. If sub-ns
latency jitter must be guaranteed, ultra-fixed latency configuration is provided.
A simulation of the Tx and Rx streamer can
be run in order to understand how some of these features work in
Encapsulation of data words and blocks into Ethernet Frame
The number of data words grouped into blocks is specified by the
user who indicates the last data word. Inside the frame, each
block ends with a CRC and an escape code (0xCAFE). If such
escape code happens to be in transmitted data, another 0xCAFE is
inserted during transmission. Two consecutive escape codes indicate to
the receiver that the received data included 0xCAFE.
The Streamer Frame consists of a transmission timestamp and a collection
of blocks, it is sent in the payload of an Ethernet Frame, as
depicted in the figure below.
Each block starts with an ID number
the ID number of the block that immediately follows the Ethernet
Header, is the sequence number of the frame
the ID number of the subsequent blocks, is the inter-frame
sequence number of the block
In the figure, grey text indicates sizes in case the Ethernet Frame
includes VLAN tag. Click
the figure to