CPRI Intel® FPGA IP User Guide

ID 683595
Date 5/19/2023
Public
Document Table of Contents

3.14.1. GMII Normal Mode

CPRI Intel® FPGA IP core contains the logic for Ethernet PCS block. This block does 8B/10B encoding to the received data through TX interface before sending it to the CPRI link. Likewise, it does 10B/8B decoding after receiving data from CPRI link before sending it back to RX interface. The available interface is intended to be connected to an external Ethernet MAC block. The external Ethernet MAC block should format the data following the IEEE 802.3 before sending the data to CPRI Intel® FPGA IP core (data from the Preamble to FCS). However, the IP observe all the incoming/outgoing data through this interface as raw data and apply the encoding/decoding respectively.

The GMII supports the bandwidth described in Table 12 of the CPRI Specification, Achievable Ethernet bit rates.

The inter-packet gap should be 96 bits. Since, the data interface is 8-bit wide, the inter-packet gap corresponds to 12 gmii_txclk cycles.

The GMII interface has the following limitations:
  • You must not send a packet of size smaller than eight bytes, excluding start-of-packet and end-of-packet bytes.
  • You must not send packets with inter-packet gap of less than twelve gmii_txclk cycles between them.
Table 33.  GMII Signals

These signals are available if you set the value of the Ethernet PCS interface parameter in the CPRI parameter editor to GMII. You can connect a user-defined Ethernet MAC to this interface.

The interface is compliant to the IEEE 802.3 1000BASE-X 1Gbps MII specification. An Ethernet PCS block in the CPRI IP ensures the interface bandwidth matches the current CPRI line bit rate and accesses data at the correct CPRI frame positions according to the Z.194.0 pointer value.

You must monitor the GMII FIFO status signals and ensure you do not overflow or underflow the FIFO.

The interface signals are clocked by the gmii_rxclk or gmii_txclk clock.

RX GMII Signals

Signal Name

Direction

Description

gmii_rxclk Input Clocks the GMII receiver interface. You must drive this clock at the frequency of 125 MHz.
gmii_rxreset_n Input Resets the GMII receiver interface and FIFO read logic. This reset signal is active low.
gmii_rxdv Output Ethernet receive data valid. Indicates the presence of valid data or initial start-of-packet control character on gmii_rxd[7:0]. Each pulse of this signal is considered as one Ethernet packet.
gmii_rxer Output Ethernet receive error. Indicates an error on gmii_rxd. When this signal is asserted, the value on gmii_rxd[7:0] can be any value from 0x00 to 0xFF.
gmii_rxd[7:0] Output Ethernet receive data. Data bus for data from the CPRI IP to the external Ethernet block. All bits are de-asserted during reset, and all bits are asserted after reset until the CPRI IP achieves frame synchronization.
TX GMII Signals

Signal Name

Direction

Description

gmii_txclk Input Clocks the GMII transmitter interface. You must drive this clock at the frequency of 125 MHz.
gmii_txreset_n Input Resets the GMII transmitter interface and FIFO write logic. This signal is active low.
gmii_txen Input Valid signal from the external Ethernet block, indicating the presence of valid data on gmii_txd[7:0]. This signal must be asserted two cycles before data is actually valid. This advance notice provides time for the CPRI GMII transmitter block to insert an S character in the data stream to form the start-of-packet symbol.

Deasserting this signal triggers the IP core to insert T and R characters in the data stream to form the end-of-packet symbol.

Each pulse of this signal is considered as one Ethernet packet.

gmii_txer Input Ethernet transmit coding error. When this signal is asserted, the CPRI IP inserts an Ethernet Error Propagation symbol /V/ in the data it passes to the CPRI link.
gmii_txd[7:0] Input Ethernet transmit data. The data transmitted from the external Ethernet block to the CPRI Intel® FPGA IP, for transmission on the CPRI link. This input bus is synchronous to the rising edge of the gmii_txclk clock.
MII Status Signals

Signal Name

Direction

Description

gmii_txfifo_status[3:0] Output Ethernet Tx PCS FIFO fill level status. The individual bits have the following meanings:
  • Bit [3]: Empty
  • Bit [2]: Almost empty
  • Bit [1]: Full
  • Bit [0]: Almost full

Almost Empty = FIFO level is 6.25% of maximum

Almost Full = FIFO level is 93.75% of maximum

When this signal value is 4'b0000, it could mean that the FIFO level is in between the levels. For example, it could be between Almost Empty and Almost Full.
Note: This status signal is delayed due to the internal CDC (clock domain crossing) between gmii_txclk and cpri_clkout. Be cautious if Almost Full is reached while transmitting as the real-time level of the FIFO can be more than 93.75%. You are advised to plan your transmission so that you do not have to split the packets. For example:
  • Use smaller size packets
  • Increase the interpacket-gap corresponding to the packet size
  • Increase the size of FIFO depth by configuring the GUI parameter
gmii_rxfifo_status[3:0] Output Ethernet Rx PCS FIFO fill level status. The individual bits have the following meanings:
  • Bit [3]: Empty
  • Bit [2]: Almost empty
  • Bit [1]: Full
  • Bit [0]: Almost full

Almost Empty = FIFO level is 6.25% of maximum

Almost Full = FIFO level is 93.75% of maximum

When this signal value is 4'b0000, it could mean that the FIFO level is in between the levels. For example, it could be between Almost Empty and Almost Full.

Figure 52. RX GMII Timing Diagram
Figure 53. TX GMII Timing Diagram