I have to use the Trimode Ethernet MAC core for my FPGA project, which will send and recieve data while connected to LAN though an Ethernet cable. For that obviously some IP address should be assigned to the FPGA, I couldn't find the part of code where this is happening ... Can anyone help me identify that part of code where IP address assignment is taking place?
From the description, it doesn't sound like it should have an IP address. Ethernet MAC addresses are 48 bit addresses, independent of IP addressing. Is it the MAC address you are trying to locate?
You will need an IP stack as well as Ethernet to communicate via IP.
Usually that would be done in software outside the FPGA.
In some cases you can assign a static address, but DHCP would be nice. Much easier to do in software in a simple processor. It only needs to be done once (get a long lease from DHCP).
Another way is putting an entry into ARP on another host with your hosts MAC address as the destination. Then all you need to do is accept any data coming in.
You can exchange the MAC and IP addresses before sending the data back, easiest for UDP.
Yes, but when you construct a UDP packet with IP header you still have to get the IP address into the packet. It should be possible to do all that with FPGA logic (and a medium sized state machine).
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.