USB hub internal data transmission method and USB hub chip
By inserting data bits and resynchronizing the data transmission within the USB HUB, the clock synchronization problem is solved, the wiring design is simplified, the internal delay is reduced, and the compatibility of multiple HUB cascades is improved.
Patent Information
- Application Number
- PCT/CN2024/108584
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-25
- Filing Date
- 2024-07-30
- Publication Date
- 2025-09-18
AI Technical Summary
During data transmission within existing USB HUBs, clock synchronization is difficult, resulting in large signal jitter, complex wiring, increased internal delay, and poor compatibility of multiple HUB cascades.
During the internal data transmission process of the USB HUB, data bits are inserted before the serial data valid signal is valid, and the inserted data is sent to the high-speed routing module using a selection circuit or a data bit insertion unit. Resynchronization is performed before sending to generate synchronized serial data and local clock.
It reduces high-frequency radiation, simplifies wiring design, reduces internal delay, and improves the compatibility of multiple USB HUB cascades.
Smart Images

Figure CN2024108584_18092025_PF_FP_ABST
Abstract
Description
USB HUB internal data transmission method and USB HUB chip Technical Field
[0001] The present invention relates to USB communication technology, in particular to a data transmission method of a USB HUB internal routing module and a USB HUB chip. Background Art
[0002] A USB hub is a commonly used computer peripheral device. The main functions and technical characteristics of a hub are defined in a dedicated chapter of the USB specification. The hub's upstream port (UFP) acts as a USB device and is usually connected to a computer's USB host port. The hub then extends to multiple USB downstream ports (DFPs), each of which acts as a USB host port to connect to several USB devices.
[0003] Taking the High-Speed USB HUB as an example (the SuperSpeed USB HUB is similar and includes a High-Speed HUB module), the USB specification has requirements for the internal delay of the HUB and the total delay of multiple HUB cascades. To avoid the extra waiting caused by the ordinary USB physical transceiver (PHY) converting into 8-bit or 16-bit parallel data, the HUB's dedicated USB transceiver and the high-speed routing module (the central component of the hub repeater) use serial data at a 480MHz clock for data transmission.
[0004] Refer to Figure 1 for an example of data transmission within a conventional USB hub. A USB host sends a 480Mbps high-speed data stream to the hub's upstream port. The upstream port's USB transceiver's receiver temporarily stores the data in an elasticity buffer. After a minimum of approximately 12 bits are processed according to the specification, the receiver extracts the serial data based on the 480MHz global synchronous clock (GCLK). This data is then provided to the high-speed routing module, broadcast to all enabled downstream ports, and then transmitted to each USB device via the transmitter of the downstream USB transceiver. If a USB device's address matches, it responds and sends a high-speed data stream to the connected hub's downstream port. The downstream port's USB transceiver recovers the serial data and a variable reference clock, stores the data in its elasticity buffer for approximately 12 bits, and then synchronously extracts the data to the high-speed routing module. The routing module, which includes a multiple-choice selection unit, sends the selected serial data to the hub's upstream USB transceiver for transmission to the USB host. This process completes one downstream data stream and one upstream data stream.
[0005] A typical hub has one upstream port and four downstream ports, for a total of five hub transceivers. These transceivers are typically arranged around the chip for external connectivity. Although the global clock (GCLK) and each transceiver's local clock frequency are identical, the high-speed routing module's distances from the five transceivers vary, resulting in long and varying signal traces. This leads to varying phase differences between the global clock and each transceiver's local clock. The global synchronous clock is 480MHz, while the serial data signal is no higher than 240MHz. Both are high-frequency, high-speed signals. Long traces can lead to significant jitter and a high risk of mismatch between the serial data and the global clock. This is especially true for a seven-port hub with eight internal transceivers. When processing upstream data, the high-speed routing module uses at least one-in-seven selection unit to select serial data from the seven transceivers, located at varying distances. Therefore, the selected serial data cannot be directly applied based on the global clock. Overly complex processing schemes increase internal hub latency and compromise compatibility when cascading multiple hubs.
[0006] Summary of the Invention
[0007] Purpose of the invention: In order to solve the problem of difficult clock synchronization during USB HUB internal data transmission in the prior art, the present invention provides a USB HUB internal data transmission method and a USB HUB chip.
[0008] Technical solution: A USB HUB internal data transmission method includes the following steps:
[0009] The first USB transceiver receives the target serial data and stores the target serial data in an elastic buffer;
[0010] The first USB transceiver sends the target serial data and the serial data valid signal to the high-speed routing module, and before the serial data valid signal is valid, inserts the insert data into the target serial data and sends it to the high-speed routing module, wherein the insert data includes N data bits;
[0011] The high-speed routing module receives and sends out the inserted serial data signal, wherein the inserted serial data signal includes the inserted data and the target serial data;
[0012] Resynchronize the inserted serial data signal before sending it, obtain synchronized serial data and local clock, and send it out by the second USB transceiver;
[0013] The time length of the N data bits is not less than the synchronization time required for resynchronization before sending.
[0014] Furthermore, the method of inserting the inserted data into the target serial data and sending it to the high-speed routing module is: using a selection circuit to implement, before the serial data valid signal is valid, selecting to transmit the inserted data to the high-speed routing module; when the serial data valid signal is valid, selecting to send the target serial data in the elastic buffer to the high-speed routing module.
[0015] Furthermore, the inserted data is one or more of input serial data of the elastic buffer, data of the input serial data of the elastic buffer synchronized with a global clock, and serial data generated based on a global synchronous clock.
[0016] Furthermore, in addition to sending the target serial data and the serial data valid signal to the high-speed routing module, the first USB transceiver also sends a receiving status signal to the high-speed routing module or the HUB state machine. The receiving status signal is valid earlier than the serial data valid signal, so that the inserted data portion passes through the high-speed routing module.
[0017] Furthermore, resynchronization before transmission refers to synchronizing the local clock with the inserted serial data signal, specifically using any of the following methods:
[0018] Sampling the inserted data portion of the inserted serial data signal using the local multi-phase clock, finding a local clock with a phase that best matches the inserted serial data signal based on the sampling result, using the local clock as the synchronized local clock, and maintaining phase lock during the period when the serial data valid signal is valid;
[0019] The inserted data portion of the inserted serial data signal is sampled using a higher frequency clock having a frequency at least three times that of the local clock. The frequency division is adjusted based on the sampling result to generate a local clock that closely matches the inserted serial data signal as the synchronized local clock, and the phase lock is maintained during the period when the serial data valid signal is valid.
[0020] Furthermore, resynchronization before transmission refers to synchronizing the inserted serial data signal with the local clock, specifically including: sampling the inserted data portion of the inserted serial data signal with the local multi-phase clock to form multiple sampling results with a delay relationship, selecting the delayed serial data that best matches the transmitted local clock as the synchronized serial data, and maintaining the selection lock while the serial data valid signal is valid.
[0021] A USB HUB chip, comprising:
[0022] At least a first USB transceiver and a second USB transceiver, the first USB transceiver is used to receive target serial data and store the target serial data in an elastic buffer, and send the target serial data and a serial data valid signal to the high-speed routing module;
[0023] a data bit insertion unit connected to the first USB transceiver and the high-speed routing module, configured to insert insertion data into target serial data and send the data to the high-speed routing module before a serial data valid signal sent by the first USB transceiver to the high-speed routing module becomes valid, wherein the insertion data includes N data bits, and a time length of the N data bits is not less than a synchronization time required for resynchronization before sending;
[0024] a high-speed routing module connected to the first USB transceiver and the data bit insertion unit, configured to receive and send out the inserted serial data signal, wherein the inserted serial data signal includes the inserted data and the target serial data;
[0025] The pre-sending resynchronization unit is connected to the high-speed routing module and the second USB transceiver, and is used to resynchronize the inserted serial data signal before sending, obtain synchronized serial data and local clock, and send them to the second USB transceiver.
[0026] Furthermore, the data bit insertion unit includes a two-choice selection circuit, wherein the first input end and the second input end of the selection circuit are respectively connected to the insertion data and the output end of the elastic buffer, the output end of the selection circuit is connected to the high-speed routing module, and the control end of the selection circuit is connected to the serial data valid signal output end of the first USB transceiver. Before the serial data valid signal is valid, the insertion data is selected to be transmitted to the high-speed routing module; when the serial data valid signal is valid, the target serial data in the elastic buffer is selected to be sent to the high-speed routing module.
[0027] Furthermore, the data bit insertion unit includes a two-choice selection circuit, the first input end and the second input end of the selection circuit are respectively connected to the insertion data and the output end of the elastic buffer, the output end of the selection circuit is connected to the high-speed routing module, and the control end of the selection circuit is connected to the combination control signal, which is formed by the serial data valid signal and the receiving status signal of the first USB transceiver after logical operation. When the receiving status signal is valid and the serial data valid signal is invalid, the insertion data is selected to be output to the high-speed routing module; when the receiving status signal is valid and the serial data valid signal is valid, the target serial data is selected to be output to the high-speed routing module.
[0028] Furthermore, the inserted data is one or more of input serial data of the elastic buffer, data of the input serial data of the elastic buffer synchronized with a global clock, and serial data generated based on a global synchronous clock.
[0029] Compared with the prior art, the USB HUB internal data transmission method and USB HUB chip provided by the present invention have the following beneficial effects:
[0030] Taking the high-speed HUB as an example, there is no need to transmit the 480MHz clock synchronously with the serial data, which reduces high-frequency radiation. There is no need to consider the timing mismatch between the serial data and the global clock, which reduces the difficulty of wiring and layout design. There is no need to waste effective serial data bits for clock synchronization, which reduces the internal delay of the HUB. This is conducive to long-distance routing or expanding more USB ports, and helps to improve compatibility in multiple USB HUB cascade applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] FIG1 is a flow chart of data transmission within a conventional USB HUB;
[0032] FIG2 is a flow chart of internal data transmission of a USB HUB according to the present invention. DETAILED DESCRIPTION
[0033] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.
[0034] Figure 2 shows a flow chart of internal data transmission within the USB HUB of this embodiment. Taking one upstream port and four downstream ports as an example, the USB HUB of this embodiment comprises five USB transceivers. Because each USB transceiver has the same structure, including both a receiving side and a transmitting side, only the interior of the first USB transceiver is depicted in the figure for illustration. The internal structures of the other USB transceivers are similar to those of the first. For simplicity, the figure omits non-critical and non-critical components, such as the TT and full-speed routing switch, which are not relevant to the present invention or are relatively conventional. Furthermore, the state machine has complex connections with most of the unit modules within the HUB, including the various ports, receiving side modules, transmitting side modules, and the high-speed routing module. For simplicity, these conventional connections and representations have been omitted. Serial data A represents the downstream data stream, and serial data B represents the upstream data stream.
[0035] Taking the following data stream as an example, a USB HUB internal data transmission method includes the following steps:
[0036] The first USB transceiver receives the target serial data and stores the target serial data in an elastic buffer;
[0037] The first USB transceiver sends the target serial data and the serial data valid signal to the high-speed routing module, and before the serial data valid signal is valid, inserts the insert data into the target serial data and sends it to the high-speed routing module, wherein the insert data includes N data bits;
[0038] The high-speed routing module receives and sends out the inserted serial data signal, wherein the inserted serial data signal includes the inserted data and the target serial data;
[0039] The inserted serial data signal is resynchronized before transmission. Before the serial data valid signal is valid, the clock and data are synchronized in advance using the inserted data of N data bits to avoid occupying the time after the serial data is valid. The resynchronization process before transmission synchronizes the local clock with the inserted serial data signal transmitted by the high-speed routing module and maintains the synchronization lock during the period when the serial data valid signal is valid. The synchronization lock can be released during the period when the serial data is invalid. The synchronized serial data and local clock are sent by the second USB transceiver;
[0040] The time length of the N data bits is not less than the synchronization time required for resynchronization before sending. For example, in the present embodiment, resynchronization can be completed within the time length of one data bit. N can be taken as 2, and the data inserted can be "01". Alternatively, the insertion data can be set to a longer string of data. According to the effect of inserting data, the insertion data can be sent just before the target serial data is sent, or it can be sent at intervals of several bits. That is, after the insertion data is transferred to the high-speed routing module, the target serial data begins to be sent after several data bits have passed. As long as it is ensured that the insertion data can be used for resynchronization when it is transmitted to the second USB transceiver before the target serial data is sent, the synchronization of clock and data can be completed before the target serial data is sent.
[0041] There are multiple methods for inserting the inserted data into the target serial data and sending it to the high-speed routing module before the serial data valid signal is valid. This embodiment uses a selection circuit to implement it. Before the serial data valid signal is valid, the inserted data is selected to be transmitted to the high-speed routing module. The inserted signal is ahead of the target serial data output by the elastic buffer and can be used for synchronization before transmission. When the serial data valid signal is valid, the target serial data in the elastic buffer is selected to be sent to the high-speed routing module. This is conventional serial data.
[0042] The inserted data can be one or more of the following: the elastic buffer's input serial data, the elastic buffer's input serial data synchronized with a global clock, or serial data generated based on a global synchronous clock. The serial data generated based on a global synchronous clock, for example, uses a trigger that continuously flips based on the global synchronous clock, forming synchronized serial data with alternating 0s and 1s. The content of the inserted data can vary; the important thing is that the length of the inserted data (i.e., N times the width of a single data bit) is no less than the synchronization time required by the resynchronization unit before transmission, so that data and clock synchronization can be completed before the target serial data.
[0043] In addition to sending the target serial data and the serial data valid signal to the high-speed routing module, the first USB transceiver can also send a receive status signal RXV (equivalent to a Squelch signal) to the high-speed routing module or the hub state machine. RXV must be valid before the serial data valid signal. Taking the hub's upstream data stream as an example, the receive status signal of each downstream USB transceiver is connected to the high-speed routing module or the hub state machine. When the receive status signal of a downstream USB transceiver is valid, the high-speed routing module and the hub state machine, combined with other states such as the hub port connection, determine the matching downstream port with a valid receive status signal as the current data source. The high-speed routing module's multiple-choice selection unit then sends the serial data signal and serial data valid signal of the current data source to the pre-transmit resynchronization unit on the upstream USB transceiver's transmitting side. The receive status signal is valid before the serial data valid signal, facilitating selection and routing of inserted data.
[0044] There are two methods for resynchronizing before transmission. Method 1 is to select or adjust the local clock so that the local clock used for transmission is synchronized with the serial data signal. Method 2 is to select or adjust the delay of the serial data signal so that the serial data used for transmission is synchronized with the local clock used for transmission. Both methods can achieve resynchronization before transmission.
[0045] Method 1 can be done in any of the following ways:
[0046] Sampling the inserted data portion of the inserted serial data signal using the local multi-phase clock, finding a local clock with a phase that best matches the inserted serial data signal based on the sampling result, using the local clock as the synchronized local clock, and maintaining phase lock during the period when the serial data valid signal is valid;
[0047] The inserted data portion of the inserted serial data signal is sampled using a higher frequency clock having a frequency at least three times that of the local clock. The frequency division is adjusted based on the sampling result to generate a local clock that closely matches the inserted serial data signal as the synchronized local clock, and the phase lock is maintained during the period when the serial data valid signal is valid.
[0048] Method 2 specifically includes: sampling the inserted data portion of the inserted serial data signal using a local multi-phase clock to form multiple sampling results with a delay relationship, selecting the delayed serial data that best matches the transmitted local clock as the synchronized serial data, and maintaining the selection lock while the serial data valid signal is valid.
[0049] A USB HUB chip, as shown in FIG2 , includes:
[0050] At least a first USB transceiver and a second USB transceiver, the first USB transceiver is used to receive target serial data and store the target serial data in an elastic buffer, and send the target serial data and a serial data valid signal to the high-speed routing module;
[0051] a data bit insertion unit connected to the first USB transceiver and the high-speed routing module, configured to insert insertion data into target serial data and send the data to the high-speed routing module before a serial data valid signal sent by the first USB transceiver to the high-speed routing module becomes valid, wherein the insertion data includes N data bits, and a time length of the N data bits is not less than a synchronization time required for resynchronization before sending;
[0052] a high-speed routing module connected to the first USB transceiver and the data bit insertion unit, configured to receive and send out the inserted serial data signal, wherein the inserted serial data signal includes the inserted data and the target serial data;
[0053] The pre-sending resynchronization unit is connected to the high-speed routing module and the second USB transceiver, and is used to resynchronize the inserted serial data signal before sending, obtain synchronized serial data and local clock, and send them to the second USB transceiver.
[0054] As shown in Figure 2, which is a simplified diagram, a data bit insertion unit and a send resynchronization unit are actually connected between each USB transceiver and the high-speed routing module. The data bit insertion unit is located in the receiving side path between the USB transceiver and the high-speed routing module, and the send resynchronization unit is located in the sending side path between the high-speed routing module and the USB transceiver.
[0055] The data bit insertion unit is implemented using a selection circuit, which is a two-choice selection circuit. The first and second inputs of the selection circuit are connected to the insertion data and the output of the elastic buffer, respectively. The output of the selection circuit is connected to the high-speed routing module. The control terminal of the selection circuit is connected to a control signal. The control signal can be directly the serial data valid signal of the first USB transceiver. Before the serial data valid signal is valid, the insertion data is selected to be transmitted to the high-speed routing module; when the serial data valid signal is valid, the target serial data in the elastic buffer is selected to be sent to the high-speed routing module. The control signal can also be a combined control signal, which is logically composed of a serial data valid signal and a reception status signal. When the reception status signal is valid and the serial data valid signal is invalid, the insertion data is selected to be output to the high-speed routing module; when the reception status signal is valid and the serial data valid signal is valid, the target serial data in the elastic buffer is selected to be sent to the highway module.
[0056] In this embodiment, N data bits are inserted before the serial data valid signal is valid to synchronize the data and clock before transmission. This eliminates the need to transmit the clock and data together during transmission within the USB hub. Without a data bit insertion unit, the clock and data resynchronization process of the pre-transmission resynchronization unit would inevitably occupy several data bits. As a result, after a USB data packet passes through a hub, its preamble (sync pattern) will lose several sync bits. This loss accumulates when multiple hubs are cascaded, resulting in a shorter time for clock synchronization at the first and last stages when receiving data. However, the method of this embodiment does not cause the loss of preamble sync bits, reduces internal hub latency, and improves compatibility in hub applications.
Claims
1. A USB HUB internal data transmission method, characterized in that: The following steps are involved: The first USB transceiver receives the target serial data and stores the target serial data in an elastic buffer; The first USB transceiver sends the target serial data and the serial data valid signal to the high-speed routing module, and before the serial data valid signal is valid, inserts the insert data into the target serial data and sends it to the high-speed routing module, wherein the insert data includes N data bits; The high-speed routing module receives and sends out the inserted serial data signal, wherein the inserted serial data signal includes the inserted data and the target serial data; Resynchronize the inserted serial data signal before sending it, obtain synchronized serial data and local clock, and send it out by the second USB transceiver; The time length of the N data bits is not less than the synchronization time required for resynchronization before sending.
2. The USB HUB internal data transmission method according to claim 1, characterized in that: The method for inserting the inserted data into the target serial data and sending it to the high-speed routing module is: using a selection circuit to select and transmit the inserted data to the high-speed routing module before the serial data valid signal is valid; when the serial data valid signal is valid, the target serial data in the elastic buffer is selected and sent to the high-speed routing module.
3. The USB HUB internal data transmission method according to claim 1 or 2, characterized in that: The inserted data is one or more of the following: input serial data of the elastic buffer, data of the input serial data of the elastic buffer synchronized with a global clock, and serial data generated based on a global synchronous clock.
4. The USB HUB internal data transmission method according to claim 1 or 2, characterized in that: In addition to sending the target serial data and the serial data valid signal to the high-speed routing module, the first USB transceiver also sends a receiving status signal to the high-speed routing module or the HUB state machine. The receiving status signal is valid earlier than the serial data valid signal to allow the inserted data portion to pass through the high-speed routing module.
5. The USB HUB internal data transmission method according to claim 1 or 2, characterized in that: Resynchronization before transmission refers to synchronizing the local clock with the inserted serial data signal. It can be done by any of the following methods: Sampling the inserted data portion of the inserted serial data signal using the local multi-phase clock, finding a local clock with a phase that best matches the inserted serial data signal based on the sampling result, using the local clock as the synchronized local clock, and maintaining phase lock during the period when the serial data valid signal is valid; The inserted data portion of the inserted serial data signal is sampled using a higher frequency clock having a frequency at least three times that of the local clock. The frequency division is adjusted based on the sampling result to generate a local clock that closely matches the inserted serial data signal as the synchronized local clock, and the phase lock is maintained during the period when the serial data valid signal is valid.
6. The USB HUB internal data transmission method according to claim 1 or 2, characterized in that: Resynchronization before transmission refers to synchronizing the inserted serial data signal with the local clock. Specifically, it includes: sampling the inserted data portion of the inserted serial data signal with the local multi-phase clock to form multiple sampling results with a delay relationship, selecting the delayed serial data that best matches the transmitted local clock as the synchronized serial data, and maintaining the selection lock while the serial data valid signal is valid.
7. A USB HUB chip, characterized in that: include: At least a first USB transceiver and a second USB transceiver, the first USB transceiver is used to receive target serial data and store the target serial data in an elastic buffer, and send the target serial data and a serial data valid signal to the high-speed routing module; a data bit insertion unit connected to the first USB transceiver and the high-speed routing module, configured to insert insertion data into target serial data and send the data to the high-speed routing module before a serial data valid signal sent by the first USB transceiver to the high-speed routing module becomes valid, wherein the insertion data includes N data bits, and a time length of the N data bits is not less than a synchronization time required for resynchronization before sending; a high-speed routing module connected to the first USB transceiver and the data bit insertion unit, configured to receive and send out the inserted serial data signal, wherein the inserted serial data signal includes the inserted data and the target serial data; The pre-sending resynchronization unit is connected to the high-speed routing module and the second USB transceiver, and is used to resynchronize the inserted serial data signal before sending, obtain synchronized serial data and local clock, and send them to the second USB transceiver.
8. The USB HUB chip according to claim 7, characterized in that: The data bit insertion unit includes a two-choice selection circuit, wherein the first input end and the second input end of the selection circuit are respectively connected to the insertion data and the output end of the elastic buffer, the output end of the selection circuit is connected to the high-speed routing module, and the control end of the selection circuit is connected to the serial data valid signal output end of the first USB transceiver. Before the serial data valid signal is valid, the insertion data is selected to be transmitted to the high-speed routing module; when the serial data valid signal is valid, the target serial data in the elastic buffer is selected to be sent to the high-speed routing module.
9. The USB HUB chip according to claim 7, characterized in that: The data bit insertion unit includes a two-choice selection circuit, wherein the first input end and the second input end of the selection circuit are respectively connected to the insertion data and the output end of the elastic buffer, the output end of the selection circuit is connected to the high-speed routing module, and the control end of the selection circuit is connected to a combination control signal. The combination control signal is formed by a logical operation of a serial data valid signal and a receiving status signal of the first USB transceiver. When the receiving status signal is valid and the serial data valid signal is invalid, the insertion data is selected to be output to the high-speed routing module; when the receiving status signal is valid and the serial data valid signal is valid, the target serial data is selected to be output to the high-speed routing module.
10. The USB HUB chip according to any one of claims 7 to 9, characterized in that: The inserted data is one or more of the following: input serial data of the elastic buffer, data of the input serial data of the elastic buffer synchronized with a global clock, and serial data generated based on a global synchronous clock.
Citation Information
Patent Citations
Elastic buffer structure and method applied to universal serial bus 3.0 (USB 3.0)
CN102708086A
USB link bridge
CN108733608A
USB data decoding circuit, method, chip and system
CN117370244A
USB data transmission method, device and system, electronic equipment and storage medium
CN117493248A
USB HUB internal data transmission method and USB HUB chip
CN118227546A