A USB3.0 physical layer debugging device and method based on FPGA

By embedding USB3.0 physical layer debugging device in FPGA, using physical layer interface modules and error code analysis, the problem of complex and cost of USB3.0 device debugging process is solved, and the rapid positioning and simplification of debugging process is achieved, and the testing is reduced. cost.

CN112015606BActive Publication Date: 2024-11-08WUHAN HUIDISEN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010765671.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-03
Publication Date
2024-11-08
Estimated Expiration
2040-08-03

AI Technical Summary

Technical Problem

The PHY debugging process of existing USB3.0 devices is complex and has high testing costs. Professional protocol analyzer equipment is expensive and complex to operate, making it difficult to quickly locate errors introduced by high-speed serial underlying links or software, resulting in a long iteration debugging cycle.

Method used

Design a USB3.0 physical layer debugging device based on FPGA, including physical layer interface module, LFPS module, data excitation module, data analysis module and modulation control module. Through FPGA, the IP core of the intellectual property rights is embedded to realize the communication process of the opposite USB device. Error code analysis in simplifies debugging process and reduces testing costs.

Benefits of technology

It realizes the rapid positioning of PHY high-speed data signal transmission problems of the opposite USB device, simplifies the debugging process, reduces the testing cost, does not require special protocol analyzer equipment, and shortens the iterative debugging cycle of software and hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112015606B_ABST
    Figure CN112015606B_ABST
Patent Text Reader

Abstract

The present invention discloses a USB3.0 physical layer debugging device and method based on FPGA; the device is configured with a physical layer interface module, an LFPS module, a data excitation module, a data analysis module and a modulation control module; the method comprises detecting the state of a USB device port at a peer end; executing LFPS out-of-band signal synchronization with the USB device at the peer end; executing data synchronization with the USB device at the peer end; the system according to the embodiment of the present invention executes the above method, embeds the debugging device into the FPGA in the form of an intellectual property IP core, analyzes error codes corresponding to various abnormal events during communication with the USB device at the peer end, locates problems in the PHY high-speed data signal transmission process of the USB device at the peer end, simplifies the debugging process, does not require a dedicated protocol analyzer device, and reduces the test cost to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of high-speed data signal transmission, and in particular to a USB3.0 physical layer debugging device and method based on FPGA. Background Art

[0002] USB (Universal Serial Bus, hereinafter referred to as USB) is an external bus standard used to regulate the connection and communication between computers and external devices. It is developed and maintained by the official USB organization USB-IF; there are five versions, USB1.1, USB2.0, USB3.0, USB3.1 and USB3.2, and the new version is forward compatible with the old version. The maximum transmission rate supported by each version is distributed as follows: USB1.1: 12Mbps; USB2.0: 480Mbps; USB3.0: 5Gbps; USB3.1: 10Gbps; USB3.2: 20Gbps.

[0003] As USB3.0 technology is increasingly widely used, more and more embedded devices have USB3.0 interfaces. In order to solve the problem of debugging USB3.0 PHY high-speed data signal transmission, it is necessary to establish communication function with the USB3.0 device port. To speed up the debugging process, the method adopted is to use professional protocol analyzer equipment or build a complete and complex system of USB3.0 PHY, USB3.0 controller and USB3.0 software to complete the physical layer debugging of USB3.0 devices.

[0004] The shortcomings of the prior art are:

[0005] 1. Professional protocol analyzer equipment. Currently, the USB3.0 protocol analyzer products on the market are expensive, complicated to operate, and not easy to carry;

[0006] 2. During the debugging process, when an error occurs in the system, it is impossible to quickly locate and distinguish whether it is an error in the high-speed serial underlying link or an error introduced by the USB3.0 controller or USB3.0 software. It involves both software and hardware, and the iterative debugging cycle is relatively long, resulting in a large amount of manpower costs in the debugging and testing process. Summary of the invention

[0007] The present invention aims at the technical problems in the prior art that the PHY debugging process of USB3.0 equipment is complicated and the testing cost is high. The present invention provides a USB3.0 physical layer debugging device and method based on FPGA.

[0008] The technical solution of the present invention to solve the above technical problems is as follows:

[0009] On the one hand, an embodiment of the present invention provides a USB3.0 physical layer debugging device based on FPGA, which is configured with:

[0010] Physical layer interface module, used for data transmission between USB3.0 physical layer transceiver;

[0011] The LFPS module is used to periodically send the LFPS out-of-band signal and receive and analyze the LFPS out-of-band signal fed back by the opposite USB device;

