![background image](http://html1.mh-extra.com/html/national-semiconductor/macphyter-ii-dp83816/macphyter-ii-dp83816_manual_3402840063.webp)
4.0 Register Set
(Continued)
62
www.national.com
DP83816
Accept on Multicast or Unicast Hash
Multicast and Unicast addresses may be further qualified
by use of the receive filter hash functions. An internal 512
bit (64 byte) RAM-based hash table is used to perform
imperfect filtering of multicast or unicast packets. By
enabling either Multicast Hashing or Unicast Hashing in the
RFCR, the receive filter logic will use the 9 least significant
bits of the destination addresses’ CRC as an index into the
Hash Table memory. The upper 4 bits represent the word
address and the lower 5 bits select the bit within the word.
If the corresponding bit is set, then the packet is accepted,
otherwise the packet is rejected. The hash table memory is
accessed through the RFCR and the RFDR. Refer to
Figure 4-2 for a memory map. Below is example code for
setting/clearing a bit in the hash table.
Figure 4-2 Hash Table Memory - 40h bytes addressed on word boundaries
set HASH_TABLE = 200
crc $DA
# compute the CRC of the destination address
set index = ($crc >> 3)
set bit = ($crc & 01f)
# lower 5 bits select which bit in 32 bit word
# write word address into RFCR
iow l $RFCR ($HASH $index)
# select bit to set/clear
if ($bit > f) set bit = ($bit - 010h)
# use 16 bit register interface into 32bit RAM
set hash_bit = (0001 << $bit)
# read indexed word from table
ior l $RFDR
if ($SetBit) then
set hash_word = ($rc | $hash_bit)
iow l $RFDR ($hash_word)
else
set hash_bit = (~$hash_bit)
set hash_word = ($rc & $hash_bit)
iow l $RFDR ($hash_word)‘
endif
iow l $RFCR ($RFEN|$MHEN|$UHEN)# enable multicast and/or unicast
# address hashing
Unused
Unused
X X
byte63
byte62
23E
X X
byte61
byte60
23C
..............
X X
byte5
byte4
204
X X
byte3
byte2
202
X X
byte1
byte0
200
Bit# 17 16 15
8 7
0
Summary of Contents for MacPHYTER-II DP83816
Page 106: ...105 www national com DP83816 Notes...