Receive operation, Comma detection, 8b/10b decoding – Altera Triple Speed Ethernet MegaCore Function User Manual

Page 63: Frame de-encapsulation, Synchronization, Carrier sense, Collision detection, Receive operation -27

Advertising
background image

Receive Operation

The receive operation includes comma detection, decoding, de-encapsulation, synchronization, and carrier
sense.

Comma Detection

The comma detection function searches for the 10-bit encoded comma character, K28.1/K28.5/K28.7, in
consecutive samples received from PMA devices. When the K28.1/K28.5/K28.7 comma code group is
detected, the PCS function realigns the data stream on a valid 10-bit character boundary. A standard 8b/10b
decoder can subsequently decodes the aligned stream.

The comma detection function restarts the search for a valid comma character if the receive synchronization
state machine loses the link synchronization.

8b/10b Decoding

The 8b/10b decoder performs the disparity checking to ensure DC balancing and produces a decoded 8-bit
stream of data for the frame de-encapsulation function.

Frame De-encapsulation

The frame de-encapsulation state machine detects the start of frame when the /I/ /S/ sequence is received
and replaces the /S/ with a preamble byte (0x55). It continues decoding the frame bytes and transmits them
to the MAC function. The /T/ /R/ /R/ or the /T/ /R/ sequence is decoded as an end of frame.

A /V/ character is decoded and sent to the MAC function as frame error. The state machine decodes sequences
other than /I/ /I/ (Idle) or /I/ /S/ (Start of Frame) as wrong carrier.

During frame reception, the de-encapsulation state machine checks for invalid characters. When the state
machine detects invalid characters, it indicates an error to the MAC function.

Synchronization

The link synchronization constantly monitors the decoded data stream and determines if the underlying
receive channel is ready for operation. The link synchronization state machine acquires link synchronization
if the state machine receives three code groups with comma consecutively without error.

When link synchronization is acquired, the link synchronization state machine counts the number of invalid
characters received. The state machine increments an internal error counter for each invalid character
received and incorrectly positioned comma character. The internal error counter is decremented when four
consecutive valid characters are received. When the counter reaches 4, the link synchronization is lost.

The PCS function drives the

led_link

signal to 1 when link synchronization is acquired. This signal can be

used as a common visual activity check using a board LED.

Carrier Sense

The carrier sense state machine detects an activity when the link synchronization is acquired and when the
transmit and receive encapsulation or de-encapsulation state machines are not in the idle or error states.

The carrier sense state machine drives the

mii_rx_crs

and

led_crs

signals to 1 when it detects an activity.

The

led_crs

signal can be used as a common visual activity check using a board LED.

Collision Detection

A collision happens when non-idle frames are received from the PHY and transmitted to the PHY
simultaneously. Collisions can be detected only in SGMII and half-duplex mode.

Altera Corporation

Functional Description

Send Feedback

4-27

Receive Operation

UG-01008
2014.06.30

Advertising