EmbDev.net

Forum: FPGA, VHDL & Verilog to communicate fpga board to pc via ethernet


Author: Sidharth Kashyap (Company: cdac) (kashyap0)
Posted on:

Rate this post
0 useful
not useful
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");

Author: Schlumpf (Guest)
Posted on:

Rate this post
1 useful
not useful
The mac address isn´t stored in the phy!
It is managed by the mac controller.
But in your case YOUR fpga design IS the mac controller and therefore 
YOU can use any mac address you like.
As long as you make sure that no other device in the network has the 
same mac address you are using, everything is fine.


To geht a "working" ethernet-frame, don´t forget the following:
- preamble and sfd
- padding to minimum 64 bytes (data + fcs)
- fcs at end of frame

Author: Sidharth Kashyap (Company: cdac) (kashyap0)
Posted on:
Attached files:

Rate this post
0 useful
not useful
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.


my frame is:-

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", -- mac src
    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");
and i am getting same frame on simulation and chipScope but i am not 
getting this frame in proper order on Wireshark. Wireshark result 
attached with it.

please find this attachment.
please respond me as soon as possible.

Author: Sidharth Kashyap (Company: cdac) (kashyap0)
Posted on:

Rate this post
0 useful
not useful
i read it. my question is different.

Author: Schlumpf (Guest)
Posted on:

Rate this post
0 useful
not useful
Did you read what I wrote?

Schlumpf wrote:
> To geht a "working" ethernet-frame, don´t forget the following:
> - preamble and sfd
> - padding to minimum 64 bytes (data + fcs)
> - fcs at end of frame

Author: Schlumpf (Guest)
Posted on:

Rate this post
0 useful
not useful
Sidharth Kashyap wrote in post #4124209:
> my question is different

I cannot see a question!

Author: jonasbiensack (Guest)
Posted on:

Rate this post
0 useful
not useful
I see x"DA" is readed as AD. You need to swap your bytes. LSB and MSB...

greetz maestro

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
@Sidharth Kashyap
Pls don't start a new thread with a similar title on the same topic!

Author: Sidharth Kashyap (Company: cdac) (kashyap0)
Posted on:

Rate this post
0 useful
not useful
i am transmitting x"DA" as x"5B"
x"DA"=1101 1010
x"5B"=0101 1011


A lot of thanks for your previous suggestion.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.