Speed adaptation system for USB 2.0 speed reduction bridge and USB 2.0 speed reduction bridge
By designing a rate adaptation system suitable for USB 2.0 speed reduction bridges, cross-frequency rate adaptation is achieved, solving the problem of limited verification function of USB 2.0 speed reduction bridges in existing technologies, reducing hardware system complexity and adaptation difficulty, and supporting HS, FS and LS rates.
Patent Information
- Application Number
- CN202310833961.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-07-07
AI Technical Summary
Existing USB 2.0 speed reduction bridges can only connect to specific devices, have limited verification capabilities, and cannot fully verify the functionality of USB 2.0 devices in cross-frequency rate adaptation.
Design a rate adaptation system for USB 2.0 speed reduction bridges, including a slow clock domain module, a fast clock domain module, and a signal synchronization module. The transmission rate is synchronized through the signal synchronization module, and the negotiation rate of each module is determined through negotiation to achieve cross-frequency rate adaptation.
It realizes the functional verification of USB 2.0 speed reduction bridge in cross-frequency rate adaptation, reduces hardware system complexity and adaptation difficulty, supports three rates: HS, FS and LS, and is suitable for FPGA prototype verification stage.
Smart Images

Figure CN116974967B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speed adaptation technology for USB 2.0 speed-down bridges, and in particular to a speed adaptation system and a USB 2.0 speed-down bridge suitable for USB 2.0 speed-down bridges. Background Technology
[0002] With the development of industrial automation, the wave of large-scale mechanized production replacing traditional manual labor in factories has arrived. Consequently, USB, as one of the most commonly used wired communication protocols, is widely applied in various fields. USB 2.0, in particular, has been developing for decades, and after continuous updates and iterations, it has become deeply integrated into people's lives. As an indispensable IP in various chips, USB 2.0 needs to be integrated and verified during chip prototyping. Due to the speed limitations of prototyping, and the fact that USB 2.0 must operate at a specific speed, a USB 2.0 speedbridge is essential. Currently, most speedbridges can only connect to specific devices and can only verify a small portion of basic functions, which has significant limitations. Summary of the Invention
[0003] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a rate adaptation system and a USB 2.0 speed-down bridge suitable for USB 2.0 speed-down bridges, so as to solve the technical problem of cross-frequency rate adaptation of USB 2.0 speed-down bridges.
[0004] To achieve the above and other related objectives, a first aspect of this application provides a rate adaptation system suitable for a USB 2.0 speed-down bridge. The rate adaptation system includes: a slow clock domain module, a fast clock domain module, and a signal synchronization module. The signal synchronization module connects the slow clock domain module and the fast clock domain module to synchronize transmission rates, ensuring consistent transmission rates between the slow and fast clock domain modules. The slow clock domain module is connected to a USB 2.0 controller, and negotiates and determines a first negotiation rate based on a first negotiation signal received from the USB 2.0 controller or based on the current negotiation rate of the fast clock domain module received from the signal synchronization module. The fast clock domain module is connected to an external device adapter card, and negotiates and determines a second negotiation rate based on a second negotiation signal received from the external device adapter card or based on the current negotiation rate of the slow clock domain module received from the signal synchronization module. The signal synchronization module is used to synchronize the transmission of signals between the slow and fast clock domain modules.
[0005] In some embodiments of the first aspect of this application, the slow clock domain module includes: an interface adaptation unit, a line status signal generation unit, and a first rate state machine unit; wherein, the interface adaptation unit is used to adjust the input and output directions of communication signals to control the transmission direction of the USB 2.0 controller; the line status signal generation unit is used to control the line status of the USB 2.0 controller according to the generated line status signal; the first rate state machine unit is used to receive a first negotiation signal issued by the USB 2.0 controller and perform rate negotiation to determine the first negotiation rate of the slow clock domain module.
[0006] In some embodiments of the first aspect of this application, the fast clock domain module includes: a power control unit and a second rate state machine unit; wherein the power control unit is used to receive a power consumption request signal to control the power consumption state of the link; the second rate state machine unit is used to receive a second negotiation signal sent by the external device adapter card and perform rate negotiation to determine the second negotiation rate of the fast clock domain module.
[0007] In some embodiments of the first aspect of this application, the specific process of maintaining consistent transmission rates between the slow clock domain module and the fast clock domain module includes: when the USB 2.0 controller is in host mode, the fast clock domain module first initiates a link handshake, receives a second negotiation signal from the external device adapter card to determine a second negotiation rate for the fast clock domain module, and initiates a link handshake for the slow clock domain module, transmitting the second negotiation rate to the slow clock domain module, thus maintaining consistent transmission rates between the slow clock domain module and the fast clock domain module, both being the second negotiation rate; when the USB 2.0 controller is in slave mode, the slow clock domain module first initiates a link handshake, receives a first negotiation signal from the USB 2.0 controller to determine a first negotiation rate for the slow clock domain module, and initiates a link handshake for the fast clock domain module, transmitting the first negotiation rate to the fast clock domain module, so that consistent transmission rates between the slow clock domain module and the fast clock domain module, both being the first negotiation rate.
[0008] In some embodiments of the first aspect of this application, the power consumption state of the link includes three power consumption states: high power consumption state, medium power consumption state, and low power consumption state.
[0009] In some embodiments of the first aspect of this application, the specific process by which the power control unit receives a power consumption request signal to control the power consumption state of the link includes: when the USB 2.0 controller is in host mode, the USB 2.0 controller sends a link layer power management data packet; the slow clock domain module receives the link layer power management data packet and transmits it to the fast clock domain module through the signal synchronization module; the fast clock domain module receives the link layer power management data packet and enters a medium power consumption state to control the link to be in a medium power consumption state; wherein, the power control unit receives the link layer power management data packet and controls the fast clock domain module to enter a medium power consumption state; when the USB 2.0 controller is in slave mode, the fast clock domain module receives the link layer power management data packet sent by the external device adapter card and enters a medium power consumption state, and transmits the medium power consumption state to the slow clock domain module through the signal synchronization module to control the link to be in a medium power consumption state.
[0010] In some embodiments of the first aspect of this application, the specific process by which the power control unit receives a power consumption request signal to control the power consumption state of the link further includes: when the USB 2.0 controller is in host mode, the USB 2.0 controller issues a low power consumption request signal, the slow clock domain module enters a low power consumption state according to the received low power consumption request signal from the USB 2.0 controller, and transmits the low power consumption request signal to the fast clock domain module through the signal synchronization module, the fast clock domain module enters a low power consumption state to control the link to be in a low power consumption state; wherein, the power control unit receives the low power consumption request signal and controls the fast clock domain module to enter a low power consumption state; when the USB 2.0 controller is in slave mode, the fast clock domain module receives a low power consumption request signal sent by the external device adapter card and enters a low power consumption state, and transmits the low power consumption state to the slow clock domain module through the signal synchronization module to control the link to be in a low power consumption state.
[0011] In some embodiments of the first aspect of this application, the external device adapter card includes: a USB 2.0 PHY chip and a USB 2.0 connector connected to the USB 2.0 PHY chip; wherein the USB 2.0 PHY chip is connected to the fast clock domain module; and the USB 2.0 connector is used to connect to an external device.
[0012] In some embodiments of the first aspect of this application, the first rate state machine unit supports three rates: high speed, full speed, and low speed.
[0013] In some embodiments of the first aspect of this application, the second rate state machine unit supports three rates: high speed, full speed, and low speed.
[0014] To achieve the above and other related objectives, a second aspect of this application provides a USB 2.0 speed-down bridge, including the aforementioned rate adaptation system for the USB 2.0 speed-down bridge.
[0015] As described above, the speed adaptation system and USB 2.0 speed reduction bridge of this application have the following features:
[0016] Beneficial effects:
[0017] This invention provides a rate adaptation system for USB 2.0 speed-down bridges for USB 2.0 speed-down testing. It is used in the prototype verification stage of chips. Most of the structure can be implemented using FPGA, which reduces the complexity of the hardware system and the difficulty of cross-frequency rate adaptation. Attached Figure Description
[0018] Figure 1 The diagram shown is a schematic representation of a rate adaptation system for a USB 2.0 speed-down bridge according to an embodiment of this application.
[0019] Figure 2 The diagram shown is a connection structure diagram of a rate adaptation system for a USB 2.0 speed reduction bridge according to an embodiment of this application.
[0020] Figure 3 The diagram shown is a schematic representation of the internal structure of a rate adaptation system for a USB 2.0 speed-down bridge according to an embodiment of this application.
[0021] Figure 4 The diagram shown is a structural schematic of an external device adapter card according to an embodiment of this application. Detailed Implementation
[0022] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0023] It should be noted that in the following description, reference is made to the accompanying drawings, which illustrate several embodiments of this application. It should be understood that other embodiments may also be used, and changes in mechanical composition, structure, electrical system, and operation may be made without departing from the spirit and scope of this application. The following detailed description should not be considered limiting, and the scope of the embodiments of this application is defined only by the claims of the published patent. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. Spatially related terms, such as “upper,” “lower,” “left,” “right,” “below,” “below,” “lower part,” “above,” “upper part,” etc., may be used herein to illustrate the relationship between one element or feature shown in the figures and another element or feature.
[0024] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," "fixing," and "holding" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0025] Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of the stated feature, operation, element, component, item, kind, and / or group, but do not preclude the presence, occurrence, or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition arise only when combinations of elements, functions, or operations are inherently mutually exclusive in some manner.
[0026] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the invention.
[0027] Before providing a further detailed description of the present invention, the nouns and terms used in the embodiments of the present invention are explained, and the nouns and terms used in the embodiments of the present invention are subject to the following interpretations:
[0028] <1> USB, short for Universal Serial Bus, is a serial bus standard for connecting external devices. Its most significant feature is its support for hot-swapping and plug-and-play. Since its introduction, the USB protocol has received widespread support from computer and peripheral manufacturers, and over the years, USB has become the standard interface between computers and external devices. Whether it's external hard drives, cameras, mice, keyboards, printers, or scanners, data transfer between them and computers generally uses USB cables. With the upgrades and iterations of the USB standard, USB technology has seen significant development primarily in data transfer rates. The USB 2.0 standard established three data transfer rates: 1.5Mb / s (Low Speed), 12Mb / s (Full Speed), and 480Mb / s (High Speed). Low Speed is mainly used for human-computer interface devices such as mice, keyboards, and joysticks, while High Speed is mainly used for high-volume data transfer needs such as audio and disk transfers.
[0029] <2> FPGA Prototyping: FPGA prototyping maps RTL-level design code onto a Programmable Logic Device (FPGA) chip, enabling extremely rapid implementation of the designed hardware modules. This allows the designed system to be truly implemented within the FPGA chip and then run in a real-world environment at near-real-world speeds. Essentially, FPGA prototyping builds a hardware platform that realistically simulates the chip's actual operating environment. By observing the chip's performance on this platform, design problems can be identified. FPGA prototyping offers advantages such as high speed and comprehensive verification, and its ability to simulate the chip's actual operating environment provides more accurate simulation results. FPGA prototyping has a wide range of applications, primarily due to its high accuracy and speed.
[0030] <3> Link Power Management (LPM): This is a USB power-saving technology introduced with USB 2.0. In the STM32Cube library, there is an entry called USBD_LPM_ENABLED, where LPM stands for Link Layer Power Management.
[0031] <4> USB PHY chip (Physical Layer): As an indispensable part of USB 2.0 devices, USB PHY has strong versatility. It can be used as a standalone PHY chip in the entire USB system, or it can be used as an IP core and directly integrated into large-scale SOC designs. Therefore, it has broad market prospects and practical significance.
[0032] This invention provides a rate adaptation system and a USB 2.0 speed-down bridge suitable for a USB 2.0 speed-down bridge. Regarding the implementation of the rate adaptation system for a USB 2.0 speed-down bridge, this invention will describe exemplary implementation scenarios of the rate adaptation for a USB 2.0 speed-down bridge.
[0033] Based on the limitations of existing USB 2.0 speed-down bridges, this invention proposes a speed adaptation system for USB 2.0 speed-down bridges, which is compatible with HS, FS and LS speeds. This system is used to solve the cross-frequency speed adaptation problem of USB 2.0 speed-down bridges. Most of the logic can be implemented using FPGA, which reduces the complexity of the system.
[0034] like Figure 1 The diagram illustrates a schematic of a rate adaptation system for a USB 2.0 speed-down bridge according to an embodiment of the present invention, mainly including a slow clock domain module 100, a fast clock domain module 200, and a signal synchronization module 300. The module is located in... Figure 1 The PCS area on the left represents the slow clock domain, and the slow clock domain module 100 is located in the PCS area; Figure 1 The MAC area on the right represents the fast clock domain, and the fast clock domain module 200 is located in the MAC area. Optionally, the interfaces on both sides of the PCS area and the MAC area are configurable interfaces, supporting UTMI, UTMI+, and ULPI interfaces.
[0035] The slow clock domain module 100 and the fast clock domain module 200 are connected to the signal synchronization module 300 so that the transmission rate is synchronized through the signal synchronization module 300, so that the transmission rate between the slow clock domain module 100 and the fast clock domain module 200 is kept consistent.
[0036] Combination Figure 2The speed adaptation system of this invention achieves speed adaptation by maintaining consistent transmission rates between the slow clock domain module and the fast clock domain module. One end of the slow clock domain module 100 is connected to the USB 2.0 controller 400, and the other end of the fast clock domain module 200 is connected to an external device via an external device adapter card 500. Cross-speed transmission between the USB 2.0 controller and the external device is achieved through a USB 2.0 speed reduction bridge. The speed adaptation system of this invention is applicable to this USB 2.0 speed reduction bridge, achieving speed adaptation through the speed adaptation system within the USB 2.0 speed reduction bridge. The USB 2.0 interfaces include: UTMI interface, UTMI+ interface, and ULPI interface. These interfaces can achieve data transmission at three speeds: High Speed (HS), Full Speed (FS), and Low Speed (LS). External devices include PCs, USB flash drives, mice, and keyboards.
[0037] Furthermore, since USB 2.0 controllers include two operating modes: host mode and slave mode, this invention can be applied in both modes. In host mode, the USB 2.0 controller acts as the host, and the external device acts as the slave for connection; in slave mode, the USB 2.0 controller acts as the slave, and the external device acts as the host for connection. During the FPGA prototype verification stage, the USB 2.0 device controller IP core, after being slowed down using the rate adaptation system of this invention, performs a link handshake with an external host or slave operating at normal speed to enter the working state, thereby more fully verifying the functionality of the USB 2.0 device controller IP core within the chip.
[0038] The slow clock domain module 100 is connected to the USB 2.0 controller 400. The slow clock domain module 100 negotiates and determines the first negotiation rate of the slow clock domain module 100 based on the first negotiation signal received from the USB 2.0 controller 400 or based on the current negotiation rate of the fast clock domain module 200 transmitted from the signal synchronization module 300.
[0039] It should be noted that when the USB 2.0 controller is in master mode, the transmission rate of the entire link is consistent with that of the external device acting as a slave. The slow clock domain module receives the negotiated rate from the external device to determine that the first negotiated rate of the slow clock domain module is the negotiated rate of the external device. The negotiated rate of the external device is synchronously transmitted through the signal synchronization module. When the USB 2.0 controller is in slave mode, the transmission rate of the entire link is consistent with that of the USB 2.0 controller acting as a slave. The USB 2.0 controller sends a first negotiation signal to the slow clock domain module, and through negotiation, determines that the first negotiated rate of the slow clock domain module is the rate of the USB 2.0 controller.
[0040] The fast clock domain module 200 is connected to the external device adapter card 500. The fast clock domain module 200 receives a second negotiation signal from the external device adapter card 500 or, based on the current negotiation rate of the slow clock domain module 100 transmitted from the signal synchronization module 300, negotiates and determines a second negotiation rate. Preferably, the external device adapter card 500 is a daughter card, used for connecting external devices.
[0041] Specifically, when the USB 2.0 controller is in host mode, the fast clock domain module receives a second negotiation signal from an external device and negotiates to determine a second negotiation rate. This second negotiation signal is transmitted to the fast clock domain module via an external device adapter card. When the USB 2.0 controller is in slave mode, the external device acts as the host, and the current negotiation rate of the slow clock domain module is transmitted to the fast clock domain module via a signal synchronization module, so that the second negotiation rate of the fast clock domain module becomes the current negotiation rate of the slow clock domain module.
[0042] The signal synchronization module 300 is used to synchronize the transmission of signals between the slow clock domain module 100 and the fast clock domain module 200. Specifically, the signal synchronization module 300 can synchronize transmission rates, power requests, link handshake requests, etc. Furthermore, the signal synchronization module 300 can synchronize the signals from the slow clock domain module 100 to the fast clock domain module 200, and vice versa.
[0043] It should be noted that the speed adaptation system for USB 2.0 speed-down bridge in this invention is used to solve the problem that when the chip is in the FPGA prototype verification stage, the slowed-down USB 2.0 controller can enter the working state by performing a link handshake with the host or slave device that is working at the normal speed. This allows for more thorough verification of the function of the USB 2.0 device controller IP core inside the chip. Most of the logic can be implemented through FPGA, which reduces the complexity of the hardware system and the difficulty of adaptation.
[0044] It should be noted that the division of the various modules in the above system is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software through processing element calls; they can be implemented entirely in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the signal synchronization module can be a separate processing element, or it can be integrated into a chip within the system. Alternatively, it can be stored as program code in the system's memory, and its functions can be called and executed by a processing element. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element mentioned here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0045] In one embodiment of this application, as Figure 3 As shown, the slow clock domain module 100 includes: an interface adaptation unit 110, a line status signal generation unit 120, and a first rate state machine unit 130.
[0046] The interface adapter unit 110 is used to adjust the input and output directions of communication signals to control the transmission direction of the USB 2.0 controller. It is used to adjust the input and output directions of communication signals of the USB 2.0 interface (including UTMI, UTMI+, and ULPI interfaces) according to the interface requirements of USB 2.0. The interface adapter unit adapts to the interface of the USB 2.0 controller, adjusting the input and output directions of the UTMI / ULPI related signals of the USB 2.0 controller interface. This adjustment can be controlled by the first rate state machine of the slow clock domain module to ensure the correct operation of the USB 2.0 controller.
[0047] The line status signal generation unit 120 is used to control the line status of the USB 2.0 controller based on the generated line status signal. The line status signal generation unit 120 is mainly responsible for generating the line status signal (linestate signal) in the UTMI protocol. This signal is used to represent the status on the line. Since the line status of the fast clock domain module cannot be directly used in the slow clock domain module test, it is necessary to generate the line status signal based on the link handshake stage and the transmitted data to ensure the correct operation of the USB 2.0 controller.
[0048] It should be noted that, according to the UTMI protocol standard, the linestate signal definition specifically includes: linestate[1:0] reflects the state of the USB 2.0 bus signal. Specifically, in the USB 2.0 UTMI, linestate[1] corresponds to the DM (data negative terminal corresponds to USB 2.0 data negative terminal D-) signal, and linestate[0] corresponds to the DP (data positive terminal corresponds to USB 2.0 data positive terminal D+) signal. A linestate[1:0] value of “00” indicates that the USB 2.0 bus is in SE0 state, a linestate[1:0] value of “01” indicates that the USB 2.0 bus is in J state, and a linestate[1:0] value of “10” indicates that the USB 2.0 bus is in K state. In USB 2.0, during full-speed or low-speed mode when not transmitting data, SE0 indicates reset, J state indicates bus idle, and K state indicates wake-up. During data transmission, DM and DP are differential signals and basically alternate.
[0049] Furthermore, in the HS and FS transmission speed modes, the state where the USB 2.0 bus line DP is high and the line DM is low is called the J state, and the state where the line DP is low and the line DM is high is called the K state. Similarly, in the LS transmission speed mode, the state where the USB 2.0 bus line DP is low and the line DM is high is called the J state, and the state where the line DP is high and the line DM is low is called the K state.
[0050] The first rate state machine unit 130 is used to receive a first negotiation signal from the USB 2.0 controller and perform rate negotiation to determine the first negotiation rate of the slow clock domain module 100. The first rate state machine unit 130 conforms to the state machine logic of the USB 2.0 protocol handshake and supports high-speed, full-speed, and low-speed rates. When the USB 2.0 controller is in slave mode, the first rate state machine unit 130 receives the first negotiation signal from the USB 2.0 controller and performs rate negotiation to determine the first negotiation rate of the slow clock domain module 100.
[0051] In one embodiment of this application, combined with Figure 3 The fast clock domain module 200 includes a power control unit 210 and a second rate state machine unit 220.
[0052] The power control unit 210 receives power consumption request signals to control the power consumption state of the link. The link's power consumption state includes three types: high power consumption (L0), medium power consumption (L1), and low power consumption (L2). USB 2.0 power management is always host-driven (host initialization), and both ends of the link support power management. Therefore, the link can enter the required low-power state whenever it needs to be idle, disconnected, or communicating. In this embodiment, the link's power consumption state is controlled according to the transmission requirements between the USB 2.0 controller and the external device. For example, when communication requires a lower power consumption state, the link can be controlled to be in a lower power consumption state, saving circuit power and ensuring long-term stable operation of the transmission link.
[0053] It should be noted that in this embodiment, the power consumption state control of the link to a low-power state refers to a state in which the USB 2.0 host device operates with lower power consumption compared to when it is conducting data communication. Specifically, the USB 2.0 host device or USB 2.0 slave device achieves this low-power state by sending Link Layer Power Management (LPM) packets to each other. When network devices are idle, the LPM function can be used to minimize the power consumption of network devices, transitioning them from an active state to a low-power mode, thereby saving energy. When the LPM is transmitted from the USB 2.0 host (USB 2.0 controller) to the USB 2.0 device (external device) and then acknowledged (ACK signal is received), both the USB 2.0 device and the USB 2.0 host transition to a low-power state. Here, ACK indicates a positive response, signifying successful data transmission.
[0054] The second rate state machine unit 220 is used to receive the second negotiation signal sent by the external device adapter card and perform rate negotiation to determine the second negotiation rate of the fast clock domain module 200. The second rate state machine unit 220 conforms to the state machine logic of the USB 2.0 protocol handshake and supports high-speed, full-speed, and low-speed rates. When the USB 2.0 controller is in host mode, the external device, acting as a slave, sends the second negotiation signal, and the second rate state machine unit 220 receives the second negotiation signal and performs rate negotiation to determine the second negotiation rate of the fast clock domain module 200.
[0055] In one embodiment of this application, the specific process of maintaining consistent transmission rates between the slow clock domain module 100 and the fast clock domain module 200 includes two cases. The rate adaptation system in this embodiment does not distinguish between host and slave, that is, it can be applied whether the USB 2.0 controller is working in host or slave mode. The specific two rate adaptation processes are as follows:
[0056] In the first scenario: when the USB 2.0 controller is in host mode, the fast clock domain module first initiates a link handshake. The fast clock domain module receives the second negotiation signal sent by the external device adapter card to determine the second negotiation rate of the fast clock domain module, and initiates the link handshake of the slow clock domain module, transmitting the second negotiation rate to the slow clock domain module. The transmission rate between the slow clock domain module and the fast clock domain module remains consistent, both being the second negotiation rate.
[0057] It should be noted that the fast clock domain module initiates a link handshake first to connect with the external device acting as a slave to determine the external device's transmission rate. At this time, the external device sends a second negotiation signal through the external device adapter card to the fast clock domain module for rate negotiation to determine the second negotiated rate. This second negotiated rate is the external device's transmission rate. Simultaneously, the slow clock domain module initiates a link handshake to transmit the second negotiated rate to the slow clock domain module, so that the transmission rates between the slow clock domain module and the fast clock domain module are consistent, which is the external device's transmission rate.
[0058] In the second scenario: when the USB 2.0 controller is in slave mode, the slow clock domain module first initiates a link handshake. The slow clock domain module receives the first negotiation signal sent by the USB 2.0 controller to determine the first negotiation rate of the slow clock domain module, and then initiates a link handshake of the fast clock domain module, transmitting the first negotiation rate to the fast clock domain module so that the transmission rate between the slow clock domain module and the fast clock domain module remains consistent, both being the first negotiation rate.
[0059] It should be explained that when the USB 2.0 controller is in slave mode, since the USB 2.0 master device is generally at HS speed, the slow clock domain module initiates a link handshake first. After the handshake is successful and the device enters the working state, it negotiates the transmission rate to confirm the transmission rate (i.e., the first negotiated rate) and transmits the transmission rate to the fast clock domain module through the signal synchronization module to limit the maximum transmission rate of the fast clock domain module. At this time, the link handshake is initiated on the fast clock domain module side to achieve the effect of keeping the speeds on both sides consistent and not losing data on the host side.
[0060] In one embodiment of this application, the specific process by which the power control unit 210 receives a power consumption request signal to control the power consumption state of the link includes several scenarios. It should be noted that in the rate adaptation system of this embodiment, the USB 2.0 controller can operate in either host or slave mode. The operating mode is configured by a register, which can control whether the test mode is enabled. The test mode is mainly used to test some special scenarios that may affect normal data transmission; therefore, the host should not send data during testing in test mode. The specific testing process regarding the power control unit's control of the link's power consumption state is as follows:
[0061] In the first scenario: when the USB 2.0 controller is in host mode, it sends a link-layer power management data packet. The slow clock domain module 100 receives the link-layer power management data packet and transmits it to the fast clock domain module 200 through the signal synchronization module 300. The fast clock domain module 200 receives the link-layer power management data packet and enters a medium power consumption state to control the link to be in a medium power consumption state. The power control unit 210 receives the link-layer power management data packet and controls the fast clock domain module 200 to enter the medium power consumption state.
[0062] Specifically, when the USB 2.0 controller is in host mode, the slow clock domain module receives the LPM packet first, and the fast clock domain module forwards the LPM packet. After receiving the ACK response, the power control unit controls the link to enter the L1 state; otherwise, it remains in the L0 state.
[0063] In the second scenario: when the USB 2.0 controller is in slave mode, the fast clock domain module 200 receives the link layer power management data packet sent by the external device adapter card 500 and enters a medium power consumption state. The signal synchronization module 300 transmits the medium power consumption state to the slow clock domain module 100 to control the link to be in a medium power consumption state.
[0064] It should be noted that when the fast clock domain module receives the LPM, it decides whether to accept it and enter the L1 state based on the contents of the register. If it decides to accept it, the fast clock domain module receives the LPM and enters the L1 state. Then, it selects whether to forward it to the slow clock domain module based on the test mode. If it is an L1 in / out test, it forwards the L1 test to the slow clock domain module. Otherwise, it does not forward the test to the slow clock domain module to prevent the host from exiting the L1 state and the slow clock domain module from exiting very slowly, which could result in no response to the data sent.
[0065] The third scenario: When the USB 2.0 controller is in host mode, it sends a low-power state request signal. The slow clock domain module 100 enters a low-power state based on the received low-power state request signal from the USB 2.0 controller, and transmits the low-power state request signal to the fast clock domain module 200 through the signal synchronization module 300. The fast clock domain module 200 then enters a low-power state to control the link to be in a low-power state. The power control unit 210 receives the low-power state request signal and controls the fast clock domain module 200 to enter a low-power state.
[0066] It should be explained that when the USB 2.0 controller is in host mode, the slow clock domain module receives an L2 request. The slow clock domain module receives the L2 request and enters the L2 state. At the same time, it synchronously transmits the L2 request to the fast clock domain module. The fast clock domain module then initiates an L2 request to the external device acting as a slave. At this time, the fast clock domain module has also entered the L2 state.
[0067] The fourth scenario: When the USB 2.0 controller is in slave mode, the fast clock domain module 200 receives the low power state request signal sent by the external device adapter card 500 and enters the low power state. The low power state is transmitted to the slow clock domain module 100 through the signal synchronization module 300 to control the link to be in the low power state.
[0068] It should be noted that when the USB 2.0 controller is in slave mode, the fast clock domain module receives an L2 request and enters the L2 state. Depending on the test mode, it chooses whether to forward the request to the slow clock domain module. If it is an L2 in / out test, it forwards the request to the slow clock domain module and enters the L2 state. Otherwise, it does not forward the request to the slow clock domain module. This is to prevent the host from exiting the L2 state and the data sent from not responding because the slow clock domain module exits very slowly.
[0069] In one embodiment of this application, as Figure 4 As shown, the external device adapter card 500 includes: a USB 2.0 PHY chip 510 and a USB 2.0 connector 520 connected to the USB 2.0 PHY chip 510; wherein, the USB 2.0 PHY chip 510 is connected to the fast clock domain module 200; the USB 2.0 connector 520 is used to connect external devices. Optionally, the USB 2.0 PHY chip 510 supports UTMI interface, UTMI+ interface, and ULPI interface.
[0070] This application also provides a USB 2.0 speed reduction bridge 600, including the aforementioned rate adaptation system for a USB 2.0 speed reduction bridge. The implementation of the USB 2.0 speed reduction bridge 600 provided in this application is similar to the rate adaptation system for a USB 2.0 speed reduction bridge described above, and will not be repeated here.
[0071] In summary, the rate adaptation system and USB 2.0 speed-down bridge provided in this application synchronize the transmission rate through a signal synchronization module, ensuring consistent transmission rates between the slow clock domain module and the fast clock domain module. Used in the chip prototyping stage, most of the structure can be implemented using an FPGA, reducing hardware system complexity and the difficulty of cross-frequency rate adaptation. Therefore, this application effectively overcomes the various shortcomings of existing technologies and has high industrial applicability.
[0072] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A rate adaptation system for a USB 2.0 speed reduction bridge, characterized in that, The rate adaptation system includes: a slow clock domain module, a fast clock domain module, and a signal synchronization module; The slow clock domain module and the fast clock domain module are connected by the signal synchronization module to synchronize the transmission rate, thereby ensuring that the transmission rates between the slow clock domain module and the fast clock domain module remain consistent. The specific process for ensuring that the transmission rates between the slow clock domain module and the fast clock domain module remain consistent includes: When the USB 2.0 controller is in host mode, the fast clock domain module first initiates a link handshake. The fast clock domain module receives a second negotiation signal from the external device adapter card to determine the second negotiation rate of the fast clock domain module, and initiates a link handshake of the slow clock domain module to transmit the second negotiation rate to the slow clock domain module. The transmission rate between the slow clock domain module and the fast clock domain module is consistent, both being the second negotiation rate. When the USB 2.0 controller is in slave mode, the slow clock domain module first initiates a link handshake. The slow clock domain module receives the first negotiation signal sent by the USB 2.0 controller to determine the first negotiation rate of the slow clock domain module, and then initiates a link handshake of the fast clock domain module to transmit the first negotiation rate to the fast clock domain module, so that the transmission rate between the slow clock domain module and the fast clock domain module is consistent and is the first negotiation rate. The slow clock domain module is connected to the USB 2.0 controller. The slow clock domain module negotiates and determines the first negotiation rate of the slow clock domain module based on the first negotiation signal received from the USB 2.0 controller or based on the current negotiation rate of the fast clock domain module transmitted from the signal synchronization module. The fast clock domain module is connected to an external device adapter card. The fast clock domain module receives a second negotiation signal from the external device adapter card or negotiates and determines a second negotiation rate based on the current negotiation rate of the slow clock domain module transmitted by the received signal synchronization module. The signal synchronization module is used to synchronously transmit signals between the slow clock domain module and the fast clock domain module.
2. The rate adaptation system for a USB 2.0 speed-down bridge according to claim 1, characterized in that, The slow clock domain module includes: an interface adaptation unit, a line status signal generation unit, and a first rate state machine unit. The interface adapter unit is used to adjust the input and output directions of communication signals to control the transmission direction of the USB 2.0 controller. The line status signal generation unit is used to control the line status of the USB 2.0 controller according to the generated line status signal; The first rate state machine unit is used to receive the first negotiation signal sent by the USB 2.0 controller and perform rate negotiation to determine the first negotiation rate of the slow clock domain module.
3. The rate adaptation system for a USB 2.0 speed-down bridge according to claim 1, characterized in that, The fast clock domain module includes: a power control unit and a second rate state machine unit; The power control unit is used to receive power consumption request signals to control the power consumption state of the link; The second rate state machine unit is used to receive the second negotiation signal sent by the external device adapter card and perform rate negotiation to determine the second negotiation rate of the fast clock domain module.
4. The rate adaptation system for a USB 2.0 speed-down bridge according to claim 3, characterized in that, The power consumption states of the link include three states: high power consumption, medium power consumption, and low power consumption.
5. The rate adaptation system for a USB 2.0 speed-down bridge according to claim 4, characterized in that, The specific process by which the power control unit receives a power consumption request signal to control the power consumption state of the link includes: When the USB 2.0 controller is in host mode, it sends a link-layer power management data packet. The slow clock domain module receives the link-layer power management data packet and transmits it to the fast clock domain module through the signal synchronization module. The fast clock domain module receives the link-layer power management data packet and enters a medium power consumption state to control the link to be in a medium power consumption state. The power control unit receives the link-layer power management data packet and controls the fast clock domain module to enter the medium power consumption state. When the USB 2.0 controller is in slave mode, the fast clock domain module receives the link layer power management data packet sent by the external device adapter card and enters a medium power consumption state. The signal synchronization module then transmits the medium power consumption state to the slow clock domain module to control the link to be in a medium power consumption state.
6. The rate adaptation system for a USB 2.0 speed-down bridge according to claim 4, characterized in that, The specific process by which the power control unit receives power consumption request signals to control the power consumption state of the link also includes: When the USB 2.0 controller is in host mode, it sends a low-power state request signal. The slow clock domain module enters a low-power state based on the received low-power state request signal and transmits the low-power state request signal to the fast clock domain module through the signal synchronization module. The fast clock domain module then enters a low-power state to control the link to be in a low-power state. The power control unit receives the low-power state request signal and controls the fast clock domain module to enter a low-power state. When the USB 2.0 controller is in slave mode, the fast clock domain module receives a low-power state request signal sent by the external device adapter card and enters a low-power state. The low-power state is then transmitted to the slow clock domain module through the signal synchronization module to control the link to be in a low-power state.
7. The rate adaptation system for a USB 2.0 speed-down bridge according to claim 1, characterized in that, The external device adapter card includes: a USB 2.0 PHY chip and a USB 2.0 connector connected to the USB 2.0 PHY chip; The USB 2.0 PHY chip is connected to the fast clock domain module; the USB 2 connector is used to connect external devices.
8. The rate adaptation system for a USB 2.0 speed-down bridge according to claim 2, characterized in that, The first rate state machine unit supports three rates: high speed, full speed, and low speed.
9. The rate adaptation system for a USB 2.0 speed-down bridge according to claim 3, characterized in that, The second rate state machine unit supports three rates: high speed, full speed, and low speed.
10. A USB 2.0 speed-reducing bridge, characterized in that, Including the rate adaptation system for a USB 2.0 speed-down bridge as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Bridge circuit
JP2014010550A
System and method to facilitate deterministic testing of data transfers between independent clock domains on a chip
US7958285B1
