Unicast address checking, Multicast address resolution – Altera Triple Speed Ethernet MegaCore Function User Manual

Page 44

Advertising
background image

Unicast Address Checking

When promiscuous mode is disabled, the MAC function only accepts unicast frames if the destination
address matches any of the following addresses:

• The primary address, configured in the registers

mac_0

and

mac_1

• The supplementary addresses, configured in the following registers:

smac_0_0/smac_0_1

,

smac_1_0/smac_1_1

,

smac_2_0/smac_2_1

and

smac_3_0/smac_3_1

Otherwise, the MAC function discards the frame.

Multicast Address Resolution

You can use either a software program running on the host processor or a hardware multicast address
resolution engine to resolve multicast addresses. Address resolution using a software program can affect the
system performance, especially in gigabit mode.

The MAC function uses a 64-entry hash table in the register space, multicast hash table, to implement the
hardware multicast address resolution engine as shown in figure below. The host processor must build the
hash table according to the specified algorithm. A 6-bit code is generated from each multicast address by

XOR

ing the address bits as shown in table below. This code represents the address of an entry in the hash

table. Write one to the most significant bit in the table entry. All multicast addresses that hash to the address
of this entry are valid and accepted.

You can choose to generate the 6-bit code from all 48 bits of the destination address by setting the

MHASH_SEL

bit in the

command_config

register to 0, or from the lower 24 bits by setting the

MHASH_SEL

bit to 1. The

latter option is provided if you want to omit the manufacturer's code, which typically resides in the upper
24 bits of the destination address, when generating the 6-bit code.

Figure 4-4: Hardware Multicast Address Resolution Engine

Hash

Generate

multicast_match

frame destination

address (47:0)

write_port

din

read_addr(5:0)

dout

hash_addr(5:0)

hash_w

ren

hash_d

ata

w

clk

Look-Up Table

(64x1 DPRAM)

Table 4-1: Hash Code Generation—Full Destination Address

Algorithm for generating the 6-bit code from the entire destination address.

Value

Hash Code Bit

xor

multicast MAC address bits 7:0

0

xor

multicast MAC address bits 15:8

1

xor

multicast MAC address bits 23:16

2

xor

multicast MAC address bits 31:24

3

xor

multicast MAC address bits 39:32

4

Functional Description

Altera Corporation

Send Feedback

UG-01008

Unicast Address Checking

4-8

2014.06.30

Advertising