[0012] The data excitation module is configured with a training sequence generating unit, and the training sequence generating unit is used to send a training sequence for link negotiation;

[0013] The data parsing module is configured with a training sequence parsing unit, and the training sequence parsing unit is used to receive and parse the training sequence fed back by the opposite USB device;

[0014] The modulation control module controls the communication process between the physical layer interface module, the data excitation module, the data parsing module, the LFPS module and the opposite USB device, and performs real-time analysis on the error codes corresponding to various abnormal events generated during the communication process.

[0015] On the other hand, an embodiment of the present invention provides a USB3.0 physical layer debugging method based on FPGA, comprising the following steps:

[0016] Step 1, perform status detection of the opposite USB device; if the opposite USB device does not exist, perform corresponding error code analysis and exit;

[0017] Step 2, executing LFPS out-of-band signal synchronization with the opposite USB device; if the synchronization is not completed within the set time, performing corresponding error code analysis and exiting;

[0018] Step 3, executing data synchronization with the opposite USB device; if the synchronization is not completed within the set time, performing corresponding error code analysis and exiting.

[0019] The embodiment of the present invention provides a USB3.0 physical layer debugging device and method based on FPGA. The debugging device is embedded into the FPGA in the form of an intellectual property IP core. During the communication with the opposite USB device, error codes corresponding to various abnormal events are analyzed to locate problems in the PHY high-speed data signal transmission process of the opposite USB device, thereby simplifying the debugging process. No dedicated protocol analyzer equipment is required, which reduces the testing cost to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1This is a schematic diagram of the structure of a USB3.0 physical layer debugging device based on FPGA according to an embodiment of the present invention;

[0021] Figure 2 It is a schematic diagram of the overall structure of an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a flow chart of a USB3.0 physical layer debugging method based on FPGA according to an embodiment of the present invention being executed;

[0023] Reference numerals:

[0024] 1. Modulation control module 2. Data excitation module 201. Training sequence generation unit

[0025] 7. Data parsing module 3, data scrambling module 202, link command generating unit

[0026] 701, training sequence analysis unit 6, data descrambling module 203, protocol packet generation unit

[0027] 702, link command parsing unit 5, LFPS module 4, physical layer interface module

[0028] 703, protocol packet parsing unit 8, observation module. DETAILED DESCRIPTION

[0029] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0030] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0031] like Figure 1 As shown, Figure 1 This is a schematic diagram of the structure of a USB3.0 physical layer debugging device based on FPGA according to an embodiment of the present invention; it is configured with:

[0032] Physical layer interface module 4, used for data transmission between USB3.0 physical layer transceiver;

[0033] LFPS module 5, used for regularly sending LFPS out-of-band signals and receiving and parsing the LFPS out-of-band signals fed back by the opposite USB device;

[0034] The data excitation module 2 is configured with a training sequence generating unit 201, and the training sequence generating unit 201 is used to send a training sequence for link negotiation;

[0035] The data analysis module 7 is configured with a training sequence analysis unit 701, and the training sequence analysis unit 701 is used to receive and analyze the training sequence fed back by the opposite USB device;

[0036] The modulation control module 1 controls the communication process between the physical layer interface module 4, the data excitation module 2, the data analysis module 7, the LFPS module 5 and the opposite USB device, and performs real-time analysis on the error codes corresponding to various abnormal events generated during the communication process.

[0037] Specifically, the physical layer interface module 4 is connected to an external USB 3.0 physical layer transceiver; the USB 3.0 physical layer transceiver is a USB 3.0 physical layer high-speed transceiver chip, which is connected to the opposite USB device through a standard USB 3.0 connector to realize the transmission and reception of link data.

[0038] The LFPS module 5 sends the polling.LFPS out-band signal regularly, receives the polling.LFPS out-band signal of the USB device at the opposite end, analyzes the rise and fall time, period, duty cycle, peak-to-peak value, common mode voltage, and burst duration (tBurst) and repetition time (tRepeat) of the polling.LFPS out-band signal pulse of the USB device at the opposite end, and completes the LFPS out-band signal handshake; realizes the code rate synchronization, clock synchronization and rate matching of the underlying high-speed serial link through the LFPS (Low Frequency Period Singal) out-band signal handshake;

