where is the IP address assigned to the fpga in Trimode Ethernet MAC Core???

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?

I'm using Xilinx Application Notes, XAPP443.

formatting link

I really need help, immediately.

Reply to
Ambreen Ashfaq Afridi
Loading thread data ...

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.

RL

Reply to
RL

An Ethernet MAC does not know about IP addresses, only Ethernet MAC =

addresses. Ethernet sees IP packets as just data with a label that says = =

"protocol=3DIP", it does not use the IP address in any way. Ethernet rou= ting =

is based on the MAC address.

Now your PC which is on Ethernet uses the ARP protocol to query the =

network for "which is the MAC address of the machine with IP xx.xx.xx.xx= =

?", it is a broadcast packet that all machines receive and the one which= =

feels concerned responds.

So as a first step you can set an entry in the ARP cache on your PC (on= =

Linux use command arp) to tell the PC that your FPGA's IP corresponds to= =

its MAC address. You should chose the IP yourself, something like =

192.168.0.xx if your network is in the 192.168.0.xx form.

Once you do that the PC will set the packets' destination address to th= e =

right value and your FPGA's MAC will see it and understand that the =

packets are targeted at it.

Then use an IP stack with ARP to automate this process.

Reply to
PFC

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.

-- glen

Reply to
glen herrmannsfeldt

but i'm supposed to work until the 2nd layer i.e data link layer...so i'll only be needing MAc addresses right?

Reply to
silver.glimmer

Assuming that they haven't been mis-edited recently,

formatting link
and the articles it references should tell you what you need to know...

Reply to
RCIngham

PFC wrote: (snip)

That is , a type of X'0800'

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).

-- glen

Reply to
glen herrmannsfeldt

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.