Forums

Ethernet on recent FPGAs

Started by Pat Magnits January 4, 2008
Hi,

Am far from being an expert in fpga usage and programming, I was wondering 
if there exists any ip cores out there that would allow the use of ethernet 
interfaces on recent FPGAs. For instance say that I have a rather important 
bandwidth (500Mb/s) and that I want to send that over the Gigabit interface 
of a Virtex 5 in UDP frames. Is there any blackbox concept IP Core that 
would allow me to do that without having to learn about UDP frame and TCP 
and the use of the Xilinx ethernet MAC usage etc etc ?

Thanks

Pat 


"Pat Magnits" <Pat@Magnits.com> wrote:

>Hi, > >Am far from being an expert in fpga usage and programming, I was wondering >if there exists any ip cores out there that would allow the use of ethernet >interfaces on recent FPGAs. For instance say that I have a rather important >bandwidth (500Mb/s) and that I want to send that over the Gigabit interface >of a Virtex 5 in UDP frames. Is there any blackbox concept IP Core that >would allow me to do that without having to learn about UDP frame and TCP >and the use of the Xilinx ethernet MAC usage etc etc ?
Sending UDP packets is rather straightforward. Look here: http://www.fpga4fun.com/10BASE-T.html You'll need a phy to send the data. These aren't difficult to connect & control. -- Reply to nico@nctdevpuntnl (punt=.) Bedrijven en winkels vindt U op www.adresboekje.nl
"Pat Magnits" <Pat@Magnits.com> wrote in message 
news:flkr96$tb3$1@s1.news.oleane.net...
> Hi, > > Am far from being an expert in fpga usage and programming, I was wondering > if there exists any ip cores out there that would allow the use of > ethernet interfaces on recent FPGAs.
http://www.opencores.org/browse.cgi/by_category
Nico Coesel <nico@puntnl.niks> wrote:
> "Pat Magnits" <Pat@Magnits.com> wrote:
> >Hi, > > > >Am far from being an expert in fpga usage and programming, I was wondering > >if there exists any ip cores out there that would allow the use of > >ethernet interfaces on recent FPGAs. For instance say that I have a > >rather important bandwidth (500Mb/s) and that I want to send that > >over the Gigabit interface of a Virtex 5 in UDP frames. Is there > >any blackbox concept IP Core that would allow me to do that without > >having to learn about UDP frame and TCP > >and the use of the Xilinx ethernet MAC usage etc etc ?
> Sending UDP packets is rather straightforward. Look here:
> http://www.fpga4fun.com/10BASE-T.html
10base-t and Gigabit ethernet have different implementation difficulty levels ;-) FPGA, uC-Core and Gigabit is being done. Look at the Leon or the USRP2/Gnuradio effort. -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Uwe Bonnes <bon@hertz.ikp.physik.tu-darmstadt.de> wrote:

>Nico Coesel <nico@puntnl.niks> wrote: >> "Pat Magnits" <Pat@Magnits.com> wrote: > >> >Hi, >> > >> >Am far from being an expert in fpga usage and programming, I was wondering >> >if there exists any ip cores out there that would allow the use of >> >ethernet interfaces on recent FPGAs. For instance say that I have a >> >rather important bandwidth (500Mb/s) and that I want to send that >> >over the Gigabit interface of a Virtex 5 in UDP frames. Is there >> >any blackbox concept IP Core that would allow me to do that without >> >having to learn about UDP frame and TCP >> >and the use of the Xilinx ethernet MAC usage etc etc ? > >> Sending UDP packets is rather straightforward. Look here: > >> http://www.fpga4fun.com/10BASE-T.html > >10base-t and Gigabit ethernet have different implementation difficulty >levels ;-)
Not if you are using an external phy (which are relatively cheap). In that case you'll have to implement an MII-like interface which is not very difficult. I estimate a Spartan 3 speed grade 5 should do just fine. -- Reply to nico@nctdevpuntnl (punt=.) Bedrijven en winkels vindt U op www.adresboekje.nl
On 2008-01-04, Pat Magnits <Pat@Magnits.com> wrote:
> FPGAs. For instance say that I have a rather important > bandwidth (500Mb/s) and that I want to send that over the Gigabit interface > of a Virtex 5 in UDP frames.
That is not particularly difficult if you are using a dedicated hardware MAC in a Xilinx part or even if you are talking GMII directly to an external PHY. To send UDP frames you don't need to be able to receive anything[*]. Most of the difficulty will actually be in forming the first packet header. For UDP data, you can probably reuse the exact header over and over (as long as the length is always the same). There's a lot of stuff in the header that you take for granted which is provided by your network stack (some of which is done by executing low level protocols over the interface[*]). Also, if you are making a commercial product, you will need to get some actual MAC addresses for your interfaces. -- Ben Jackson AD7GD <ben@ben.com> http://www.ben.com/
Ben Jackson <ben@ben.com> wrote:

