|
# Transmit and Receive Streamer modules
|
|
# Interface of Transmit and Receive Streamer modules
|
|
|
|
|
|
## Streamers principles of data transfer
|
|
|
|
|
|
|
|
- **Tx Streamer** transfers **data words** that are of width (n \* 16)
|
|
|
|
bits. The width is defined by generic `g_data_width` that must be
|
|
|
|
identical for the Tx and Rx Steamer.
|
|
|
|
- **Data words** can be grouped in **blocks** of any size with upper
|
|
|
|
limit defined by `g_tx_max_words_per_frame`, 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_max_words_per_frame`,
|
|
|
|
- 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 `g_tx_timeout`,
|
|
|
|
- the user asserts `tx_flush_i` to explicitly request transmission
|
|
|
|
of the data that has been written to the buffer of the Tx
|
|
|
|
Streamer.
|
|
|
|
|
|
|
|
-----
|
|
|
|
|
|
|
|
## 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)
|
|
|
|
|
|
|
|
-----
|
|
|
|
|
|
|
|
## Interface of Tx and Rx Streamer modules
|
|
|
|
|
|
|
|
### **Transceiver configuration:**
|
|
### **Transceiver configuration:**
|
|
|
|
|
... | | ... | |