DNX AFDX 664 Manual
DNX AFDX 664 Manual
—
User Manual
May 2017
PN Man-DNx-AFDX-664
See the UEI website for complete terms and conditions of sale:
http://www.ueidaq.com/cms/terms-and-conditions/
For a list of our distributors and partners in the US and around the world, please contact a member of our
support team:
Support:
Telephone: (508) 921-4600
Fax: (508) 668-2350
Also see the FAQs and online “Live Help” feature on our web site.
Internet Support:
Support: [email protected]
Web-Site: www.ueidaq.com
FTP Site: ftp://ftp.ueidaq.com
Product Disclaimer:
WARNING!
DO NOT USE PRODUCTS SOLD BY UNITED ELECTRONIC INDUSTRIES, INC. AS CRITICAL
COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS.
Products sold by United Electronic Industries, Inc. are not authorized for use as critical components in
life support devices or systems. A critical component is any component of a life support device or
system whose failure to perform can be reasonably expected to cause the failure of the life support
device or system, or to affect its safety or effectiveness. Any attempt to purchase any United Electronic
Industries, Inc. product for that purpose is null and void and United Electronic Industries Inc. accepts
no liability whatsoever in contract, tort, or otherwise whether or not resulting from our or our
employees' negligence or failure to detect an improper purchase.
Specifications in this document are subject to change without notice. Check with UEI for
current status.
DNx-AFDX/ARINC-664 Board i
Table of Contents
Table of Contents
Chapter 1 Introduction .................................................... 1
1.1 Organization of this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 AFDX-664 Board Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 AFDX Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.2 AFDX Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.3 AFDX Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.4 Certification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.5 Software Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6 ARINC 664 and AFDX Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6.1 AFDX-664 in an AFDX Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6.2 AFDX Network Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.6.3 OSI Model Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6.4 AFDX Packet Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.6.5 Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.7 Device Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.7.1 Device RTOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.8 Wiring & Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.8.1 Connecting to the AFDX Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 2 Programming with the High-level API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 3 Programming with the Low-level API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.1 About the Low-level API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 Low-level Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.3.3 Send / Receive Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3.4 Stop Cleanly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.4 UEI AFDX XML Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Chapter 4 Tools and Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1 Diagnostic Panel for PowerDNA Explorer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2 Device RTOS Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2.1 Reception. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3 AFDX Network Packet Inspection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.1 Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
List of Figures
1-1 The DNR-ARINC-664 Board..........................................................................................4
1-2 Example of an AFDX-664 board in an AFDX Network ..................................................6
1-3 Basic AFDX Network (Logical Addressing Perspective)................................................7
1-4 The OSI Model for AFDX Systems ..............................................................................10
1-5 AFDX Packet Structure ...............................................................................................12
1-6 DNx-AFDX-664 Logic Block Diagram..........................................................................13
1-7 Connection diagram for the DNR-AFDX-664...............................................................14
3-1 Immediate (left), VMap (top right), aEvent (lower right)...............................................20
3-2 DaqBios packet format for VMap refresh.....................................................................22
3-3 VMap control & data ....................................................................................................23
3-4 VMap+ control & data payload ....................................................................................23
3-5 AFDX-664 Configurator ...............................................................................................29
4-1 AFDX-664 Panel in PowerDNA Explorer.....................................................................32
Chapter 1 Introduction
This document outlines the feature set of the DNx-AFDX-664 board and its use
as an AFDX®/ ARINC 664 communications interface.
Manual Conventions
To help you get the most out of this manual and our products, please note that
we use the following conventions:
Tips are designed to highlight quick ways to get the job done or to reveal
good ideas you might not discover on your own.
CAUTION! Caution advises you of precautions to take to avoid injury, data loss,
and damage to your boards or a system crash.
Text formatted in bold typeface generally represents text that should be entered
verbatim. For instance, it can represent a command, as in the following
example: “You can instruct users how to run setup using a command such as
setup.exe.”
Text formatted in fixed typeface generally represents source code or other text
that should be entered verbatim into the source code, initialization, or other file.
Usage of Terms
Throughout this manual, the term “Cube” refers to either a PowerDNA Cube
product or to a PowerDNR RACKtanglerack mounted system, whichever is
applicable. The term DNR is a specific reference to the RACKtangle, DNA to the
PowerDNA I/O Cube, and DNx to refer to both.
1.2 AFDX-664 The DNA-AFDX-664 and DNR-AFDX-664 are 2 channel AFDX® / ARINC-664
Board communications interfaces for UEI’s Cube and RACKtangle I/O chassis
Overview respectively. The boards may be configured as a single A or B channel or as one
dual redundant channel. The network implementation supports 10, 100 and
1000-BASE-T speeds. Each channel may operate as transceiver, transmitter, or
receiver.
1.2.1 AFDX In input mode, the user may time tag inputs with resolutions as low as 10
Receiver microseconds. The input automatically provides error/integrity checking, but this
feature may be disabled in software if the application requires. Receive filtering
of virtual link (VL), port, and error properties is also supported.
1.2.2 AFDX Monitor Monitor mode allows the user to capture network traffic, providing the capability
of capturing select information with automatic filtering. Monitor mode will also
gather a variety of statistics from the bus/network. If desired, monitor mode may
be set to capture UDP network traffic statistics, regardless of whether it is
configured based on the ARINC-664 protocol.
1.2.3 AFDX Transmit channels automatically configure traffic shaping via Bandwidth
Transmitter Allocation Gaps (BAGs) that can be set for 1, 2, 4, 8, 16, 32, 64 or 128
millisecond timing. Transmission may be based on an automatic scheduler or in
one-shot asynchronous mode. Both unicast and multicast virtual links are fully
supported. The transmitter generates and tags consecutive Sequence
Numbers.
1.2.4 Certification The board is based on the Freescale 8347 processor running the DO-178
certified µC Operating System. In PowerDNA mode, the Cube/RACK itself also
uses µC/OS, so even though the units are not certified to DO-178, the fact that
the operating system already is will dramatically reduce certification time.
Advanced users may also wish to implement special functions in the board’s
firmware which can be accessed with custom µC code. The Cube/RACK is well
supported with a variety of debugging tools, and additionally a dedicated
RS-232 diagnostic port is provided on the board allowing easy access to the
lowest levels of the board’s functionality.
1.2.5 Software Software for the DNx-AFDX-664 series is provided with the UEI Software Suite,
Support which includes an easy-to-use API for Windows and Linux.
DNR bus
connector
DB-9 (female)
9-pin debug connector
ARINC-664 Bus Connector (B)
ARINC-664 Bus Connector (A)
Access Port
Status LEDs
1.5 Specification The technical specification for DNx-AFDX-664 is provided in the table below:
Table 1-1 . DNx-AFDX-664 Technical Specifications
Configuration
Number of channels 2: supports A only, B only or dual redundant
Ethernet BASE 10 1000 BASE-T
Channel functions Transmit, Receive or Monitor
VLs supported Up to 2000 VLs or ports with up to 664 active
Underlying Processor Freescale 8347 running DO-178 certified OS
Receive Specifications
Time tagging resolution 10 μS
Error/Integrity checking -JOLMFWFM
Integrity, Sequence Number (SN)
Filtering VL, Port
and error detection filters
Monitor Specifications
Configuration 4FMFDUBCMF
Error Checking *OUFHSBUFE
Statistics Gathering Counters: PHY, E5), IP, UDP, AFDX
Transmit Specifications
Traffic shape via BAG 1, 2, 4, 8, 16, 32, 64 or 128 m4
Transmission scheduling
0 μS resolution QFSJPEJD scheduling of
NFTTBHFTBMMTDIFEVMJOHEPOFJOGJSNXBSF
Transmission configuration Unicast and multicast addressing
Sequence Numbers Auto-Tequenced Donsecutive QFS7-
General Specifications
Debugging options via Cube/RACKtangle chassis backplane or
directly to board via RS-232 port
4FMGUest 1PXFSPOTFMGUFTU 1045
PGDPNQVUFSCPBSE
EVBM"'%9MPPQUFTUPGOFUXPSLJOUFSGBDF
Operating temperature tested -40 °C to +85 °C
Vibration IEC 60068-2-6 5 g, 10-500 Hz, sinusoidal
EC 60068-2-64 5 g (rms), 10-500 Hz, broad-band random
Shock IEC 60068-2-27 50 g, 3 ms half sine, 18 shocks @ 6 orientations
30 g, 11 ms half sine, 18 shocks @ 6 orientations
30 g, 11 ms half sine, 18 shocks @ 6 orientations
Humidity 5 to 95%, non-condensing
Power consumption 6 Watts, maximum
1.6 ARINC 664 The ARINC 664 standard defines an aircraft data network in 8 parts. Part 71 of
and AFDX the standard defines the avionics full-duplex (AFDX) switched network protocol.
Overview Throughout this document we refer to ARINC-664P7 networks as AFDX
networks for brevity and simplicity.
There are two major implementations of the standard: native Airbus and Boeing.
Airbus AFDX™ implements the standard for use on Airbus commercial (A380)
and military (A400M) aircraft, which is supported on the DNx-AFDX-664 board.
The Boeing 787 also implements ARINC 664 and superimposes error-detection
encoding (EDE) protocol extensions different than AFDX.
ARINC 664 is similar to ARINC 429, ARINC 629, MIL-STD-1553 in that it allows
any two avionics devices to communicate reliably and deterministically within a
specific time-interval across a fault-tolerant dual-redundant bus but with faster
rates of communication, less wire, and lower cost using COTS components.
1.6.1 AFDX-664 in DNx-AFDX-664 can be used to send, receive, or report traffic on an AFDX
an AFDX network. In practice, the AFDX-664 is used for the following applications:
Network • Test and debug of avionics network equipment during development, such as:
• passively monitoring traffic (data/statistics) from specific AFDX ports
• actively inserting traffic onto the bus to provide input to equipment
• Emulate real plane traffic for physical avionic equipment (e.g., display LRUs)
of commercial aircraft simulator(s)
AFDX-664 Board
Aircraft Computer System 1 Emulated Aircraft Computer System 2
Partition 1 EndSystem 1 Emulated E/S 2 Emulated Partition 1
Subsystem
Interface
Port 2 VL 2
Emulated Aircraft Computer System 3
Partition 2 AFDX Emulated E/S 3 Emulated Partition 1
Switch
Subsystem
Port 3 VL 3
Interface
VL 3 Emulated Port 1
Avionics
VL 1 Emulated Port 2
...
...
1.Aeronautical Radio Incorporated, ARINC Specification 664 P7-1: Aircraft Data Network Part 7 -
Avionics Full-Duplex Switched Ethernet Network. AEEC, Annapolis, MD: 2009.
The AFDX-664 board is configurable by XML into the mode you require.
Once configured, the DNx-AFDX-664 allows your program to abstract away
everything to AFDX messages, allowing you to communicate using a handful of
simple function calls documented in the PowerDNA API.
Refer to Chapter 3 for more information about the AFDX-664 API and AFDX-
664 XML configuration.
The remainder of this section explains the structure and behavior of AFDX
network nodes, as well as defines the most common attributes, terms and
definitions.
1.6.2 AFDX Network Figure 1-3 shows an example aircraft network topology:
Overview
Aircraft Computer System 1 Aircraft Computer System 2
Partition 1 EndSystem 1 E/S 2 Partition 1
Subsystem
Interface
Port 1 VL 1 VL 2 Port 1
Avionics
Port 2 VL 2
AFDX
Switch Aircraft Computer System 3
Partition 2 E/S 3 Partition 1
Subsystem
Switch VL 1 Port 2
ARINC 664 Part 7 describes an AFDX network as containing one or more of the
following:
• EndSystem (ES): connects an aircraft computer system to the AFDX
network. Each endsystem must have a unique address in the network.
An aircraft computer system will generally have multiple subsystems
and applications, each of which is isolated within an ARINC 653
partition. These applications communicate with one another by
transferring data over sampling or queuing (S/Q) communications ports
defined by ARINC 653. ARINC 664 Part 7 additionally defines service
access ports (SAP). Data from one port on one endsystem is sent
across the AFDX network to a receiving port on another endsystem via
a unidirectional logical channel called a Virtual Link (VL).
• Switch: transfers (and polices) data traveling between end systems.
Policing is the process of checking that traffic flowing from one ES to
another ES complies with rules of AFDX networks (traffic shaping) and
ensures that the network is deterministic even if an ES malfunctions.
Each switch pre-loads a configuration file with all endsystems and their
parameters (e.g., VLs, etc).
1.6.2.2 Virtual Link Each Virtual Link (VL) has these characteristics:
• Each is an input or output (unidirectional).
• Each has one or more receiving partitions (via unicast or multicast).
• Each VL has only one source address on the network (unique sender).
Each sending VL can operate in "normal" (1 S/Q ports per VL) or
"subVL" mode (one VL can be assigned 2, 3, or 4 Q/S ports per subVL).
Each subVL is assigned an individual subVL ID and a sending queue.
• Each VL must send packets in the order that they are queued. A VL
divided into 2, 3, or 4 sub-VL queues and sends using a round-robin
algorithm.
• Each VL can transmit once every BAG=1, 2, 4, 8, 16, 32, 64, or 128 ms.
• SkewMax should be between 0 and 253*BAG
• Ethernet frame length (Lmax) should be between 64 and 1518 bytes
Virtual Links are represented in Ethernet MAC address notation (see Section
1.6.3). The destination address has a 16-bit VLID in the last two octets
[03:00:00:00:[VL:ID]]. The source MAC address format contains the source
(transmitter) information: [02:00:00:8-bit Network ID:8-bit Equipment ID:8-bit
Bus ID (20 is A, 40 is B)].
1.6.2.3 AFDX COM There are three types of communication ports defined in ARINC-664P7:
Ports • Sampling (SMP) as defined in ARINC-653 for avionics data.
• Queuing (QUE) as defined in ARINC-653 for avionics data.
• Service Access Ports (SAP) defined in ARINC-664P7 for other uses.
In TCP/IP protocol notation this is a 16-bit UDP port from 0-65535 (see 1.6.3).
Sampling ports have the following characteristics:
• Connectionless UDP with no flow or error management.
• Data is transmitted as the payload of a single non-fragmented UDP
packet. Received data is of a fixed size that is preconfigured. The
largest maximum data size is 1471 bytes (when Lmax=1518B).
• Multiple partitions on an endsystem may read from the same sampling
port’s received message buffer. This buffer is not cleared upon read.
This receive buffer has a freshness indicator. Only a single buffer exists
and is overwritten when a new message arrives.
© Copyright 2017 May 2017 www.ueidaq.com
United Electronic Industries, Inc.
508.921.4600
DNx-AFDX/ARINC-664 Board
Chapter 1 9
Introduction
1.6.3 OSI Model The following descriptions are in reference to the OSI 7-layer model for network
Structure communication. Refer to Figure 1-4 for layer stack:
1.6.3.1 OSI Layer 1 Layer 1 is the Physical layer defining the hardware connection between sender
and receiver. Note that it transports raw bits rather than logical data. ARINC 667
specifies that the IEEE 802.3 Ethernet standard shall be used for the physical
layer. The physical interface (Ethernet port) on an AFDX end system is
connected in full-duplex to an Ethernet port on an AFDX switch. For redundancy
each AFDX network device has two Ethernet ports intended to send the same
data across two different sets of wires of bus A and B.
In practice the DNx-AFDX-664 implements two independent bus connectors
that are IEEE 802.3ab 10/100/1000BASE-T Ethernet ports, that accept twisted-
pair copper wiring with both receive and transmit, or “Ethernet cable”, as
explained in architecture Section 1.7; for wiring, see Section 1.8.
1.6.3.2 OSI Layer 2 Layer 2 is the Data-Link layer. The data-link layer transfers entire frames of
logical data from sender to receiver, at least as far as Layer 3 is concerned. In
the Ethernet standard the Data-Link layer (DLL) is composed of two parts: the
medium access control (MAC) and logical link control (LLC) sublayer.
The MAC sublayer provides mechanisms to access the physical medium
including packet switching and scheduling to transmit data (as Ethernet frames)
assembled by the LLC’s multiplexing of data from Layer 3 above. The physical
layer and MAC sublayer are designed to be embedded in hardware, so that
changing from twisted-pair copper to fiber or other medium is done by changing
the COTS part. Higher layers are implemented in software.
The IEEE 802.3ab MAC sublayer specifies use of the carrier sense multiple
access with collision detection (CSMA/CD) protocol to choose which device will
have exclusive access to the physical medium to transmit, but CSMA/CD alone
is non-deterministic due to collisions that can cause indefinitely long contention
for the transmission medium by devices with long transmissions. To ensure
deterministic on-time delivery of data between devices on the avionics network
AFDX uses the Virtual Link mechanism in the data-link layer. The Virtual Link is
a logical communication channel which guarantees bandwidth by limiting one
transmission of 1518 bytes or less (<122µs at 100Mbps) once every 1-128ms;
Virtual Links are explained in more detail in later sections. AFDX also adds a
frame sequence number to the end of the Ethernet frame for redundancy
management of identical frames sent across bus A and B.
1.6.3.3 OSI Layer 3 Layer 3 is the Network layer. AFDX specifies a connectionless communication
network with no routing (gateways for SAP are not considered) with a very
restricted IP header carrying either a ICMP ECHO or a UDP datagram. The IP
header must have the following flags set or be discarded: Version=4, Type of
Service=0, Flag={0,1,2}, TTL=1 (hop), Protocol={1:ICMP,17:UDP}.
The Internet Control Message Protocol is restricted to ECHO datagrams only
corresponding to ICMP type={0,8} code=0, which are used to “ping” an
endsystem to see if it is online; all other types and codes are not used.
1.6.3.4 OSI Layer 4 Layer 4 is the Transport layer. AFDX defines UDP as the only transport layer
protocol to carry a data payload. The UDP CRC is not used, and the length can
be set to as low as the 4 byte header with no data up to 4+8192 bytes where
8192 bytes is defined as the maximum payload for a queuing port.
1.6.3.5 OSI Layers Layers 5 to 7 above the Transport layer are not policed by AFDX switches, but
5 to 7 the respective data formats are found in other avionics standards.
1.6.4 AFDX Packet The figure below illustrates an AFDX network packet as a UDP datagram.
Structure The traditional Ethernet UDP datagram structure varies for AFDX packets in the
following ways:
• An Ethernet frame contains an AFDX sequence number (SN), 0 - 255.
• Ethernet MAC addresses use the AFDX addressing scheme.
• Padding is added to ensure that the Ethernet frame size is at least 64
bytes, and that the Ethernet length field is at least 46 bytes. A sampling
port carrying 1 byte payload: 14+20+8+1payload+16padding+1+4 = 64, for
example, or a fragment carrying 1 byte: 14+20+1+24padding+1+4 = 64.
The minimum frame size is 64 bytes whether the packet is carrying up to
17 bytes of UDP payload: 14+20+8+17payload+1+4 = 64 byte frame.
• The IP header is simplified.
- VER=4, ToS=0, TTL=1, Protocol is only UDP (or ICMP ECHO)
- IP addresses use AFDX EndSystem & Partition addressing scheme.
• The UDP CRC is ignored. UDP payload may not exceed 8192 bytes.
Inter-frame
DST MAC
SRC MAC
Sequence#
Padding to
46-1500 [Byte]
IP Header
total 64B
Preamble
Length
AFDX
Ethernet
FCS
IP Payload
SFD
Gap
20B 1 to 1479 bytes
4b 4b 8b 16b 16b 3b 13b 8 8 16 32 32
IP (Network)
Frag offset
Protocol
VER=4
SRC IP
DST IP
TTL=1
FragID
Length
ToS=0
IP Payload
FCS
Flag
IHL
8 bytes
UDP (Transport)
0-8192 bytes
2 2 2 2
Optional in AFDX;
SRC Port
DST Port
data+hdr in ipv4
8-8200 [Byte]
AFDX Payload
CRC=0
Length
1.6.5 Bandwidth Bandwidth utilization for 17 byte and 1471 byte payloads is:
• 17 byte payload: 100Mbps/(8bits)/(84 octets/frame)=148810 frames/sec
or effectively 148810 FPS * 17 Bytes/frame = 2,529,770 B/s (2.4MiB/s)
• 1471 byte payload: 100Mbps/(8bits)/(1538 octets/frame)=8127 frames/sec
or effectively 8127 FPS * 1471 Bytes/frame = 11,954,817 B/s (11.4MiB/s)
8127 frames / 1000msec is about 8 sampling messages of 1471 bytes per ms,
and at 17 bytes that is 148 sampling messages per millisecond.
© Copyright 2017 May 2017 www.ueidaq.com
United Electronic Industries, Inc.
508.921.4600
DNx-AFDX/ARINC-664 Board
Chapter 1 13
Introduction
1.7 Device This section describes the hardware used in the DNx-AFDX-664 board.
Architecture A block diagram of the board is shown in Figure 1-6.
DNx-ARINC-664 board
ARINC 664
Interface 0
Bus A
FPGA/DSP block
ARINC 664
Interface 1
control
Bus B
IRQ
ARINC-side Logic
data
Debug Port
Bus Multiplexor
RS-232
IRQ
DNA-side Logic
Sync Port
SD &
1.7.1 Device RTOS The DNx-AFDX-664 incorporates a DO-178 certified real-time operating system
“MicroC/OS” that facilitates AFDX emulation. Important processes like the
reception routine and statistic collection are described in “Device RTOS
Processes” on page 33.
© Copyright 2017 May 2017 www.ueidaq.com
United Electronic Industries, Inc.
508.921.4600
DNx-AFDX/ARINC-664 Board
Chapter 1 14
Introduction
1.8 Wiring & The following ports are located on the front-end of the DNx-AFDX-664 board:
Connectors • RS-232 female connector to debug the DNx-AFDX-664.
• Dual TIA/EIA-568 female sockets accepts Category 5/6 straight-through
unshielded twisted-pair (UTP) wire - the same Fast Ethernet or Gigabit
Ethernet copper wiring that is used to connect PCs to LANs.
Pin Signal
1 Tx+
2 Tx-
3 Rx+
4 (none)
5 (none)
6 Rx-
7 (none)
8 (none)
The socket closer to the RS-232 port corresponds to Bus B. The socket
closer to the SYNC/LED port is Bus A. See Figure 1-1 for bus labeling.
Note that to connect to an avionics interface that uses an optic fiber link
please contact Technical Support for a recommended media converter.
• SYNC port hardware for synchronization and triggering.
1.8.1 Connecting to To connect the AFDX-664 board, use the following procedure:
the AFDX 1. Verify the AFDX-664 board is powered down.
Network
2. Connect the network interface(s) to the switch(es) (Figure 1-7):
- Connect “Bus A” network interface port to the Switch for Bus A.
- Connect “Bus B” network interface port to the Switch for Bus B.
3. Apply power to the RACK or Cube IOM. The board will link to the
network.
Note: The board performs a fast link, and disconnecting either network
cable will disable that network interface until it is power-cycled.
4. Confirm that network link lights are on as orange (10/100Mbps) or
green. You are now connected to the AFDX network.
Optionally, you can connect to the serial debug port using MTTTY (or PuTTY) at
57600 baud, no parity, 8 data bits, 1 stop bit to confirm connectivity.
Switch
for Bus A
Switch
for Bus B
NOTE: It is preferred that both the Bus A and Bus B Switch be certified ARINC
664 network switches that are properly pre-configured for the avionics
network. COTS Ethernet switches will act as hubs which degrade
overall performance.
NOTE: At the writing of this manual, programming the AFDX-664 with high-level
Framework API is not supported. Programming the AFDX-664 using the
low-level functions is described in Chapter 3.
3.1 About the The low-level API provides direct access to the DAQBIOS protocol structure and
Low-level API registers in C. The low-level API is intended for speed-optimization, when
programming unconventional functionality, or when programming under Linux or
real-time operating systems.
UEI also offers a high-level Framework API for use when programming in
Windows OS; however, AFDX-664 is not currently supported in the Framework
and must be programmed using the low-level API.
For additional information regarding low-level API, refer to the PowerDNA API
Reference Manual located in either of the following directories:
• On Linux systems:
<PowerDNA-x.y.z>/doc
• On Windows systems:
Start » All Programs » UEI » PowerDNA » Documentation
3.2 Low-level Low-level functions are described in detail in the PowerDNA API Reference
Functions Manual. Table 3-1 provides a summary of AFDX-664-specific functions.
Table 3-1 Summary of Low-level API Functions for DNx-AFDX-664
Function Description
Function Description
3.3 Tutorial The following tutorial provides a brief overview of how to set up and use your
AFDX-664 using the low-level API.
For best results, use this tutorial in conjunction with an actual code sample,
which can be found in either of the following directories:
• <PowerDNA-x.y.z>/src/DAQLib_Samples/Sample664_xml (Linux)
• %PDNAROOT%\Examples\Visual C++\ARINC\Sample664_xml (Windows).
3.3.1 Initialization To initiate communication with the RACK or Cube, you must first get a DAQLib
handle for the IOM by calling DqOpenIOM():
// Connect to the IOM and obtain a library handle for the connection
3.3.2 Configuration Prepare to configure the AFDX-664 card by clearing any existing configuration
from its memory:
Configure the VLs and ports by creating an XML configuration file and specifying
its path to DqAdv664SetConfig() call as shown in the following code
snippet.
NOTE: To create the XML file, use the UEI AFDX Configurator tool or use one
of the <config>.xml samples in Sample664_xml as a template. Refer to
“UEI AFDX XML Configuration” on page 29 for a list of programmable
configuration attributes and for more information about the AFDX
Configurator.
AR664_ARCFG AfdxNetworkInterfaceConfiguration = {
(AR664_CTRL_ENABLE_A|AR664_CTRL_ENABLE_B),
(AR664_CTRL_ETH100_A|AR664_CTRL_ETH100_B)};
int size_tbl;
AR664_CFG_HANDLES *handle_tbl;
// Set the configuration with the above AFDX network interface config,
// VL/Ports from my_file.xml, and where to return a handle table and size
DqAdv664Enable(hd, 0, AR664_VL_USE_A|AR664_VL_USE_B);
3.3.3 Send / Receive The DNx-AFDX-664 board can send or receive messages in three ways:
Messages (1) Immediate mode; (2) Variable Data Map or VMap+; (3) Asynchronous mode.
The difference between the modes is described below with code snippets in the
following sections. Figure 3-1 is provided for reference:
• Immediate mode: each function call is directed to a single AFDX port.
The function call gets received data or puts transmit data and returns
port status. Practical for use with tens of SMP/QUE/SAP/ICMP ports.
• VMap/VMap+: each variable-size data map contains multiple receive &
transmit AFDX ports that are refreshed simultaneously per function call.
Designed to perform a bulk update of sampling ports of small data size
in a single call and is ideal for frequently refreshed transmit AFDX ports.
Each legacy VMap requires a fixed list of AFDX ports to be configured
before DqAdv664Enable, and is practical for tens to a hundred ports.
VMap+ allows ports to be set dynamically at runtime (VMap is only at
configuration time) and practical for refreshing hundreds of AFDX ports.
• Asynchronous Events or aEvent mode for AFDX reception only: the
IOM can forward messages received from the AFDX bus directly to the
PC, but requires a separate listening thread on the PC.
PC IOM PC IOM
RecvMessage Refresh (tx-data)
(blocking call) (process) (blocking call) (process)
(data,status) (optional rx-data)
SendMessage
PC IOM
(blocked) (process)
(thread sleep) (event)
(status)
(rx-data, status)
Figure 3-1 Immediate (left), VMap (top right), aEvent (lower right)
3.3.3.1 Immediate To send messages, call DqAdv664SendMessage() using the AFDX port
Mode handle. The following example shows how to do this for our previously-
configured sampling port:
int written;
uint32 available, status;
uint8 message_s[AR664_MAX_MSG_SZ_N] = "my message";
For this example, let’s assume that we also set up a VL to receive, which has a
corresponding Port named myRxP1hdl.
To receive messages, call DqAdv664RecvMessage() for the port as described
for the following sampling port:
int received;
uint32 available, status;
uint8 message_r[AR664_MAX_MSG_SZ_N];
3.3.3.2 VMap&Vmap+ Rather than receiving or transmitting data from each Port, it is possible to set up
Introduction a variable-size data map to receive and transmit multiple messages at once.
VMap/VMap+ is described in detail in the PowerDNx Protocol Manual. Using a
VMap/+ consists of the following function calls (shown in the next two sections):
• Initial configuration of a VMap/VMap+:
a. set up VMap parameters
b. add input/output channels (fixed for VMap, dynamic for VMap+)
c. start the VMap
• Operation:
d. schedule data to write upon next refresh from channel(s)
e. schedule data to read upon next refresh from channel(s)
f. refresh (see Figure 3-1)
g. read retrieved data from input channel (returned in reply to refresh)
• Stop and close the VMap
Both (a) and (b) are performed in the PowerDNA Library on the PC and that data
map is eventually built and sent to the IOM at (c) when the start command is
called.
The number of input and output channels (up to 64) from (b) are thereafter fixed
and in that VMap control even if no data is scheduled to be sent/received in (d)/
(e) for that channel upon refresh (f).
The DaqBios command for VMap Refresh has the process shown in Figure 3-1
and the packet format shown in Figure 3-2:
14 20 8 16 8 4 (variable) 4
DQPKT
Header
Header
VMap
VMap
VMap control+data
Flags
UDP
ETH
FCS
IP
(see below)
For traditional VMap each AFDX receive/transmit port handle added as an input/
output channel is put into a transfer list. Scheduling data to write and be read
can only be performed for those added AFDX handles and only requires
specifying the size to be written (and data in case of write) or read:
2-11764 bytes
2-128 Bytes 2-128 (sum of out_size[0] thru [63])
2 2 2 2 2 2 2 2 out_size[0] [1] … [63]
out_size[63]
out_size[...]
out_data[1]
in_size [63]
out_data[0]
out_data[1]
in_size […]
out_size[0]
out_size[1]
in_size [1]
in_size[0]
…
Figure 3-3 VMap control & data
Figure 3-3 shows the VMap control+data portion of Figure 3-2’s Refresh
command sent from PC to IOM. The output and input array indexes correspond
to the channels added in (b) and set in (c) is always of fixed size until the VMap
that they are assigned to is destroyed. For example, for 64 input + 64 output
channels they use up the first 128+128 bytes of 11764 bytes, even if the data
transferred for most channels is mostly 0, leaving only 11508 bytes for output
channel data. The sizes for output channels and data to write are assigned in
(d), and the sizes for input channels to return with the refresh’s reply are
assigned in (e).
The reply from IOM to PC returns a packet with the size of the read data (up to
in_size[] specified in the command) followed by the data itself for that channel.
Up to 256 VMaps, each with 0-64 input and 0-64 output channels, can be
assigned at configuration time. However, for hundreds of AFDX ports, of which
only a few are frequently updated, traditional VMap is not as efficient as VMap+,
since VMap+ gives control to which of thousands of AFDX ports to refresh.
For VMap+, channels are added with a special flag that allows the AFDX handle
to be specified at (d) or (e) using a VMapPlus function call. As seen in Figure 3-
4 the extra control information can create a larger header.
4-11764 bytes
4-256 Bytes 4-256 (sum of out_size[0]..[63])
2 2 2 2 2 2 2 2 out_size[0] [1] … [63]
out_port[63]
in_port [63]
out_data[0]
out_data[1]
out_size[0]
out_port[0]
in_port [0]
out_data[1]
in_size[0]
…
...
...
The examples that follow show how to use VMap and VMap+ in practice.
3.3.3.3 Variable Data This section exemplifies how to configure, operate, and close a VMap.
Map or VMap Configuration
To create a new VMap, call:
int vmapid;
DQ_RTMAP_PARAM vmapparam;
vmapparam.max_payload_sz = 12000;
vmapparam.mtu = 1518;
vmapparam.refreshRate = 0.1;
int flags = 0;
DqRtVmapAddChannel(hd0, vmapid, DEVN, DQ_SS0IN , &myRxP1hdl, &flags, 1)
DqRtVmapAddChannel(hd0, vmapid, DEVN, DQ_SS0OUT, &myTxP1hdl, &flags, 1)
DqRtVmapStart(hd0, vmapid);
Operation
Now the VMap is configured, operation involves preparing to Refresh the VMap
as explained in steps (d) through (g) in the previous section.
Begin by using this convenience function to reset everything to 0 (otherwise you
must reset all channels to 0 yourself):
DqRtVmapInitOutputPacket(hd0, vmapid);
To write data to a transmitting AFDX port, first request it in the VMap packet:
uint8 out_data[1440];
len = sprintf((char*)(out_data), “0123456789”);
The DqRtVmapWriteOutput call will return the number of bytes still available
in the VMap packet (ret) . When (ret!=len) your request has been denied; if
(ret<0) then an error has occurred (for detail, call DqTranslateError(ret)).
The VMap request has been prepared so it can be sent with
DqRtVmapRefresh.
To read a message from an AFDX port, first request it in the VMap packet:
The DqRtVmapRequestInput call will return the number of bytes still available
in the VMap packet (ret) as with DqRtVmapWriteOutput. This VMap request
has been prepared so it can be sent with the next DqRtVmapRefresh.
Note that the above DqRtVmapWriteOutput and DqRtVmapReadInput only
create requests but do not send the actual VMap packet to the IOM. To send the
actual packet use the VMapRefresh call seen below:
// Send the VMap refresh request (sends the actual packet prepared above)
Note that the Refresh command only operates on the data of an AFDX port and
does not currently retrieve the status, number of messages in queue, or SAP
headers as the simple messaging mode does. Requesting data from a queuing
port only receives a single message from the queue, not the whole queue.
The VMap refresh command packet (Figure 3-1 and Figure 3-3) contains both
the data transmitted, (i.e., including out_data) and any request for data to be
returned with the VMap reply from the IOM.
To read the input received after a refresh you must call DqRtVmapReadInput:
uint8 data[1440];
int rxsz = 0;
DqRtVmapReadInput(hd0, vmapid, DEVN, myRxP1hdl, 1440, &rxsz, data);
printf("Input channel %x data: %d (%s)\n", myRxP1hdl, rxsz, data);
// Clean up VMap
finish_up:
if (vmapid) {
DqRtVmapStop(hd0, vmapid); // Stop VMap
DqRtVmapClose(hd0, vmapid); // Destroy it
}
int vmapid;
DQ_RTMAP_PARAM vmapparam = {12000,1518,0.1};
DqRtVmapInitEx(hd0, &vmapid, &vmapparam);
// Add VMap channels (no AFDX port handles are used, just unique #s)
You can then start the operation of the AFDX-664 with DqAdv664Enable() to
allow the AFDX-664 to interact with the network.
Start the VMap by calling:
DqRtVmapStart(hd0, vmapid);
To write data to a transmitting AFDX port first request it in the VMap packet:
uint8 out_data[8192];
len = sprintf((char*)(out_data), “0123456789”);
DqRtVmapPlusWriteOutput(hd0, vmapid, DEVN, vmapch_tx[0], myTxP1hdl, len,
out_data);
// Send the VMap request (sends the actual packet prepared above)
Note that the Refresh command only accesses the AFDX port’s message
payload and does not retrieve the status, remaining messages in queue, or SAP
headers as the simple messaging mode does. Requesting data from a queuing
port only receives a single message from the queue, not the whole queue.
The VMap refresh command packet (Figures 3-1 and 3-3) contains both the data
transmitted (i.e., including out_data) and any request for data to be returned
with the VMap reply from the IOM. The reply contains only AFDX message data
without any status, remaining messages in queue, or SAP headers as seen with
simple messaging mode. The status and number of messages may be retrieved
with the DqAdv664PortMsgStatus and DqAdv664VLPortStatus
commands. It is useful to run these commands to see which ports are
worthwhile refreshing.
To read the input received after a refresh you must call DqRtVmapReadInput:
// Clean up VMap
if (vmapid) {
DqRtVmapStop(hd0, vmapid); // Stop VMap
DqRtVmapClose(hd0, vmapid); // Destroy it
}
3.3.3.5 Asynchronous Asynchronous events were implemented to improve efficiency in receiving large
Events or quantities of data quickly from the AFDX bus and transferring them to the PC.
aEvent Mode The UEIPAC does not use aEvent mode because all traffic is local.
Asynchronous events are described in detail in the PowerDNx Protocol Manual.
In summary, configuring and using asynchronous events follows this process:
• Initial configuration:
a. create an independent IOM handle and port for aEvents only
b. configure the DNx-AFDX-664 with a list of AFDX receive ports
c. start listening for events on that list
d. start a thread to process asynchronous events coming from IOM
• Operation on the DNx-AFDX-664:
e. receive a message from the AFDX bus
f. find the receiving port in the aEvents list
g. encapsulate the message data in an aEvent packet
h. queue the IOM-CPU to send the aEvent packet
i. send the aEvent packet to the PC (see Figure 3-1)
• Operation on the host PC:
j. wake sleeping thread (started at d) to receive the aEvent packet
k. unencapsulate AFDX message(s) from the aEvent packet
l. process AFDX message(s), then sleep until next packet
• Cleanup:
m. disable events and clear the aEvent port list
We have seen that Immediate and VMap/VMap+ function calls block the
application on the PC while sending a command to the IOM, which in turn block
the IOM while it polls the DNx-AFDX-664 for data for 1 to 64 receiving AFDX
port. We can see that these steps are no longer necessary with aEvents.
The following event modes are available:
• Send every AFDX message as it is received from AFDX bus.
• Accumulate received messages in a buffer of up to 12kB, and send
them when the watermark is reached, for bandwidth efficiency.
• Accumulate received messages in a buffer of 12kB, and send them
when after a timeout is reached, for bandwidth efficiency.
3.3.4 Stop Cleanly To stop operation, call DqAdv664Enable() with a FALSE parameter as
follows:
// Disable operation
int DEVN = 0;
DqAdv664Enable(hd, DEVN, FALSE);
This stops operation of the AFDX-664 board without changing the configuration.
3.4 UEI AFDX As described in Section 3.3.2, each DNx-AFDX-664 device is configured using
XML an XML file.
Configuration UEI provides a GUI-based AFDX Configurator that allows users to create and
edit AFDX-664 configuration XML files. See Figure 3-5 below.
VL Attribute Description
name metadata
direction Data transfer direction: “read” or “write” for receive or transmit respec-
tively
LMax Largest Ethernet frame: from 64 to 1518 bytes for maximum frame size
max_jitter Maximum allowed jitter: from 0 to 65535 milliseconds for receive ports
• For each <VL>, one or more <port> tags that define the following attributes:
Table 3-4 Summary of port Attributes
name metadata
portid metadata
NOTE:
• For the expanded XML format the endsystem and partition address are:
EndSystem address as endsys_src and endsys_dst from 0 to 65535
Partition on EndSystem as part_src and part_dst from 0 to 256
Multicast as “yes” or “no” to use a mutlicast or unicast address
• Compact format endsystem and partition addresses are represented as
a multicast address 224.224.[upper 8 bits of vlid].[lower 8 bits of vlid] or
unicast address 10.[upper 8 bits of endsys].[lower 8 bits of endsys].[part] for
src_ip_address and dst_ip_address.
For more detail, refer to the comments for AR664_VL/PORT_CFG in section
3.3.2.
4.2 Device RTOS This section describes the process by which the receiver stores or drops AFDX
Processes messages from the time that they are received from the AFDX network.
4.3 AFDX The following procedure can be used to inspect AFDX network packets with
Network Wireshark 1.10+. Wireshark is a free and open source network instrumentation
Packet tool.
Inspection Perform a Packet Capture
1. Prepare to capture packets
• Bring up your capturing Ethernet Adapter’s Properties (you can type “ip”
in Start Menu).
• Uncheck all boxes, (e.g., Protocol Version 4 (TCP/IP v4), etc.) to avoid
injecting data.
• Connect the Ethernet CAT5e line into the AFDX network.
2. Start WireShark
NOTE: For first-time configuration, you can see packets better if you
perform these commands:
• View > Coloring Rules > Disable “TTL low or unexpected”
• View > Name Resolution > (Uncheck All)
This will allow you to scroll through packets to inspect the payload. The payload
is what is delivered to the application running on a virtual flight computer (such
as the Altitude display in a Display Unit).
To inspect jitter of sampling packets (difference between configured and actual
retransmit period), press Ctrl+Alt+6 or use the menu:
View > Time Display Format > Seconds Since Previous Displayed Packet
To switch back to “seconds since start of capture”, use Ctrl+Alt+4.
Find Interesting Data
Let’s say that you want to search for a value (e.g., the Altitude) decoded from a
message on your 429 bus.
To find a particular hex value, click Edit > Find Data > Hex Value
Statistics:
• Statistics > Summary will show averages of traffic
• Statistics > IO Graph will show a graph of traffic across the network
Statistics > Conversations will show when all connections (between various
avionics components) start communicating and for how long.
Appendix A
A.1 Accessories The following cables and STP boards are available for the DNx-AFDX-664.
DNA-CAT5E-CBL
This is a 4-conductor round unshielded twisted-pair cable with 8-pin male TIA/
EIA-568 connectors on both ends.
DNA-DB9MF-CBL
This is a 9-pin serial cable with male D-sub connectors on both ends. It is used
to connects to your PC’s serial port or terminal console to the RS-232 port.
DNA-CBL-SYNC-10
Sync-to-sync cable used for synchronization with an external sync port.
DNA-CBL-SYNC-RJ
Sync-to-8P8C (RJ-45) cable for use with a synchronization breakout board.
Index
A PowerDNA Explorer 32
Accessories 38
Q
AFDX Network Overview 7
Queuing ports 9
AFDX Network Packet Inspection 35
AFDX Packet Structure 12 S
Sampling ports 8
B
Screw Terminal Panels 38
Block diagram 13
Service Access Ports 9
C Setting Operating Parameters 4
Cable(s) 38 Support ii
Conventions 2 Support email
[email protected] ii
D Support FTP Site
Diagnostic 32 ftp
E //ftp.ueidaq.com ii
Endsystems 8 Support Web Site
www.ueidaq.com ii
H
High Level API 15 T
Tools 32
L Troubleshooting 32
Low-level API 16, 32
V
O Virtual Link 8
Organization 1
W
P Wireshark 35
Partitions 8 Wiring 14