Thursday September 09 , 2010

XGMII eVC

XGMII e Verification Component

IP Part Number: DR905-XGMII-eVC

 

Features

  • IEEE 802.3ae/D3.4 compliant MAC layer to PHY layer interface

  • Targeted for an e Verification environment

  • Modular, Extensible/Configurable and Re-useable

  • Self Checking, Random Generators

  • Stand Alone Configuration with eVC Loop Back

  • Straight Forward Integration

Applications

Ethernet Switches, Routers and transceivers operating at 10 Gb/s

 

Overview

The port diagram above shows an UML-port diagram for the XGMII (10 Gigabit Media Independent Interface) Verification Component. It is a ready-to-use, out-of-the-box verification environment for a core using the XGMII protocol.

 

The XGMII e Verification Component is designed to satisfy the following requirements:

  • Transfer frames between a MAC layer device and a PHY device

  • Inject error conditions into the device under test

  • Viewable interfaces, which can be extended easily

  • Coverage monitors for interface state machines


Structure Description

 

XGMII eVC Struct Descriptions

Fields

Description

XgmiiPorts

List of XGMII eVCs

NumFramesTx

Number of frames to send

NumFramesRx

Number of frames received

FramesReceived

List of frames received

NumberOfFrame

Frame ID

LengthOfFrame

Length of a frame (in octets)

InterFramePeriod

Delay between successive frames

KindOfFrame

GOOD/BAD frame (request respective TXC assertion and respective TXD = 0xFE to identify lane(s) if kindOfFrame = BAD)

DirectionOfFrame

Tx or Rx

PreambleSize

Size of the preamble beginning the frame transmission. Defaults to DEFAULT_PREAMBLE_SIZE

LogEnable

Enable logging of messages

DebugLevel

Debug level of messages

Events

Description

TxClk

Rising edge of TX_CLK

RxClk

Rising edge of RX_CLK

FrameReceived

Frame received

FrameCheckErrorRx

RXC asserted for respective lane(s) and respective RXD = 0xFE

FrameStart

Start of frame transmission/reception

FrameEnd

End of frame transmission/reception

TxResetDone

Tx BFM reset done

RxResetDone

Rx BFM reset done

Methods

Description

printFrame()

Prints the contents of the frame struct

logMessage()

Outputs a message to stdout based on debuglevel

txReset()

TCM to reset the Tx BFM

preTxHook()

Hook method for any pre-transmission processing

postTxHook()

Hook method for any post-transmission processing

rxReset()

TCM to reset the Rx BFM

preRxHook()

Hook method for any pre-reception processing

postRxHook()

Hook method for any post-reception processing

Variables

Description

DR905_XGMII_NUMPORTS

Number of XGMII ports (defaults to 1)

DR905_DEFAULT_PREAMBLE_SIZE

Default preamble size (defaults to 7)

DR905_ENABLE_COVERAGE

Enables coverage (defaults to True)

DR905_EN_STAND_ALONE_TEST

Enables stand alone test in eVC loop back mode

 

Table 1: XGMII eVC struct descriptions overview

 

 

XGMII Interface Structure

 

