![](http://datasheet.mmic.net.cn/110000/GT-96100A_datasheet_3491740/GT-96100A_271.png)
GT-96100A Advanced Communication Controller
Revision 1.0
271
12.3.4.2 Hash Modes
There are two Hash functions in the GT-96100A; Hash Mode 1 and Hash Mode 0.
12.3.4.3 Hash Mode 0
In Hash mode 0, the Hash entry address is calculated in the following manner:
hashResult[14:0] = hashFunc0(ethernetADD[47:0])
hashResult is the 15 bits Hash entry address.
ethernetADD is a 48 bit number, which is derived from the Ethernet MAC address, by nibble swapping
in every byte; i.e. MAC address of 0x123456789abc translates to ethernetADD of 0x21436587a9cb.
inverse every nibble; i.e. ethernetADD of 0x21436587a9cb translates to 0x482c6a1e59d
hashFunc0 calculates the hashResult in the following manner:
hashResult[14:9] = ethernetADD[7:2]
hashResult[8:0]= ethernetADD[14:8,1,0] XOR ethernetADD[23:15] XOR ethernetADD[32:24]
12.3.4.4 Hash Mode 1
In Hash mode 1, the Hash entry address is calculated in the following manner:
hashResult[14:0] = hashFunc1(ethernetADD[47:0])
hashResult is the 15 bits Hash entry address.
ethernetADD is a 48 bit number, which is derived from the Ethernet MAC address, by nibble swapping
in every byte (i.e MAC address of 0x123456789abc translates to ethernetADD of 0x21436587a9cb).
inverse every nibble; i.e. ethernetADD of 0x21436587a9cb translates to 0x482c6a1e59d
hashFunc1 calculates the hashResult in the following manner:
hashResult[14:9] = ethernetADD[0:5]
hashResult[8:0]= ethernetADD[6:14] XOR ethernetADD[15:23] XOR ethernetADD[24:32]
12.3.4.5 Hash Entry
For each Ethernet address, the Hash table entry address is the lower 13 bits of the hashResult for the 8KByte
address table, or the lower 9 bits for the 0.5KByte address table. The entry is an offset from the address base and
is octet-byte aligned. The address entry is therefore:
8K
Address Table: tblEntryAdd = EHTP + {hashResult[14:0],000}
1/2K Address Table:tblEntryAdd = EHTP + {hashResult[10:0],000}
12.3.4.6 Hash Table Numbers
12.3.4.7 Table Filling
When preparing the Hash table data structure, the CPU must first (typically at boot time) initialize the Hash table
memory to ‘0’.
The table filling algorithm is described below. The hopNumber should be selected and initialized before entering
this routine. The Hash table hopNumber (Number of Hops) is 12. After 12 tries to identify an address, the GT-
96100A passes the address to the CPU and sets the HE (Hash Expired) bit in the descriptor status field. There-
fore, the hopNumber is the number of times the CPU will attempt to write a newly learned Ethernet address into
the Hash table.