... | @@ -36,94 +36,109 @@ inside. |
... | @@ -36,94 +36,109 @@ inside. |
|
from the latest write to Tx Streamer exceeded timeout defined by
|
|
from the latest write to Tx Streamer exceeded timeout defined by
|
|
generic *g\_tx\_timeout*
|
|
generic *g\_tx\_timeout*
|
|
- the user explicitly requested transmission the data currently in
|
|
- the user explicitly requested transmission the data currently in
|
|
the Tx Buffer by asserting
|
|
the Tx Buffer by asserting *tx\_flush\_i*
|
|
*tx\_flush\_i*
|
|
|
|
|
|
|
|
-----
|
|
-----
|
|
|
|
|
|
## Encapsulation of **data words** and **blocks** into Ethernet Frame
|
|
## 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
|
|
|
|
below.
|
|
|
|
|
|
![](/uploads/5ca925a3bdea901a75422ddf95fd5d1a/Streamer-frame.jpg)
|
|
![](/uploads/5ca925a3bdea901a75422ddf95fd5d1a/Streamer-frame.jpg)
|
|
|
|
|
|
\--
|
|
-----
|
|
|
|
|
|
## Interface of Tx and Rx Streamer modules
|
|
## Interface of Tx and Rx Streamer modules
|
|
|
|
|
|
/4216
|
|
To use streamers, the user is required to
|
|
|
|
|
|
<table>
|
|
- **define configuration of transmission using VHDL generics:**
|
|
<tbody>
|
|
- *g\_data\_width* - must be identical for the Tx and Rx Streamer,
|
|
<tr class="odd">
|
|
it defines the width of input/output data in (n\*16) bits.
|
|
<td><b> I/F name </b></td>
|
|
- *g\_tx\_threshold* - minimum number of data words in the TX
|
|
<td><b> Description </b></td>
|
|
buffer that will trigger transmission of an Ethernet frame.
|
|
</tr>
|
|
- *g\_tx\_max\_words\_per\_frame* - maximum number of data words
|
|
<tr class="even">
|
|
in a single Ethernet frame. It also defines the maximum block
|
|
<td>tx_data_i</td>
|
|
size.
|
|
<td>Input <strong>data word</strong> of generic width to be sent by the Tx Streamer</td>
|
|
- *g\_tx\_timeout* - transmission timeout (in clk\_sys\_i cycles),
|
|
</tr>
|
|
after which the contents of TX buffer are sent regardless of the
|
|
<tr class="odd">
|
|
amount of data that is currently stored in the TX Buffer, so
|
|
<td>tx_valid_i</td>
|
|
that data in the buffer does not get stuck.
|
|
<td>HIGH indicates that the tx_data_i contains a valid <strong>data word</strong></td>
|
|
- *g\_buffer\_size* - size of RX buffer in the Rx Streamer, in
|
|
</tr>
|
|
data words.
|
|
<tr class="even">
|
|
- *g\_filter\_remote\_mac* - when it is TRUE, the Rx Streamer
|
|
<td>tx_dreq_o</td>
|
|
receives only packets whose destination MAC equals
|
|
<td>Synchronous data request: HIGH indicates that the Tx Streamer can accommodate a <strong>data word</strong> in the following clock cycle</td>
|
|
*cfg\_mac\_remote\_i*. When false. accepts all incoming frames.
|
|
</tr>
|
|
|
|
<tr class="odd">
|
|
<!-- end list -->
|
|
<td>tx_last_i</td>
|
|
|
|
<td>Last <strong>data word</strong> signal. When asserted, it indicates the last data word in a <strong>block</strong></td>
|
|
- **provide networking configuration to the following inputs of Tx and
|
|
</tr>
|
|
Rx Streamer:**
|
|
<tr class="even">
|
|
- cfg\_mac\_local\_i - Local MAC address. Leave at 0 when using
|
|
<td>tx_flush_i</td>
|
|
with the WR MAC/Core, it will insert its own source MAC.
|
|
<td>Flush input. When asserted, the streamer will immediately send out all the data that is stored in its TX buffer, ignoring g_tx_timeout.</td>
|
|
- cfg\_mac\_target\_i - Destination MAC address
|
|
</tr>
|
|
- cfg\_ethertype\_i - Ethertype of Streamer Frames. Default value
|
|
<tr class="odd">
|
|
is accepted by standard configuration of the WR PTP Core
|
|
<td>tx_reset_seq_i</td>
|
|
|
|
<td>Reset sequence number. When asserted, the internal sequence number generator used to detect loss of frames is reset to 0. Advanced feature.</td>
|
|
<!-- end list -->
|
|
</tr>
|
|
|
|
</tbody>
|
|
- **provide WR timing (optional, to allow latency measurement):**
|
|
</table>
|
|
- clk\_ref\_i - White Rabbit reference clock
|
|
|
|
- tm\_time\_valid\_i - Time valid flag
|
|
<table>
|
|
- tm\_tai\_i - TAI seconds
|
|
<tbody>
|
|
- tm\_cycles\_i - Fractional part of the second (in clk\_ref\_i
|
|
<tr class="odd">
|
|
cycles)
|
|
<td><b> I/F name </b></td>
|
|
|
|
<td><b> Description </b></td>
|
|
<!-- end list -->
|
|
</tr>
|
|
|
|
<tr class="even">
|
|
- \*write to the Tx Streamer and read from the Rx Streamer data words
|
|
<td>rx_data_o</td>
|
|
using the interfaces in the tables and figure below.
|
|
<td>Output <strong>data word</strong> of a generic width received by the Rx Streamer</td>
|
|
\*
|
|
</tr>
|
|
/4216
|
|
<tr class="odd">
|
|
|
|
<td>rx_valid_o</td>
|
|
*Tx Streamer**
|
|
<td>HIGH indicted that rx_data_o is outputting a valid <strong>data word</strong>.</td>
|
|
| \* I/F name **|** Description \*|
|
|
</tr>
|
|
| tx\_data\_i | Input **data word** of generic width to be sent by the
|
|
<tr class="even">
|
|
Tx Streamer|
|
|
<td>rx_dreq_i</td>
|
|
| tx\_valid\_i | HIGH indicates that the tx\_data\_i contains a valid
|
|
<td>Synchronous data request input: when HIGH, the streamer can output another data word in the subsequent clock cycle.</td>
|
|
*data word** |
|
|
</tr>
|
|
| tx\_dreq\_o | Synchronous data request: HIGH indicates that the Tx
|
|
<tr class="odd">
|
|
Streamer can accommodate a **data word** in the following clock cycle
|
|
<td>rx_first_o</td>
|
|
|
|
|
<td>HIGH indicates the 1st <strong>data word</strong> of the <strong>block</strong> on rx_data_o.</td>
|
|
| tx\_last\_i | Last **data word** signal. When asserted, it indicates
|
|
</tr>
|
|
the last data word in a **block** |
|
|
<tr class="even">
|
|
| tx\_flush\_i | Flush input. When asserted, the streamer will
|
|
<td>rx_last_o</td>
|
|
immediately send out all the data that is stored in its TX buffer,
|
|
<td>HIGH indicates the last word of the data block on rx_data_o.</td>
|
|
ignoring g\_tx\_timeout. |
|
|
</tr>
|
|
| tx\_reset\_seq\_i | Reset sequence number. When asserted, the internal
|
|
<tr class="odd">
|
|
sequence number generator used to detect loss of frames is reset to 0.
|
|
<td>rx_lost_o</td>
|
|
Advanced feature. |
|
|
<td>Lost output: HIGH indicates that one or more of <strong>blocks</strong> have been lost.</td>
|
|
|
|
</tr>
|
|
*Rx Streamer**
|
|
<tr class="even">
|
|
| \* I/F name **|** Description \*|
|
|
<td>rx_latency_o</td>
|
|
| rx\_data\_o | Output **data word** of a generic width received by the
|
|
<td>Latency measurement output: indicates the transport latency (between the TX streamer in remote device and this streamer), in clk_ref_i clock cycles.</td>
|
|
Rx Streamer |
|
|
</tr>
|
|
| rx\_valid\_o | HIGH indicted that rx\_data\_o is outputting a valid
|
|
<tr class="odd">
|
|
*data word**. |
|
|
<td>rx_latency_valid_o</td>
|
|
| rx\_dreq\_i | Synchronous data request input: when HIGH, the streamer
|
|
<td>HIGH when the latency on rx_latency_o is valid.</td>
|
|
can output another data word in the subsequent clock cycle. |
|
|
</tr>
|
|
| rx\_first\_o | HIGH indicates the 1st **data word** of the **block**
|
|
</tbody>
|
|
on rx\_data\_o. |
|
|
</table>
|
|
| rx\_last\_o | HIGH indicates the last word of the data block on
|
|
|
|
rx\_data\_o. |
|
|
|
|
| rx\_lost\_o | Lost output: HIGH indicates that one or more of
|
|
|
|
*blocks** have been lost. |
|
|
|
|
| rx\_latency\_o | Latency measurement output: indicates the transport
|
|
|
|
latency (between the TX streamer in remote device and this streamer), in
|
|
|
|
clk\_ref\_i clock cycles. |
|
|
|
|
| rx\_latency\_valid\_o | HIGH when the latency on rx\_latency\_o is
|
|
|
|
valid. |
|
|
|
|
|
|
-----
|
|
-----
|
|
|
|
|
... | | ... | |