[0039] The data excitation module 2 generates the training sequences of TSEQ, TS1, and TS2 for link negotiation by the training sequence generation unit 201; the data analysis module 7 is configured with a training sequence analysis unit 701 to receive and analyze the correct training sequences of TSEQ, TS1, and TS2 of the opposite USB device; the training sequence handshake is completed to achieve data synchronization.

[0040] The modulation control module 1 is used to control the coordinated operation of the data excitation module 2, the data analysis module 7, the LFPS module 5, and the physical layer interface module 4, realize part of the LTSSM (Link Training and Status State Machine) function, control the communication process with the other USB device, and perform real-time analysis on the error codes corresponding to various abnormal events generated during the communication process.

[0041] The embodiment of the present invention provides a USB3.0 physical layer debugging device based on FPGA. By embedding the debugging device into the FPGA in the form of an intellectual property IP core, the error codes corresponding to various abnormal events generated during the communication process with the opposite USB device are controlled to be analyzed in real time, so as to locate the problem in the PHY high-speed data signal transmission process of the opposite USB device, simplify the debugging process, do not need a dedicated protocol analyzer device, and reduce the testing cost to a certain extent.

[0042] Furthermore, the data excitation module 2 is configured with a link command generating unit 202; the data excitation module 2 is connected to the data scrambling module 3; the data scrambling module 3 performs scrambling operation on the link command packet sent by the link command generating unit 202; the data analysis module 7 is configured with a link command analysis unit 702; the data analysis module 7 is connected to the data descrambling module 6; the data descrambling module 6 performs descrambling operation on the link command packet fed back by the opposite USB device and sends it to the link command analysis unit 702 for analysis.

[0043] Specifically, the link command generating unit 202 generates link commands LGOODx and LCRDx; the data scrambling module 3 performs random scrambling operation on the received link commands LGOODx and LCRDx according to the linear feedback shift register (LFSR) algorithm specified in USB3.0, and then sends them to the opposite USB device through the physical layer interface module 4; the data descrambling module 6 performs descrambling operation on the link commands LGOODx and LCRDx fed back by the opposite USB device according to the LFSR algorithm, and restores the original sent data and passes it to the link command parsing unit 702 for parsing. The data scrambling module 3 and the data descrambling module 6 are used to reduce the EMI (Electromagnetic Interference) of the high-speed serial link. Generate and parse the link command packet, complete the link command handshake, and broadcast the link flow control and the buffer status of the link partner at the link layer.

[0044] Furthermore, the data excitation module 2 is configured with a protocol packet generating unit 203; the data scrambling module 2 performs scrambling operation on the protocol layer protocol packet sent by the protocol packet generating unit 203; the data parsing module 7 is configured with a protocol packet parsing unit 703; the data descrambling module 6 performs descrambling operation on the protocol packet fed back by the opposite USB device and sends it to the protocol packet parsing unit 703 for parsing.

[0045] Specifically, the protocol packet LMP (Link Manager Protocol) is randomly scrambled according to the LFSR algorithm and then sent to the peer USB device through the physical layer interface module 4; the data descrambling module 6 descrambles the protocol packet LMP fed back by the peer USB device according to the LFSR algorithm; generates and parses the protocol packet LMP to complete the configuration exchange of the port.

[0046] Furthermore, the link command generating unit 201 periodically generates LUP link commands; the data scrambling module 3 scrambles the LUP link commands; the data descrambling module 6 descrambles the LDN link commands fed back by the peer USB device and sends them to the training sequence parsing unit 701 for parsing.

[0047] Specifically, the data scrambling module 3 performs random scrambling operation on the LUP link command according to the LFSR algorithm; the data descrambling module 6 performs descrambling operation on the LDN link command according to the LFSR algorithm; generates and parses periodic LUP / LDN link commands to maintain the normal operation of the communication link with the opposite USB device.

[0048] Furthermore, the modulation control module 1 is connected to the observation module 8; the observation module 8 is used to observe the key signal waveforms of the communication process between the USB device and the other end online. By observing the key signals, it can help locate the physical layer problems of the USB device at the other end more quickly and preserve the scene.

[0049] Figure 2 Schematic diagram of the overall structure of an embodiment of the present invention; Figure 2 As shown, the embodiment of the present invention preferably adopts the XC7K325T of the Kintex-7 series produced by Xilinx, and embeds the debugging device into the FPGA in the form of an intellectual property IP core to realize a complete USB3.0 PHY debugging and testing device through the modulation control module 1, the data excitation module 2, the data analysis module 7, the LFPS module 5, and the physical layer interface module 4; the physical layer interface module 4 realizes the USB3.0 physical layer transceiver function through Xilinx's GTX high-speed serial transceiver, and is connected to the opposite USB device through a standard USB3.0 connector. During the USB3.0 protocol debugging test, the physical layer interface module 4 is connected to the USB3.0 PHY debugging device of the present invention through the PIPE (The Phy Interface for the USBArchitectures) bus interface, which supports working in 32-bit SDR mode at 125Mhz, and converts the received differential serial data into 32-bit parallel data and sends it to the debugging device of the present invention.

