Forum Discussion
Altera_Forum
Honored Contributor
12 years agoHi,
This means better is to buy IP cores. Anyway, i would like to modify the tutorial but first I didn't understand completely the application program written in C. I didn't understand which values are assigned to pointer *tse and how the address of pointer is incremented below? // Triple-speed Ethernet MegaCore base address volatile int *tse =(int *) 0x00102000; // Initialize the MAC address *(tse + 3) = 0x116E6001; *(tse + 4) = 0x00000F02; // Specify the addresses of the PHY devices to be accessed through MDIO interface *(tse + 0x0F) = 0x10; *tse + 0x10 = 0x11; // Write to register 20 of the PHY chip for Ethernet port 0 to set up line loopback *(tse + 0x94) = 0x4000; // Write to register 16 of the PHY chip for Ethernet port 1 to enable automatic crossover for all modes *(tse + 0xB0) = *(tse + 0xB0) | 0x0060; // Write to register 20 of the PHY chip for Ethernet port 2 to set up delay for input/output clk *(tse + 0xB4) = *(tse + 0xB4) | 0x0082; // Software reset the second PHY chip and wait *(tse + 0xA0) = *(tse + 0xA0) | 0x8000; while (*(tse + 0xA0) & 0x8000) ; // Enable read and write transfers, gigabit Ethernet operation, and CRC forwarding *(tse + 2) = *(tse + 2) | 0x0000004B; can anybody please clarify me?