F-Tile Ethernet Intel® FPGA Hard IP User Guide

ID 683023
Date 11/20/2024
Public
Document Table of Contents

7.7. PCS Mode TX Interface

The F-Tile Ethernet Intel® FPGA Hard IP TX client interface in PCS variations employs the Media Independent Interface (MII) protocol.

The client acts as a source and the TX PCS acts as a sink in the transmit direction.

Table 49.  Signals of the MII TX Client InterfaceAll interface signals are clocked by the TX clock. The signal names are standard Avalon® streaming interface signals.

Signal Name

Width

Description

i_tx_mii_d[1023:0]

i_tx_mii_d[511:0]

i_tx_mii_d[255:0]

i_tx_mii_d[127:0]

i_tx_mii_d[63:0]

1024 bits (400GE)

512 bits (200GE)

256 bits (100GE)

128 bits (40GE/50GE)

64 bits(10GE/25GE)

TX MII data. Data must be in MII encoding. i_tx_mii_d[7:0] holds the first byte the IP core transmits on the Ethernet link. i_tx_mii_d[0] holds the first bit the IP core transmits on the Ethernet link.

While the TX MII valid signal has the value of 0 or the alignment marker insertion bit signal has the value of 1, and for one additional clock cycle, you must hold the value of this signal stable, a behavior called freezing the signal value.

i_tx_mii_c[127:0]

i_tx_mii_c[63:0]

i_tx_mii_c[31:0]

i_tx_mii_c[15:0]

i_tx_mii_c[7:0]

128 bits (400GE)

64 bits (200GE)

32 bits (100GE)

16 bits (40GE/50GE)

8 bits(10GE/25GE)

TX MII control bits. Each bit corresponds to a byte of the TX MII data signal. For example, i_tx_mii_c[0] corresponds to i_tx_mii_d[7:0], i_tx_mii_c[1] corresponds to i_tx_mii_d[15:8], and so on.

If the value of a bit is 1, the corresponding data byte is a control byte. If the value of a bit is 0, the corresponding data byte is data.

i_tx_mii_valid

1 bit Indicates that the TX MII data signal is valid.

You must assert this signal a fixed number of clock cycles after the IP core raises ready signal, and must deassert this signal the same number of clock cycles after the IP core deasserts the ready signal. The number must be in the range of 1–6 clock cycles.

o_tx_mii_ready

1 bit Indicates the PCS is ready to receive new data.

i_tx_mii_am

1 bit Alignment marker insertion bit.
Figure 44. Transmitting Data Using the PCS Mode TX Interface

The figure above shows how to write packets directly to the PCS mode TX interface.

  • The packets are written using MII.
    • Each byte in i_tx_mii_d has a corresponding bit in i_tx_mii_c that indicates whether the byte is a control byte or a data byte; for example, i_tx_mii_c[1] is the control bit for i_tx_mii_d[15:8].
  • i_tx_mii_valid should conform to these conditions:
    • Assert the valid signal only when the ready signal is asserted, and deassert only when the ready signal is deasserted.
    • The two signals can be spaced by a fixed latency between 1 and 6 cycles.
    • When the valid signal deasserts, i_tx_mii_d and i_tx_mii_c must be paused.
  • The byte order for the PCS mode TX interface is opposite of the byte order for the MAC Avalon® streaming interface. Bytes flow from LSB to MSB; the first byte to be transmitted from the interface is i_tx_mii_d[7:0].
  • The bit order for the PCS mode TX interface is the same as the bit order of the MAC client. The first bit to be transmitted from the interface is i_tx_mii_d[0].
