FPGARelated.com
Forums

FPGA+Ethernet

Started by Steve December 7, 2006
Hi all,

I want to add an Ethernet interface to my FPGA board for data transmission. 
But I'm not sure which scheme I should use.

A) There's a PHY on the FPGA board, but I don't have much knowledge or 
experience on MAC. The protocol seems complicated and not easy to implement 
in a short time. Is it possible to develop a small and simple MAC? My idea 
is packing data to form a standard TCP or UDP packet and using the PHY to 
send out or receive it. Another reason I don't want using a full MAC is it 
costs too much resources (~2000 slices). If I use MicroBlaze+OPB MAC, I 
can't afford the license fee.

B) Using another external Ethernet micro-controller, such as Rabbit 
microprocessor. I can develop an interface between FPGA and uC for data 
transmission. But I'm wondering how fast the speed is?

C) Using micro-controller + (MAC+PHY Ethernet single chip). Then porting 
uClinux or lwip to the uC and hanging FPGA to the address/data bus of the 
uC.

Any suggestions? Thank you.

JJ 


Hi Steve,
on Opencore there is a free MAC in hdl. so you can try to use it.

The Ethernet protocol is not difficoult, you can found some usefull
informations on www.trendcomms.com

Francesco


Steve wrote:
> Hi all, > > I want to add an Ethernet interface to my FPGA board for data transmission. > But I'm not sure which scheme I should use. > > A) There's a PHY on the FPGA board, but I don't have much knowledge or > experience on MAC. The protocol seems complicated and not easy to implement > in a short time. Is it possible to develop a small and simple MAC? My idea > is packing data to form a standard TCP or UDP packet and using the PHY to > send out or receive it. Another reason I don't want using a full MAC is it > costs too much resources (~2000 slices). If I use MicroBlaze+OPB MAC, I > can't afford the license fee. > > B) Using another external Ethernet micro-controller, such as Rabbit > microprocessor. I can develop an interface between FPGA and uC for data > transmission. But I'm wondering how fast the speed is? > > C) Using micro-controller + (MAC+PHY Ethernet single chip). Then porting > uClinux or lwip to the uC and hanging FPGA to the address/data bus of the > uC. > > Any suggestions? Thank you. > > JJ
Steve <eejju@polyu.edu.hk> wrote:
> Hi all,
> I want to add an Ethernet interface to my FPGA board for data transmission. > But I'm not sure which scheme I should use.
> A) There's a PHY on the FPGA board, but I don't have much knowledge or > experience on MAC. The protocol seems complicated and not easy to implement > in a short time. Is it possible to develop a small and simple MAC? My idea > is packing data to form a standard TCP or UDP packet and using the PHY to > send out or receive it. Another reason I don't want using a full MAC is it > costs too much resources (~2000 slices). If I use MicroBlaze+OPB MAC, I > can't afford the license fee.
> B) Using another external Ethernet micro-controller, such as Rabbit > microprocessor. I can develop an interface between FPGA and uC for data > transmission. But I'm wondering how fast the speed is?
> C) Using micro-controller + (MAC+PHY Ethernet single chip). Then porting > uClinux or lwip to the uC and hanging FPGA to the address/data bus of the > uC.
Look at leon (www.gaisler.com) -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Steve:
You forget to mention the transmission speed requirement.
Is 10/100 MBPs or 1000 MBPs, you would need to make some trade off
depending on the data rate.
-James
Steve wrote:
> Hi all, > > I want to add an Ethernet interface to my FPGA board for data transmission. > But I'm not sure which scheme I should use. > > A) There's a PHY on the FPGA board, but I don't have much knowledge or > experience on MAC. The protocol seems complicated and not easy to implement > in a short time. Is it possible to develop a small and simple MAC? My idea > is packing data to form a standard TCP or UDP packet and using the PHY to > send out or receive it. Another reason I don't want using a full MAC is it > costs too much resources (~2000 slices). If I use MicroBlaze+OPB MAC, I > can't afford the license fee. > > B) Using another external Ethernet micro-controller, such as Rabbit > microprocessor. I can develop an interface between FPGA and uC for data > transmission. But I'm wondering how fast the speed is? > > C) Using micro-controller + (MAC+PHY Ethernet single chip). Then porting > uClinux or lwip to the uC and hanging FPGA to the address/data bus of the > uC. > > Any suggestions? Thank you. > > JJ
At least 10Mbps, desiralbly 100Mbps.

