Reply by February 22, 20062006-02-22
hansp wrote:
> Check out this link for some ideas: > http://www.fpga4fun.com/10BASE-T.html
Yes, I've built the transmitter twice (in both altera and xilinx) parts and it more or less worked. In one case I had to send it through a switch before an embedded ethernet board could understand it. Haven't tried the receiver. Getting it to do anything usefull is a bit different though. BTW you probably need to be local amin on a win XP box to receive UDP packets... There are really a bunch of options: - A serial to ethernet converter module, which may handle a TCP/IP protocol for you (LANCHIP, etc) - An ethernet chip or card intended for PC-ISA - lots of embeded guys have used these (avoid PCI though) - using an ethernet "PHY" chip to interface to the cable (with transformer of course) and then implementing the "MAC" function along with all the protocol stuff in the FPGA - implementing everything in the FPGA except for the transforer (yes, some people cheat with capacitor coupling). This is what the FPGA4FUN project does.
Reply by mk February 21, 20062006-02-21
On 21 Feb 2006 13:20:50 -0800, "aayush" <aayush_v2@rediffmail.com>
wrote:
> ethernet traffic is digital.
not if you're looking at the cat3 wire.
> now a logic "zero" must be a >band of voltage and similarly a logic "one".
Not really. For 10bt, a {high,low} is one and {low,high} is zero. Read about Manchaster coding. For 100btx it is quite a bit more complicated.
> now i wanted to ask if i am >using a 10/100 Mbps ethernet card or lan card as they are called what >will be my voltages level. ie the RJ 45 female of my lan card will send >a logic "0" at which voltage/voltage band and on what voltage/voltage >band will be logic"1". its important to find these as i am connecting >FPGA to lan card and hoping that signals fm lan card does not blow up >the damn chip.
You always need a network chip (at least a PHY or PHY+MAC) which you connect to the RJ45 to talk to the wire. You shouldn't connect the FPGA to the RJ45 directly. If you connect FPGA to the LAN card you don't need to know anything about what goes on the wire as it completely isolates it from you and gives you well-behaved bits.
Reply by aayush February 21, 20062006-02-21
hello
i am doing a project called "10 BASE T ETHERNET INTERFACE USING FPGA"
i am using a xilinx's spartan2   XC2S50 chip and using VHDL.now i
wanted to ask if any of u have any information on the codes of VHDL
that i'll be needing and related stuff.
if u happen to have any thing at all kindly send them to me. another
question.
  ethernet traffic is digital. now a logic "zero" must be a
band of voltage and similarly a logic "one". now i wanted to ask if i
am
using a 10/100 Mbps ethernet card or lan card as they are called what
will be my voltages level. ie the RJ 45 female of my lan card will send

a logic "0" at which voltage/voltage band  and on what voltage/voltage
band will be logic"1". its important to find these as i am connecting
FPGA to lan card and hoping that signals fm lan card does not blow up
the damn chip.
  your early positive reply will save me lots of time.hope u will be
able to able to spare some time.
thanku all

Reply by Hal Murray February 19, 20062006-02-19
In article <1140181834.631440.296610@f14g2000cwb.googlegroups.com>,
 "Roggey" <Roggey@gmail.com> writes:
>Hello > >I have to make an connection to a FPGA-borad. > >http://www.celoxica.com/products/rc300/default.asp > >This board only supports ethernet communication with the mac-layer. Now >I have to build an app that can send data(in my case images) to the >board. > >My question is now how can i send data using the mac-layer only from a >c++ programm. > >I do not think that we are using(or is possible to use) a router/switch >between the pc and the board, we will use an pachted-ethernet-cable.
Get help from your local software/network/sysadmin geeks. If I was doing that, I'd send UDP packets, and throw away (skip over) the IP and UDP headers on the receiving side. It's probably simplest if you can get a second ethernet card on your PC. You will probably have to setup routing and/or ARP by hand. -- The suespammers.org mail server is located in California. So are all my other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited commercial e-mail to my suespammers.org address or any of my other addresses. These are my opinions, not necessarily my employer's. I hate spam.
Reply by Roggey February 18, 20062006-02-18
I found a solution i think it will work. I will test it int the next
week.

