Frame check sequence (crc-32) checking, Address checking, Frame type checking – Altera 10-Gbps Ethernet MAC MegaCore Function User Manual

Page 79

Advertising
background image

7–12

Chapter 7: Functional Description

Receive Datapath

10-Gbps Ethernet MAC MegaCore Function User Guide

February 2014

Altera Corporation

7.5.3. Frame Check Sequence (CRC-32) Checking

The CRC polynomial, as specified in the IEEE 802.3 Standard, is shown in the
following equation:

The 32-bit CRC field is received in the following order: X

31

, X

30

,..., X

1

, X

0

, where X

31

is

the MSB of FCS field and occupies the LSB position on first FCS byte field.

If a CRC-32 error is detected, the MAC RX marks the frame invalid by setting
avalon_st_rx_error[1]

to 1 and forwards the frame to the client.

7.5.4. Address Checking

The MAC RX can accept frames with the following address types:

Unicast address—bit 0 of the destination address is 0.

Multicast address—bit 0 of the destination address is 1.

Broadcast address—all 48 bits of the destination address are 1.

The MAC RX always accepts broadcast frames. By default, it also receives all unicast
and multicast frames unless configured otherwise in the EN_ALLUCAST and
EN_ALLMCAST

bits of the rx_frame_control register.

When the EN_ALLUCAST bit is set to 0, the MAC RX filters unicast frames received. The
MAC RX accepts only unicast frames if the destination address matches the primary
MAC address specified in the rx_frame_addr0 and rx_frame_addr1 registers. If any of
the supplementary address bits are set to 1 (EN_SUPP0/1/2/3 in the rx_frame_control
register), the MAC RX also checks the destination address against the supplementary
addresses in use.

When the EN_ALLMCAST bit is set to 0, the MAC RX drops all multicast frames. This
condition doesn't apply to global multicast pause frames.

7.5.5. Frame Type Checking

The MAC RX checks the length/type field to determine the frame type:

Length/type < 0x600—The field represents the payload length of a basic Ethernet
frame. The MAC RX continues to check the frame and payload lengths.

Length/type >= 0x600—The field represents the frame type.

Length/type = 0x8100—VLAN or stacked VLAN tagged frames. The MAC RX
continues to check the frame and payload lengths.

Length/type = 0x8808—Control frames. The next two bytes are the Opcode
field which indicates the type of control frame. For pause frames (Opcode =
0x0001) and PFC frames (Opcode = 0x0101), the MAC RX proceeds with pause
frame processing (refer to

“Congestion and Flow Control” on page 7–15

). By

default, the MAC RX drops all control frames. If configured otherwise
(FWD_CONTROL bit in the rx_frame_control register = 1), the MAC RX forwards
control frames to the client.

For other field values, the MAC RX forwards the receive frame to the client.

FCS(X)

X

32

X

26

X

23

X

22

X

16

X

12

X

11

X

10

X

8

X

7

X

5

X

4

X

2

X

1

1

+

+

+

+

+

+

+

+

+

+

+

+

+

+

=

Advertising