Insights

AFDX: deterministic Ethernet for avionics

ARINC 429 gives every data flow its own one-way bus. AFDX takes a different approach. Short for Avionics Full-Duplex Switched Ethernet, and a registered trademark of Airbus, it starts from commercial Ethernet with its MAC, IP and UDP layers and adds what avionics needs: deterministic timing and redundancy. It is standardized as ARINC 664 Part 7.

End systems, switches and links

An AFDX network has three kinds of element: end systems, which connect the avionics units to the network; switches; and full-duplex links, usually at 100 Mbit/s, over copper or fibre. Every link connects an end system to a switch and carries traffic in both directions at once, so there is no shared medium and no collision. For redundancy the network exists twice: every end system has one port on network A and one on network B, two independent sets of switches and links.

Virtual links

Traffic flows over virtual links. A virtual link is a one-way logical connection from one source end system to one or more destinations, identified by a 16-bit number carried in the frame’s destination MAC address, so a network can have up to 65,536 of them. Two parameters make each link’s bandwidth predictable:

  • BAG, the bandwidth allocation gap: the minimum time between two frames on the link, one of 1, 2, 4, 8, 16, 32, 64 or 128 ms.
  • Smax, often called Lmax: the largest frame the link may carry, between 64 and 1518 bytes.

Together they give the link’s worst-case bandwidth: 1518-byte frames every 4 ms, for example, add up to at most 3.04 Mbit/s. The source end system shapes its traffic to the BAG and sends at most one frame per gap, even when the application has several messages ready. Every switch checks each virtual link against its BAG and frame size and discards frames that break the contract. Shaping at the source and policing in the switches together are what make the network deterministic.

Five end systems on networks A and B, slowed down. Three virtual links send their frames at the BAG, every frame goes out on both networks, and each receiver keeps the first valid copy. A network A link fails for a while, and a frame that a faulty end system sends too early is dropped by both switches. The VL numbers, BAGs and frame sizes are examples.

Redundancy and integrity

An end system normally sends every frame on both networks at the same time; a virtual link can also be set to use network A only or network B only. Each frame carries a one-byte sequence number, counted per virtual link and placed just before the frame check sequence. The receiving end system checks the frames’ integrity per virtual link and per network, using the sequence numbers, and then applies a simple rule: the first valid frame wins, and the later copy with the same sequence number is discarded. If a link or a whole switch fails, the frames still arrive over the other network.

Ports for applications

Applications reach AFDX through communication ports that map onto UDP ports, with the behaviour defined by ARINC 653. A sampling port sends each message in one frame, and a newer value may overwrite an older one. A queuing port loses and overwrites nothing; a message may span several frames, up to 8 kilobytes.

AFDX on a test rig

Testing an avionics unit with an AFDX interface means providing the rest of the network: end systems for the units that are not on the bench, sending their virtual links at the right BAG with valid sequence numbers on both networks, and a monitor that checks the unit’s own traffic against its configuration. The same setup is the place for fault injection: one network down, frames out of sequence or duplicated, and traffic that breaks the BAG. We integrate AFDX into real-time systems; if you are planning an AFDX rig, get in touch.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *