AFDX Tutorial
AFDX Tutorial
Table of Contents
Chapter 1 Overview The Antecedents What is AFDX? Other Avionics Buses ARINC 429 MIL-STD-1553 Ethernet ALOHA Net The ALOHA Protocol Ethernet Local Area Networks (Broadcast Media) The Ethernet Protocol Ethernet Using Category 5 UTP Copper Twisted Pairs Ethernet Frame Format Chapter 2 Ethernet Full-duplex, Switched Ethernet Doing Away with Contention Reducing Wire Runs and Weight Chapter 3 End Systems and Avionics Subsystems End Systems and Avionics Subsystems Chapter 4 AFDX Communications Ports AFDX Communications Ports Chapter 5 Virtual Links: Packet Routing in AFDX Virtual Links Chapter 6 Message Flows Message Flows Chapter 7 Redundancy Management Redundancy Management Chapter 8 Virtual Link Isolation Virtual Link Isolation Choosing the BAG and Lmax for a Virtual Link Chapter 9 Virtual Link Scheduling Virtual Link Scheduling Chapter 10 Jitter Jitter Chapter 11 AFDX Message Structures Introduction Implicit Message Structures ARINC 429 Labels Chapter 12 The AFDX Protocol Stack The AFDX Protocol Stack Transmission Reception Appendix A AFDX Frame Addressing and Header Structures Ethernet Addressing IP Header Format and Addressing UDP Header Format Appendix B Referenced Documents Reference List 4 4 4 5 5 5 6 6 6 6 6 6 6 6 7 7 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 15 16 16 17 17 17 18 19 19 19 20 21 21 21 22 23 23
List of Figures
Figure 1 AFDX Network Figure 2 ARINC 429 Communication Protocol Figure 3 MIL-STD-1553 Bus Communication Protocol Figure 4 ALOHA Net Figure 5 Ethernet Local Area Networks (Broadcast Media) Figure 6 Ethernet Frame Format Figure 7 Full-Duplex, Switched Ethernet Example Figure 8 AFDX versus ARINC 429 architecture Figure 9 End Systems and Avionics Subsystems Example Figure 10 Sampling Port at Receiver Figure 11 Queuing Port at Receiver Figure 12 Format of Ethernet Destination Address in AFDX Network Figure 13 Packet Routing Example Figure 14 Message Sent to Port 1 by the Avionics Subsystem Figure 15 Ethernet Frame with IP and UDP Headers and Payloads Figure 16 A and B Networks Figure 17 AFDX Frame and Sequence Number Figure 18 Receive Processing of Ethernet Frames Figure 19 Three Virtual Links Carried by a Physical Link Figure 20 Virtual Link Scheduling Figure 21 Virtual Link Scheduling Figure 22 Role of Virtual Link Regulation Figure 23 Two Message Structures Figure 24 ARINC 664 Message Structures Figure 25 AFDX Tx Protocol Stack Figure 26 AFDX Rx Protocol Stack Figure 27 Ethernet Source Address Format Figure 28 IP Header Format Figure 29 IP Unicast Address Format Figure 30 IP Multicast Address Format Figure 31 UDP Header Format 4 5 5 6 6 6 7 8 9 10 10 11 11 12 12 13 13 13 14 15 15 16 17 18 19 20 21 21 21 21 22
Chapter 1 Overview
The Antecedents Moving information between avionics subsystems on board an aircraft has never been more crucial, and it is here that electronic data transfer is playing a greater role than ever before Since its entry into commercial airplane service on the Airbus A320 in 1988, the all-electronic fly-by-wire system has gained such popularity that it is becoming the only control system used on new airliners But there are a host of other systems inertial platforms, communication systems, and the like on aircraft, that demand high-reliability, high-speed communications, as well Control systems and avionics in particular, rely on having complete and up-to-date data delivered from source to receiver in a timely fashion For safety-critical systems, reliable real-time communications links are essential That is where AFDX comes in Initiated by Airbus in the evolution of its A380 Aircraft, they coined the term, AFDX, for Avionics Full-DupleX, switched Ethernet AFDX brings a number of improvements such as higher-speed data transfer and with regard to the host airframe significantly less wiring, thereby reducing wire runs and the attendant weight What is AFDX? Avionics Full DupleX Switched Ethernet (AFDX) is a standard that defines the electrical and protocol specifications (IEEE 802 3 and ARINC 664, Part 7) for the exchange of data between Avionics Subsystems One thousand times faster than its predecessor, ARINC 429, it builds upon the original AFDX concepts introduced by Airbus One of the reasons that AFDX is such an attractive technology is that it is based upon Ethernet, a mature technology that has been continually enhanced, ever since its inception in 1972 In fact, the commercial investment and advancements in Ethernet have been huge compared say, to ARINC 429, MIL-STD-1553, and other specialized datacommunications technologies As shown in Figure 1, an AFDX system comprises the following components: Avionics Subsystem: The traditional Avionics Subsystems on board an aircraft, such as the flight control computer, global positioning system, tire pressure monitoring system, etc An Avionics Computer System provides a computational environment for the Avionics Subsystems Each Avionics Computer System contains an embedded End System that connects the Avionics Subsystems to an AFDX Interconnect AFDX End System (End System): Provides an interface between the Avionics Subsystems and the AFDX Interconnect Each Avionics Subsystem the End System interface to guarantee a secure and reliable data interchange with other Avionics Subsystems This interface exports an application program interface (API) to the various Avionics Subsystems, enabling them to communicate with each other through a simple message interface AFDX Interconnect: A full-duplex, switched Ethernet interconnect It generally consists of a network of switches that forward Ethernet frames to their appropriate destinations This switched Ethernet technology is a departure from the traditional ARINC 429 unidirectional, point-topoint technology and the MIL-STD-1553 bus technology
Internet
As shown in the example in Figure 1, two of the End Systems provide communication interfaces for three avionics subsystems and the third End System supplies an interface for a Gateway application It, in turn, provides a communications path between the Avionics Subsystems and the external IP network and, typically, is used for data loading and logging The following sections provide an overview of the AFDX architecture and protocol But first we briefly review two of the traditional avionics communications protocols Other Avionics Buses This section compares AFDX to two earlier Avionics data communication protocols: ARINC 429 and MIL-STD-1553 ARINC 429
Source
MIL-STD-1553
BC
RT
RT
RT
RT
Bit-rate 1 Mbps 20-bit data word Figure 3. MIL-STD-1553 Bus Communication Protocol
Receiver
Receiver
Receiver
Receiver
MIL-STD-1553 (see Figure 3) implements a bus architecture in which all the devices attached to the bus are capable of receiving and transmitting data The Avionics subsystems attach to the bus through an interface called a remote terminal (RT) The Tx and Rx activity of the bus is managed by a bus controller, that acts to ensure that no two devices ever transmit simultaneously on the bus The communication is half duplex and asynchronous For more information, refer to the GE Fanuc Embedded Systems MIL-STD-1553 Tutorial
ARINC 429 implements a single-source, multi-drop bus with up to 20 receivers (see Figure 2) Messages consist of 32-bit words with a format that includes five primary fields The Label field determines the interpretation of the fields in the remainder of the word, including the method of translation The point to multi-point property of ARINC 429 requires the Avionics system to include an ARINC 429 bus for each pair-wise communication Refer to the GE Fanuc Embedded Systems ARINC Tutorial for more details
Chapter 2 Ethernet
Ethernet This chapter provides a brief description of the origins of Ethernet, the Ethernet frame format and the role of switched Ethernet in avionics applications
Host Coaxial Cable (Bus Architecture)
Host
Host
Host
ALOHA Net In 1970, the University of Hawaii deployed a packet radio system called the ALOHA network [Norman Abramson; see Figure 4] to provide data communications between stations located on different islands There was no centralized control among the stations; thus, the potential for collisions (simultaneous transmission by two or more stations) existed
Ether
The Ethernet Protocol 1 If you have a message to send and the medium is idle, send the message 2 If the message collides with another transmission, try sending the message later using a suitable back-off strategy Issues
Station
Station
Station
The ALOHA Protocol 1 If you have a message to send, send the message, and 2 If the message collides with another transmission, try resending the message later using a back-off strategy Issues
No central coordination Collisions lead to non-deterministic behavior
Ethernet Using Category 5 UTP Copper Twisted Pairs The most common electrical form of Ethernet today is based on the use of twisted pair copper cables Typically, cables are point-to-point, with hosts directly connected to a switch In the case of Fast Ethernet (100Mbps), two pairs of Category 5 UTP copper wire are used for Tx and Rx, respectively In the case of transmission, each 4-bit nibble of data is encoded by 5 bits prior to transmission This is referred to as 4B/5B encoding and results in a transmission clock frequency of 125Mbps, since 5 bits are sent for every 4 bits of data Since there are twice as many 5-bit patterns as 4-bit ones, it is possible to ensure that every transmitted pattern is able to provide good clock synchronization (not too many 0s or 1s in a row) for reliable transmission of data Some of the 5-bit patterns are used to represent control codes
Ethernet Local Area Networks (Broadcast Media) In 1972, Robert Metcalfe and David Boggs at Xerox Palo Alto Research Center built upon the ALOHA network idea and used a coaxial cable as the communication medium and invented Ethernet (see Figure 5) Ethernet is similar to the ALOHA protocol in the sense that there is no centralized control and transmissions from different stations (hosts) could collide The Ethernet communication protocol is referred to as CSMA/ CD (Carrier Sense, Multiple Access, and Collision Detection) Carrier Sense means that the hosts can detect whether the medium (coaxial cable) is idle or busy Multiple Access means that multiple hosts can be connected to the common medium Collision Detection means that, when a host transmits, it can detect whether its transmission has collided with the transmission of another host (or hosts) The original Ethernet data rate was 2 94Mbps
6
byte
2 Ethernet Frame
46 - 1500
FCS
Preamble
Destination Address
Source Address
Type
SFD
Payload
IFG 12
Ethernet Frame Format As Figure 6 illustrates, IEEE 802 3 defines the format of an Ethernet transmission to include a 7-byte Preamble, a Start Frame Delimiter (SFD), the Ethernet frame itself, and an Inter-Frame Gap (IFG) consisting of at least 12 bytes of idle symbols The Ethernet frame begins with the Ethernet header,
which consists of a 6-byte destination address, followed by a 6-byte source address, and a type field The Ethernet payload follows the header The frame concludes with a Frame Check Sequence (FCS) for detecting bit errors in the transmitted frame, followed by an IFG The length of an Ethernet frame can vary from a minimum of 64 bytes to a maximum of 1518 bytes Ethernet communication (at the link level) is connectionless Acknowledgments must be handled at higher levels in the protocol stack Full-duplex, Switched Ethernet The Scenario Half-duplex Mode Ethernet is another name for the original Ethernet Local Area Network discussed earlier As we explained, there is an issue when multiple hosts are connected to the same communication medium as is the case with coaxial cable, depicted in Figure 5, and there is no central coordination It is possible for two hosts to transmit simultaneously so that their transmissions collide Thus there is a need for the hosts to be able to detect transmission collisions When a collision occurs (two or more hosts attempting to transmit at the same time), each host has to retransmit its data Clearly, there is a possibility that they will retransmit at the same time, and their transmissions will again collide To avoid this phenomenon, each host selects a random transmission time from an interval for retransmitting the data If a collision is again detected, the hosts selects another random time for transmission from an interval that is twice the size of the previous one, and so on This is often referred to as the binary exponential backoff strategy Since there is no central control in Ethernet and in spite of the random elements in the binary exponential backoff strategy, it is theoretically possible for the packets to repeatedly collide What this means is that in trying to transmit a single packet, there is a chance that you could have an infinite chain of collisions, and the packet would never be successfully transmitted Therefore, in half-duplex mode it is possible for there to be very large transmission delays due to collisions This situation is unacceptable in an avionics data network So, what was required (and what was implemented in AFDX) was an architecture in which the maximum amount of time it would take any one packet to reach its destination is known That meant ridding the system of contention
Doing Away with Contention To do away with contention (collisions), and hence the indeterminacy regarding how long a packet takes to travel from sender to receiver, it is necessary to move to Full-duplex Switched Ethernet Full-duplex Switched Ethernet eliminates the possibility of transmission collisions like the ones that occur when using Half-duplex Based Ethernet As shown in Figure 7, each Avionics Subsystem autopilot, heads-up display, etc is directly connected to a Switch over a full-duplex link that comprises two twisted pairs one pair for transmit (Tx) and one pair for receive (Rx) (The switch comprises all the components contained in the large box ) The switch is able to buffer packets for both reception and transmission Now, lets look at what goes on within the switch, as shown in Figure 7
Switch
Forwarding Table
Memory Bus
Rx Buffer
Tx Buffer
Rx Buffer
Tx Buffer
Rx Buffer
Tx Buffer
The Rx and Tx buffers in the switch are both capable of storing multiple incoming/outgoing packets in FIFO (firstin, first out) order The role of the I/O processing unit (CPU) is to move packets from the incoming Rx buffers to the outgoing Tx buffers It does this by examining each arriving packet that is next in line in the Rx buffer to determine its destination address (virtual link identifier) and then goes to
the Forwarding Table to determine which Tx buffers are to receive the packet The packet is then copied into the Tx buffers, through the Memory Bus, and transmitted (in FIFO order) on the outgoing link to the selected Avionic Subsystem or to another switch This type of switching architecture is referred to as store and forward Consequently, with this full-duplex switch architecture the contention encountered with half-duplex Ethernet is eliminated, simply because the architecture eliminates collisions Theoretically, a Rx or Tx buffer could overflow, but if the buffer requirement in an avionics system are sized correctly, overflow can be avoided There are no collisions with full-duplex switched Ethernet, but packets may experience delay due to congestion in the switch Instead of collisions and retransmissions, switching architecture may result in jitter, due to the random delay introduced by one packet waiting for another to be transmitted The extent of jitter introduced by an End System and Switch must be controlled if deterministic behavior of the overall Avionics System is to be achieved Reducing Wire Runs and Weight In addition to the enhancements already described, AFDX delivers some additional benefits, compared to ARINC 429 Figure 8 shows some distinctions between ARINC 429 and AFDX In ARINC 429, a twisted pair must link every device that receives the azimuth signal form the inertial platform The point-to-multi-point and unidirectional properties of ARINC 429 means that the avionics system must include an ARINC 429 bus for each communication path In a system with many end points, point-to-point wiring is a major overhead This can lead to some huge wiring harnesses, with the added weight that goes along with them
But in the case of AFDX, as shown in Figure 8b, each signal is connected to the switch only once so that no matter how many subsystems require the azimuth signal from the inertial platform, they need not be connected individually to the inertial platform With ARINC 429, a transmitter can fan out to only 20 receivers With AFDX, the number of fan-outs from the inertial platform is limited only by the number of ports on the switch Also, by cascading switches, the fan-out can be easily increased as needed
Azimuth data
Receiver
Receiver
Autopilot
Heads-up Display
Simplex
ARINC 429
Switch
Two pairs category 5 UTP twisted-pair copper wire End System Inertial Platform End System Heads-up Display End System Other Systems, etc.
Full duplex
AFDX
Controllers
Avionics Subsystem Partition 1 Avionics Subsystem Partition 2 Avionics Subsystem Partition 3 End System AFDX Switch AFDX Network
Sensors
Actuators
ARINC 653
AFDX communications ports Sampling ports Queuing ports Service access point port
Arriving message overwrites the current message stored in the port buffer
M1
Application reading a message from the port does not remove the message
Freshness Indicator
M1
M1
M1
The port_ID identifies the communication port, and the message argument points to a buffer that either contains the message to be sent or is available to receive a new message from the port
10
48 bits Constant Field: 24 bits 0000 0011 0000 0000 0000 0000 0000 0000 Virtual Link ID 16-bit Unsigned Integer
End System 1
VLID = 100
VLID = 100
VLID = 100
End System 2
End System 3
11
Port 5
IP Header 20
UDP Headers 8
UDP Payload Avionics Subsystem Message - 1472 0 --1472 UDP Header and Payload
Pad
FCS 4
Figure 15. Ethernet Frame with IP and UDP Headers and Payloads
12
A Network
B Network
End Systems need a way to identify corresponding packets (replicas) that arrive on the A and B networks In AFDX, all packets transmitted over virtual link are provided with a
IP Header 20
UDP Header 8
UDP Payload Avionics Subsystem Message - 1472 17-- 1472 UDP Header and Payload
Seq. No. 1
FCS 4
A Network
Integrity Checking
Detect and eliminate invalid frames
Redundancy Management
Eliminate invalid frames
Just as partitions are used to isolate Avionics subsystems from one another, a similar mechanism is required to isolate individual virtual links, in order to prevent the traffic on one virtual link from interfering with traffic on other virtual links using the same physical link This is done by limiting the rate at which Ethernet frames can be transmitted on a virtual link and by limiting the size of the Ethernet frames that can be transmitted on a virtual link Each virtual link is assigned two parameters: Bandwidth Allocation Gap (BAG), a value ranging in powers of 2 from 1 to 128 milliseconds Lmax, the largest Ethernet frame, in bytes, that can be transmitted on the virtual link The BAG represents the minimum interval in milliseconds between Ethernet frames that are transmitted on the virtual link For example, if a virtual link with VLID 1 has a BAG of 32 milliseconds, then Ethernet packets are never sent faster than one packet every 32 milliseconds on VLID 1 If VLID 1 has an Lmax of 200 bytes, then the maximum bandwidth on VLID 1 is 50,000 bits per second (200* 8*1000/32)
14
Choosing the BAG and Lmax for a Virtual Link The choice of BAG for a particular virtual link depends on the requirements of the AFDX ports that are being provided link-level transport by the virtual link For example, suppose an Avionics subsystem is sending messages on three AFDX communications ports that are being carried by the same virtual link Lets assume the message frequencies on the ports are 10 Hz, 20 Hz, and 40 Hz, respectively The total frequency of the combined messages (they will be combined on the same virtual link) is 70 Hz The average period of the message transmissions is 14 4ms Accordingly, to provide adequate bandwidth on the virtual link, we should select a BAG that is less than 14 4 ms The first available BAG is 8 ms, which corresponds to a frequency of 125 Hz With a BAG of 8 ms, we are guaranteed that the virtual link is able to transport the combined messages from the three ports without any backlog The source End System is required to enforce BAG restrictions for each outgoing virtual link A number of virtual link scheduling algorithms can be used by the End System Lmax should be chosen to accommodate the largest Ethernet frame to be transmitted by these ports on the virtual link
Nbw is the link bandwidth (100 Mbps) The first formula represents a bound on the jitter arising from an Ethernet frame being delayed by a frame from each of the other virtual links The second formula is a hard limit, independent of the number of virtual links These requirements are necessary to demonstrate the overall determinism of an AFDX network Once a frame is selected from a virtual link queue for transmission, the per-VL sequence number is assigned and the frame is sent to the Redundancy Management Unit for replication (if necessary) and transmission on the physical link(s) The sequence numbers are not assigned to AFDX frames sooner than actual virtual link scheduling because of the sub-VL mechanism If a virtual link has more than one sub-VL, the sequence number cannot be assigned to an AFDX frame until it is actually chosen by the Virtual Link Scheduler for transmission
AFDX Comm Port Selects frames for transmission AFDX Comm Port Virtual Link 200 BAG = 128 ms Lmax = 200 Virtual Link Scheduler Replicates Ethernet frames Redundancy Management Physical Link Physical Link
The timing of messages sent to an AFDX communications port is controlled by the Avionics subsystems and requirements of various attached devices For example, a sensor may be sending readings at a 10 Hz rate Jitter may be introduced if the message arrives at a non-empty virtual link queue Similarly, multiplexing all the virtual link queues into the Redundancy Management Unit and subsequent transmission on the physical links can introduce additional jitter The ARINC 664 specification requires that, in transmission, the maximum allowed jitter on each virtual link at the output of the End System comply with both of the following formulas:
Figure 21 depicts a virtual link with three sub-VLs The Virtual Link Scheduler treats these sub-VLs as a single virtual link for scheduling purposes However, packets are selected for transmission from the sub-VL queues in a round-robin manner Clearly, sequence numbers cannot be assigned to the packets in the sub-VL queues until they are actually selected for transmission by the Virtual Link Scheduler If there is only a single sub-VL (the usual case), sequence numbers can be assigned as the Ethernet frames are inserted in the virtual link queue
15
Chapter 10 Jitter
Jitter Virtual Link scheduling consists of two components: packet regulation and multiplexing Figure 22 shows the role of the Virtual Link Regulators in pacing the frames from the virtual link queues to create zero-jitter output streams The Virtual Link Scheduler is also responsible for multiplexing the regulator outputs into the Redundancy Management Unit for replication and transmission on the physical links The outputs of the Regulator consist of regulated streams of Ethernet frames Jitter is introduced when the Regulator outputs are combined by the Virtual Link Scheduler MUX; Ethernet frames arriving at input to the MUX at the same time will experience queuing delay (jitter)
Virtual Link 100 Regulator BAG = 16 Virtual Link 200 Regulator BAG = 32 Virtual Link 300 Regulator BAG = 4
Physical Link
Physical Link
Regulator Input
Regulator Output
2 BAG BAG
4 BAG
1 BAG
2 BAG
3 BAG
1 BAG
2 BAG
3 BAG
1 BAG
2 BAG
3 BAG
16
Boolean String Opaque Data The standard also requires that the primitive data types be aligned on their natural boundaries For example, Float_64 must be aligned on a 64-bit boundary Address 0 is considered the beginning of the UDP payload; all alignments are relative to Address 0 The first 4 bytes of the message structure are reserved After this, the basic message structure consists of a 4-byte word called the Functional Status Set, followed by up to four data sets The basic message structure can be repeated an arbitrary number of times to form the message structure Figure 23 depicts two message structures The one on the left consists of two data sets, Data Set 1 and Data Set 2 The Functional Status Set has two functional status bytes, FS1 and FS2, which correspond to the Data Sets 1 and 2, respectively
Data Set 1
Data Set 1
Data Set 2 Data Set 2 AFDX Message Structure Functional Status (FS) No Data Normal Operation Functional Test No Computed Data Data Set 3 Data Set 4 FS5 Data Set 5 ARINC 664 Message Structure
Figure 23. Two Message Structures
The functional status of each data set is encoded in the corresponding Functional Status byte There are four possible states: No Data, Normal Operation, Functional Test, and No Computed Data Clearly, the data must be grouped into data sets so that the functional status applies to all the data in the data set The message structure depicted above on the right consists of two basic message structures and a total of five data sets and five corresponding functional statuses ARINC 429 Labels Figure 24 shows how ARINC 429 data can be accommodated using the ARINC 664 message structures The opaque primitive data type is used so that the interpretation of the data is left up to the application (as usual)
Data Set 1
Reserved Reserved
FS-DS1 unused unused unused
A429 Label 010 - Present Position (Lat) Data Set 1 A429 Label 011- Present Position (Long)
A429 Label 012 - Ground Speed Data Set 1 A429 Label 076- GNSS Altitude
18
UDP Header
Message
IP Network Layer
IP Hdr One or more packets as a result of IP fragmentation Add IP Checksum Add Ethernet Header Ethernet Hdr Sub VL queue
IP Hdr
VL Scheduler (Regulator)
Reception Reception is the reverse of transmission The process starts with the reception of an Ethernet frame, which is checked for correctness using the Frame Check Sequence (FCS) If there is no error, the FCS is stripped and the AFDX frame is passed through Integrity Checking and Redundancy Management These steps are carried out at the (virtual) link level The resulting IP packet is passed on to the IP network level
The network level is responsible for checking the IP checksum field and the UDP packet reassembly, if necessary The UDP packet is passed to the UDP transport layer to deliver (DEMUX) the AFDX message to the appropriate UDP port
Seq #
Drop packet
ICMP
No
Yes
IP Fragmentation
20
Length
Fragmentation Control
Checksum
Source Address
Destination Address
bytes
12 IP Header
Figure 28. IP Header Format
UDP Header
Destination Port ID
Payload Length
Checksum
bytes
22
23
GE Fanuc Embedded Systems Information Centers Americas: 1 800 322 3616 or 1 256 880 0444 Asia Pacific: 86 10 6561 1561 Europe, Middle East and Africa: +49 821 5034-0
Additional Resources For more information, please visit the GE Fanuc Embedded Systems web site at:
2007 GE Fanuc Embedded Systems All Rights Reserved All other brands or names are property of their respective holders
02 07 GFT-640