Note: The PCS mode TX interface is not SOP aligned. Any legal ordering of packets in MII format is accepted.
Table 50.  Writing a Start Packet Block with Preamble to the PCS Mode TX Interface
MII Data MII Control Ethernet Packet Byte
i_tx_mii_d[7:0] 0xFB i_tx_mii_c[0] 1 Start of Packet
i_tx_mii_d[15:8] 0x55 i_tx_mii_c[1] 0 Preamble
i_tx_mii_d[23:16] 0x55 i_tx_mii_c[2] 0 Preamble
i_tx_mii_d[31:24] 0x55 i_tx_mii_c[3] 0 Preamble
i_tx_mii_d[39:32] 0x55 i_tx_mii_c[4] 0 Preamble
i_tx_mii_d[47:40] 0x55 i_tx_mii_c[5] 0 Preamble
i_tx_mii_d[55:48] 0x55 i_tx_mii_c[6] 0 Preamble
i_tx_mii_d[63:56] 0xD5 i_tx_mii_c[7] 0 SFD
Figure 45. Inserting Alignment MarkersThe following figure shows the timing diagram for a 100G rate and illustrates how to perform alignment marker insertion.

The fabric controls the timing of alignment marker insertion. Alignment markers cannot be delayed without disrupting the Ethernet link. Use valid cycles to count the alignment markers.

For alignment marker counts, you only use valid cycles. When i_tx_mii_valid is low, the alignment marker counters and input data must freeze.

The number of cycles that i_tx_mii_am remains high depends on the interface rate. Refer to the following table for reference:
Table 51.  Alignment Marker Insertion Periods
Ethernet Mode # of VLanes AM Insertion (Blocks/VLane) AM Period (Blocks/VLane) AM Period (Blocks) Client Width (Blocks) Client AM Insertion Cycles Client AM Insertion Period (Cycles)
25G with RS-FEC 1 4 81920 81920 1 4 81920
40G

50G-2 (consortium) (NO RS-FEC)

4 1 16384 65536 2 2 32768
50G-2 (consortium) (with RS-FEC)

50G-1 (IEEE)

4 1 20480 81920 2 2 40960
100G 20 1 16384 327680 4 5 81920
200G 8 2 40960 327680 8 2 40960
400G 16 2 40960 655360 16 2 40960

The number of cycles for am period depends on the rate of the interface and whether in simulation or hardware.

In simulation, it is common to use a reduced am period for both sides of the link to increase lock-time speed. Refer to the following tables for simulation with Non-PTP and PTP Enabled Modes:
Table 52.  Alignment Marker Insertion Periods for Simulation with Non-PTP Enabled Modes
Ethernet Mode # of VLanes AM Insertion (Blocks/VLane) AM Period (Blocks/VLane) AM Period (Blocks) Client Width (Blocks) Client AM Insertion Cycles Client AM Insertion Period (Cycles)
25G with RS-FEC 1 4 1280 1280 1 4 1280
40G 4 1 64 256 2 2 128
50G-2 (consortium) (NO RS-FEC) 4 1 256 1024 2 2 512
50G-2 (consortium) (with RS-FEC)

50G-1 (IEEE)

4 1 320 1280 2 2 640
100G 20 1 256 5120 4 5 1280
200G 8 2 640 5120 8 2 640
400G 16 2 640 10240 16 2 640
Table 53.  Alignment Marker Insertion Periods for Simulation with PTP Enabled modes
Ethernet Mode # of VLanes AM Insertion (Blocks/VLane) AM Period (Blocks/VLane) AM Period (Blocks) Client Width (Blocks) Client AM Insertion Cycles Client AM Insertion Period (Cycles)
25G with RS-FEC 1 4 2560 2560 1 4 2560
50G-2 (consortium) (with RS-FEC)

50G-1 (IEEE)

4 1 1280 5120 2 2 2560
100G 20 1 512 10240 4 5 2560
200G 8 2 2560 20480 8 2 2560
400G 16 2 2560 40960 16 2 2560

For proper operation, program the MAC, PCS, and optional FEC to use the same am period.

In FEC modes, the TX datapath does not come completely out of reset until at least 2 alignment marker periods passed. You must start driving i_tx_mii_am at the proper interval before o_tx_lanes_stable goes high. You may drive the signal as soon as o_tx_pll_locked has gone high and o_tx_mii_ready starts toggling. When the external custom rate interface is enabled, you must start driving i_custom_cadence. For more information, refer to the Custom Rate Interface.