The present disclosure relates to universal serial bus technology, in particular to a bandwidth reservation under universal serial bus (“USB”) version 2.0.
In a specific Automotive USB communication requirement there is a need to reserve or prioritize bandwidth. Since the USB hub is a pass-through medium at the USB protocol layer, reservation or prioritization of bandwidth cannot be done for a particular device connected to one of the HUB ports.
For example, some USB devices, such as certain mobile players, mobile phones, etc., drive a proprietary specification. This proprietary specification operates the mobile player in USB host mode and the respective player has full control of USB bandwidth. Automotive original equipment manufacturer (“OEMs”), however, do not want to give up host mode, and certain USB hubs (e.g., USB hubs manufactured by Applicant) solve the problem by providing host bridging. In this mode, a media player has to share bandwidth with other USB devices. USB bulk transfer type does not provide bandwidth reservation.
Systems and methods for reserving bandwidth in a USB hub are disclosed. The systems and methods may include receiving data from at least one downstream endpoint in a buffer, identifying a current capacity of the buffer, comparing the current capacity of the buffer to a buffer threshold, generating an output based at least on the comparison, based at least on the output, dynamically throttling at least one low-throughput endpoint, and allocating a predefined bandwidth to a USB device that has a predetermined bandwidth requirement by providing bandwidth to the USB device available from the throttle of the at least one low-throughput endpoints.
In various embodiments, the systems and methods may include a USB hub. The USB hub may include at least one upstream port and a plurality of downstream ports, wherein a downstream port can be connected to a USB device that may operate as a USB host, wherein the USB device has a predetermined bandwidth requirement and wherein the USB hub is configured to allocate a predefined bandwidth to said USB device by adaptive throttling of low throughput endpoints.
In some embodiments, the USB hub may include a USB host scheduler which allocates fare share bandwidth for all active bulk endpoints in a round robin fashion. In such embodiments, slower endpoints are pushed to a delayed schedule. In some embodiments, the USB hub may be configured to adaptively throttle low-throughput endpoints by generating a NAK signal for each of the low-throughput endpoints during at least one microframe. In such embodiments, the USB hub may be configured to allocate the predefined bandwidth to said USB device by allocating a remainder of the at least one microframe recovered from the low-throughput endpoints. Also in such embodiments, the USB hub may be configured to adaptively throttle low-throughput endpoints by draining at least one packet from the low-throughput endpoints and responding with a NAK signal.
In some embodiments, the predefined bandwidth is at least 100 mbps. In some embodiments, the USB hub may be configured to adaptively throttle low-throughput endpoints by adding repeater path delay to downstream ports. In some embodiments, the USB hub may be configured to adaptively throttle low-throughput endpoints by compensating packet parse time. In some embodiments, the USB hub may also include a mode selection module operable to choose between a standard hub operation mode and a traffic shaping mode.
In various embodiments, the systems and methods may also include a USB hub including a configuration register and a comparator. The configuration register may include a buffer operable to receive data from at least one downstream endpoint receiving data in a buffer from at least one downstream endpoint operating in a host mode and communicate data to at least one upstream endpoint, and circuitry communicatively coupled to the buffer operable to identify a current capacity of the buffer. The comparator may be operable to compare the current capacity of the buffer to a buffer threshold and output a signal communicatively coupled to a throttle module operable to provide a throttle to at least one low-throughput endpoint. The USB hub may be configured to allocate a predefined bandwidth to a USB device that has a predetermined bandwidth requirement by providing bandwidth to the USB device available from the throttle of the at least one low-throughput endpoints.
In some embodiments, the USB hub may include a USB host scheduler which allocates fare share bandwidth for all active bulk endpoints in a round robin fashion. In such embodiments, slower endpoints are pushed to a delayed schedule. In some embodiments, the USB hub may be configured to adaptively throttle low-throughput endpoints by generating a NAK signal for each of the low-throughput endpoints during at least one microframe. In such embodiments, the USB hub may be configured to allocate the predefined bandwidth to said USB device by allocating a remainder of the at least one microframe recovered from the low-throughput endpoints. Also in such embodiments, the USB hub may be configured to adaptively throttle low-throughput endpoints by draining at least one packet from the low-throughput endpoints and responding with a NAK signal.
In some embodiments, the predefined bandwidth is at least 100 mbps. In some embodiments, the USB hub may be configured to adaptively throttle low-throughput endpoints by adding repeater path delay to downstream ports. In some embodiments, the USB hub may be configured to adaptively throttle low-throughput endpoints by compensating packet parse time. In some embodiments, the USB hub may also include a mode selection module operable to choose between a standard hub operation mode and a traffic shaping mode.
In various embodiments, a method for reserving bandwidth in a USB hub is also disclosed. The method may include receiving data in a buffer from at least one downstream endpoint operating in a host mode, identifying a current capacity of the buffer, comparing the current capacity of the buffer to a buffer threshold, generating an output based at least on the comparison, based at least on the output, dynamically throttling at least one low-throughput endpoint, and allocating a predefined bandwidth to a USB device that has a predetermined bandwidth requirement by providing bandwidth to the USB device available from the throttle of the at least one low-throughput endpoints.
As integration of electronics into automotive applications increases, more and more is demanded of the ability of those automotive applications to accommodate the needs of the associated electronics. However, in certain automotive applications, there is insufficient flexibility for such accommodation. For example, in a specific automotive USB communication requirement there is a need to reserve or prioritize bandwidth. However, since the traditional USB hub is a pass-through medium at the USB protocol layer, reservation or prioritization of bandwidth cannot be done for a particular device connected to one of these traditional HUB ports.
This may become an issue in an automotive context if, for example, a media player demands a certain amount of bandwidth for proper operation. For example, certain USB hubs provided by Omega Computer require one hundred mbps bandwidth for proper operation. Thus, there is a need for a mechanism to reserve USB bandwidth in the automotive USB host to meet the bandwidth requirement. To determine which traffic should be forwarded or throttled, the hub must examine the incoming packets. With existing hubs, by the time the packet is decoded and parsed it is already too late to decide.
According to various embodiments of the present disclosure, systems and methods for redistributing the bandwidth allocated by the USB host at the HUB node are provided. According to various embodiments of the present disclosure, a USB Host Scheduler implements a round robin fare share bandwidth allocation for all active bulk endpoints. The Host Scheduler implements adaptive throttling of low throughput endpoints. Slower endpoints are pushed to a delayed schedule. The Hub may implement adaptive throttling of USB ports that do not require the bandwidth. A traffic shaping algorithm may modify the host schedule to prioritize the traffic of the device requiring the dedicated bandwidth. Furthermore, repeater traffic may be delayed while the hub makes decision to forward or throttle.
Thus, example topology 100 illustrates first USB hub and second USB hub 106 communicatively coupled to one another. Each USB hub, in turn, has one or more USB devices communicatively coupled to it. For example, first USB hub 104 may have a first USB device 108 and a second USB device 110 communicatively coupled to ports of first USB hub 104. Second USB hub 106 may likewise have a third USB device 112 communicatively coupled to a port of second USB hub 106. In some embodiments, USB devices 108, 110, 112 may be any appropriate electronic device operable to communicate with a USB hub via the USB 2.0 (or compatible) serial communication protocol. For example, USB device 108, 110, 112 may be a tablet computer, smart phone, memory card, GPS device, etc. Although a certain number of USB hubs 104, 106 and USB devices 108, 110, 112 are illustrated in
In some embodiments, microframe 200 may include a plurality of transaction allocations 202-220. In some embodiments, a “transaction” may include the command, data, and response phases and associated timing for a USB transmission packet. In some embodiments, the amount of bandwidth within microframe 200 for each transaction allocation 202-220 may be approximately 5,000 USB bit times (approximately 10 μs). In some embodiments, microframe 200 may include approximately ten such packet transaction allocations 202-220, although more or fewer may be present within any given configuration without departing from the scope of the present disclosure.
In some embodiments, the number of transaction allocations 202-220 associated with a particular endpoint depends on the number of endpoints requesting use of the bus at any given time. For example, in the example microframe 200 of
In some embodiments, each transaction may include sending one or more signals to the USB hub. These signals are represented in example microframe 200 at 222. These signals may include a packet identifier (“PID”), an address identifier (“ADDR”), data (“DATA”), cyclic redundancy checks (“CRC”), etc.
In some embodiments, microframe 300 may include a plurality of transaction allocations 302-320, 324-328. In some embodiments, a “transaction” may include the command, data, and response phases and associated timing for a USB transmission packet. In some embodiments, the amount of bandwidth within microframe 300 for each transaction allocation 302-320, 324-328 may be variable, depending on whether the associated transaction has been throttled, as described in more detail below with reference to
In the example microframe 300 of
Referring again to
In some embodiments, the NAK packet transaction may be completed in a much-reduced bit time allocation. For example, the transaction may be completed in approximately seven hundred eighty-three bit times. By giving these reduced transaction allocations to other endpoints, the designated high-speed endpoint may be able to accumulate more of the available bandwidth. For example, by reducing the size of the other transaction allocations, EP1 may be able to instigate further transactions (e.g., transaction allocations 320, 324, 326, 328). Thus, within example microframe 300, EP1 may have associated therewith seven transaction allocations rather than three (e.g., transaction allocations 302, 310, 318, 320, 324, 326, 328). The maximum under the USB 2.0 (or compatible) standard may be six to eight transactions per microframe. This would provide a range of between approximately 200 and 256 mbps. This would provide a sufficient amount of dedicated bandwidth for the example described in more detail above that requires 100 mbps.
In some embodiments, each transaction may include sending one or more signals to the USB hub. These signals are represented in example microframe 300 at 322. These signals may include a packet identifier (“PID”), an address identifier (“ADDR”), data (“DATA”), cyclic redundancy checks (“CRC”), NAK, etc.
In some embodiments, buffer 402 may be operable to generate a signal associated with the current degree of data capacity of the buffer (the “buffer level”). For example, buffer 402 may be operable to generate a signal containing a binary value indicative of a percentage of the buffer that is full, the amount of data that is within the buffer, etc. This signal may be communicated to an input of latch 404. In some embodiments, the buffer level may be sampled periodically. For example, the buffer level may be sampled at the start of frame (“SOF”) for every endpoint requesting access to the hub. The sampling point may, in some embodiments, be associated with signal 408 communicatively coupled to latch 404, thus providing the sampled value to an output of latch 404.
In some embodiments, the output of latch 404 may be communicatively coupled to an input of comparator 406. A second input of comparator 406 may, in some embodiments, be a signal associated with a buffer threshold 410. Buffer threshold 410 may, in some embodiments, be a programmable and/or adjustable threshold value that triggers the throttling of certain packets through the hub. For example, buffer threshold 410 may be a signal containing a binary value indicative of a threshold for percentage of the buffer that is full, a threshold for the amount of data that is within the buffer, etc. For example, buffer threshold may be a signal associated with a programmed value of 25% of the buffer's capacity.
In some embodiments, comparator 406 compares the output of the sampled buffer level and buffer threshold 410. In a first result of this comparison, comparator 406 outputs a first state, and in a second result, a second state. For example, if the current sampled buffer level is higher than buffer threshold 410, an output of comparator 406 may be a logic high, while if the current sampled buffer level is lower than buffer threshold 410, an output of comparator 406 may be a logic low. In some embodiments, the output of comparator 406 may be communicatively coupled to other circuitry of the hub that indicates that the “NAK” signal should be asserted for identified USB hubs. These identified USB hubs may be identified previously (e.g., “all USB devices that are not the particular USB device requiring dedicated bandwidth”).
The various components 510, 512, 514, 516, 518 are generally known to one of ordinary skill in the art. However, in various embodiments, example USB hub may also include configuration register 520 and throttle 522. The combination of these two components may be generally equated with the components of
In various embodiments of the present disclosure, both hub and downstream ports will always be high speed. Up and downstream traffic may be using a high-speed repeater path. When this is the case, throttle 522 may set up and tear down connectivity on packet boundaries in both up and down directions. Throttle 522 may also re-clock the packets in both directions. Throttle 522 may also recover serial data from the received stream and transmits it using its own local clock. The USB 2.0 (and compatible) specification allows a maximum delay of thirty-six high-speed bit times through repeater path.
In some embodiments, throttle 522 may add repeater path delay to downstream ports, and compensate packet parse time. All non-bandwidth-demanding IN/OUT/PING tokens may be routed to a virtual device on assertion of signal 412 (e.g., assert nak). The virtual device may then drain the packet and respond with NAK. Throttle 522 may include a mode to select between “standard” HUB vs the “traffic shaping” features described in more detail above and with reference to
Various embodiments of the present disclosure have illustrated systems and methods for USB bandwidth reservation. This may allow, for example, a particular USB device to demand dedicated bandwidth in order to function properly. This may allow for increased flexibility in the USB standard in certain contexts (e.g., automotive applications).
This application claims priority to commonly owned U.S. Provisional Patent Application No. 62/195,557 filed Jul. 22, 2015, which is hereby incorporated by reference herein for all purposes.
Number | Date | Country | |
---|---|---|---|
62195557 | Jul 2015 | US |