Jump to content
  • 0

to communicate ATLYS fpga board to pc via ethernet


kashyap0

Question

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 address.
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");
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Hello!

The MAC address is set by the software application. For example, if you make TestPeriph Application from the SDK wizard, (2014.4 but it should be similar to older versions too), then the MAC address is stored in xaxiethernet_example_util.c, line 76: 

char AxiEthernetMAC[6] = { 0x00, 0x0A, 0x35, 0x01, 0x02, 0x03 }, 

and the MAC address is set either in xaixiethernet_example_polled.c, line 237:

    /*
     * Set the MAC  address
     */
    Status = XAxiEthernet_SetMacAddress(&AxiEthernetInstance,
                            (u8 *) AxiEthernetMAC);
    if (Status != XST_SUCCESS) {
        AxiEthernetUtilErrorTrap("Error setting MAC address");
        return XST_FAILURE;
    }

or in xaxi_ethernet_example_intr_fifo.c, from Line 361.

 

If you use a LWIP library-based application (recommended), then the MAC address can be found in the main.c, you can check line 65:

unsigned char mac_ethernet_address[] = { 0x00, 0x0a, 0x35, 0x00, 0x01, 0x02 };

I would suggest to use the LWIP library, because it contains many API-based TCP/IP functions.

 

Regards,

Albert

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...