[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ethmac] FW: exchanging data trough the Ethernet card.
> Dear OPENCORE friends,
>
> I have never worked with Ethernet protocol but I need about 15Mbps from an FPGA
> device and a PC. One idea I thought today to implement a `null modem` based
> connection from the PC to the device (just two devices - no hubs or friends) I
> have just 2 questions:
>
> 1) Assuming they claim 10/100Mbps on those Eth cards, can you really reach
> those speeds?
Ethernet works in half duplex and in full duplex. If you are working in half
duplex, then only one device can speak on the wire at the same time, so you get
10/100 Mbps. But when 2 device start to transmit on the wire on the same time,
there is a collision and both have to retry. If there is litte traffic, there is
little collisions. When more traffic gets in you get more collision. I've heard
that you reach at peak at about 30% of utilisation (3/30 Mbps) If you try to use
more bandwidth, you get too much collision and the actual bandwidth decrease.
But since you only use 2 devices, you can use full duplex (if you use a unshielded
twistet pairs (similar to telephone jack in north america). Full duplex is not
supporter on co-axial cable (afaik). Then you get a real 100Mbs.
In fact, you never get 100 percent of the 100Mbs. Every packet has a 12 bytes of
addresses, 2 bytes for type and 4 bytes for CRC. The total packet lenght must be
between 64 bytes or 1518 bytes. between each packet, there is some overhead
equivalent to 20 bytes (12 for inter-packet gap and 8 for pre-amble). So if you use
large packets (because you actually have lot of information to send), the overhead
(12+2+4+20) is negligible compared to 1518 bytes, so you get almost 100Mbs of true
bandwidth. If you use full duplex, you get all this bandwith 'guaranteed' because
there is no collision. that is as far as Ethernet is concerned. You Eth Card must
be of good design. Maybe the cheap (old) cards use I/O access to transfer the
packets. Then your CPU is going to be the limitations.
Note also that Ethernet is not like a null modem. You have to send data in packets.
You can't just send a single caracter on the wire.
good luck
--
************************************************************
Jean-Francois Larin ing. stag.
FPGA design
Network Products Group
Matrox Electronic Systems
1055 St. Regis Blvd.
Dorval, Quebec, Canada
H9P 2T4
Tel:(514)685-7230 ext. 2041
Fax:(514)822-6272
E-Mail: JeanFrancois.Larin@matrox.com
************************************************************