SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
The Address Filtering Module of the MAC checks the source address (SA) and destination address (DA) fields of each incoming packet. The MAC supports up to 128 MAC addresses for unicast perfect filtering. If perfect filtering is selected (HUC bit of MAC_Packet_Filter register is reset), the MAC compares all 48 bits of received unicast address with the programmed MAC address for any match. The default MacAddr0 is always enabled.
The MacAddr1 to MacAddr127 addresses are selected with an individual enable bit. For MacAddr1 to MacAddr31 addresses, you can mask each byte during comparison with corresponding received DA byte by setting the corresponding Mask Byte Control bit in the register. This enables group address filtering for the DA. The MacAddr32 to MacAddr127 addresses do not have mask control and all 6-bytes of the MAC address are compared with the received 6-bytes of DA.
In hash filtering mode (when HUC bit is set), the MAC performs imperfect filtering for unicast addresses using a 64-bit Hash table. For hash filtering, the MAC uses the upper 6 bits CRC of the received destination address to index the content of the Hash table. A value of 00000 selects Bit 0 of selected register, and a value of 11111 selects Bit 63 of Hash Table register. If the corresponding bit (indicated by the 6-bit CRC) is set to 1, the unicast packet is considered to have passed the Hash filter; otherwise, the packet is considered to have failed the Hash filter.
To program the MAC to pass all multicast packets, set the PM bit in MAC_Packet_Filter register. If the PM bit is reset, the MAC performs the filtering for multicast addresses based on the HMC bit of the MAC_Packet_Filter register.
The multicast address is compared with the programmed MAC Destination Address registers (1–31). Group address filtering is also supported.
In Hash filtering mode, the MAC performs imperfect filtering using a 64-bit Hash table. The MAC uses the upper 6-bits CRC of received multicast address to index the content of the Hash table. A value of 000000 selects Bit 0 of selected register and a value of 111111 selects Bit 63 of the Hash Table register. If the corresponding bit is set to 1, the multicast packet is considered to have passed the Hash filter. Otherwise, the packet is considered to have failed the Hash filter.
To configure the DA filter to pass a packet when its DA matches either the Hash filter or the Perfect filter, set the HPF bit and the corresponding HUC or HMC bits in MAC_Packet_Filter register. This is applicable to both unicast and multicast packets. If the HPF bit is reset, only one of the filters (Hash or Perfect) is applied to received packet.
The MAC does not filter any broadcast packets by default. To program the MAC to reject all broadcast packets, set the DBF bit in MAC_Packet_Filter register.
Packet Type | PR | HPF | HUC | DAIF | HMC | PM | DBF | DA Filter Operation |
---|---|---|---|---|---|---|---|---|
Broadcast | 1 | X | X | X | X | X | X | Pass |
0 | X | X | X | X | X | 0 | Pass | |
0 | X | X | X | X | X | 1 | Fail | |
Unicast | 1 | X | X | X | X | X | X | Pass all packets |
0 | X | 0 | 0 | X | X | X | Pass on Perfect/Group filter match | |
0 | X | 0 | 1 | X | X | X | Fail on Perfect/Group filter match | |
0 | 0 | 1 | 0 | X | X | X | Pass on Hash filter match | |
0 | 0 | 1 | 1 | X | X | X | Fail on Hash filter match | |
0 | 1 | 1 | 0 | X | X | X | Pass on Hash or Perfect/Group filter match | |
0 | 1 | 1 | 1 | X | X | X | Fail on Hash or Perfect/Group filter match | |
Multicast | 1 | X | X | X | X | X | X | Pass all packets |
X | X | X | X | X | 1 | X | Pass all packets | |
0 | X | X | 0 | 0 | 0 | X | Pass on Perfect/Group filter match and drop Pause packets if PCF = 0x |
|
0 | 0 | X | 0 | 1 | 0 | X | Pass on Hash filter match and drop Pause packets if PCF = 0x | |
0 | 1 | X | 0 | 1 | 0 | X | Pass on Hash or Perfect/Group filter match and drop Pause packets if PCF = 0x | |
0 | X | X | 1 | 0 | 0 | X | Fail on Perfect/Group filter match and drop Pause packets if PCF = 0x |
|
0 | 0 | X | 1 | 1 | 0 | X | Fail on Hash filter match and drop Pause packets if PCF = 0x | |
0 | 1 | X | 1 | 1 | 0 | X | Fail on Hash or Perfect/Group filter match and drop Pause packets if PCF = 0x |