GD32F20x User Manual
795
implementing the function. If the FAR bit in the ENET_MAC_FRMF register is '0' (by default),
only the frame passed the filter will be received. This function is configured according to the
parameters of the application (frame filter register) to filter the destination or/and source
address of unicast or multicast frame (The difference between an individual address and a
group address is determined by I/G bit in the destination address field) and report the result
of the corresponding address filtering. The frame not pass through the filter will be discarded.
Note:
If the FAR bit in the ENET_MAC_FRMF register is set to 1, frames are all thought
passed the filter. In this case, even the filter result will also be updated in receive descriptor
but the result will not affect whether current frame passes the filter or not.
Unicast frame destination address filter
For a unicast frame, application has two modes for filtering: the one is using static physical
address (by setting HUF bit to ‘0’), the other is using hash list (by setting HUF bit to ‘1’).
Static physical address (SPA) filtering
In the filter mode, MAC supports using four MAC addresses for unicast frame filtering. In this
way, the MAC compares all 6 bytes of the received unicast address to the programmed MAC
address. MAC address 0 is always used and MAC address 1 to address 3 can be configured
to use or not. Each byte of MAC address 1 to MAC address 3 register can be masked for
comparison with the corresponding destination address byte of received frame by setting the
corresponding mask byte bits (MB) in the corresponding register.
Hash list filtering
In this filter mode, MAC uses a HASH mechanism. MAC uses a 64-bit hash list to filter the
received unicast frame. This filter mode obeys the followings two filtering steps:
1) The MAC calculates the CRC value of the received frame’s destination address
2) Using the high 6 bits of the calculated CRC value as the index to retrieve the hash list. If
the corresponding value of hash list is 1, the received frame passes through the filter,
conversely, fail the filter.
The advantage of this type of filter is that it can cover any possible address just using a small
table. But the disadvantage is that the filter is imperfect and sometimes the frames should be
dropped are also be received by mistake.
Multicast frame destination address filter
Application can enable the multicast frame MAC address filtering by cleaning the MFD bit in
register ENET_MAC_FRMF. By configuring the value of HMF bit in ENET_MAC_FRMF
register application can choose two ways just like unicast destination address filtering for
address filtering.
Hash or perfect address filter
The destination address (DA) filter can be configured to pass a frame when its DA matches
either the hash list filter or the static physical address filter by setting the HPFLT bit in the
Содержание GD32F20 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F20x ARM Cortex M3 32 bit MCU User Manual Revision 2 2 Oct 2019 ...
Страница 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Страница 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Страница 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Страница 385: ...GD32F20x User Manual 385 ...
Страница 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...