UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Scholar joelby
Scholar
8,385 Views
Registered: ‎10-05-2010

Re: UDP IP stack on a Spartan-6

The Ethernet checksum should be generated by the MAC (I forget exactly where and don't have the code in front of me).

 

Did the unmodified example work correctly?

0 Kudos
Observer kruljcina
Observer
8,381 Views
Registered: ‎04-20-2011

Re: UDP IP stack on a Spartan-6

Hi Joelby,

 

sorry I have just realized that I have modified your code to work with RGMII standard of my KSZ9021. By MAC

you are referring to the 88E1111 chip?

0 Kudos
Scholar drjohnsmith
Scholar
8,370 Views
Registered: ‎07-09-2009

Re: UDP IP stack on a Spartan-6

re checksum.

 

The TCP / IP header checksum , not in the macs as far as the ones I have seen .

 

easy to impliment in the code though, only have to do a ones compliment addition,

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Scholar joelby
Scholar
8,349 Views
Registered: ‎10-05-2010

Re: UDP IP stack on a Spartan-6


sorry I have just realized that I have modified your code to work with RGMII standard of my KSZ9021. By MAC

you are referring to the 88E1111 chip?


Ah, if you've modified the MAC, then I have no idea what's wrong! ;-) The MAC is everything under the "simple_gemac" directory. The 88E1111 and the KSZ9021 are both PHYs.

 

In the original code, CRCs are calculated during transmit in simple_gemac_tx.v:

 

crc crc(.clk(tx_clk), .reset(reset), .clear(clear_crc),
.data(txd_pre), .calc(calc_crc), .crc_out(crc_out));

 

and output to the wire in this bit:

 

	case(tx_state)
	  TX_CRC_0 :
	    GMII_TXD <= crc_out[31:24];
	  TX_CRC_1 :
	    GMII_TXD <= crc_out[23:16];
	  TX_CRC_2 :
	    GMII_TXD <= crc_out[15:8];
	  TX_CRC_3 :
	    GMII_TXD <= crc_out[7:0];

 Check your simulation to see if these states are being reached correctly.

0 Kudos
Observer kruljcina
Observer
8,341 Views
Registered: ‎04-20-2011

Re: UDP IP stack on a Spartan-6

Hi,

 

you are right I have bypassed some code and crc

was probably excluded.

Sorry for false alarm.

0 Kudos
Visitor lama_prog
Visitor
7,696 Views
Registered: ‎04-14-2014

