1. Field of the Invention
This technology relates to a USB intermediate device, such as a USB hub device or USB compound device.
2. Description of Related Art
According to the Universal Serial Bus 3.0 Specification, a USB 3.0 hub requires the implementation of a separate USB 2 hub and a separate USB SuperSpeed hub. In this specification-compliant USB 3 hub architecture, all the USB 2 devices that are downstream of the USB 3 hub share the same 480 Mbps bandwidth provided by the USB 2 hub within the specification-compliant USB 3 hub. For example, if five downstream USB 2 devices are connected to the specification-compliant USB 3 hub, then the five USB 2 devices each might have, on average, up to 96 Mbps bandwidth (480 Mbps bandwidth/5 devices).
In various embodiments, the upstream port of a USB intermediate device shares the 5 Gbps bandwidth of the upstream port among multiple downstream USB 2 ports of the USB intermediate device. The collective data rate of these multiple downstream USB 2 ports exceeds a 480 Mbps data rate. For example, if five downstream USB 2 devices are connected to the USB intermediate device, then the five USB 2 devices each might have, on average, a 480 Mbps bandwidth. The collective data rate of these five downstream USB 2 devices is 2.4 Gbps, which is less than the 5 Gbps bandwidth of the upstream port. The 2.4 Gbps collective data rate of these five downstream USB 2 devices exceeds the 480 Mbps bandwidth provided by the USB 2 hub within the specification-compliant USB 3 hub.
One aspect of the technology is an apparatus with a USB intermediate device. Examples of the USB intermediate device are a USB hub and a USB composite device. The USB intermediate device includes an upstream USB 3 port, multiple downstream USB 2 ports, and control circuitry.
Downstream is the direction of data flow from the host or away from the host. A downstream port is the port on the USB intermediate device electrically farthest from the host that generates downstream data traffic from the USB intermediate device. Downstream ports receive upstream data traffic.
Upstream is the direction of data flow towards the host. An upstream port is the port on the USB intermediate device electrically closest to the host that generates upstream data traffic from the USB intermediate device. Upstream ports receive downstream data traffic.
The upstream USB 3 port is adapted to electrically connect with a USB 3 host controller of a host computer. The upstream USB 3 port has a USB 3 maximum data rate. The typical USB 3 maximum data rate is the 5 Gbps SuperSpeed bandwidth.
The multiple downstream USB 2 ports are adapted to electrically connect with multiple USB 2 peripherals.
The control circuitry (i) performs translation between USB 2 communications of the multiple downstream USB 2 ports and USB 3 SuperSpeed communications of the upstream USB 3 port; and (ii) modifies apportionment of the USB 3 maximum data rate among the multiple downstream USB 2 ports, such that the multiple downstream USB 2 ports communicate at a collective data rate exceeding a USB 2 maximum data rate of USB High Speed (typically 480 Mbps).
In some embodiments the apparatus violates a USB specification, in that in the apparatus the multiple downstream USB 2 ports communicate at the collective data rate exceeding the USB 2 maximum data rate of USB High Speed, despite the USB specification requiring that a USB specification-compliant USB 3 device has the multiple downstream USB 2 ports communicate at the collective data rate no faster than the USB 2 maximum data rate of USB High Speed.
In some embodiments the apparatus violates a USB specification, in that in the apparatus the USB 2 peripherals appear as USB 3 SuperSpeed peripherals to the USB 3 host controller, despite the USB specification requiring that USB 2 peripherals appear as USB 2 peripherals to the USB 3 host controller.
In one embodiment, the USB 2 communications are half duplex, and USB 3 SuperSpeed communications are full duplex, such that the control circuitry performs translation between half duplex USB 2 communications and dual simplex USB 3 SuperSpeed communications.
Various embodiments are directed to the translation performed by the control circuitry.
In one embodiment the translation is transparent to the USB 3 host controller of the host computer, such that the USB 2 peripherals appear as USB 3 SuperSpeed peripherals to the USB 3 host controller and communications via the upstream USB 3 port with the multiple USB 2 peripherals are compliant with USB 3 SuperSpeed protocol.
In one embodiment the translation is transparent to the USB 3 host controller of the host computer, such that the USB 3 host controller follows a USB SuperSpeed protocol to communicate with the plurality of USB 2 peripherals.
In one embodiment the translation is transparent to the USB 3 host controller of the host computer, such that the USB 3 host controller is unaware of whether the plurality of USB 2 peripherals communicate at USB High Speed, USB Full Speed, or USB Low Speed.
In one embodiment the control circuitry that performs translation, creates a USB 3 SuperSpeed descriptor to represent a USB 2 peripheral connected to one of the plurality of downstream USB 2 ports.
In one embodiment, the control circuitry that performs translation, creates a virtual USB 3 SuperSpeed device to represent a USB 2 peripheral connected to one of the plurality of downstream USB 2 ports.
In one embodiment, the control circuitry that performs translation, creates a virtual USB 3 SuperSpeed device to represent a USB 2 peripheral connected to one of the multiple downstream USB 2 ports. The apparatus further includes a buffer that stores data transferred between the virtual USB 3 SuperSpeed device and the USB 2 peripheral. The buffer can be used to handle flow control.
In one embodiment, the control circuitry that performs translation, creates a virtual USB 3 SuperSpeed device to represent a USB 2 peripheral connected to one of the multiple downstream USB 2 ports, and the control circuitry handles flow control in the upstream SuperSpeed link and between the virtual USB 3 SuperSpeed device and the USB 2 peripheral.
In one embodiment, the control circuitry that performs translation, creates a virtual USB 3 SuperSpeed device to represent a USB 2 peripheral connected to one of the plurality of downstream USB 2 ports, and the control circuitry adds a frame or a micro-frame to isochronous communications between the virtual USB 3 SuperSpeed device and the USB 2 peripheral.
In one embodiment, the control circuitry that performs translation, creates a virtual USB 3 SuperSpeed device to represent a USB 2 peripheral connected to one of the multiple downstream USB 2 ports, and the control circuitry modifies polling of the USB 2 peripheral, to permit the host computer to go to a sleep mode. For example, the control circuitry automatically takes care of the polling of the USB 2 peripheral without intervention from the host computer software/hardware. This allows the host computer to save power.
Another aspect of the technology is a method with the following steps:
Another aspect of the technology is the USB intermediate device as described herein, and further including the host computer including the USB 3 host controller.
In one embodiment, the host computer includes code that makes the USB 3 SuperSpeed peripherals appear as USB 2 peripherals.
Another aspect of the technology is a non-transitory computer readable medium with instructions executable by a USB intermediate device including an upstream USB 3 port and multiple downstream USB 2 ports, the upstream USB 3 port adapted to electrically connect with a USB 3 host controller of a host computer and the multiple downstream USB 2 ports adapted to electrically connect with multiple USB 2 peripherals. The instructions include:
Another aspect of the technology is an apparatus with a USB intermediate device. The USB intermediate device includes an upstream USB 3 port adapted to electrically connect with a USB 3 host controller of a host computer, the upstream USB 3 port having a USB 3 maximum data rate; multiple downstream USB 2 ports adapted to electrically connect with multiple USB 2 peripherals; and control circuitry that performs translation between USB 2 communications of the multiple downstream USB 2 ports and USB 3 SuperSpeed communications of the upstream USB 3 port. Other aspects are corresponding methods, computer readable media storing the translation instructions, and a system also including the host computer.
Another aspect of the technology is an apparatus with a USB intermediate device. The USB intermediate device includes an upstream USB 3 port adapted to electrically connect with a USB 3 host controller of a host computer, the upstream USB 3 port having a USB 3 maximum data rate; multiple downstream USB 2 ports adapted to electrically connect with multiple USB 2 peripherals; and control circuitry that modifies apportionment of the USB 3 maximum data rate among the multiple downstream USB 2 ports, such that the multiple downstream USB 2 ports communicate at a collective data rate exceeding a USB 2 maximum data rate of USB High Speed. Other aspects are corresponding methods, computer readable media storing the translation instructions, and a system also including the host computer.
The present technology has enhancements to the USB (Universal Serial Bus) standards. Incorporated by reference herein are the USB 2 and 3 Specifications, including Universal Serial Bus 3.0 Specification, Revision 1.0, Nov. 12, 2008, and Universal Serial Bus Specification, Revision 2.0, Apr. 27, 2000, available at http://www.usb.org.
As described by the USB specifications, the various USB bus speeds are: SuperSpeed at 5 Gbps, High Speed at 480 Mbps, Full Speed at 12 Mbps, and Low Speed at 1.5 Mbps.
The USB intermediate device can use various types of processor model (e.g. ARM7 or ARM9 processor), bus architecture (e.g. AMBA 2 or AMBA 3 bus), clock speeds, memory sizes (e.g. ROM and RAM sizes), DMA controller type (e.g. register based or scatter/gather), and software interface (e.g. hardware register and Interrupt definition).
On the System Host side, there are four hardware and software layers:
These four Host System layers are used in the standard USB communications. In most USB applications, there is no need to modify these layers in the Host System to support the masquerade mode. However, if the USB Client Software checks for the USB connection speed and can only run at USB 2 connection speed, it may be necessary to add a simple filter driver between USB Client Software and USB System Software. The filter driver essentially hard codes the USB connection speed to USB 2. As a result, the USB Client Software can still work with a USB 3 device.
This optional filter driver can be inserted before or after the USB 3 driver in the host operating system. The main purpose of this filter is to de-masquerade the devices in case the client drivers can only work with USB 2 devices.
The USB 2.0 Specification has discussion about the system generally at Chapters 10.3, 10.4, 10.5, and 10.6.
In some operating systems, it is straightforward to masquerade multiple USB 2 mass storage devices as USB 3 mass storage devices, because no additional software driver is needed.
A USB 2 device is “masqueraded” as a USB 3 device to take advantage of the higher bandwidth in SuperSpeed buses.
In a docking station application, it is efficient to use masquerade mode to support multiple fixed USB 2 devices inside the docking station.
The virtual USB 3 hub layer manages the USB 3 connection between the USB intermediate device and the external USB 3 host, and allows the intermediate device to support multiple USB 3/USB 2 downstream devices. The virtual hub allows multiple USB 2 devices to be masqueraded. The virtual USB 3 hub layer is implemented by firmware similarly as a real USB 3 hub.
The virtual USB 3 device layer manages all the USB devices visible to the host USB client software. The virtual USB 3 device layer is implemented by firmware similarly as a real USB 3 device.
The USB 3 to USB 2 bridge layer manages the USB transfers and transactions between USB 3 protocol/link layers and USB 2 protocol/link layers. All USB 3 transfers are converted to USB 2 transfers using the transfer-level and transaction-level translation schemes described in connection with
The USB Event Handler manages the USB events in the virtual USB 3 hub and the USB events in USB 2 hosts. USB Event Handler is described in connection with Tables 2 and 3 below.
The USB Control Transfer Handler manages the USB Control transfers issued by the System Host. The USB Control Transfer Handler is described in connection with Table 1 below and
The USB Bulk Transfer Handler manages the USB Bulk transfers issued by the System Host. The USB Bulk Transfer Handler is described in connection with
The USB Interrupt Transaction Handler manages the USB Interrupt transfers issued by System Host. The USB Interrupt Transaction Handler is described in connection with
USB Isochronous Transaction Handler manages the USB Isochronous transfers issued by the System Host. The USB Isochronous Transaction Handler is described in connection with
The preceding five logic blocks take care of the masquerade logic and the flow control logic. The masquerade logic is responsible for handling all upstream and downstream USB descriptors and end point configurations. It reports the downstream USB 2 devices as USB 3 devices. The flow control makes sure there is no underflow and overflow condition on both USB SuperSpeed and USB 2 sides. It maintains a local FIFO buffer to handle the incoming and outgoing transactions.
In addition, a USB 2 polling block, incorporated within each downstream USB 2.0 port, checks the status of USB 2 devices even in power saving states.
A direct translation from USB SuperSpeed transactions to USB 2 transactions cannot work reliably because:
The USB 2 host layer manages the USB 2 connection between the USB intermediate device and the external USB 2 devices. The USB 2 host layer is implemented by firmware similarly as a real USB 2 host.
Accordingly, the firmware manages resources and state variables in all real and virtual USB hosts, devices, and hubs. For example in
Additionally, the firmware and hardware manage the data buffer used in transfer-level translation and transaction-level translation described in connection with
The virtual USB 3.0 hub corresponds to a real USB 3.0 hub and is described in the USB 3.0 Specification at Chapter 10 and the USB 2.0 Specification at Chapter 11.
The virtual USB 3.0 device corresponds to a real USB 3.0 device and is described in the USB 3.0 Specification at Chapter 9 and the USB 2.0 Specification at Chapter 9.
The USB 2.0 host layer is described in the USB 2.0 Specification at Chapter 10.2 and Chapter 11.5.
From the System Host's perspectives,
Enumeration, Initialization, and Configuration
The following discusses the USB Control Transfer Handler.
Each USB device is required to implement the default control pipe, which provides access to the USB device's configuration, status and control information. Using Control transfers to the default control pipe, the client software can issue requests to access the USB device's configuration, status and control information.
Generally speaking, Control transfers can be issued to the default control pipe as well as non-default control pipes. For non-default control pipes, the corresponding USB 2 host can simply issue the same Control transfers to the USB 2 device using the transfer-level translation scheme described in connection with
The following table describes how to process the default control pipe control requests received by the virtual USB 3 device. For instance, if the virtual USB 3 device receives a SET_FEATURE (ENDPOINT_HALT) request, the corresponding USB 2 host should issue the same request using the transfer-level translation scheme described in connection with
TABLE 1: USB 2 host reaction responding to client software requests to corresponding USB 3 device.
Data Translation
The following discussion is about transfer-level and transaction-level translation. In USB terminology, a USB transfer consists of one or more bus transactions moving information between a software client and its USB function. There are four standard USB transfer types: Control, Bulk, Interrupt and Isochronous transfers.
For Control and Bulk transfers, the USB 3 to USB 2 Bridge handles one transfer at a time, meaning that the bridge state machine may have to manage multiple transactions. For Interrupt and Isochronous transfers, the USB 3 to USB 2 Bridge handles one transaction at a time, meaning that the bridge state machine only needs to manage one transaction.
The conversion from USB 3 transfers to USB 2 transfers is called transfer-level translation and the conversion from USB 3 transactions to USB 2 transactions is called transaction-level translation. The transfer-level translation scheme is used for Control and Bulk transfers, and the transaction-level translation scheme is used for Interrupt and Isochronous transfers.
Although USB 3 is architected to re-use USB 2 protocol and software model, there are key differences which make it challenging to convert USB 3 transfers to USB 2 transfers. One key difference between the two standards is in the area of flow control. USB 3 uses a more sophisticated and efficient flow control scheme in order to achieve higher bandwidth. In addition, the USB 3 protocol level transaction packets (ACK, NRDY, ERDY) also provide more efficient handshaking between host and device. The USB 3 link level flow control is described in Section 7 of the USB 3 specification. The USB 3 protocol level transaction packets are described in Section 8 of the USB 3 specification. In many embodiments, the USB link and protocol layer control is expected to be handled by the third-party USB 2 and USB 3 controllers. However, the data transfer and buffering is handled by the USB intermediate device's DMA controller with firmware assistance and control.
All USB 3 Bulk transfers are converted to USB 2 Bulk transfers using the transfer-level translation described in connection with
All USB 3 Interrupt transactions are converted to USB 2 Interrupt transactions using the transaction-level translation scheme described in connection with
All USB 3 Isochronous transactions are converted to USB 2 Isochronous transactions using the transaction-level translation scheme described in connection with
USB Event Handling
The USB event handler manages the USB events occurring in the virtual USB 3 hub and the USB events occurring in the USB 2 hosts. Most importantly, the USB event handler manages the virtual connection and disconnection of the virtual USB 3 devices.
The following table shows the corresponding USB 2 host reaction when a USB event occurs in the virtual USB 3 hub
The following table shows the corresponding virtual USB 3 hub reaction when a USB event occurs in the USB 2 host.
Based on the size of the internal FIFO, multiple transactions on the USB 3 side can be outstanding and can be temporarily stored in the USB intermediate device.
Computer system 210 typically includes a processor subsystem 214 which communicates with a number of peripheral devices via bus subsystem 212. These peripheral devices may include a storage subsystem 224, comprising a memory subsystem 226 and a file storage subsystem 228, user interface input devices 222, user interface output devices 220, and a network interface subsystem 216. The input and output devices allow user interaction with computer system 210. Network interface subsystem 216 provides an interface to outside networks, including an interface to communication network 218, and is coupled via communication network 218 to corresponding interface devices in other computer systems. Communication network 218 may comprise many interconnected computer systems and communication links. These communication links may be wireline links, optical links, wireless links, or any other mechanisms for communication of information. While in one embodiment, communication network 218 is the Internet, in other embodiments, communication network 218 may be any suitable computer network.
The physical hardware component of network interfaces are sometimes referred to as network interface cards (NICs), although they need not be in the form of cards: for instance they could be in the form of integrated circuits (ICs) and connectors fitted directly onto a motherboard, or in the form of macrocells fabricated on a single integrated circuit chip with other components of the computer system.
User interface input devices 222 may include a keyboard, pointing devices such as a mouse, trackball, touchpad, or graphics tablet, a scanner, a touch screen incorporated into the display, audio input devices such as voice recognition systems, microphones, and other types of input devices. In general, use of the term “input device” is intended to include all possible types of devices and ways to input information into computer system 210 or onto computer network 218.
User interface output devices 220 may include a display subsystem, a printer, a fax machine, or non visual displays such as audio output devices. The display subsystem may include a cathode ray tube (CRT), a flat panel device such as a liquid crystal display (LCD), a projection device, or some other mechanism for creating a visible image. The display subsystem may also provide non visual display such as via audio output devices. In general, use of the term “output device” is intended to include all possible types of devices and ways to output information from computer system 210 to the user or to another machine or computer system.
USB device subsystem 221 connects to a USB intermediate device as described herein.
Storage subsystem 224 stores the basic programming and data constructs that provide the functionality of certain aspects of the present invention. These software modules are generally executed by processor subsystem 214. The data constructs stored in the storage subsystem 224 also can include any technology files, and other databases. Note that in some embodiments, one or more of these can be stored elsewhere but accessibly to the computer system 210, for example via the communication network 218 or USB devices 221.
Memory subsystem 226 typically includes a number of memories including a main random access memory (RAM) 230 for storage of instructions and data during program execution and a read only memory (ROM) 232 in which fixed instructions are stored. File storage subsystem 228 provides persistent storage for program and data files, and may include a hard disk drive, a floppy disk drive along with associated removable media, a CD ROM drive, an optical drive, or removable media cartridges. The translation and apportionment programs 280 implementing the functionality of certain embodiments of the invention may have been provided on a computer readable medium including transitory media, and nontransitory media 240 such as one or more CD-ROMs (or may have been communicated to the computer system 210 via the communication network 218), and may be stored by file storage subsystem 228. The host memory 226 contains, among other things, computer instructions which, when executed by the processor subsystem 210, cause the computer system to operate or perform functions as described herein. As used herein, processes and software that are said to run in or on “the host” or “the computer”, execute on the processor subsystem 214 in response to computer instructions and data in the host memory subsystem 226 including any other local or remote storage for such instructions and data.
Bus subsystem 212 provides a mechanism for letting the various components and subsystems of computer system 210 communicate with each other as intended. Although bus subsystem 212 is shown schematically as a single bus, alternative embodiments of the bus subsystem may use multiple busses.
Computer system 210 itself can be of varying types including a personal computer, a portable computer, a workstation, a computer terminal, a network computer, a television, a mainframe, or any other data processing system or user device. Due to the ever changing nature of computers and networks, the description of computer system 210 depicted in
Bandwidth Apportionment
Both the USB intermediate device and the USB host controller can affect the device bandwidths. In many embodiments, the USB intermediate device is not a network device that distributes bandwidth “evenly” among multiple downstream ports. Although the bandwidth distribution task is performed mainly by the USB host controller in the host computer, the USB intermediate device also can affect the bandwidth distribution task.
The USB intermediate device arbitrates the upstream traffic—data traffic from multiple devices to host. Generally, “many to one” requires arbitration. The USB intermediate device may adopt different arbitration policies, such as fixed priority or round robin to control the upstream traffic. For such upstream data flow, the USB intermediate device can prioritize a device over another device, because all these devices are sharing the same upstream port. Thus, the USB intermediate device can affect the apportionment.
The USB intermediate device does not need to arbitrate the downstream traffic—data traffic from the host to multiple devices. Generally, “one to many” does not require arbitration. Unlike the USB intermediate device, the USB host controller controls the downstream traffic. For such downstream data flow, the USB intermediate device performs the appropriate transaction but does not affect the bandwidth distribution.
However, in either the upstream or downstream cases, bandwidth may need to be selectively apportioned, if the aggregate bandwidth requirement of the multiple devices exceeds the bandwidth of the host.
The following discussion provides examples of apportioning the USB 3 maximum data rate among multiple downstream USB ports.
In the first case, available upstream bandwidth exceeds or equals the total downstream bandwidth requirements. For example, 4 downstream USB 2 devices are downstream of 1 USB 3 SuperSpeed port.
In this example, a distribution policy is not very important. The device bandwidths are not seriously affected by the distribution policy because the bandwidths are essentially “optimized”.
In the second case, upstream bandwidth is less than the total downstream bandwidth requirements. For example, 10 USB 3 SuperSpeed devices and 10 downstream USB 2 devices are downstream of 1 USB 3 SuperSpeed port.
In this example, the distribution policy affects available bandwidth of each device.
One distribution policy is a fixed policy, such as prioritizing USB 2 devices over USB 3 SuperSpeed devices. In such a policy, the USB 3 SuperSpeed devices share bandwidth which is left over after meeting the bandwidth requirements of the USB 2 devices.
Another distribution policy is a round robin policy, in which the devices taken turns.
Yet another distribution policy is a combination of a fixed policy and a round robin policy. For example, the USB 2 devices are prioritized over USB 3 SuperSpeed devices, and the USB 3 SuperSpeed devices take turns in priority.
Such distribution policies can be enforced by an arbiter inside the USB intermediate device. The arbiter arbitrates among multiple bandwidth requests that arrive. When multiple downstream transactions arrive at same time, one at a time goes through the upstream port. Such distribution policies can be enforced by the host controller as well, to prefer one stream over another.
While the present invention is disclosed by reference to the preferred embodiments and examples detailed above, it is to be understood that these examples are intended in an illustrative rather than in a limiting sense. It is contemplated that modifications and combinations will readily occur to those skilled in the art, which modifications and combinations will be within the spirit of the invention and the scope of the following claims.
The application claims the benefit of U.S. Provisional Application 61/228,581 filed 26 Jul. 2009, which are incorporated by reference herein.
Number | Date | Country | |
---|---|---|---|
61228581 | Jul 2009 | US |