The MAC provides VLAN tag hash filtering with a 16-bit Hash table. The MAC performs the VLAN
hash matching based on the
VTHM
bit of the
EMACVLANTG
register. If the
VTHM
bit is set, the most
significant four bits of VLAN tag's CRC-32 are used to index the content of the
Ethernet MAC VLAN
Hash Table (EMACVLANHASH)
register, offset 0x588. A value of 1 in the
EMACVLANHASH
register, corresponding to the index, indicates that the VLAN tag of the frame matched and the
packet should be forwarded. A value of 0 indicates that VLAN-tagged frame should be dropped.
The MAC also supports the inverse matching of the VLAN frames. In the inverse matching mode,
when the VLAN tag of a frame matches the perfect or hash filter, the packet should be dropped. If
the VLAN perfect and VLAN hash match are enabled, a frame is considered as matched if either
the VLAN hash or the VLAN perfect filter matches. When inverse match is set, a packet is forwarded
only when both perfect and hash filters indicate mismatch. Table 20-18 on page 1450 shows the
different possibilities for VLAN matching and the final VLAN match status. When the
RA
bit of the
EMACFRAMEFLTR
register is set, all frames are received and the VLAN match status is indicated
in Bit 10 of Receive Descriptor word 0 (RDES0). When the
RA
bit is not set and the
VTFE
bit in the
EMACFRAMEFLTR
register is set, the frame is dropped if the final VLAN match status is fail. In
Table 20-18 on page 1450, value X means that this column can have any value. When the
VL
field is
programmed to 0x0 in
EMACVLANTG
register, all VLAN-tagged frames are considered as perfect
matched but the status of the VLAN hash match depends on the VLAN hash enable (
VTHM
) bit and
VLAN inverse filter (
VTIM
) bit.
Table 20-18. VLAN Match Status
Final VLAN Match
Status
VLAN Inverse
Filter Bit (
VTIM
)
VLAN Hash Filter
Match Status (
VTHM
)
VLAN HASH Enable
bit (
HPF
bit in
EMACFRAMEFLTR)
VLAN Perfect Filter
Match Status (
VPF
)
VLAN ID
(
VL
field)
Pass
X
X
0
Pass
VL = 0
Pass
0
X
1
Pass
Pass
1
Fail
1
Pass
Fail
1
Pass
1
Pass
Pass
0
X
X
Pass
VL !=0
Fail
0
X
0
Fail
Fail
0
Fail
1
Fail
Pass
0
Pass
1
Fail
Pass
1
X
0
Fail
Fail
1
X
X
Pass
Fail
1
Pass
1
Fail
Pass
1
Fail
1
Fail
20.3.7
Source Address, VLAN, and CRC Insertion, Replacement or Deletion
The MAC supports the following functions for transmit frames:
■ Source Address Insertion or replacement
■ VLAN Insertion, Replacement or Deletion
■ CRC Replacement
20.3.7.1
Source Address Insertion or Replacement
Software can use the SA insertion or replacement feature to instruct the MAC to do the following
for transmit frames:
June 18, 2014
1450
Texas Instruments-Production Data
Ethernet Controller