|
|
# WR Streamers Principle of Data Transfer
|
|
|
|
|
|
## Streamers principles of data transfer
|
|
|
|
|
|
- **Tx Streamer** transfers **data words** that are of width (n \* 16)
|
|
|
bits. The width is defined by generic `data_width` (in
|
|
|
`g_tx_streamer_params` and `g_rx_streamer_params`) that must be
|
|
|
identical for the Tx and Rx Streamer.
|
|
|
- **Data words** can be grouped in **blocks** of any size with upper
|
|
|
limit defined by `max_words_per_frame` (in `g_tx_streamer_params`) ,
|
|
|
each **block** has independent sequence number and CRC.
|
|
|
- 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 `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
|
|
|
`g_tx_streamer_params`),
|
|
|
- The user asserts `tx_flush_i` to explicitly request transmission
|
|
|
of the data that has been written to the buffer of the Tx
|
|
|
Streamer.
|
|
|
|
|
|
A [simulation](/WR-Streamers-Simulation) of the Tx and Rx streamer can
|
|
|
be run in order to understand how some of these features work in
|
|
|
practice.
|
|
|
|
|
|
-----
|
|
|
|
|
|
## 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`).
|
|
|
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**
|
|
|
|
|
|
![](/uploads/e9f6b568d102f612b4e1e034378629bb/Streamer-frame.v2.jpg)
|
|
|
|
|
|
|
|
|
|
|
|
### Files
|
|
|
* [Streamer-frame.v2-large.jpg](/uploads/fe4c7b7ed7f46451f6cb0c5f49c7037d/Streamer-frame.v2-large.jpg) |
|
|
\ No newline at end of file |