Ethernet AV-Bridging
In spite of the constant growth of bandwidth and improvements in quality of service, Ethernet still faces the problem of the lack of real-time capabilities. This flaw is made awkwardly prominent by the transmission of multimedia content, which requires synchronous package delivery as much as possible. There may be a change now in this respect as the "AVB" standard extension (802.1BA) allows the deterministic delivery of packages in local networks. XMOS' event-driven processors offer a state-of-the-art implementation for this purpose.
Event-Driven Prozessor
With its substandards "Precision Time Protocol" (802.1AS), "Queuing & Forwarding" (802.1Qav) and "Reservation & Allocation" (802.1Qat), Ethernet AVB requires specific extensions to the Media Access Controller and support for digital media recording and playback. Implementation is generally facilitated by processors of the embedded range, but they need to be determinable, i.e. real-time capable, to a great extent to meet the requirements of synchronous Ethernet. On the other hand, architectures based on state machines, which can be implemented e.g. in FPGAs and CPLDs, naturally satisfy this requirement ideally; however, they are quite cumbersome in terms of forming the necessary function blocks as HDL code. Therefore, the perfect option would be a highly deterministic processor with the possibility of programming in standard high level language, like the one that has for some time been offered by XMOS as an "event-driven processor" (EDP) of the so-called XCore-architecture.
The underlying idea is basically very simple: Define as many functions as possible in the software, even those that would normally be realized in the hardware, and let these run in an array of processor cores. Each task occupies a thread, and 8 of them run in an exact cycle on a core. Mutual influence is ruled out, so it can be predicted in the development stage how long a certain action will last. This high degree of determinism is a key characteristic of the chips, which enables developers to define not only system processes like protocol stacks, but also hardware interfaces in a joint environment. This integrated hardware/software development flow is based on a modified C compiler named XMOS-C (XC), practically a C extension facilitating access to and the control of multi-threading and I/O resources.
Development platforms
The software development environment XS1-G Development System can be acquired free of charge after registration on the XMOS website, both for Windows environments and MAC or Linux operating systems. Once registered, you are granted access to tools and sample programs, as well as the Xlinkers site, which is the official XMOS web community. The site includes a large number of projects, programs and code snippets, as well as blogs offering an opportunity to discuss problems and solutions, making the life of developers easier.
On the hardware side, XMOS offers several evaluation boards based on XS1-G4 and the new single-core device XS1-L1. XMOS utilizes XS1-G for AVB implementation, which is a break-out box with QVGA-LCD in its shiny black housing and the look-and-feel of a modder PC, comprehensively equipped with LVDS interfaces, audio I/O and Ethernet, an SD card slot and XIO ports with pin headers.
Upon delivery, a few sample programs are already installed, which can be launched from the on-screen menu or the keyboard. In addition to "Pong" and "Mandelbrot", there is also an audio frequency analyzer analyzing the audio input of the eval system in real time and displaying it on screen as a frequency diagram.
Systemdesign
The components MAC, PTP and audio interface require a total of 13 threads and a mere 80 kByte memory. The set of 32 threads and the 256 kByte memory of the XS1-G4 processor mean that more than 60% of available chip resources can be used by applications, e.g. protocol implementations, network configuration, user interfaces, audio processing routines, or simply additional audio streams. You can see the distribution of components among the 4 processor cores in the figure on the right. Certain time-critical threads must run on a common core to ensure the shortest link delays.
Demo system
The configuration of XMOS' AVB reference system allows to build up an AVB cloud with 4 participants, where each box can function as a talker or a listener. The necessary software is stored on an SD card in each box and can be selected via a menu, with the program alternatives "AVB_T.XB" for use as a talker and "AVB_L.XB" as a listener. Audio signals are fed into the boxes through the line-in jack plugs, and can be output to active boxes via line-out. The central Ethernet switch allows to track data traffic at the Ethernet level via a repeating port, e.g. using a packet sniffer like the well-known Wireshark. During operation, the boxes show a frequency diagram of the audio signals fed and transmitted, to be found in the thread diagram as FFT & Buffer component. This is another impressive proof of the fact that threads on this processor do not influence one another, and that they preserve their real-time capabilities even under load.