參數(shù)資料
型號: AM79C90PCTR
廠商: Advanced Micro Devices, Inc.
英文描述: CMOS Local Area Network Controller for Ethernet (C-LANCE)
中文描述: 的CMOS局域網(wǎng)控制器(丙應(yīng)聘以太網(wǎng))
文件頁數(shù): 52/62頁
文件大?。?/td> 437K
代理商: AM79C90PCTR
AMD
52
Am79C90
{
int k,i, byte; /* temporary array indices */
int hashcode; /* the object of this program */
char buf[80]; /* holds input characters */
for (i=0;i<8;i++) ladrf[i] = 0; /* clear log. adr. filter */
printf (”Enter Ethernet addresses as 6 octets separated by blanks.\n”);
printf (”Each octet is one or two hex characters. The first octet \n”);
printf (”entered is the first octet to be transmitted. The LSB of \n”);
printf (”the first octet is the first bit transmitted. After each \n”);
printf (”address is entered, the Logical Address Filter contents \n”);
printf (”are displayed, least significant byte first, with the \n”);
printf (”appropriate bits set for all addresses entered so far.\n”);
printf (” To exit press the <Enter> key.\n\n”);
while (1)
{
loop:
printf (”\nEnter address: ”);
/* If 1st character = CR, quit, otherwise read address. */
gets (buf);
if ( buf[0] == ’\0’) break;
if (sscanf (buf, ”%x %x %x %x %x %x”,
&adr[0], &adr[1], &adr[2],&adr[3],&adr[4],&adr[5])
!= 6)
{ printf
(”Address must contain 6 octets separated by blanks.\n”);
goto loop;
}
if ((adr[0] & 1) == 0)
{ printf (”First octet of multicast address ”);
printf (”must be an odd number.\n”);
goto loop;
}
/* Initialize CRC */
for (i=0; i<32; i++) CRC[i] = 1;
/* Process each bit of the address in the order of transmission.*/
for (byte=0; byte<6; byte++)
for (i=0; i<8; i++)
updateCRC ((adr[byte] >> i) & 1);
/* The hash code is the 6 least significant bits of the CRC
in reverse order: CRC[0] = hash[5], CRC[1] = hash[4], etc.
*/
hashcode = 0;
for (i=0; i<6; i++) hashcode = (hashcode << 1) + CRC[i];
/* Bits 3–5 of hashcode point to byte in address filter.
Bits 0–2 point to bit within that byte. */
byte = hashcode >> 3;
相關(guān)PDF資料
PDF描述
AM79C930 PCnet-Mobile Single-Chip Wireless LAN Media Access Controller
AM79C930VCW PCnet-Mobile Single-Chip Wireless LAN Media Access Controller
AM79C940VCW Media Access Controller for Ethernet (MACE)
AM79C940 Media Access Controller for Ethernet (MACE)
AM79C940JCW Media Access Controller for Ethernet (MACE)
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AM79C90WW WAF 制造商:Advanced Micro Devices 功能描述:
AM79C930 制造商:AMD 制造商全稱:Advanced Micro Devices 功能描述:PCnet-Mobile Single-Chip Wireless LAN Media Access Controller
AM79C930EVAL-HW 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Am79C930EVAL-HW - PCnet-Mobile Evaluation Kit
AM79C930VC/W 制造商:AMD 制造商全稱:Advanced Micro Devices 功能描述:PCnet-Mobile Single-Chip Wireless LAN Media Access Controller