Hello! Anybody happen to have a pin configuration file (*...

Hello!
Anybody happen to have a pin configuration file (*. ucf) to run this project on the Xilinx SP605 evaluation kit?
I would really appreciate if you share!
Sincerely.

 

0 Kudos
7,674 Views
Registered: ‎04-17-2014

Re: UDP IP stack on a Spartan-6

Hi,

do you know how can i confugure pins of ml605 virtex  board to spartan 6 board.I am working on udp ip stack layer project.

0 Kudos
Visitor lama_prog
Visitor
7,662 Views
Registered: ‎04-14-2014

Re: UDP IP stack on a Spartan-6

Hello!

 

After a little editing *.ucf file and PLL core settigs i can execute this UDP stack on SP605 evaluation kit.

Iperf utility show 550-570 Mbps bandwidth after a change package send mode (from manual to forced - in top level module i change packet_sender(...  .start(sw_send_packet),  ....); to .start(1'b1)).  But wireshark displayed input datagrams with [ETHERNET FRAME CHECK SEQUENCE INCORRECT] mark. Please, tell me, what i am doing wrong?

 

I also tried receive UDP datagrams (host send broadcast packet), but packet_receiver FSM always in state 0... There are any thoughts about why?

 

Best regards

0 Kudos
Scholar joelby
Scholar
7,652 Views
Registered: ‎10-05-2010

Re: UDP IP stack on a Spartan-6

Using my example code? You'll need to use unicast UDP using the correct destination IP and port. I used netcat for this, using the IP address hard-coded in the code. Sorry it's not better documented! :(

0 Kudos
Visitor lama_prog
Visitor
7,636 Views
Registered: ‎04-14-2014

Re: UDP IP stack on a Spartan-6

Hi, joelby!

Thanks for your reply.

At first i used QUdpSocket class in Qt 4.8.5 framework to send datagrams to my developer board, but i have some problems (wireshark not shown outbox datagrams - probably because it was not possible to get the MAC address of the recipient - it was not in ARP table and I think, in the used stack is not implemented response to ARP request to the MAC address of the device) and i can send only broadcast datagrams.

After your reply i used Colasoft Packet Builder 1.0 [http://www.colasoft.com/packet_builder/] to send packet. After learning your's testbench tb_packet_receiver_gemac.v i found mistake in my code - i forgot change ucast_addr! After i change parameters for wb_reg_ucast_h and wb_reg_ucast_l  in module simple_gemac_wb i saw the data sent in PuTTY utility which connected to SP605 in serial mode.

Again thanks for your reply :)

With best regards! 

 

0 Kudos
Visitor lama_prog
Visitor
6,991 Views
Registered: ‎04-14-2014

Re: UDP IP stack on a Spartan-6

Understood of QUdpSocket in Qt 4.8.5. Problem was the proxy settings on the host.

Сontinue to explore this UDP/IP stack.

0 Kudos
6,893 Views
Registered: ‎05-28-2014

Re: UDP IP stack on a Spartan-6

hi,I am using your udp_ip code,but I don,t know how to send data to atlys,use linux,s socket or others,how did you do it ?

0 Kudos
Scholar joelby
Scholar
6,885 Views
Registered: ‎10-05-2010

Re: UDP IP stack on a Spartan-6

For debugging or simple applications, the 'netcat' program is great for sending UDP packets.

For anything more complex or robust, it's probably best to write a program in your language of choice.
0 Kudos
6,850 Views
Registered: ‎05-28-2014

Re: UDP IP stack on a Spartan-6

thank for you reply,I attemp to use netcat,My linux installed in vmware,my linux net ipaddr is 192.168.2.112,hardware is 000c_29e9_cf6b,becaue my board is atlys,so I just chang your code in the packet_sender as follows:

 parameter SRC_PORT = 16'h1234;
 parameter DST_PORT = 16'h1234;
 parameter SRC_MAC = 48'h0037_ffff_3737;
 parameter DST_MAC = 48'h000c_29e9_cf6b;
 parameter DST_IP = 32'hc0a8_0170;
 parameter SRC_IP = 32'hc0a8_0171;

and then generate ethernet_test_top.bit,and download to my atlys board,connet atlys to my computer with net,and then

Type the command in the linux console as follows:

nc  -l  -p 1234

and then type some datas,I find it don,t work,and then I type the follows command:

nc 192.168.1.10 1234 -u -p 1234

and it,s also don,t work.I really don't know how to do it and where is wrong ,could you give me some advice?

thank you very much!

 

0 Kudos
Scholar joelby
Scholar
6,840 Views
Registered: ‎10-05-2010

Re: UDP IP stack on a Spartan-6

Sorry it's not better document :( I've updated the web site with some more details.

 

The packet receiver process doesn't implement ARP, so you will need to set a static ARP entry:

 

arp -s 169.254.77.1 0037ffff3737

 

The IP address doesn't really matter (the packet receiver doesn't check it) but it will need to be something in the same subnet as your computer. The MAC address is set as a default in simple_gemac_wb.v.

 

Then nc -u 192.168.1.10 1234 should work! The port doesn't really matter either.

 

You should also be able to receive packets with nc -l -u but I can't remember if it sends anything very useful.. probably easiest to use Wireshark or tcpdump.

 

0 Kudos
Visitor sameedsohail
Visitor
6,597 Views
Registered: ‎07-16-2014

Re: UDP IP stack on a Spartan-6

Hi Joel & kruljcina,

 

I have bought AC701 Evaulation board and intend to send UDP packets from it via Ethernet. The PHY module it  uses is Marvell M88E1116r (i.e. RGMII ).

 

I want to know if any of you had success in implementing UDP transmission for RGMII so that i may be able to use the code for my purpose. I will appreciate any guidance on implementing this IP.

 

Regards,
Sameed

0 Kudos
Scholar joelby
Scholar
6,586 Views
Registered: ‎10-05-2010

Re: UDP IP stack on a Spartan-6

It's probably best if you start a new thread, rather than resurrecting an old one that relates to a different FPGA and different PHY!

 

I've never tried to use RGMII, but as long as you use a MAC that supports RGMII on a proven development board such as the AC701, you shouldn't have too much trouble. I'd probably recommend using the Xilinx TEMAC - my Spartan-6 sample code uses a MAC that only supports GMII at gigabit speeds. You might be able to use my code's UDP packet generator for inspiration and for the details of IP/UDP header generation, but be aware that the interface to the Xilinx MAC (and probably every other MAC) will be different.

 

0 Kudos
Observer kruljcina
Observer
6,532 Views
Registered: ‎04-20-2011

Re: UDP IP stack on a Spartan-6

Hi,

 

vau, that was long time ago. I did a very ugly hack

of the original code. I wasn't very efficient because I

managed to make only transmit to work, receive branch

had an error which I never got time to track down.

I based my GMII to RGMII converter on:

Rgmii adaptation module written by Ting Kao and Mary Low

I am not sure if it is ok to post their module but you can find it

easy on google.

 

best regards

0 Kudos
Observer mkachar
Observer
1,912 Views
Registered: ‎07-07-2016

Re: UDP IP stack on a Spartan-6

Hi,

My name is Mohith. I am a student who is interested in implementing UDP IPCore on kintex boards to support 10G ethernet. I have a beginners idea about fpga, verilog and IP stack; as i am new to this domain . Can you please teach me how to implement it from scratch. 

Cheers

mohith

0 Kudos
Observer mkachar
Observer
1,912 Views
Registered: ‎07-07-2016

Re: UDP IP stack on a Spartan-6

Hi,

Mohith here again. I will be available on this email id for communication.

mktech.dis@gmail.com

cheers

Mohith

0 Kudos
Scholar joelby
Scholar
1,272 Views
Registered: ‎10-05-2010

Re: UDP IP stack on a Spartan-6

Hi Mohith, I’m not sure if anyone here is a full-time teacher, but if you have any specific questions then feel free to ask (perhaps in a new thread)
0 Kudos