Jump to content
  • 0

NEXYS 4 DDR Ethernet communication


mishu

Question

Hi there,

I am thinking to replace my UART core from my FPGA system with an Ethernet one. Right now I am using a commercial board to control my system, hence it has a PHY interface for Ethernet, NEXYS-4 DDR board. I am using VHDL and VIVADO for this.

I want to place my system in to a intranet network, commercial router based, and I want to read data from it with a pc connected via Ethernet.
I was looking at some IPs from Xilinx, AXI Ethernet Lite, but maybe is better to ask here for some thoughts or solutions first.

Do you think is suitable to use it, even I dont have a huge amount of data? (about 100kbits/s)
If yes, can you recommend some solutions which not include the Microblaze core from Xilinx?

Thank you,
Vlad

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

@mishu,

The OpenArty project includes an ethernet controller for the 10/100 ethernet RMII on the Arty, so you could use the controller from that project if you wanted.  It does not use Micrblaze or any other Xilinx IP save for the MIG memory controller.

I did use a CPU for the project, however.  I used a ZipCPU.  I found it necessary to have the ZipCPU handle the ARP and ICMP packets.  (If you don't respond to those queries from the "net", your ethernet won't really work.)  You can see the code I used to handle ARP and ICMP here.  Sending UDP packets should be fairly easy at this point, although that's as far as my own work has gone so far.

I know there are some cores on OpenCores that will give you a TCP connections with no CPU, but I've never used them so I don't know how well they work.

Dan

Link to comment
Share on other sites

@D@n

Many thanks, for your answer. I am interested so use it and since I am not very familiar with the Ethernet protocol, I have a few questions:

1- your code has some register to set the IP or it will get it automatically?

2- it will work on a intranet network? Like to connect my computer to it?

3- the data I have to send are 400 bits to be send 100 times per sec, so about 40kbits/s

Many thanks,

Link to comment
Share on other sites

@mishu,

  1. Both IP and MAC address are set within the C code.  The controller is dumb in that respect.
  2. I've really only ever tested it on an intranet by connecting my computer to it.  I haven't tried to use it in a DHCP setting though, only with fixed IP addresses.
  3. Please consider using wireshark to debug what's going on.  It'll show you both good and bad packets, and tell you whats wrong with any bad packets.

Dan

 

Link to comment
Share on other sites

@mishu,

Yes, the enetpackets.v file will allow you to send an arbitrary packet across the network.  It will also allow you to read a packet from the network, whether to you or someone else.

However, if you are going to be successful, you will need to do more than just transmit packets.

  • Prior to sending a packet to an IP address on the local network, you need to broadcast an ARP request packet to find out the MAC address of the IP address you wish to send to.  (You might preload this ... but the "official" solution is via ARP)  This of course means you'll need to be able to receive and process the response to get the data associated with this.
  • In order to know if you are connected to a network, you'll want to be able to "ping" your board.  This means that you'll want to be able to read and respond to ICMP packets.
  • However, before you can receive any ICMP packets, you'll need to respond to an ARP packet sent to you so that the "ping" source knows how to reach you

You are also need to decide which packet protocol to use.  Two common ones are UDP and TCP.  You should read up on what those are and understand them.

Dan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...