Mesa's 7i80 cards have a HostMot2 firmware that communicates via an
ethernet interface using standard UDP packets. The LinuxCNC HAL driver,
hm2_eth, simply uses these UDP packets as a communications bus, just
like it uses the PCI bus for a PCI Mesa card.
So for instance, to write all 72 GPIOs on the 7i80hd, you send a packet
with the contents (expressed in hex)
83C2 (write 3 words in sequential addresses in memory space 0)
0010 (starting at address 0100, the GPIO module)
AAAAAAAA (4 bytes for first header's GPIO outputs)
BBBBBBBB (4 bytes for second header's GPIO outputs)
CCCCCCCC (4 bytes for third header's GPIO outputs)
(If you were also setting stepgen frequencies or PWM values, they would
be additional commands within the same packet). This is the same thing
that happens with a PCI Mesa card:
memory_mapped_io[0x100/4] = 0xAAAAAAAA;
memory_mapped_io[0x104/4] = 0xBBBBBBBB;
memory_mapped_io[0x108/4] = 0xCCCCCCCC;
or with an EPP Mesa card:
ADDR 0010
DATA AAAAAAAA
DATA BBBBBBBB
DATA CCCCCCCC
just transporting the data in a different way.
I don't understand the technical details of ethernet, but based on some
wikipedia browsing it looks like a full ethernet packet with the 16 byte
UDP payload would weigh 672 bits and take under 10microseconds to
transmit, so there's enough bandwidth and the packet size alone doesn't
pose any problems for latency.
A dedicated, point-to-point ethernet connection is used, so there are no
ethernet switches or other devices connected that can interfere to add
latency or the potential to packets lost due to collision. On the
remote side, a dedicated part of the FPGA chip handles packets in real
time as well. On the Linux side, the PREEMPT-RT kernel has apprently
removed most latency even from the regular kernel ethernet drivers.
(so no need for special "rtnet" drivers)
Using a 2kHz servo period (.5ms interval), Peter Wallace of Mesa has run
one of these boards with an earlier iteration of the driver for over 30
billion packets (real-world months) without interruption, and for me the
driver has worked properly for as long as I cared to let it run --
though that's only been for minutes at a time, nothing like Peter's
extended test.
I suspect that we'll discover that certain NICs are better than others
at giving realtime performance, just like with the PCs themselves. For
instance, Sam has seen on one system that the onboard RTL-chipset NIC
worked reliably, and a PCI NIC with Intel chipset did not. I've seen
good performance with the only NIC I tried, a PCI-E NIC with an Intel
chipset.
Jeff