[0050] The embodiment of the present invention provides a USB3.0 physical layer debugging device based on FPGA. By embedding the debugging device into FPGA in the form of an intellectual property IP core, the communication process between the control and the opposite USB device is carried out. By analyzing the error codes corresponding to various abnormal events and completing the error code analysis of each step feedback, the problem location in the PHY high-speed data signal transmission process of the opposite USB device is realized, the debugging process is simplified, and no dedicated protocol analyzer equipment is required, which reduces the testing cost to a certain extent. During the debugging process, when an error occurs in the system, it can quickly locate and distinguish whether it is an error problem of the high-speed serial bottom link or an error introduced by the USB3.0 controller or the USB3.0 software; at the same time, the software and hardware iteration debugging cycle is shortened.

[0051] Based on the above embodiments, Figure 3 FIG. 1 is a flow chart of an FPGA-based USB 3.0 physical layer debugging method being executed according to an embodiment of the present invention; Figure 3 As shown, the following steps are included:

[0052] Step 1, perform status detection of the opposite USB device; including sending a TxDetectRx signal and detecting an RxSTATUS signal. If the RxSTATUS signal returns valid information, it indicates that the opposite USB device exists; if the RxSTATUS signal returns invalid information, it indicates that the opposite USB device does not exist, and at the same time, perform corresponding error code analysis and exit;

[0053] Step 2, execute LFPS out-of-band signal synchronization with the opposite USB device; including sending polling.LFPS out-of-band signal and receiving polling.LFPS out-of-band signal of the opposite USB device at regular intervals; complete LFPS out-of-band signal handshake to realize code rate synchronization, clock synchronization and rate matching of the underlying high-speed serial link; if synchronization is completed within the set time, proceed to the next step; if synchronization is not completed within the set time, perform corresponding error code analysis and exit; the set time is the time set according to the protocol provisions;

[0054] Step 3, execute data synchronization with the opposite USB device; including sending the TSEQ training sequence, TS1 training sequence and TS2 training sequence negotiated by the link layer in sequence and parsing the correct TSEQ training sequence, TS1 training sequence and TS2 training sequence fed back by the opposite USB device to complete data synchronization; if the synchronization is completed within the set time, proceed to the next step; if the synchronization is not completed within the set time, perform the corresponding error code analysis and exit.

[0055] Furthermore, it also includes executing link layer synchronization with the opposite USB device; scrambling the link layer commands LGOODx and LCRDx; descrambling and parsing the received link layer commands LGOODx and LCRDx of the opposite USB device; the LGOODx command is used for exchanging header packet link sequence number notifications between link partners, and the link sequence number range is 0-7; the LCRD_x command is used for exchanging entry flow control credit notifications between link partners, and each available link layer receive buffer corresponds to a flow control credit command, and the USB 3.0 specification stipulates four receive buffers (called ABCD); completing link command synchronization, broadcasting the link flow control and the buffer status of the notification link partner at the link layer; if the synchronization is completed within the set time, proceed to the next step; if the synchronization is not completed within the set time, perform the corresponding error code analysis and exit.

[0056] Furthermore, it also includes executing a port configuration exchange with a USB device at the opposite end; scrambling the protocol packet LMP of the protocol layer; descrambling the received protocol packet LMP of the USB device at the opposite end and parsing it to complete the port configuration exchange; if it is completed within the set time, proceed to the next step; if it is not completed within the set time, perform a corresponding error code analysis and exit.

[0057] Furthermore, it also includes executing periodic detection of the communication link between the USB device and the other end; including scrambling the periodic LUP link command; descrambling the received periodic LDN link command of the USB device and then parsing it; used to maintain the normal operation of the communication link between the USB device; if it is completed within the set time, then enter the next step; if it is not completed within the set time, then perform corresponding error code analysis and exit.

[0058] Furthermore, it also includes online observation of key signal waveforms in the process of establishing communication with the opposite USB device. By observing the key signal waveforms, the problem of the physical layer of the opposite USB device can be located more quickly and the scene can be preserved.

