cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lokicdac
Visitor
Visitor
9,015 Views
Registered: ‎04-25-2015

to communicate fpga board to pc via ethernet

hi
i am trying to cummunicate to pc with fpga board. i am using atlys board of digilent company in which spartan-6 (xc6slx45csg324c) is connected to marevell 88E1111 phy chip.In this project i am facing the problem to getting the mac address of board (phy chip) to send the arp frame and udp frame.because i am manually framming the udp and arp frame fr in my code for which i need source mac address i.e mac address of fpga board (or marvell phy chip).
please respond me as soon as possible.

 

 

 

constant udp_frameA :frame60:=
(x"FF",x"FF",x"FF",x"FF", -- mac dest
x"FF",x"FF",x"00",x"00",
x"00",x"04",x"14",x"13", -- i want to know this source mac adress
x"08",x"00",x"45",x"00", -- IP header
x"00",x"2E",x"00",x"00",
x"00",x"00",x"40",x"11",
x"7A",x"C0",x"00",x"00", -- IP src
x"00",x"00",x"FF",x"FF", -- IP dest
x"FF",x"FF",x"00",x"00", -- port src
x"50",x"DA",x"00",x"12", -- port dest + len
x"00",x"00",x"41",x"41", -- checksum udp + data "A"
x"41",x"41",x"41",x"41",
x"41",x"41",x"41",x"41",
x"41",x"41",x"41",x"41",
x"41",x"41",x"41",x"41");

0 Kudos
6 Replies
yenigal
Xilinx Employee
Xilinx Employee
8,974 Views
Registered: ‎02-06-2013

Hi

 

The Board MAC address will be labeiled on the Board generally?

 

Are you not able to see it on your board.

Regards,

Satish

--------------------------------------------------​--------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
lokicdac
Visitor
Visitor
8,944 Views
Registered: ‎04-25-2015

thanku for your suggestion.

but mac address is not mantioned anywhere on the board.I have studied somewhere that every manufacturer provide the mac address to phy chip.but i am not able to get mac address of marvell phy chip of atlys board which i am using for my project.

0 Kudos
saichandu
Newbie
Newbie
613 Views
Registered: ‎04-27-2020

You can see the data sheet to know the PHY MAC address

0 Kudos
dpaul24
Scholar
Scholar
603 Views
Registered: ‎08-07-2014

@saichandu,

How are you making sure that your dev board is communicating with the Eth of your PC?

If you are using Wireshark running on your PC, then you will be able to see the packets coming from your dev board. There you will find the PHY MAC address.

If you say that you cannot ping from your PC to the dev board, then do this--

Without any higher level protocol, you would at least need to manually add the board's MAC address to your local ARP table so you could try to send it something like a ping. In a command window you can assign a static entry to the ARP table like:

arp -s 192.168.5.10 DA-01-02-03-04-05

Then if you try to ping 192.168.5.10 you should see some activity (not a real ping response - you'll still need WireShark to see it).

Note: DA-01-02-03-04-05 was then my dev board PHY MAC.

See this e.g.- https://www.xilinx.com/support/documentation/boards_and_kits/ac701/2014_4/xtp223-ac701-ethernet-c-2014-4.pdf

You can set your own MAC addr!

 

------------FPGA enthusiast------------
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem

0 Kudos
yj
Contributor
Contributor
547 Views
Registered: ‎06-25-2020

@dpaul24 

Thanks for the answer.

I'm working on a similar issue. When I run the TEMAC example design it works, could see the packets.

I extended the design to add an SFP module and loop back the data from SFP.

 -- KC705, Vivado 2020.1 --

Now when I switch on the packet generator, only 200-300 packets are received, could you help me solve the issue?

I'm using Wireshark to sniff packets. 

Could you explain more about MAC and IP address WRT to dev boards?  

0 Kudos
dpaul24
Scholar
Scholar
530 Views
Registered: ‎08-07-2014

@yj 

Now when I switch on the packet generator, only 200-300 packets are received, could you help me solve the issue?

Modify the packet gen to send a fixed number of packets. In this way you know how many packets to be expected by Wireshark. If you still get less than expected num of packets, get an ILA core in and observe the Transmit side of the MAC core. If everything is ok there, then analyze the PHY Transmit side.

Could you explain more about MAC and IP address WRT to dev boards?

I already did it in my last post. Raw Ethernet packet are sent by the packet generator having a Destination and Source MAC ID. These IDs are observable using Wireshark. Mapping the FPGA Ethernet MAC address to an IP address is just an ARP table mapping in the PC. Physically there is no connection b/w this IP and FPGA Ethernet MAC address.

 

 

------------FPGA enthusiast------------
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem

0 Kudos