>On 2008-01-04, Pat Magnits <Pat@Magnits.com> wrote: >> FPGAs. For instance say that I have a rather important >> bandwidth (500Mb/s) and that I want to send that over the Gigabit interface >> of a Virtex 5 in UDP frames. > >That is not particularly difficult if you are using a dedicated hardware >MAC in a Xilinx part or even if you are talking GMII directly to an >external PHY. To send UDP frames you don't need to be able to receive >anything[*]. > >Most of the difficulty will actually be in forming the first packet header. >For UDP data, you can probably reuse the exact header over and over (as >long as the length is always the same). There's a lot of stuff in the >header that you take for granted which is provided by your network stack >(some of which is done by executing low level protocols over the >interface[*]). > >Also, if you are making a commercial product, you will need to get >some actual MAC addresses for your interfaces.
In theory yes. However there are still loads of MAC address ranges assigned to companies which are long gone or have moved into a different direction. Unless you will be making millions of units, it is quite safe to pick one of those. -- Reply to nico@nctdevpuntnl (punt=.) Bedrijven en winkels vindt U op www.adresboekje.nl
>In theory yes. However there are still loads of MAC address ranges >assigned to companies which are long gone or have moved into a >different direction. Unless you will be making millions of units, it >is quite safe to pick one of those.
If you have a LAN with 200 (non-clashing) MAC addresses and generate a random (40-bit) address for your node, the probability of its clashing with an existing address is 200/2^40 (call this P), which is about one in 5,5000,000,000 If you make ten million units and each is added to a LAN which already has 200 nodes, the probability of having no clash is (1-P)^10,000,000, which is about 1-10,000,000P, so the probability of a clash is about 10,000,000P = one in 550. So, under these (extreme) conditions, the probability of even one clash is less than 0.2% (and the probability of more than one clash is much less). The options seem to be: 1) Buy a batch of unique addresses (which isn't cheap and involves administrative hassle). If you're designing a LAN for an airliner I'm going to fly on, I'd like you to use this method. 2) Generate a random address. There's a chance of about 0.2% that one of your 10,000,000 customers will have a problem. You could: i) Provide a procedure to deal with this situation (e.g. to generate another random number). ii) Send a replacement with an apology and a box of chocolates. This is probably the cheaper option. Mike
MikeShepherd564@btinternet.com wrote:

>>In theory yes. However there are still loads of MAC address ranges >>assigned to companies which are long gone or have moved into a >>different direction. Unless you will be making millions of units, it >>is quite safe to pick one of those. > >If you have a LAN with 200 (non-clashing) MAC addresses and generate a >random (40-bit) address for your node, the probability of its clashing >with an existing address is 200/2^40 (call this P), which is about one >in 5,5000,000,000
The problem is that some bits in the MAC address are reserved for other purposes. So the actual number of bits you can use is somewhere between 36 and 38 (don't know exactly). Also, all zeroes and all ones are invalid addresses.
>If you make ten million units and each is added to a LAN which already >has 200 nodes, the probability of having no clash is (1-P)^10,000,000, >which is about 1-10,000,000P, so the probability of a clash is about >10,000,000P = one in 550. > >So, under these (extreme) conditions, the probability of even one >clash is less than 0.2% (and the probability of more than one clash is >much less).
True. Still I know people that had problems because they had network cards with the same MAC address (set by the factory). -- Reply to nico@nctdevpuntnl (punt=.) Bedrijven en winkels vindt U op www.adresboekje.nl
>The problem is that some bits in the MAC address are reserved for >other purposes. So the actual number of bits you can use is somewhere >between 36 and 38 (don't know exactly). Also, all zeroes and all ones >are invalid addresses.
MAC addresses are 48 bits. I was being conservative by assuming that only 40 are unique. The (rather poor) article at http://en.wikipedia.org/wiki/MAC_address suggests that only two of the bits are reserved. I think that the "all zeroes" and "all ones" cases can safely be ignored in our approximate calculations, so the revised arithmetic gives: If you have a LAN with 200 (non-clashing) MAC addresses and generate a random (46-bit) address for your node, the probability of its clashing with an existing address is 200/2^46 (call this P), which is about one in 350,000,000,000. If you make ten million units and each is added to a LAN which already has 200 nodes, the probability of having no clash is (1-P)^10,000,000, which is about 1-10,000,000P, so the probability of a clash is about 10,000,000P = one in 35,000. So, under these (extreme) conditions, the probability of even one clash is about 0.003% (and the probability of more than one clash is much less), so you can forget it. Even if you're designing a LAN for an aircraft I'll fly on, I'm happy for you to allocate the MAC address at random with these odds. Yes, there might be a clash, but I'm more likely to be hit while crossing the road by an errant spacecraft from the planet Zog. Mike