I will use an opsource program http://www.winpcap.org/
This program manage all the stuff like open the networkadapter and
stuff like that.

here is some code i found:

#include <stdlib.h>
#include <stdio.h>
#include <pcap.h>

int main(int argc, char **argv)
{
	pcap_t *fp;
	char errbuf[PCAP_ERRBUF_SIZE];
	u_char packet[100];
	int i;

	/* Check the validity of the command line */
	if (argc != 2)
	{
		printf("usage: %s interface", argv[0]);
		return 1;
	}

	/* Open the adapter */
	if ((fp = pcap_open_live(argv[1],		// name of the device
							 65536,			// portion of the packet to capture. It doesn't matter
in this case
							 1,				// promiscuous mode (nonzero means promiscuous)
							 1000,			// read timeout
							 errbuf			// error buffer
							 )) == NULL)
	{
		fprintf(stderr,"\nUnable to open the adapter. %s is not supported by
WinPcap\n", argv[1]);
		return 2;
	}

	/* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */
	packet[0]=1;
	packet[1]=1;
	packet[2]=1;
	packet[3]=1;
	packet[4]=1;
	packet[5]=1;

	/* set mac source to 2:2:2:2:2:2 */
	packet[6]=2;
	packet[7]=2;
	packet[8]=2;
	packet[9]=2;
	packet[10]=2;
	packet[11]=2;

	/* Fill the rest of the packet */
	for(i=12;i<100;i++)
	{
		packet[i]=i%256;
	}

	/* Send down the packet */
	if (pcap_sendpacket(fp,	// Adapter
		packet,				// buffer with the packet
		100					// size
		) != 0)
	{
		fprintf(stderr,"\nError sending the packet: \n", pcap_geterr(fp));
		return 3;
	}

	pcap_close(fp);
	return 0;
}

The way to find the name of the network-adapter can be found here:
http://www.winpcap.org/docs/docs31/html/group__wpcap__tut1.html

thanks to all of you for the help.

roggey

Reply by Roggey February 18, 20062006-02-18
http://www.rawether.net/  this cost very much like 200/400$ depending
on the type.

Reply by hansp February 18, 20062006-02-18
Check out this link for some ideas:
http://www.fpga4fun.com/10BASE-T.html

Reply by mk February 17, 20062006-02-17
On 17 Feb 2006 08:05:46 -0800, "GHEDWHCVEAIS@spammotel.com"
<GHEDWHCVEAIS@spammotel.com> wrote:

>Roggey schrieb: > >> My question is now how can i send data using the mac-layer only from a >> c++ programm. > >That is a good question. I know what you are looking for. > >Normally people use the IP stack and every OS has its own >implementation of that. > >I would be interested in that too, how to send data over the Ethernet. >At least the people who implemented the IP stack had to know how to do >it :) > >Guenter
Actually all the source is out there but alas not in a very accessible form. One can go to the linux source and grab the driver for the specific network card in question and also use the linux ethernet driver at the bottom of the ip stack (eth_drv.c I think).
Reply by Mike Harrison February 17, 20062006-02-17
On 17 Feb 2006 08:05:46 -0800, "GHEDWHCVEAIS@spammotel.com" <GHEDWHCVEAIS@spammotel.com> wrote:

>Roggey schrieb: > >> My question is now how can i send data using the mac-layer only from a >> c++ programm. > >That is a good question. I know what you are looking for. > >Normally people use the IP stack and every OS has its own >implementation of that. > >I would be interested in that too, how to send data over the Ethernet. >At least the people who implemented the IP stack had to know how to do >it :) > >Guenter
I think what you are looking for is a DLL which allows raw ethernet frames to be sent - I'm sure it must be possible, but may need to talk to the card at a low level and may be card-specific. It would also need to fight of Windows' own attempts to use it. This looks promising : http://www.rawether.net/
Reply by GHED...@spammotel.com February 17, 20062006-02-17
Roggey schrieb:

> My question is now how can i send data using the mac-layer only from a > c++ programm.
That is a good question. I know what you are looking for. Normally people use the IP stack and every OS has its own implementation of that. I would be interested in that too, how to send data over the Ethernet. At least the people who implemented the IP stack had to know how to do it :) Guenter