TECHNOLOGY CONNECTED
Serial Interconnects: What are the Choices?
Faster Measurement Results with SuperSpeed USB
SuperSpeed USB is backward compatible with previous versions of USB and is gaining widespread acceptance in the consumer space. Its increased speed along with other enhancements makes it a very attractive interface for test and measurement applications as well.
ANDY PURCELL, AGILENT TECHNOLOGIES
SuperSpeed USB, developed by the USB Implementers Forum, has arrived, bringing much faster data transfer rates. The main impetus behind SuperSpeed USB, which is also known as USB3, was the desire to speed up transfers between rich media consumer devices and PCs. SuperSpeed enables fast “sync-and-go” when transferring large amounts of video and audio content to a portable device. The new SuperSpeed technology is rapidly establishing itself in the consumer world and works equally well for test and measurement devices. It enables unprecedented USB performance exceeding 70 Mbyte/s. This increase in performance will reduce automated test times on a production line and speed up testing in R&D lab environments.
USB3 can be thought of as a superset of USB2. USB3 supports low-speed, full-speed and high-speed devices as defined in USB2, and adds support for SuperSpeed. SuperSpeed is enabled with the addition of 5 wires—2 differential pairs and 1 wire to provide extra grounding. The signals in a USB3 cable are shown in Figure 1. The SuperSpeed differential pairs have a signaling data rate of 5 Gbit/s, which is 10 times faster than the USB2 480 Mbit/s. One differential pair is used for communicating to downstream USB hubs and devices. The other differential pair is used for upstream (toward the PC) communication. This method of signaling is sometimes called “dual simplex.” The 5 Gbit/s SuperSpeed high data rate is made reliable with automatic link initialization and training sequences.
Figure 1
USB3 cable showing the new 5 Gbit/s SSTX and SSRX SuperSpeed differential pairs.
This is done in hardware at the USB3 physical layer when a device is first attached. With this technique, the USB3 specification says the bit error rate is less than one in 1012 bits. And in the rare event an error does occur at the physical layer, USB3 has a protocol layer mechanism to provide detection and correction. When a data packet is transmitted, a cyclic redundancy check (CRC) code is computed and sent along with the data. When the data packet is received, the receiving device computes a CRC based on the received data. If the computed CRC does not match the transmitted CRC, the protocol layer detects this as an error and requests retransmission of the packet.
The USB3 specification does not actually specify the maximum length of a cable. Instead it specifies maximum voltage drop and insertion loss. USB3 cables up to six feet long are readily available. USB3 hubs and devices are connected to a PC in a tiered star topology just as in USB2. USB3 hubs are also readily available. A USB3 hub is essentially a USB2 hub with a SuperSpeed hub added in parallel. When any device is plugged into a hub port the signaling rate capability of the device is detected automatically and the highest possible speed will be used.
Device enumeration (discovery) remains much the same. When a device is first plugged in, the USB host sends requests to the device control endpoint and the device returns descriptors that describe the device, interface and endpoints. USB3 does add a new descriptor called a companion descriptor. Companion descriptors are associated with each endpoint (except the control endpoint) and provide more endpoint information. This information is used by the USB3 scheduler that runs on the USB host. For example, the companion descriptor “bMaxBurst” value specifies the maximum number of packets the endpoint can send or receive as part of a burst. This enables the USB3 host scheduler to burst data to a bulk endpoint in a back-to-back sequence without any added delays due to acknowledge/handshake packets.
The USB3 SuperSpeed protocol layer utilizes these types of packets:
• Link Management Packets
• Transaction Packets
• Data Packets
• Isochronous Timestamp Packets
All SuperSpeed packets have a 14 byte header. Hubs use the “route string” information in the header to route packets to a particular device. This helps overall bus efficiency—only the destination device processes the packet. In USB2, every device was required to analyze each packet and then discard the packet if it was addressed to a different device.
Examples of SuperSpeed transaction packets are ACK, NRDY (not ready), ERDY (endpoint ready) and STALL. These transaction packets are used for flow control. An improvement in USB3 is that a device can initiate the sending of ERDY to the host when the device is ready to send or receive data. This eliminates polling by the host.
Data packets contain data appropriate for whatever USB class is implemented by the device. Devices like USB flash drives and USB hard drives are mass storage devices and implement the USB mass storage specification. Mass storage data packets contain SCSI commands and data. Common devices like mice and keyboards implement the HID (human interface device) class. HID data packets contain “reports” that communicate changes in mouse position, mouse button presses or keyboard key presses. Test and measurement devices implement the USB Test and Measurement Class (USBTMC) specification so data packets carry USBTMC program messages and USBTMC response messages. SuperSpeed data transfers are made more efficient by using 1024 byte data packets instead of the 512 byte maximum in USB2.
It is worth mentioning that USB3 changes the amount of power available for a bus-powered device. A device can now draw up to 900 mA instead of the USB2 500 mA. This increased power delivery enables a device to charge faster. And more power is available for electro-mechanical devices like a USB hard drive.
Compatibility
The additional wires to enable SuperSpeed necessitate new cables, plugs and receptacles. These have been defined to be both mechanically and electrically backward compatible. Backward compatibility means all the familiar USB2 mice, keyboards, mass storage devices, printers and other peripherals can connect to a new PC with USB3 host ports. No existing device is made obsolete (Figure 2).
Figure 2
Compatibility—Existing USB2 peripherals connect to a newer PC with USB3 ports.
Backward compatibility also means a newer USB3 peripheral can be connected to a PC or hub with the legacy USB2 host ports. No problems. The peripheral and PC will communicate at high speed. One option to enable SuperSpeed in this scenario is to simply purchase a readily available USB3 host bus adapter (Figure 3).
Figure 3
Compatibility—USB3 peripherals connect to a PC with USB2 ports.
In addition to the physical and electrical compatibility of cables and connectors, there is software compatibility. The same concepts of control, bulk, interrupt and isochronous endpoint types and pipes apply for SuperSpeed devices. SuperSpeed is transparent to high level application software running on the USB Host.
As an example of software compatibility, consider again a device that implements the USBTMC class specification. USB3 has not impacted this class specification. No revision to the specification is necessary. In fact, the same USB host side driver, distributed by the Interchangeable Virtual Instrument Foundation, works equally well for both USB3 and USB2 Test and Measurement class devices.
Creating a USB3 Device
General purpose USB3 silicon is now available for creating USB3 devices that implement any of the USB class specifications. When creating a USB3 device, the first thing to do is get enumeration working and enumeration changes only slightly. First, the device descriptor “bcdUSB” field must be set to 0x0300. Then, after receiving a GET_DESCRIPTOR request, the device returns a packed structure containing several descriptors, including the new companion descriptor, all in one data packet. An example is shown in Table 1 for a USBTMC device.
Table 1
Complete set of descriptors returned by a USB3 Test and Measurement class device.
When communicating with test and measurement devices, one of the important metrics is transfer rate. Transfer rate matters when sending a large waveform to an arbitrary waveform generator or when reading sampled data from a spectrum analyzer, oscilloscope, or data acquisition device. The actual measured transfer rate is most important—not an “instantaneous transfer rate” or “theoretical transfer rate.” For USB3, the measured transfer rate is shown in Figure 4.
Figure 4
SuperSpeed USB3 Read/Write Performance.
Latency is also important. When communicating to a test and measurement device, many applications just want to read a result, such as a voltage level. This kind of communication involves sending a query program message and then reading the response message. Experimental results show a query takes 175 microseconds using USB3.
SuperSpeed USB brings improved performance and is backward compatible with USB2. USB3 is ramping up and gaining presence in the consumer electronics space. PC manufacturers are beginning to provide SuperSpeed USB ports on both laptop and desktop PCs. SuperSpeed USB can be used in consumer electronics to speed data transfers of audio and visual content, and the increased power delivery charges devices quicker. SuperSpeed USB can benefit other applications as well. Test and measurement applications can use SuperSpeed USB to improve throughput both on production lines and in lab environments. Look for SuperSpeed USB to become as common and successful as earlier versions of the USB standard.
Agilent Technologies
Santa Clara, CA.
(408) 345-8886.
www.agilent.com
Interchangeable Virtual Instrument Foundation
www.ivifoundation.org
USB Implementers Forum
www.usb.org






