Multicast address filters – Maxim Integrated 78Q8430 Software Driver User Manual
Page 19
UG_8430_004
78Q8430 Software Driver Development Guidelines
Rev. 1.0
19
STEP 4: Enable the filter.
Enable the unicast address filter N by modifying the CAM rule for byte [0]:
• Set the CAR ADDR field to 0x70+N.
• Set the RMR Previous Hit Mask field to 0x7F.
This step must be done last to prevent an arriving frame from matching a partial set of filter rules. All
the rules for a filter must be in place before the first rule, and then the filter itself, is enabled.
An address filter can be simply activated and deactivated by toggling the value of the RMR Previous Hit
Mask field for the associated byte [0] CAM rule between 0x7F and 0x00 respectively. Filter #0, the
promiscuous mode filter, should not be deactivated in this way.
It is important that STEP 1 deactivate the filter (by setting the RMR Previous Hit Mask field to 0x00)
so that no frames are filtered using a partial filter setting before all relevant rules are written.
STEP 4 reactivates the filter once the new settings are in place.
4.2.5 Multicast Address Filters
The default CAM rule set supports a total of four multicast address filters. The first, multicast filter #0,
serves the same purpose as the promiscuous mode filter except it applies only to multicast addresses.
The last, multicast filter #3, is the broadcast filter and is reserved for that purpose. The second, multicast
filter #1, is the PAUSE filter and is set up by default to match the PAUSE address. Multicast filter #2 is
unused by default and available for general use. Each filter has two components, the 48-bit address that
it matches and a mask that defines which bits of the address are relevant and which bits are wildcards.
Each byte of each address filter has a CAM rule assigned to it. Table 4 summarizes the association of
multicast filter bytes and CAM rules.
Table 4: CAM Rules Associated with Multicast Filter Bytes
Byte [0]
Byte [1]
Byte [2]
Byte [3]
Byte [4]
Byte [5]
Filter #3
0x7F 0x67 0x63 0x4F 0x4B 0x3F
Filter #2
0x7E 0x66 0x62 0x4E 0x4A 0x3E
Filter #1
0x7D 0x65 0x61 0x4D 0x49 0x3D
Bytes are in network transmit order starting with byte [0].
For an arbitrary multicast filter number N, use the following procedure to set the address and mask
values:
STEP 1: Write address and mask byte [0] to the CAM.
CAM rule 0x7C+N is written as follows:
Reg. Field
Value
to
write
CAR ADDR
0x7C+N
Data Match
Value of MAC address byte [0]
Data Mask
Value of mask byte [0]
Previous Hit Match
0x00 to disable the filter
RMR
Previous Hit Mask
0x00
Byte Offset
Retain default: 0x00
Interrupt
Retain default: 0
Control Logic Action
SETMC
RCR
Match Control
Retain default: MD
The LSB of both address byte [0] and mask byte [0] must be non-zero for multicast address filters. If
the LSBs are zero, the address is not multicast and belongs in the unicast filter set.