"dexue" <yangdexue@gmail.com> 
??????:1165518730.953912.148850@79g2000cws.googlegroups.com...
> Steve: > You forget to mention the transmission speed requirement. > Is 10/100 MBPs or 1000 MBPs, you would need to make some trade off > depending on the data rate. > -James > Steve wrote: >> Hi all, >> >> I want to add an Ethernet interface to my FPGA board for data >> transmission. >> But I'm not sure which scheme I should use. >> >> A) There's a PHY on the FPGA board, but I don't have much knowledge or >> experience on MAC. The protocol seems complicated and not easy to >> implement >> in a short time. Is it possible to develop a small and simple MAC? My >> idea >> is packing data to form a standard TCP or UDP packet and using the PHY to >> send out or receive it. Another reason I don't want using a full MAC is >> it >> costs too much resources (~2000 slices). If I use MicroBlaze+OPB MAC, I >> can't afford the license fee. >> >> B) Using another external Ethernet micro-controller, such as Rabbit >> microprocessor. I can develop an interface between FPGA and uC for data >> transmission. But I'm wondering how fast the speed is? >> >> C) Using micro-controller + (MAC+PHY Ethernet single chip). Then porting >> uClinux or lwip to the uC and hanging FPGA to the address/data bus of the >> uC. >> >> Any suggestions? Thank you. >> >> JJ >
As long as you limit yourself to 10BASE-T, it is quite possible to implement 
the PHY in the FPGA, and for very low logic usage.
See an implementation example http://www.fpga4fun.com/10BASE-T0.html

"Steve" <eejju@polyu.edu.hk> wrote in message 
news:1165494117.52713@nsserver1.polyu.edu.hk...
> Hi all, > > I want to add an Ethernet interface to my FPGA board for data > transmission. But I'm not sure which scheme I should use. > > A) There's a PHY on the FPGA board, but I don't have much knowledge or > experience on MAC. The protocol seems complicated and not easy to > implement in a short time. Is it possible to develop a small and simple > MAC? My idea is packing data to form a standard TCP or UDP packet and > using the PHY to send out or receive it. Another reason I don't want using > a full MAC is it costs too much resources (~2000 slices). If I use > MicroBlaze+OPB MAC, I can't afford the license fee. > > B) Using another external Ethernet micro-controller, such as Rabbit > microprocessor. I can develop an interface between FPGA and uC for data > transmission. But I'm wondering how fast the speed is? > > C) Using micro-controller + (MAC+PHY Ethernet single chip). Then porting > uClinux or lwip to the uC and hanging FPGA to the address/data bus of the > uC. > > Any suggestions? Thank you. > > JJ >
I'm using Picoblaze to emulate the MAC (still on early stage, I can't
tell whether it works or not). Basically, the MAC interface (MII) is
not so hard to understand and the PHY layer helps against the noise
from CAT5 cables.

Take a look at http://www.fpga4fun.com/10BASE-T.html, and the PHY's
datasheet. The complete details about how should MAC work can be found
in IEEE802.3 whitepaper (http://standards.ieee.org/getieee802/). But I
think fpga4fun site's information is enough.

Steve wrote:
> Hi all, > > I want to add an Ethernet interface to my FPGA board for data transmission. > But I'm not sure which scheme I should use. > > A) There's a PHY on the FPGA board, but I don't have much knowledge or > experience on MAC. The protocol seems complicated and not easy to implement > in a short time. Is it possible to develop a small and simple MAC? My idea > is packing data to form a standard TCP or UDP packet and using the PHY to > send out or receive it. Another reason I don't want using a full MAC is it > costs too much resources (~2000 slices). If I use MicroBlaze+OPB MAC, I > can't afford the license fee. > > B) Using another external Ethernet micro-controller, such as Rabbit > microprocessor. I can develop an interface between FPGA and uC for data > transmission. But I'm wondering how fast the speed is? > > C) Using micro-controller + (MAC+PHY Ethernet single chip). Then porting > uClinux or lwip to the uC and hanging FPGA to the address/data bus of the > uC. > > Any suggestions? Thank you. > > JJ
If you have a modest cpu onboard, you might also want to look at the very light software TCP stacks by Adam Dunkels. These get widely mentioned in some software sites with an interest in this sort of thing. Should work on most of the FPGA softcores but some google work needed. www.sics.se/~adam/lwip the other JJ John Jakson transputer guy
"kunil" <kunilkuda@gmail.com> schrieb im Newsbeitrag 
news:1165797516.077446.272980@l12g2000cwl.googlegroups.com...
> I'm using Picoblaze to emulate the MAC (still on early stage, I can't > tell whether it works or not). Basically, the MAC interface (MII) is > not so hard to understand and the PHY layer helps against the noise > from CAT5 cables. > > Take a look at http://www.fpga4fun.com/10BASE-T.html, and the PHY's > datasheet. The complete details about how should MAC work can be found > in IEEE802.3 whitepaper (http://standards.ieee.org/getieee802/). But I > think fpga4fun site's information is enough. >
hah, look at U-BOOT, there is software bit bang MII management routine already included of course writing from scratch isnt much more complicated Antti