From: Arlet on 21 Nov 2009 15:10
On Sat, 21 Nov 2009 19:44:49 +0000, Peter Van Epp wrote:
> I think you are going to find you need an IP stack. At the very least
> you are going to need to implement arp to find the MAC address of whoever
> you want to communicate with and perhaps DHCP to get an IP address for your
> device (although you could hardcode both although it won't be too flexable).
> Then you will need to format UDP packets with appropriate headers, data and
> crc to send to the MAC address you found via arp. A TCP connection is much
> more complex. A PHY/MAC combination will only get packets (with appropriate
> content from somewhere, usually the IP stack :-)), on the wire.
Sending raw ethernet packets may be good enough for some applications. If
you have a private network, and use some dedicated software on an attached
PC, you can define your own protocol using ethernet packets.
I've used such a method for a tiny bootloader that could boot over
ethernet, using proprietary packet format, and a special boot server
program running on a PC.
Of course, if the device needs to talk to existing IP-family protocols,
some more code is required, although it's possible to cut some corners
too. For instance, if the device is passive, you can skip ARP, and just
reverse the src/dst MAC address to turn a request into a response.
From: whygee on 21 Nov 2009 18:50
Peter Van Epp wrote:
> Depending on your time line and
> budget you may be best to start with the Dragon board I mentioned as it comes
> with do it your self VHDL to do 10 meg (no PHY) ethernet and a PCI interface
> (the Dragon is $299 US + as noted $9 for the ether connector and oscillator)
> that may be your best bet to learn more about ethernet and fpgas. Good luck!
If money is an issue but not time or bandwidth, I suggest buying
a ready-made module based on the ENC28J60. I have found (and bought)
several on eBay, they are _cheap_ and _small_ . Mine are marked
as coming from http://www.the0.net
BTW the interface is synchronous serial (SPI) up to 20MHz (so it's only 10BasetT)
but it is easier to start using Ethernet with the HW/MAC/PHT already designed.
And later it can be integrated in a product, due to the size and price.
> Peter Van Epp
http://ygdes.com / http://yasep.org