Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
Sending and receiving Ethernet traffic
- 09-05-2003
- Jean Nicolle
September 5, 2003, 8:07 am

I managed to transmit and receive traffic on a 10BASE-T network using some
simple Verilog code and 4 pins of an FPGA connected almost directly to the
wires.
Most microcontrollers require an external Ethernet MAC, but it seems that we
can do without if we limit ourselves to IP/UDP.
I think that there are potentially plenty of interesting applications.
The project is working well already, so I documented a good chunk of it.
http://www.fpga4fun.com/10BASE-T.html
Comments are welcome!
Jean
simple Verilog code and 4 pins of an FPGA connected almost directly to the
wires.
Most microcontrollers require an external Ethernet MAC, but it seems that we
can do without if we limit ourselves to IP/UDP.
I think that there are potentially plenty of interesting applications.
The project is working well already, so I documented a good chunk of it.
http://www.fpga4fun.com/10BASE-T.html
Comments are welcome!
Jean

Re: Sending and receiving Ethernet traffic

we
Cool project. Have you coded the ethernet stuff by yourself or used an ip
block? You have one small misstake: The splitting in RX and TX lines on RJ45
does not prevent contention! It is still possible. Some time ago I was also
thinking about an ethernet inteface in an FPGA. I thought, like you, now
with RJ45 it's easier since contention detection is one of the hard parts.
However, if you read carefully the doc's it's still there ;-(
Martin
--
----------------------------------------------
JOP - a Java Processor core for FPGAs:
----------------------------------------------
JOP - a Java Processor core for FPGAs:
We've slightly trimmed the long signature. Click to see the full one.

Re: Sending and receiving Ethernet traffic
about the contention, in the current IEEE spec (IEEE 802.3-2002), section
"4.2.3.2.6 Full duplex transmission" states:
"In full duplex mode, there is never contention for a shared physical
medium."
That's the beauty of it. Twice the bandwidth, and much easier to implement.
So my code is only intended to be connected to a full-duplex capable device
only (i.e. a switch or directly to another computer).
Your remark is true for half-duplex (which is much harder to implement!).
Hope that convinces you.
Jean

some
the
that
RJ45
also

Re: Sending and receiving Ethernet traffic
Jean,
there is still a problem. If you use a point to point connection (with a
cross over cabel) it can be possible that both stations transmit without a
contention. However, Ethernet is still a bus. Imagine following situation:
Three stations (A,B,C) connected via a hub. Station A and B are sending at
the same time. Which message will arrive at C? This IS a contention. On A
and B perhaps you will not see a contention on the TX lines, however you
have to listen to the RX line while sending and abort your transmit, enter
the random timeout and retransmit.
And I'm not shure if a simple hub will support full duplex mode.
Sorry, I'm not convinced
Martin

implement.
device
it.
ip
parts.
there is still a problem. If you use a point to point connection (with a
cross over cabel) it can be possible that both stations transmit without a
contention. However, Ethernet is still a bus. Imagine following situation:
Three stations (A,B,C) connected via a hub. Station A and B are sending at
the same time. Which message will arrive at C? This IS a contention. On A
and B perhaps you will not see a contention on the TX lines, however you
have to listen to the RX line while sending and abort your transmit, enter
the random timeout and retransmit.
And I'm not shure if a simple hub will support full duplex mode.
Sorry, I'm not convinced
Martin

implement.
device
it.
ip
parts.

Re: Sending and receiving Ethernet traffic

Full-duplex Ethernet is *not* a bus and does *not* use CSMA/CD. It's
a point-to-point self-clocking serial connection. All
interconnections have to be done at layer 2 (i.e. by bridges/switches)
or higher.
-hpa
--
If you send me mail in HTML format I will assume it's spam.
If you send me mail in HTML format I will assume it's spam.
We've slightly trimmed the long signature. Click to see the full one.
Site Timeline
- » Include design file using QuartusII
- — Next thread in » Field-Programmable Gate Arrays
-
- » ISE: use verilog-modules in an vhdl-design-flow
- — Previous thread in » Field-Programmable Gate Arrays
-
- » Division Algorithms
- — Newest thread in » Field-Programmable Gate Arrays
-
- » Gowin - This Just Got Real
- — Last Updated thread in » Field-Programmable Gate Arrays
-
- » FPC Buchse gesucht
- — The site's Newest Thread. Posted in » Electronics (German)
-
- » gu10 sijalice
- — The site's Last Updated Thread. Posted in » Electronics (Croatian)
-