Nikkei Electronics Asia -- May 2009
Insights
UWB Video Streaming MAC on Customizable MCU

E-Mail Article
Tweet This
Digg This
Share this with friends on Facebook
Buzz Up!
May 20, 2009 15:01 Nikkei Electronics Asia

Ultra Wide-Band (UWB), a wireless transmission technology for high bandwidth (480Mbps) and short range (10-50m) is designed for communications among devices. While the initial target market of UWB was to replace USB cables, there are many other applications for which this technology is suited, for example uncompressed video streaming, wireless data hubs, medical instrumentation.

This article describes a WiMedia-compliant UWB media access controller (MAC) which is realized with the AT91CAP9S metal mask customizable microcontroller from Atmel. The MAC interfaces to a UWB PHY module according to the ECMA-369 MAC-PHY interface standard to achieve data rates of up to 355Mbps utilizing isochronous data transfers. The integrated ARM processor of the Atmel CAP allows UWB beacon and distributed reservation protocol (DRP) processing to be controlled by software such that the hardware design can be kept as simple as possible. The MAC is configurable by software, meaning that the same mask programmable SoC can be used in the receiver and the transmitter. The CAP with metal mask programming area has a power consumption as low as standard microcontrollers. Due to these features, the CAP SoC is suited to handle applications such as high-quality video wireless transmission in a battery-powered portable medical instrument.

Application Conditions

For removal of obstacles in the human larynx, or to insert breathing tubes, physicians use laryngoscopes. A laryngoscope, an instrument to view the larynx of a patient, consists of a handle and spatula. In order to examine the larynx, this instrument must be shaped ergonomically and be easy to operate. The physician inserts the instrument into the mouth and lifts the lower jar with a gentle push upwards. This method may cause some complications, since there is a danger of breaking the incisors of the patients. Additionally, about 20% of patients show an unexpectedly difficult airway, which means the instrument cannot be used.

A solution to these problems is equipped with a miniature camera, built into the tip of the spatula, which improves the sight of the laryngoscope. In systems currently on the market, a miniature camera is connected to a monitor via a cable, but this cable is a hindrance in the operation room or in an ambulance. For this reason, a wireless connection between the laryngoscope and the camera makes the handling more convenient. To maintain picture quality and avoid distortions, the transmission should be in digital. For the comfort of the physician, movements of the object should appear on the screen with little delay, which implies that the video signal may not pass through compression circuits or extensive layer stacks. Due to the high bandwidth requirements (166Mbps for a picture in NTSC quality) and the operating range of the near field (1-10m), UWB appears to be a suitable transmission medium for this instrument.

Camera Architecture

The video sensor deployed is a CMOS type. In order to compensate for data rate fluctuations on the transmission line, and to allow for repeated transmission of video frames, the image is captured in a frame store before being sent to the UWB MAC. A tightly coupled microcontroller bus (AMBA Host Bus) between the UWB MAC and the microcontroller allows most UWB functions, like beacon generation, to be software supported. The UWB unit consists of a UWB transceiver (UWB PHY) and the UWB streaming MAC.

Since the camera unit is battery-powered, care must be taken to keep power consumption to a minimum, such that the system can be operated for at least 2 hours on one battery charge. The battery charging system is controlled by the microcontroller as well.

UWB Streaming MAC Principles

User data (mainly video content) and the tables required for UWB network management are stored in memory. This memory could be internal to the MAC ASIC or bulk memory outside of the MAC device. To provide a continuous data flow from the data source (camera) to the destination (display), the UWB MAC utilizes isochronous data streaming. To reach this goal, a concept which consists of a fast user data path and a scheduler has been developed. The fast user data path formats the data stream according to the UWB protocol defined in the ECMA-368 standard. The scheduler, controlled by the firmware, sends the packets to the UWB PHY according to the UWB MAC timing requirements. In this way, the non time-critical functions like network management and resource negotiation between the MAC on the camera side and the MAC on the display side can be implemented in the firmware of the microcontroller.

The fast user data path and the scheduler need to be implemented in hardware. In addition to classic MAC layer functionality, the firmware also provides simple link control functionality for point-to-point transfers like opening a connection with the display device and specifying the desired bandwidth.

Implementation Scheme

Since the device is battery-operated, power consumption becomes an issue. The architecture of the MAC requires a tight coupling between the scheduler and microcontroller. The CMOS sensor is controlled by an I2C bus, and the battery management requires ADCs and a pulse width modulator (PWM). Parts count should be reduced to a minimum, since everything has to fit into the handle of the laryngoscope. A standard-cell ASIC would therefore be the obvious choice; however its volume does not justify the development costs. For these reasons, the Atmel CAP, an ARM9-based microcontroller with mask programmable custom logic, and combining high integration, low NRE, low parts cost and low power, is the suitable solution for this application.

The UWB MAC is implemented in the metal user programmable block, which is connected to the ARM9 advanced high-performance bus (AHB) through a 6-layer AHB matrix. To take advantage of cheap bulk memory, the RAM for data and UWB management is located external to the CAP and is connected to the external bus interface (EBI). The multi-layered AHB matrix of the CAP9 architecture supports this very well, by allowing the AHB bus masters to be implemented into the metal programmable block. The MAC then becomes a bus master when accessing data from external bulk memory via the EBI. For memory that must be accessed without delay, or during beacon frame generation, SRAM on the SoC is used.

The UWB MAC architecture includes a fast data path between the MAC-PHY interface (MPI) and the AMBA AHB of the SoC. External memory lookups are performed via the Rx- and Tx-endpoints. Each endpoint contains an address pointer, which determines the start address, end address and read/write of the memory location addressed by the AHB master.

The scheduler is responsible for timely correct controlling of the PHY and the fast user data path. The scheduler receives its information from additional blocks like the network allocation vector (NAV), instruction table, timing calculator and timer. The timing calculator block calculates the frame-size and duration on request of the scheduler. The registers and instruction table are accessed through the ARM peripheral bus (APB). In automatic mode, scheduler instructions are loaded from the instruction table.

MAC Firmware

The UWB MAC firmware implements three protocol layers (see Fig), the link control layer, the MAC layer and the hardware access layer.

Since the firmware controls real-time processes, message queues are necessary, and they are implemented as circularly linked lists, with the Put and Get operations being automatic. Based on a link control request the link control layer generates a distributed reservation period (DRP) information element (IE) request. A DRP IE describes the reserved media access slot (MAS) and is controlled by the MAC layer. The bandwidth is dependent on the MAS count, data rate, burst mode and acknowledge policy. Since the maximum data rate that can be transmitted in the MAS depends on the received signal strength, the link layer is required to adjust the number of reserved MAS. Communication between link layers is done through the link feedback IE.

The MAC layer is responsible for resource management. MACs communicate via beacons with each other. Received beacons are interpreted and a beacon for transmit is created. A beacon period occupancy map and MAS availability map need to be updated to represent the network allocation state.

The hardware is configured by programming of registers. For beacon communication at least one Rx and one Tx endpoint is required. The Rx endpoint needs to receive all beacon frames. Since the beacons are stored in the memory, they can therefore be processed by the firmware. As the registers are memory mapped, configuring the MAC is easy.

by Hans-Joachim Gelke,
Daniel Alberti,
Institute of Embedded Systems,
Zurich University of Applied Sciences

NIKKEI ERECTRONICS ASIA

Nikkei Electronics Asia magazine is available each month free of charge to engineers, managers and other qualified readers.