Lattice Semiconductor
Application Support
// check for multicast destination address
if ((multi_addr[0] & 0x01) == 0)
{
printf(" Not a multicast address\n");
printf(" Bit 0 of MSB must be 1\n\n");
system("PAUSE");
return 1;
}
// The following loops create the 32-bit crc
// value.
// loop through each byte of the address.
for(i=0; i<6; i++)
{
// Loop through each byte bit of that byte.
for(bit=0; bit<8; bit++)
{
carry = (crc >> 31)^((multi_addr[i] & (1 << bit)) >> bit);
crc <<= 1;
if (carry)
crc = (crc ^ CRC_POLYNOMIAL) | carry;
}
}
// Extract the middle 6 bits from the MSB of the 32bit CRC value,
// this six bit value is used to index a
// unique filter bit.
printf(" crc %lx \n", crc);
crc >>= 25; // TSMAC refers to Bit 30..25
crc &= 0x3F; // mask six bit
//Find the multicast register number and
//bit of that register to set.
printf(" hash %lx \n", crc);
register_no = crc >> 3;
register_bit = crc & 7;
printf (" register_no %lx\n register_bit %lx \n\n", register_no, register_bit);
system("PAUSE");
return 0;
}
IPUG51_03.0, December 2010
58
Tri-Speed Ethernet MAC User’s Guide
相关PDF资料
TS250-130F-2 POLYSWITCH PTC RESET 0.13A SMD
TS250-130F-B-0.5-2 POLYSWITCH PTC RESET 0.13A SMD
TS250-130F-RB-2 POLYSWITCH PTC RESET 0.13A SMD
TS250-130F-RC-2 POLYSWITCH PTC RESET 0.13A SMD
TS250-130F-RC-B-0.5-2 POLYSWITCH PTC RESET 0.13A SMD
TS600-170F-2 POLYSWITCH PTC RESET 0.17A T/R
TS600-200F-RA-B-0.5-2 POLYSWITCH PTC RESET 0.20A SMD
TS600-400F-2 POLYSWITCH PTC RESET 0.40A SMD
相关代理商/技术参数
TSMBG0505C 制造商:未知厂家 制造商全称:未知厂家 功能描述:SINGLE BIDIRECTIONAL BREAKOVER DIODE|100V V(BO) MAX|DO-215AA
TSMBG0506C 制造商:未知厂家 制造商全称:未知厂家 功能描述:SINGLE BIDIRECTIONAL BREAKOVER DIODE|110V V(BO) MAX|DO-214AA
TSMBG0507C 制造商:未知厂家 制造商全称:未知厂家 功能描述:SINGLE BIDIRECTIONAL BREAKOVER DIODE|145V V(BO) MAX|DO-214AA
TSMBG0509C 制造商:未知厂家 制造商全称:未知厂家 功能描述:SINGLE BIDIRECTIONAL BREAKOVER DIODE|185V V(BO) MAX|DO-215AA
TSMBG0510C 制造商:未知厂家 制造商全称:未知厂家 功能描述:SINGLE BIDIRECTIONAL BREAKOVER DIODE|200V V(BO) MAX|DO-214AA
TSMBG0511C 制造商:未知厂家 制造商全称:未知厂家 功能描述:SINGLE BIDIRECTIONAL BREAKOVER DIODE|210V V(BO) MAX|DO-214AA
TSMBG0512C 制造商:未知厂家 制造商全称:未知厂家 功能描述:SINGLE BIDIRECTIONAL BREAKOVER DIODE|215V V(BO) MAX|DO-214AA
TSMBG0514C 制造商:未知厂家 制造商全称:未知厂家 功能描述:SINGLE BIDIRECTIONAL BREAKOVER DIODE|250V V(BO) MAX|DO-214AA