AFDX :
Avionics Full Duplex Switched Ethernet (AFDX) is a standard that defines the electrical and protocol specifications (IEEE 802.3 and ARINC 664) for the exchange of data between Avionics subsystems. AFDX is based on Ethernet technology and adapted to the avionics environment.
The major components of an AFDX network are:
- Avionics Subsystem: Traditional subsystem such as the flight control, global positioning system, tire pressure monitoring system etc…
- AFDX End System: Provides the “interface” between avionics subsystems and the AFDX Interconnect. This interface exports an API to these subsystems, thereby enabling them to communicate with each other through a simple message interface.
- AFDX Interconnect : Based on full-duplex, switched Ethernet technology. This is a departure from the traditional ARNC 429 point to point technology and the MIL-STD-1553 bus technology
AFDX Frame Structure:
Frame Size: 64 … 1518 Bytes
Preamble+ Start Delimiter+ Inter Frame Gap : 20 Bytes
Avionics applications residing at End-Systems exchange message via the service of the User Datagram Protocol Layer (UDP)
AFDX switches switch AFDX frames based on the MAC destination address.
AFDX MAC Header:
- MAC Header comprises a source to and Destination address.
- Each Address is 48 bits wide.
- The Destination Address identifies the Virtual Link.
- The source address is a unicast address.
- The Destination address is a multicast address.
6. The least significant bit of the first byte indicates the Individual Address = 0.
7. The second to least significant bit of the first byte indicates the locally administrated address =1.
8. MAC Destination address identifies the Virtual Link
9. 2 Pow (16) = 65536 VL Id’s are possible
AFDX IP Layer :
IP source& Address details:
AFDX UDP Layer :
Source Port: It indicates the port number of the sending process, if not used value of ‘0’ is used.
Destination Port : This the port number of the addressed application on the destination computer.
UDP Length : length is the length in bytes of this UDP diagram , including this header and data .This means that the minimum value of length is 8, and maximum value is 65535.
UDP Checksum : Checksum of the entire UDP program and pseudo header. The entire UDP diagram means UDP header plus all data. This is the actual payload data.
Virtual Links:
In a Traditional Ethernet Switch, incoming Ethernet frames are routed to output links based on the Ethernet destination address. In AFDX, a 16 bit value called a Virtual Link ID is used to route Ethernet frames in an AFDX network.
The 100mbps link of an end system can support multiple virtual links .these virtual links can share the 100mbps bandwidth of the physical link.
Each virtual link is assigned to parameters.
- Band width Allocation Gap (BAG)
- Frame Size
- Jitter is introduced due to switches.
Band Width Allocation Gap (BAG) :
- The End system Controls the flow for each VL in accordance with the BAG
- Allowed AFDX BAG values 1,2,4,8,16,32,64 and 128 milliseconds.
- In order to properly allocate bandwidth the different BAG’s are given maximum payload sizes that are proportional to the BAG rates
That is the 1 msec BAG is typically allowed only 64 bytes per frame of data, while 128msec group is allowed the maximum 1518 bytes per frame.
Jitter :
- jitter is introduced due to switches. But we can maintain zero-jitter by using scheduling method at Virtual links
- The difference between the minimum and maximum time from when a source node sends a message to when the sink node receives the message.
- The Jitter and the BAG define a “Window” in which frames are received at the destination End-System
- Window represents the boundaries where two consecutive frames of the same Virtual Link can be transmitted on the physical link.
AFDX Protocol Stack:
- Applications send and receive messages through AFDX Ports
- There are 2 types of AFDX Ports (defined by ARINC-653)
- Queuing Ports – AFDX messages may be sent over several AFDX
Frames (fragmentation by IP layer), no data is lost or
Overwritten
- Sampling Ports – AFDX messages are sent in 1 Frame, data may be
Lost or overwritten
- Both AFDX Port types can be either send or receive ports
- Each AFDX Port is associated with a UDP Port
- Each UDP/AFDX port is associated with a Virtual Link over which all
- messages sent/received via the port travel
- The VL used by the port is identified by a VL field within the IP layer’s Destination address
- The IP layer handles the fragmentation/reassembly functions required by Queuing ports
- The Ethernet/MAC layer handles the Physical and Data Link functions in The AFDX network
- No routing tables are required to map the IP destination address to MAC Destination address mapping
- The VL field of the IP destination address is copied to the VL field of the MAC destination address
- Up to 100Mbit/sec Ethernet is supported
AFDX Communication Ports:
Sampling Port: Data may be lost
- A sampling port has buffer storage for a single message arriving message overwrite the message currently stored in the buffer.
- AFDX message are sent in 1 Frame, data may be lost or overwritten.
- Each sampling port must provide an indication of the freshness of the message contained in the port buffer. Without this indication, it is impossible to tell whether the transmitting Avionics subsystem has stopped transmitting or is repeatedly sending the message.
Queuing Port: For Bi-Directional Communication and no data lost
- A queuing port has sufficient storage for a fixed number of messages (a Configuration parameter), and new messages are appended to the queue.
- AFDX messages may be sent over several AFDX frames fragmentation by IP layer , no data is lost or overwritten.
- Reading from a queuing port removes the message from the queue (FIFO).
- For a Bidirectional communication, ports should be used in queuing mode.
How AFDX Tx Protocol Works:
- The Tx protocol begins with a message being sent to an AFDX port.
- The UDP transport layer is responsible for adding the UDP header, which includes the appropriate source and destination UDP port numbers. These numbers are determined by the system configuration and are fixed for each AFDX communications port.
- The IP network layer receives the UDP packet and determines whether it needs to be fragmented. The IP network layer uses the appropriate virtual link’s Lmax to determine whether fragmentation is necessary.
- The IP header is added and IP checksum is calculated for each fragment. The IP layer adds the Ethernet header and enqueues the Ethernet frame in the appropriate sub-VL queue. The VL layer is responsible for scheduling the Ethernet frames for transmission, adding the sequence numbers (on a per-VL basis), and passing the frames to the Redundancy Management Unit, where the frames are replicated (if necessary) and the Ethernet source address is updated with the physical port ID on which the frame is transmitted.
How AFDX Rx protocol works:
- 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.
- In reception, if the AFDX frame format and Frame Check Sequence (FCS) and Cyclic Redundancy Check (CRC) are valid (without preamble and Start Frame Delimiter fields) the frame should be forwarded to the upper layer.
Redundancy Management:
An AFDX implementation requires two redundant switch networks, A and B, and that each packet be replicated and sent out on both networks.
End systems need a way to identify the corresponding packets that arrive on the A and B networks.
In AFDX, all packets are transmitted over virtual link are provided with a 1-byte sequence number field that occurs just before the FCS field.
E/S adds a sequence number (0…255) in the frame
The sequence number 0 is reserved for End System Reset
- A partition using transmitting End System prepares some data and passes it to the communications protocol stack.
- Here a sequence number field is added to each frame, and the sequence numbers are incremented on each successive frame.
- The sequence number is added to enable the receive function to reconstruct a single ordered stream of frames without duplication before delivery to the receiving partition.
- In default mode each frame is sent across both of two networks. Upon reception, an algorithm in the communications stack (below IP layer) uses a “First Valid wins” policy
- The first frame to be received from either network with the next valid sequence number is accepted and passed up the stack to the receiving partition.
- When the second frame is received with this sequence number, it is simply discarded.
- RM is active : This is default mode. The same frames are sent through both network A and B and it should deliver the first of the redundant frames received.
- RM is inactive : The frames are sent through either network A or B
- RM configuration is generally based on the Skewmax parameter
- Skewmax is nothing but the maximum time between the reception of two redundant frames.
- System integrator will provide this value in milliseconds which depends on number switches crossed by a frame
Permalink
The best article related to AFDX protocol.
Remembered all the things which we implemented while going through this. Was a great refresher.
Thanks.
Permalink
Thanks Vijay for your comments, Please let me know if you any information needs to be add.
Permalink
I am frequent visitor of that site. It is the best explanation of AFDX protocol and other stuffs.
Permalink
Thank you so much Amaan!!!!
Permalink
shall iknow how virtual link creates by programming code