The XGMII is composed of independent transmit and receive paths. Each direction uses 32 data signals (TXD [31:0] and RXD [31:0], four control signals (TXC [3:0], RXC [3:0]) and a clock (TX_CLK and RX_CLK).

 

XGMII DUT Interface

Signal Name

Direction

Clock Domain

Description

TXD [31:0]

Output

TX_CLK

Gigabit Transmit Data: 32 bit bundle organized into four lanes of 8 bits each (TXD[7:0], TXD[15:8], TXD[23:16], TXD[31:24]) driven synchronous to TX_CLK. Each lane is associated with a TXC signal (TXD[7:0], TXC[0]; TXD[15:8], TXC[1]; TXD[23:16], TXC[2]; TXD[31:24], TXC[3])

TXC [3:0]

Input

TX_CLK

Transmit Control: indicates data or control characters on the XGMII are valid for the external PMD and transition synchronously with respect to TX_CLK.

TX_CLK

Input

 

Transmit Clock: 156.25 MHz � 0.01%,(one-sixty fourth of the MAC transmit data rate) provides the timing reference for transfer of the TXC[3:0] and TXD[31:0] signals

RXD [31:0]

Input

RX_CLK

Gigabit Receive Data: 32 bit bundle organized into four lanes of 8 bits each (RXD[7:0], RXD[15:8], RXD[23:16], RXD[31:24]) sourced from an external PMD and driven synchronous to RX_CLK. Each lane is associated with a RXC signal (RXD[7:0], RXC[0]; RXD[15:8], RXC[1]; RXD[23:16], RXC[2]; RXD[31:24], RXC[3])

RXC [3:0]

Input

RX_CLK

Receive Control: indicates the external PMD is presenting either recovered or decoded data or control characters on the XGMII and transition synchronously with respect to RX_CLK.

RX_CLK

Input

 

Receive Clock: 156.25 MHz � 0.01%, %,(one-sixty fourth of the MAC transmit data rate) provides the timing reference for transfer of the RXC[3:0] and RXD[31:0] signals

Table-2 XGMII DUT Interface port signals

XGMII Control Characters (RXC/TXC = 1), Table-3

Idle (0x07) occurs

    1. During an Inter-frame Gap

    2. When there is no data to send/receive

Start (0xFB) occurs

    1. For a 1 byte duration at the beginning of a frame

    2. Always on Lane 0

Terminate (0xFD) occurs

    1. For a 1 byte duration at the end of a frame

    2. On any Lane

Error (0xFE) occurs

1.       When an error is detected in a received signal

2.       When an error needs to be forced into a transmitted signal

3.       When a Start or Sequence ordered_set control character appears on any octet other than lane 0

 

XGMII Normal Data Character (RXC/TXC = 0), Table-3

 

�  Frame Data (0x00 � 0xFF) occurs

During normal data transmission

 

XGMII Lane Encoding

RXC

TXC

RXD

TXD

Description

0

0x00 � 0xFF

Normal data Transmission

1

0x00 � 0x06

Reserved

1

0x07

Idle

1

0x08 � 0x9B

Reserved

1

0x9C

Sequence (only valid in lane 0)

1

0x9D � 0xFA

Reserved

1

0xFB

Start (only valid in lane 0)

1

0xFC

Reserved

1

0xFD

Terminate

1

0xFE

Error

1

0xFF

Reserved

Table-3 XGMII lane encoding

 

XGMII Ordered Set (RXC/TXC = 1), Table-5

 

�  Sequence ordered set (0x9C) occurs

 

1.   When a Local or Remote link fault is detected on a receive or transmit data path respectively

2.   Always on Lane 0

XGMII Sequenced Ordered_Sets for Link Fault Signaling

Lane 0

Lane 1

Lane 2

Lane 3

Description

Sequence

0x00

0x00

0x00

Reserved

Sequence

0x00

0x00

0x01

Local Fault

Sequence

0x00

0x00

0x02

Remote Fault

Sequence

≥ 0x00

≥ 0x00

≥ 0x03

Reserved

 

Table-5 XGMII Sequence ordered_sets for link fault signaling

 

Link Fault status is signaled in a four bytes Sequence ordered_set. The PHY indicates a Local Fault and the RS indicates a Remote Fault.

The RS reports the fault status of the link. Local fault indicates a fault detected on the receive data path between the remote RS and the local RS. Remote Fault indicates a fault on the transmit path between the local RS and the remote RS. The RS implements the link fault signaling state machine

The RS outputs TXC[3:0] and TXD[31:0] are controlled by the state machine variable link_fault within the RS.

�         Link_fault = OK

1.       The RS sends MAC frames as requested. In the absence of MAC frames, the RS generates Idle control characters.

�         Link_fault = Local Fault

2.       The RS continuously generates Remote Fault Sequence ordered_sets.

�         Link_fault = Remote Fault

3.       The RS continuously generates Idle control characters.

 

The RS inputs RXC[3:0] and RXD[31:0] are monitored by the state machine for Sequenced ordered_sets. The variable link_fault is set to indicate the value of a received Sequence ordered_set when four fault sequences containing the same fault value have been received with each pair of fault sequences separated by less than 128 columns and no intervening sequences of a different fault value.

 

�         Link_fault = OK

1.       No fault.

�         Link_fault = Local Fault

2.       Fault detected by the PHY.

�         Link_fault = Remote Fault

3.       Fault detection signaled bt the remote RS.

 

XGMII Data Stream

The data stream  is a sequence of bytes, where each byte conveys either a data octet or control character

<inter-frame><preamble><sfd><data><efd>

 

 

Inter-frame <inter-frame>

 

The inter-frame <inter-frame> period on an XGMII transmit or receive path is an interval during which no frame activity occurs. The <inter-frame> corresponding to the MAC inter-packet gap (IPG) begins with the Terminate control character, continues with Idle control characters and ends with the Idle control character prior to a Start control character. The length of the interpacket gap may be changed between the transmitting MAC and receiving MAC by one or more functions (e.g., RS lane alignment, PHY clock rate compensation or 10GBASE-W data rate adaptation functions). The minimum (IPG) at the XGMII of the receiving RS is five octets.

 

The signaling of link status information logically occurs in the <inter-frame> period.

 

Preamble <preamble> and start of frame delimiter <sfd>

 

The preamble <preamble> begins a frame transmission by a MAC and when generated by a MAC consists of 7 octets with the following bit values:

 

10101010 10101010 10101010 10101010 10101010 10101010 10101010

 

The preamble and SFD are shown in figure tbd with their bits ordered for serial transmission from left to right. As shown, the left-most bit of each octet is the LSB of the octet and the right-most bit is the MSB of the octet.

 

The Start control character indicates the beginning of MAC data on the XGMII. On transmit the RS converts the first data octet of preamble transferred from the MAC into a Start control character. On receive, the RS will convert the Start control character into a preamble data octet. The Start control character is aligned to lane 0 of the XGMII by the RS and by the PHY on receive.

 

The Start of frame delimiter <sfd> indicates the start of frame and immediately follows the preamble. The bit value of <sfd> at the XGMII is unchanged from the Start of Frame Delimiter (SFD) the bit sequence is 10101011.

 

The preamble and SFD are transmitted through the XGMII as octets sequentially ordered on the lanes of the XGMII. The first preamble octet is replaced with a Start control character and it is aligned to lane 0, the second octet on lane 1, the third on lane 2 and the fourth on lane 3, and the four octets are transferred on the next edge of TX_CLK. The fifth octet is assigned to lane 0 with subsequent octets sequentially assigned to the lanes with the SFD assigned to lane3. The XGMII <preamble> and <sfd> are:

Lane 0             Lane1              Lane2              Lane3

Start                 10101010          10101010          10101010

10101010          10101010          10101010          10101011

 

DATA <data>

The data <data> in a well-formed frame consists of a set of data octets.

 

End of frame delimiter <efd>

Assertion of TXC with the appropriate control character encoding of TXD on a lane constitutes an end of frame delimiter <efd> for the transmit data stream. Similarly, assertion of RXC with the appropriate Terminate control character encoding of RXD constitutes an end of frame delimiter for the receive data stream. The XGMII recognizes the end of frame delimiter on any of the four lanes of the XGMII.


 

Timing Waveforms

Figures-4 to 7 show the behavior of TXD/RXD and TXC/RXC during the transmission and reception of an example normal frame and a frame with an error

 

Figure-4 Normal frame transmission

 

Figure-5 Transmit error propagation

 

Figure-6 Basic frame reception

 

 

 

Figure-7 Reception with error

 

Architecture

 

The ITRX_XGMII_eVC can serve as the interface to a PHY layer device or a MAC layer device. The Rx and Tx clocks are inputs to the eVC, driven from either the RTL or a clock generator block in the test-bench and handled in e as events. According to the IEEE spec, RS sources the TX_CLK while RX_CLK is sourced by the PHY.

 


 

 

Figure-8 eVC Configuration 1: XGMII eVC as PHY device

 

 

Figure-9 eVC Configuration 2: XGMII eVC as MAC device


 

 

For the configuration where the eVC acts as a PHY layer device, the test-bench supplies the Rx clock and the DUT supplies the Tx clock to the eVC (as shown in Figure 8). Likewise, when the eVC acts as a MAC layer device, the test-bench must supply the Tx clock and the RTL supplies the Rx clock to the eVC (as shown in Figure 9).

 

 

Architectural Description at Figure 10 illustrates the high level architecture of the XGMII Verification Component (eVC).

 

  • The Frame Generator block converts raw data into frames to be sent using the XGMII protocol

 

  • The Physical Tx block generates and transmits these frames across the DUT on the fly. Errors can be injected into the frames for transmission to verify the DUTs response to various error conditions

 

  • The Physical Rx block collects data from the DUT and converts it into frames. Also, this block implements functionality to ensure that there are no protocol errors or timing violations in the received data.

 

  •  The Frame monitor block converts packets from the Physical Rx block to raw data, which can then be compared with the expected data to create a self-checking

 

  • The Coverage block collects coverage information of the generated input frames using cover structures. It can also collect implementation specific coverage information such as internal FSM coverage.

 

Pre and post transmission and reception hooks are provided to facilitate any other processing required by the testbench (such as hooking up scoreboards, predictors and checkers in the verification environment).