... | ... | @@ -3,14 +3,11 @@ |
|
|
WR Streamers provide to the user a FIFO-like interface over Ethernet. WR
|
|
|
Streamers comprise of VHDL modules to send and receive data:
|
|
|
|
|
|
- TX steamer takes a series of data words and encapsulates them into
|
|
|
Ethernet Frames
|
|
|
- RX streamer does the opposite: decodes Ethernet frames into series
|
|
|
of data words
|
|
|
|
|
|
User interface of a TX-RX streamer pair looks like a typical FIFO, with
|
|
|
an Ethernet link
|
|
|
inside.
|
|
|
- **TX steamer** takes a series of data words and encapsulates them
|
|
|
into Ethernet Frames
|
|
|
- **RX streamer** does the opposite: decodes Ethernet frames into
|
|
|
series of data
|
|
|
words
|
|
|
|
|
|
![](/uploads/21b064f7c8ddaba77f1b49ed4a952f30/streamers-overview-small.jpg)
|
|
|
|
... | ... | @@ -18,36 +15,38 @@ inside. |
|
|
|
|
|
## Streamers principles of data transfer
|
|
|
|
|
|
- Streamers transfer **data words** that are of width (n \* 16) bits.
|
|
|
The width is defined by generic *g\_data\_width* that must be
|
|
|
- **Tx Streamer** transfer **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
|
|
|
prepended with Streamer Header and encapsulated into a single
|
|
|
Ethernet Frame
|
|
|
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 Tx Buffer of the Tx
|
|
|
- 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*
|
|
|
- there are **data words** in the Tx Buffer, and the time elapsed
|
|
|
from the latest write to Tx Streamer exceeded timeout defined by
|
|
|
generic *g\_tx\_timeout*
|
|
|
- the user explicitly requested transmission the data currently in
|
|
|
the Tx Buffer by asserting *tx\_flush\_i*
|
|
|
*g\_tx\_threshold*,
|
|
|
- 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 **data words** that are written to Tx Streamer are grouped into
|
|
|
*blocks** of the size defined by the user. Each **block** has its own
|
|
|
sequence number and CRC.
|
|
|
A collection of **blocks** is pre-pended with timestamp of transmission
|
|
|
time and sent in the payload of an Ethernet Frame, as depicted in the
|
|
|
figure
|
|
|
The **data words** that are written to the buffer of the Tx Streamer are
|
|
|
grouped into **blocks** of the size specified by the user while writing
|
|
|
the **data words**. Each **block** starts with an *escape* magic number
|
|
|
(0xCAFE), has its own sequence number and CRC.
|
|
|
The Streamer Frame consists of a transmission timestamp and a collection
|
|
|
of **blocks**, it sent in the payload of an Ethernet Frame, as depicted
|
|
|
in the figure
|
|
|
below.
|
|
|
|
|
|
![](/uploads/5ca925a3bdea901a75422ddf95fd5d1a/Streamer-frame.jpg)
|
... | ... | @@ -61,25 +60,27 @@ below. |
|
|
data in (n\*16) bits, it must be identical for the Tx and Rx
|
|
|
Streamer.
|
|
|
- *g\_tx\_threshold* - generic defines minimum number of data
|
|
|
words in the TX buffer that will trigger transmission of an
|
|
|
Ethernet frame.
|
|
|
words in the buffer of the Tx Streamer that will trigger
|
|
|
transmission of an Ethernet Frame.
|
|
|
- *g\_tx\_max\_words\_per\_frame* - generic defines maximum number
|
|
|
of data words in a single Ethernet frame. It also defines the
|
|
|
of data words in a single Ethernet Frame. It also defines the
|
|
|
maximum block size.
|
|
|
- *g\_tx\_timeout* - generic defines transmission timeout (in
|
|
|
clk\_sys\_i cycles), after which the contents of TX buffer are
|
|
|
sent regardless of the amount of data that is currently stored
|
|
|
in the TX Buffer, so that data in the buffer does not get stuck.
|
|
|
- *g\_buffer\_size* - generic defines size of RX buffer in the Rx
|
|
|
clk\_sys\_i cycles), after which the content of the buffer in
|
|
|
the Tx Streamer is sent regardless of the amount of data that is
|
|
|
currently stored in the buffer, so that data in the buffer does
|
|
|
not get stuck.
|
|
|
- *g\_buffer\_size* - generic defines size of the buffer in the Rx
|
|
|
Streamer, in data words.
|
|
|
- *g\_filter\_remote\_mac* - generic, when it is TRUE, the Rx
|
|
|
Streamer receives only packets whose destination MAC equals
|
|
|
*cfg\_mac\_remote\_i*. When false. accepts all incoming frames.
|
|
|
*cfg\_mac\_remote\_i*. When false, it accepts all incoming
|
|
|
frames.
|
|
|
|
|
|
<!-- end list -->
|
|
|
|
|
|
- **Networking configuration (Tx and Rx Streamer):**
|
|
|
- cfg\_mac\_local\_i - Local MAC address. Leave at 0 when using
|
|
|
- cfg\_mac\_local\_i - local MAC address. Leave at 0 when using
|
|
|
with the WR MAC/Core, it will insert its own source MAC.
|
|
|
- cfg\_mac\_target\_i - Destination MAC address
|
|
|
- cfg\_ethertype\_i - Ethertype of Streamer Frames. Default value
|
... | ... | @@ -98,11 +99,11 @@ below. |
|
|
<!-- end list -->
|
|
|
|
|
|
- **FIFO-like interface (Tx and Rx Streamer)**:
|
|
|
- the figure and tables provide information on interfaces that are
|
|
|
used to write data words to the Tx Streamer and read data words
|
|
|
from the Rx Streamer
|
|
|
- the figure and tables below provide information on interfaces
|
|
|
that are used to write data words to the Tx Streamer and read
|
|
|
data words from the Rx Streamer
|
|
|
- waveform with the described signals is available
|
|
|
"here"/uploads/45936912d749480295414451e2e399f2/streamer_timing.jpg
|
|
|
[here](https://www.ohwr.org/project/wr-cores/uploads/45936912d749480295414451e2e399f2/streamer_timing.jpg):
|
|
|
|
|
|
/4216
|
|
|
|
... | ... | |