[0059] The embodiment of the present invention provides a USB3.0 physical layer debugging method based on FPGA, which is executed on the above-mentioned device. By embedding the debugging device into the FPGA in the form of an intellectual property IP core, the error code analysis corresponding to various abnormal events during the complete communication process with the opposite USB device is controlled, so as to locate the problem in the PHY high-speed data signal transmission process of the opposite USB device, simplify the debugging process, do not need a dedicated protocol analyzer device, and reduce the testing cost to a certain extent. During the debugging process, when an error occurs in the system, it can quickly locate and distinguish whether it is an error problem of the high-speed serial bottom link or an error introduced by the USB3.0 controller or the USB3.0 software; at the same time, the software and hardware iterative debugging cycle is shortened.

[0060] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0061] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A USB3.0 physical layer debugging device based on FPGA, characterized in that: The configuration is: Physical layer interface module, used for data transmission between USB3.0 physical layer transceiver; LFPS module, used to periodically send LFPS out-of-band signals and receive and analyze LFPS out-of-band signals fed back by the peer USB device; The data excitation module is configured with a training sequence generating unit, and the training sequence generating unit is used to send a training sequence for link negotiation; The data parsing module is configured with a training sequence parsing unit, and the training sequence parsing unit is used to receive and parse the training sequence fed back by the opposite USB device; The modulation control module controls the communication process between the physical layer interface module, the data excitation module, the data parsing module, the LFPS module and the opposite USB device, and performs real-time analysis on the error codes corresponding to various abnormal events generated during the communication process.

2. The FPGA-based USB3.0 physical layer debugging device according to claim 1, characterized in that: The data excitation module is configured with a link command generating unit; the data excitation module is connected to a data scrambling module; the data scrambling module performs a scrambling operation on a link command packet sent by the link command generating unit; the data parsing module is configured with a link command parsing unit; the data parsing module is connected to a data descrambling module; The data descrambling module performs a descrambling operation on the link command packet fed back by the opposite USB device and then sends it to the data parsing module for parsing.

3. The FPGA-based USB3.0 physical layer debugging device according to claim 2, characterized in that: The data excitation module is configured with a protocol packet generating unit; the data scrambling module performs a scrambling operation on the protocol layer protocol packet sent by the protocol packet generating unit; the data parsing module is configured with a protocol packet parsing unit; The data descrambling module performs a descrambling operation on the protocol packet fed back by the opposite USB device and then sends it to the data parsing module for parsing.

4. The FPGA-based USB3.0 physical layer debugging device according to claim 3, characterized in that: The link command generating unit periodically generates an LUP link command; the data scrambling module performs a scrambling operation on the LUP link command; the data descrambling module performs a descrambling operation on the LDN link command fed back by the opposite USB device and sends the descrambling operation to the data parsing module for parsing.

5. The FPGA-based USB3.0 physical layer debugging device according to any one of claims 1 to 4, characterized in that: The modulation control module is connected to the observation module; the observation module is used for online observation of key signal waveforms in the process of establishing communication with the opposite USB device.

6. A USB3.0 physical layer debugging method based on FPGA, characterized in that: The following steps are involved: Step 1, perform status detection of the opposite USB device; if the opposite USB device does not exist, perform corresponding error code analysis and exit; Step 2, executing LFPS out-of-band signal synchronization with the opposite USB device; if the synchronization is not completed within the set time, performing corresponding error code analysis and exiting; Step 3, executing data synchronization with the opposite USB device; if the synchronization is not completed within the set time, performing corresponding error code analysis and exiting.

7. The USB3.0 physical layer debugging method based on FPGA according to claim 6, characterized in that: The method also includes executing link layer synchronization with the opposite USB device; if the synchronization is not completed within the set time, performing corresponding error code analysis and exiting.

8. The USB3.0 physical layer debugging method based on FPGA according to claim 7, characterized in that: The method also includes executing a port configuration exchange with the opposite USB device; if the exchange is not completed within the set time, a corresponding error code analysis is performed and the method exits.

9. The USB3.0 physical layer debugging method based on FPGA according to claim 8, characterized in that: The method also includes executing periodic detection of the communication link with the opposite USB device; if it is not completed within the set time, performing corresponding error code analysis and exiting.

10. A USB3.0 physical layer debugging method based on FPGA according to any one of claims 6 to 9, characterized in that: The method also includes online observation of key signal waveforms in the process of establishing communication with the opposite USB device.