Forum Discussion
Altera_Forum
Honored Contributor
15 years agoRead the MAC datasheet to learn everything about the registers. You'll need to set up the MAC right, detect the PHY, configure it correctly, detect if the cable is connected, what is the speed of the link, if it is half or full duplex, and configure the MAC accordingly. You can have a look at the Interniche driver to see how it is done.
Then you write your Ethernet packet contents somewhere in memory and set up the SGDMA to read it and send it to the MAC. In my opinion it is easier to learn how to use the TCP/IP stack than try to send the packets yourself. Have a look at the simple sockets server example and modify it to suit your needs. Read some documentation about the BSD sockets API, it isn't that hard to use.