[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ethmac] FW: exchanging data trough the Ethernet card.
Dear Jean-Francois,
thank you for your help. I have some further comments:
On 23-Aug-00 Jean-François Larin wrote:
>> 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.
>
I understood that, is the full duplex mode something you set by software? In
fact hat i have to do is a hardware part and a software one.
> 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.
no problem with the card, we can buy a new one if our is not enought good. What
I do not understood here is: if I attach the ethernet rj45 cable to my FPGA
(just thos etwo devices) and I write some HDL code in such a way that it sends
on that serial ethernet link a packet of lets say 1000 bytes, well formatted
(using the right system info - header, addresses..., and obviuosly the right
frequency) is it there the way to read it by writing some software on the PC?
And on the other way, if I write some software, can I send just a packet on the
ethernet in such a way that I can read it in my FPGA?
I think this is what I need to do!
Thank you again for your help.
Have a great week,
Andrea.
>
> 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
> ************************************************************
>
----------------------------------------
Andrea AIZZA
----------------------------------------
Swiss Federal Institute of Technology
Department of Electrical Engineering
Integrated Systems Center (LSI)
EPFL-DE-LSI Office: ELB-137
Ecublens, CH-1015 Lausanne (CH)
tel. +41 21 693 69 73
fax. +41 21 693 46 63
email Andrea.Aizza@epfl.ch
http://lsiwww.epfl.ch/
----------------------------------------