Forum Discussion
Altera_Forum
Honored Contributor
9 years agoThe easiest way to do this would be to use a dedicated Ethernet port on your computer. Expect to spend a lot of time finding out how networking works on your computers OS, of find someone who already knows to help you. Get a USB to Ethernet adapter. Set it up to operate with a fixed IP address. Find out what MAC address our adapter is using. Decide on a UDP port number on your computer that isn't used elsewhere. Set up the firewall on your computer to let in that port number. This will make things easier on your embedded device.
On your FPGA, write your packets to be UDP/IP addressed to your computer at the port number you've prepared. Write an application on your computer to pick up the data that your FPGA sends. Set up wireshark or a similar packet monitor in promiscuous mode to view what is being sent. You might also want to test this with another computer simulating what your FPGA will send. When putting together your packet on the FPGA concentrate on one layer at a time. Ethernet first, then IP, and finally UDP. Wireshark won't display anything until the Ethernet header is mostly right. Then you can use wireshark to help get the rest of the headers right. You can use dumps of packets from your test code as well. Documentation of all these protocols are available on the web.