
Layer 3 ethernet protocol for FPGA based systems
This website describes the implementation of simple layer 3 ethernet
protocol suited for fast transmission of data between the cheap
FPGA based data acquisition system, and the embedded system, which
collects the data, preprocesses them and sends them to the
analysis grid for further processing.
The system consists of three parts.
- The FPGA IP core, written in VHDL
and tested currently in three platforms:
The IP core uses the
10 100 1000 Mbps tri-mode Ethernet MAC to communicate with Ethernet PHY.
- The simplified layer 3 network protocol, which uses the unofficial 0xfade Ethernet type frame
(as the protocol is used only in small private network consisting of a single segment or a few segments
connected via Ethernet switch, use of unofficial Ethernet type should not be a problem)
The protocol uses only four types of packets:
- START transmission packet (send to FPGA)
- STOP transmission packet (sent to FPGA)
- DATA packet (sent by FPGA)
- ACK packet (sent to FPGA)
- The Linux kernel driver, which handles reception of the 0xfade type packets, receives the data
from the DATA packets and sends the ACK packets. Driver minimize the acknowledge latency,
which in turn allows to obtain high transmission speed with small amount of memory in FPGA used
to buffer the transmitted, and not confirmed yet, data.
The received data are exposed to the user space application via circular buffer, which may be
memory mapped, to minimize overhead associated with access to the data.
Necessary synchronization is assured by the ioctl function, which is used to read and update
pointers used by the buffer. Driver may service multiple network cards with one or more (if a switch is used)
FPGA boards connected to them.
Application may sleep waiting for data.
The more detailed description is provided in the desc.txt file in the sources (see "Download" below).
Additionally the system is described in ma article, which is currently available as the preprint
at the arXiv server: Efficient transmission of measurement
data from FPGA to embedded system via Ethernet link
Download
You can download
Wojciech Zabolotny