09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>RM0090</strong> Ethernet (ETH): media access control (MAC) with DMA controller<br />

Multicast destination address filter<br />

The MAC can be programmed to pass all multicast frames by setting the PAM bit in the<br />

Frame filter register. If the PAM bit is reset, the MAC performs the filtering for multicast<br />

addresses based on the HM bit in the Frame filter register. In Perfect filtering mode, the<br />

multicast address is compared with the programmed MAC destination address registers (1–<br />

3). Group address filtering is also supported. In Hash filtering mode, the MAC performs<br />

imperfect filtering using a 64-bit Hash table. For hash filtering, the MAC uses the 6 upper<br />

CRC (see note 1 below) bits of the received multicast address to index the content of the<br />

Hash table. A value of 000000 selects bit 0 in the selected register and a value of 111111<br />

selects bit 63 in the Hash Table register. If the corresponding bit is set to 1, then the<br />

multicast frame is said to have passed the Hash filter; otherwise, the frame has failed the<br />

Hash filter.<br />

Note: This CRC is a 32-bit value coded by the following polynomial (for more details refer to<br />

Section 29.5.3: MAC frame reception):<br />

Gx ( ) x 32<br />

x 26<br />

x 23<br />

x 22<br />

x 16<br />

x 12<br />

x 11<br />

x 10<br />

x 8<br />

x 7<br />

x 5<br />

x 4<br />

x 2<br />

=<br />

+ + + + + + + + + + + + + x+ 1<br />

Hash or perfect address filter<br />

The DA filter can be configured to pass a frame when its DA matches either the Hash filter<br />

or the Perfect filter by setting the HPF bit in the Frame filter register and setting the<br />

corresponding HU or HM bits. This configuration applies to both unicast and multicast<br />

frames. If the HPF bit is reset, only one of the filters (Hash or Perfect) is applied to the<br />

received frame.<br />

Broadcast address filter<br />

The MAC does not filter any broadcast frames in the default mode. However, if the MAC is<br />

programmed to reject all broadcast frames by setting the BFD bit in the Frame filter register,<br />

any broadcast frames are dropped.<br />

Unicast source address filter<br />

The MAC can also perform perfect filtering based on the source address field of the received<br />

frames. By default, the MAC compares the SA field with the values programmed in the SA<br />

registers. The MAC address registers [1:3] can be configured to contain SA instead of DA<br />

for comparison, by setting bit 30 in the corresponding register. Group filtering with SA is also<br />

supported. The frames that fail the SA filter are dropped by the MAC if the SAF bit in the<br />

Frame filter register is set. Otherwise, the result of the SA filter is given as a status bit in the<br />

Receive Status word (see RDES0: Receive descriptor Word0).<br />

When the SAF bit is set, the result of the SA and DA filters is AND’ed to decide whether the<br />

frame needs to be forwarded. This means that either of the filter fail result will drop the<br />

frame. Both filters have to pass the frame for the frame to be forwarded to the application.<br />

Inverse filtering operation<br />

For both destination and source address filtering, there is an option to invert the filter-match<br />

result at the final output. These are controlled by the DAIF and SAIF bits in the Frame filter<br />

register, respectively. The DAIF bit is applicable for both Unicast and Multicast DA frames.<br />

The result of the unicast/multicast destination address filter is inverted in this mode.<br />

Similarly, when the SAIF bit is set, the result of the unicast SA filter is inverted. Table 164<br />

Doc ID 018909 Rev 3 928/1416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!