Technical Field
The present disclosure relates to an electronic device. More particularly; the present disclosure relates to a universal serial bus (USB) switch and a control method thereof.
Description of Related Art
A Universal Serial Bus (USB) has become a main specification for data transmission. For example, there are more and more kinds of computer peripheral devices, which include, for example, external hard drives, printers, mice, keyboards and so on, using a USB connector to connect with a computer. However, as the number of the computer peripheral devices using the USB connector is increased, the USB ports provided on the host may no longer be sufficient in number.
To solve the problem of insufficient USB ports, a USB hub is developed. The USB hub is a device that expands a single USB port into several ports so that there are more ports available to connect various computer peripheral devices to a host device.
In some aspects, the disclosure provides a universal serial bus (USB) switch. The USB switch includes an upstream port, first downstream ports, M second downstream ports, and a switch engine. The upstream port is configured′ to have a first bandwidth. Each of the first downstream ports is configured to have a second bandwidth. Each of the M second downstream ports is configured to have a third bandwidth, and M is an integer, and M=0−N, where N is a positive integer greater than or equal to 1. The switch engine is configured to route a plurality of signals between the upstream port and the totality of first downstream ports, and alternatively to route the signals between the upstream port and one of the M second downstream ports. The third bandwidth is greater than the second bandwidth, and the first bandwidth is a multiple of the second bandwidth.
In some aspects, the disclosure provides a USB switch. The USB switch includes an upstream port, first downstream ports, second downstream ports, and a switch engine. The upstream port is configured to communicate with a host device without USB 2.0 connectivity. The first downstream ports are configured to communicate with a plurality of USB 2.0 devices. The second downstream ports are configured to communicate with a plurality of USB 3.0 devices. The switch engine is configured to route a plurality of signals between the upstream port and the totality of first downstream ports, and alternatively to route the signals between the upstream port and one of the second downstream ports. The switch engine is further configured to transmit data from the USB 2.0 devices according to a plurality of types of data traffic.
In some aspects, the disclosure provides a control method. The control method includes following operations: sorting and storing, according to types of data traffic, data of USB 2.0 devices, to a first buffer as first data; and transferring, based on the types of the data traffic, one of first data and second data of USB 3.0 devices to a USB host device through an upstream port.
These and other features, aspects, and advantages of the present disclosure will become better understood with reference to the following description and appended claims.
It is to be understood that both the foregoing general description and the following detailed description are by examples, and are intended to provide further explanation of the disclosure as claimed.
The disclosure can be more fully understood by reading the following detailed description of the embodiment, with reference made to the accompanying drawings as follows:
Reference will now be made in detail to the present embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
In this document, the term “coupled” may also be termed as “electrically coupled”, and the term “connected” may be termed as “electrically connected”. “Coupled” and “connected” may also be used to indicate that two or more elements cooperate or interact with each other.
It will be understood that, although the terms “first,” “second,” etc., may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used to distinguish one element from another. For example a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the embodiments. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed items.
In some aspects, the present disclosure provides a novel universal serial bus (USB) switch to provide the functionality of a hub but with a novel approach and unique features.
Reference is now made to
As illustratively shown in
In some embodiments, each of the downstream ports 120 is configured to have a first bandwidth, each of the downstream ports 130 is configured to have a second bandwidth, and the second bandwidth is greater than the first bandwidth. In some embodiments, the downstream ports 120 are USB 2.0 downstream ports. In some embodiments, the downstream ports 120 are configured to communicate with USB 2.0 devices (not shown).
In some embodiments, the downstream ports 130 are USB 3.0 downstream ports. In some embodiments, the downstream ports 130 are configured to communicate with USB 3.0 devices (not shown).
In some embodiments, the upstream port 140 is coupled to a USB HOST device (not shown), which includes, for example, a personal computer via a SuperSpeed-only connection. For example, in some embodiments, the upstream port 140 is a SuperSpeed USB 3.x upstream port (without USB 2.0 connectivity). In other words, in some embodiments, the upstream port 140 is configured to communicate with the USB HOST device at a speed rate that is at least equal to about five gigabit per second (Gbps). In some embodiments, the term “USB 3.x” indicates USB 3.0, USB 3.1, and/or any later version of the USB standard, and the term “SuperSpeed” indicates any of Gen1, Gen2, or such future standards as may be later defined.
In some embodiments, the upstream port 140 is configured to have a bandwidth that is a multiple of the bandwidth of the downstream port 120. For example, in some embodiments, the bandwidth of the upstream port 140 is at least twice as large as the bandwidth of the downstream port 120. In some embodiments, the number of the downstream ports 120 is not greater than or equal to a predetermined number (e.g., 10) on condition that the upstream port 140 is a USB 3.0 upstream port, and the downstream ports 120 are USB 2.0 downstream ports.
As illustratively shown in
In some approaches, a USB hub is designed to have an individual USB 2.0 module and an individual USB 3.0 module. The individual USB 2.0 module includes USB 2.0 downstream ports and a USB 2.0 upstream port that are configured to transfer signals between the USB host device and the USB 2.0 downstream ports. The individual USB 3.0 module includes USB 3.0 downstream ports and a USB 3.0 upstream port that are configured to transfer signals between the USB host device and the USB 3.0 downstream ports.
Compared with the approaches above, with the arrangement of the switch engine 110, the USB 3.0 devices which are connected to the downstream ports 130, and the USB 2.0 devices which are connected to the downstream ports 120, are able to transmit data and/or signals to the USB host device through a single SuperSpeed USB 3.x upstream port 140. Effectively, a bandwidth of the upstream port 140 is shared by the downstream ports 120 and the downstream ports 130. Accordingly, compared with such approaches, the connectivity of the upstream port 140 is able to be simplified.
In some embodiments, the bandwidth of the upstream port 140 is configured to be greater than a total bandwidth of all downstream ports 120. With such a configuration, the USB 2.0 devices that are connected to the downstream ports 120 are able to operate with a full bandwidth. In other words, the bandwidths of the downstream ports 120 are able to be aggregated onto the bandwidth of the single one upstream port 140 without limiting the bandwidth of the USB 2.0 devices. As a result, the transfer efficiency of the USB switch 100 is improved.
Reference is now made to
As illustratively shown in
The switching unit 220 is coupled to the root port controller 230. The root port controller 230 is coupled between the switching unit 220 and the downstream ports 120. The switching unit 220 is configured to transfer signals and/or data between the downstream ports 120 to the upstream port 140. The root port controller 230 is configured to operate as a root hub for the downstream ports 120. In some embodiments, the switching unit 220 is configured to cooperate with the root port controller 230, in order to transfer data and/or signals from all of devices coupled to the downstream ports 120. In some embodiments, the switching unit 220 is configured to cooperate with the root port controller 230, in order to aggregate the total downstream ports 120 as if it were another instance of a downstream port 130. Effectively, the fan-out of an additional USB root port associated with USB 2.0 downstream ports (i.e., downstream ports 120) is generated.
In some embodiments, data from the USB 2.0 devices (not shown), which are connected to the downstream ports 120, are dispatched, by the switching unit 220, to the upstream port 140 according to types of data traffic. The detailed descriptions regarding the operations of the switching unit 220 are provided with reference to
The number of the downstream ports 120 and that of the downstream ports 130 in
Reference is now made to
As illustratively shown in
The transfer port controller 310 is coupled between the traffic scheduler 330 and the hub unit 210 in
The traffic scheduler 330 is configured to determine which data or signal transaction requests to process. In some embodiments, the traffic scheduler 330 is configured to perform a scheduling algorithm to manage the sequence of pending tasks of data transfer between the USB host device and the USB 2.0 devices. In some embodiments, the scheduling algorithm is performed to maintain a predetermined bandwidth per interval. In some embodiments, operations of the scheduling algorithm are associated with requirements of the specification of an extensible host controller interface (xHCI).
In some embodiments, the traffic scheduler 330 is configured to schedule data transfers to USB 2.0 devices based on traffic type with the most time-critical traffic going first. For example, various types of the traffic include a bulk traffic, an isochronous traffic, and an interrupt traffic, in which isochronous traffic and interrupt traffic are scheduled before bulk traffic.
In some embodiments, the traffic scheduler 330 is configured to assure that multiple isochronous streams, which are transferred between the downstream ports 120 and the upstream port 140, are scheduled in the appropriate intervals according to the defined properties of each isochronous stream. In some embodiments, the traffic scheduler 330 may take advantage of transfer control information and/or actual transfer data that has been stored in a local shared buffer (e.g., the shared buffer 360) to improve performance. An example of this is caching of a portion of the transfer rings. This prevents multiple short fetches for this data and also decreases the latency, especially important for isochronous data.
In some embodiments, the traffic scheduler 330 is configured to utilize different upstream transfer types to ensure status information about transfers that are time-critical are delivered with a low and consistent latency. For example, transfer completion events or other control information is sent via interrupt transfer types. Compared to using bulk transfers, latency is reduced and the variability of performance as a factor of system loading is also reduced.
In some embodiments, the traffic scheduler 330 is configured to combine transfer data and status information from multiple USB 2.0 devices, which are coupled to the downstream ports 120, into larger upstream transfers. As a result, timely data delivery is allowed and overhead is reduced to improve the performance.
In some embodiments, the traffic scheduler 330 is configured to transfer data from multiple USB 2.0 devices, which are coupled to the downstream ports 120, even if the entire transfer from the multiple USB 2.0 devices is not complete. With such configuration, the amount of data that is delayed is reduced. As a result, the storage in local memory is freed up, and the performance is further improved.
The DMA unit 340 is coupled to the root port controller 230. The DMA unit 340 is configured to transfer data and/or signals between upstream port 140 and the downstream ports 120, and to transfer payload data between a host bus (not shown) and the root port controller 230. The traffic dispatcher 350 is coupled between the traffic type buffers 320 and the DMA unit 340. The traffic dispatcher 350 is configured to dispatch the data from the USB 2.0 device, communicated with the downstream ports 120, to the traffic type buffers 320. In some embodiments, the traffic dispatcher 350 is configured to sort and store, according to the types of the traffic, data from the USB 2.0 devices (not shown) communicated with the downstream ports 120 to the traffic type buffers 320.
The arrangements and the configurations of the switching unit 220 are given for illustrative purposes only. Various functional circuits, which are able to be applied with a USB hub/switch/device, are within the contemplated scope of the present disclosure. For example, in some other embodiments, the shared buffer 360 is replaced with individual buffers, which are associated with the USB 2.0 devices communicated with the downstream ports 120.
Reference is now made to both of
In some embodiments, the control method 400 includes operations S410, S420, and S430. In operation S410, control information of the USB 2.0 device are captured and stored in the shared buffer 360.
For illustration, a USB host controller (not shown), which is included in the host device communicated with the upstream port 140, periodically detects whether at least one USB 2.0 device is connected to the downstream ports 120. In some embodiments, such periodical detection of the USB host controller is referred to as “polling.” If a USB 2.0 device is connected to one of the downstream ports 120, the USB host controller will require control information regarding the connected USB 2.0 device. In some embodiments, the control information will include an identification (ID) of the connected USB 2.0 device, type of traffics of stored data, active status, etc. The traffic dispatcher 350 captures the control information of the connected USB 2.0 device, and then stores the same in the shared buffer 360.
With continued reference to
In some embodiments, as described above, in the operation S410, the traffic dispatcher 350 are able to receive the type of the traffic corresponding to data from the totality of downstream ports 120, according to information stored in the shared buffer 360. The traffic dispatcher 350 then sorts the data from the downstream ports 120 according to the type of the traffic. For example, the traffic dispatcher 350 is able to combine and store the data from different USB 2.0 devices communicated with the totality of downstream ports 120, which correspond to the bulk traffic, to one of the traffic type buffers 320. Similarly, the traffic dispatcher 350 is able to combine and store the data from different USB 2.0 devices communicated with the downstream ports 120, which correspond to the isochronous traffic, to another one of the traffic type buffers 320.
In some embodiments, the bulk traffics in the USB 2.0 devices are all mapped to data and/or signals corresponding to the bulk traffic stored in the shared buffer 360. The isochronous traffics in the USB 2.0 devices are all mapped to data and/or signals corresponding to the isochronous traffic stored in the shared buffer 360. Also, the interrupt traffics in the USB 2.0 devices are all mapped to data and/or signals, corresponding to the interrupt traffic, stored in the shared buffer 360. With the mapping of the types of the traffic, the data from the USB 2.0 devices are able to be combined in the traffic type buffers 320. Accordingly, it is ensured that one type of data traffic will not block one another type of data traffic. As a result, the quality of the data transmission is improved.
With continued reference to
The above description regarding the method 400 includes exemplary operations, but the operations are not necessarily performed in the order described. The order of the operations disclosed in the present disclosure are able to be changed, or the operations are able to be executed simultaneously or partially simultaneously as appropriate, in accordance with the spirit and scope of various embodiments of the present disclosure.
Reference is now made to
As described above, in some embodiments, with the arrangement of the root port controller 230 in
As shown in
Furthermore, in some embodiments, a USB switch device driver 514 is configured and corresponds to the switching unit 220 in
The additional USB driver stack 520 corresponds to the switching unit 220 in
Accordingly, with the arrangement of the USB switch 100 in
Although the present disclosure has been described in considerable detail with reference to certain embodiments thereof, other embodiments are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the embodiments contained herein.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present disclosure without departing from the scope or spirit of the disclosure. In view of the foregoing, it is intended that the present disclosure cover modifications and variations of this invention provided they fall within the scope of the following claims.
This application claims priority to U.S. Provisional Application Ser. No. 62/188,502, filed Jul. 3, 2015 is herein incorporated by reference.
Number | Date | Country | |
---|---|---|---|
62188502 | Jul 2015 | US |