System parameter dynamic configuration method based on USB3.0
When link training between USB3.0 host and slave, the hardware circuit automatically polls the configuration PMA data and selects the optimal parameter configuration, solving the compatibility problem caused by poor signal quality of USB3.0 devices, and realizing dynamic configuration and fast adaptation of USB3.0 system parameters.
Patent Information
- Application Number
- CN202411668401.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-11
AI Technical Summary
During use, the signal quality of USB3.0 devices is deteriorated due to factors such as cable quality, length and signal routing, resulting in connection failure or communication interruption. The existing technology cannot effectively solve the compatibility problem.
During the link training between the USB3.0 host and slave, the hardware circuit automatically polls the configuration PMA data, selects the optimal parameter configuration to the PMA data, and realizes the rapid adaptation of PMA data parameters between the USB3.0 host and slave.
By dynamically configuring the USB3.0 system parameters, the PMA electrical parameters are quickly adapted between the USB3.0 host and slave, solving the compatibility problem between the master and slave, and ensuring the normal operation of the system.
Smart Images

Figure CN119597694A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated circuits, and more specifically to a method for dynamically configuring system parameters based on USB 3.0. Background Art
[0002] Under normal circumstances, after a USB 3.0 device is connected to a USB 3.0 host (HOST) through a cable, the host detects the device and performs link training. After link training is completed, normal communication begins. However, in actual use, due to factors such as cable quality, length, and signal routing, the signal quality of the signal at the transmitting end deteriorates when it is transmitted to the receiving end. In order to improve the communication quality of high-speed serial signals, the high-speed serial signals are processed in the PMA (Physical Media Attachment Layer) of the system physical layer. Specifically, a de-emphasis algorithm is performed at the signal transmitting end, and an equalization algorithm is performed at the signal receiving end. Usually, after the system is reset on power-on, the de-emphasis algorithm, equalization algorithm and other electrical parameter configurations are performed after being adjusted by software or firmware based on test experience data, so that the parameters do not need to be adjusted during the use of the device.
[0003] However, the above one-time parameter adjustment cannot meet the changing usage scenarios of USB3.0 devices. Common USB systems all support hot plugging. Without power failure, the USB3.0 host can connect to different USB3.0 devices. However, the different electrical characteristics of their cables, signal routing, etc. will cause compatibility issues such as connection failure or communication interruption when the USB3.0 device is connected to the USB3.0 host.
[0004] Therefore, it is necessary to provide an improved method for dynamically configuring system parameters based on USB 3.0 to overcome the above defects. Summary of the invention
[0005] The purpose of the present invention is to provide a method for dynamic configuration of system parameters based on USB3.0. During the link training between the USB3.0 host and the slave, the hardware circuit automatically polls and configures PMA data, and finally selects the optimal parameters to configure to the PMA data, thereby realizing the rapid adaptation of the PMA data parameters between the USB3.0 host and the slave, and solving the compatibility problem between the master and the slave.
[0006] To achieve the above-mentioned purpose, the present invention provides a method for dynamically configuring system parameters based on USB3.0, which comprises the following steps: a. loading the parameters to be configured on the firmware into a lookup table; extracting the parameter information corresponding to the PMA data of the current group from the lookup table, configuring the parameters to the PMA, and forming PMA data parameters; c. the PMA adjusts the electrical parameters according to the PMA data parameters, and records the corresponding information in the process of the PMA receiving the equalization training sequence according to the adjusted electrical parameters; d. repeating steps b to c until all PMA data configurations are completed and the corresponding information in the process of the PMA receiving the equalization training sequence is recorded; selecting the PMA data parameters corresponding to a group of information with the smallest error in the recorded information and configuring them to the PMA.
[0007] Preferably, the corresponding information recorded in the process of PMA receiving the equalization training sequence includes the number of equalization training sequences, the number of error information and the serial number of the current group of PMA data parameters.
[0008] Preferably, the corresponding information recorded in the process of PMA receiving the equalization training sequence includes the number of equalization training sequences, the number of error information and the serial number of the current group of PMA data.
[0009] Preferably, after completing parameter configuration for the PMA data, the receiving end waits for a set time and then records the corresponding information during the PMA receiving equalization training sequence.
[0010] Preferably, after the step e is completed, the receiving end waits for a set time before completing the parameter configuration of the PMA.
[0011] Preferably, the step e specifically comprises: comparing the number of equalized training sequences, the number of error messages and the serial number of the current group of PMA data corresponding to each standard group of PMA data stored in the RAM with the number of equalized training sequences, the number of error messages and the serial number of the current group of PMA data parameters in the recorded information in turn, and selecting the PMA data parameters corresponding to the group of information with the smallest error to complete the parameter configuration of the PMA.
[0012] Preferably, the PMA data parameters corresponding to the set of information with the smallest error are selected based on the same sequence number, and the set of PMA data parameters with the largest number of consecutive equalization training sequences and the smallest number of erroneous information is selected.
[0013] Preferably, the waiting time for recording the corresponding information in the process of PMA receiving the equalization training sequence is set to t1, the time for recording the corresponding information in the process of PMA receiving the equalization training sequence is set to t2, the number of PMA data groups is n, and the transmission time of the entire system is set to t3, then: (t1+t2)*n+t1 <t3。
[0014] Compared with the prior art, the method for dynamic configuration of system parameters based on USB3.0 of the present invention extracts parameter information corresponding to the PMA data of the current group from a lookup table, configures the parameters to the PMA, forms PMA data parameters, and the PMA adjusts electrical parameters according to the PMA data parameters, and records corresponding information in the process of PMA receiving an equalization training sequence according to the adjusted electrical parameters; and repeats this step to complete the parameter configuration of all PMA data and the recording of the configured information, and after the repetition, selects the PMA data parameters corresponding to a group of information with the smallest error to complete the parameter configuration of the PMA, thereby realizing the dynamic configuration of the USB3.0 system parameters; and the configuration process of the above parameters is carried out during the link training of the USB3.0 host and the slave, which does not affect the normal operation of the system, and at the same time realizes the rapid adaptation of the PMA electrical parameters between the USB3.0 host and the slave, solving the compatibility problem between the master and the slave.
[0015] The present invention will become more apparent from the following description taken in conjunction with the accompanying drawings, which are used to illustrate embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention is a flow chart of a method for dynamically configuring system parameters based on USB 3.0. DETAILED DESCRIPTION
[0017] The embodiments of the present invention are now described with reference to the accompanying drawings, in which similar element numbers represent similar elements. As described above, the present invention provides a method for dynamically configuring system parameters based on USB3.0. During the link training between the USB3.0 host and the slave, the hardware circuit automatically polls and configures the PMA data, and finally selects the optimal parameters to configure the PMA data, thereby realizing the rapid adaptation of the PMA electrical parameters between the USB3.0 host and the slave, and solving the compatibility problem between the master and the slave.
[0018] As is known to all, a USB 3.0 slave is connected to a USB 3.0 host through a cable and after the system is powered on, the host detects the connection with the slave and initiates a reset. After the reset is completed, both parties detect each other's receiving terminal and start to enter the polling state to perform link training. The method for dynamic configuration of system parameters based on USB3.0 of the present invention is performed during the link training of the master and slave. For details, please refer to Figure 1 , Figure 1 Flow chart of the method for dynamic configuration of system parameters based on USB 3.0 of the present invention. Figure 1 As shown, the method for dynamic configuration of system parameters based on USB3.0 of the present invention comprises the following steps:
[0019] Step S100, loading the parameters to be configured on the firmware into the lookup table; in this step, the PMA (Physical Media Attachment Layer) data of the system physical layer is composed of multiple groups of PMA data with the same parameter combination, and the specific parameter information corresponding to each group of PMA data is recorded one by one in the lookup table through the loading of the firmware, so that these parameters can be used to configure the PMA data later to achieve the configuration of the PMA electrical parameters; wherein the parameter information in the PMA data includes the number of equalization training sequences, the number of error messages and the serial number of the current group of PMA data, that is, each group of PMA data includes the parameter information equalization training sequence number, the number of error messages and the serial number, of course, the number of equalization training sequences, the number of error messages and the serial number of each group of PMA data are different from each other, so that each group of PMA data can be distinguished by the serial number.
[0020] Step S200, extracting parameter information corresponding to the PMA data of the current group from the lookup table, configuring the parameters to the PMA, and forming PMA data parameters; in this step, the parameter configuration of the PMA data of the current group is specifically to find the same number in the lookup table according to the number of the PMA data of the current group, and configure the parameter information corresponding to the number to the PMA data of the current group, thereby forming the PMA data parameters; for example, if the number of the PMA data of the current group is 1, the parameter information numbered 1 is found in the lookup table, and the parameter information corresponding to the numbered 1 in the lookup table is configured to the PMA data of the current group, and the PMA data parameters numbered 1 are formed, thereby ensuring that the lookup table can realize accurate parameter configuration for each group of PMA data according to the number of the PMA data, and will not cause mismatching due to too many PMA data groups, and the PMA data parameters formed after configuration correspond to the PMA data of the current group and the PMA data in the lookup table; that is, the PMA data parameters numbered 1 formed after configuration, the PMA data numbered 1 in the PMA, and the PMA data numbered 1 in the lookup table correspond to each other.
[0021] Step S300, PMA adjusts electrical parameters according to PMA data parameters, and records corresponding information during PMA receiving equalized training sequence according to the adjusted electrical parameters; in this step, PMA adjusts electrical parameters according to PMA data parameters to prepare for subsequent recording of corresponding information during receiving equalized training sequence; specifically, in this step, the receiving end receives the equalized training sequence on the transmission link, and records corresponding information during PMA receiving equalized training sequence according to the PMA data parameters (adjusted electrical parameters) of the current group, and further, the receiving end waits for a set time before recording corresponding information during PMA receiving equalized training sequence, so that PMA can be stabilized by waiting for the set time, so that the PMA of the receiving end has adjusted its own electrical parameters according to the configured PMA data and completed the adjustment process, so that the corresponding information during receiving equalized training sequence can be accurately recorded; in addition, as is well known, both the transmitting and receiving ends are always When sending and receiving an equalized training sequence, in the present invention, only the PMA at the receiving end records the corresponding information in the process of receiving the equalized training sequence within a specific time, and does not affect the normal transmission process of the sending and receiving ends; the setting time for PMA to wait for recording information is marked as t1, and the specific value of t1 can be set according to the specific application environment, as long as the PMA is stable, and no specific requirements are made in the present invention; as mentioned above, the corresponding information in the process of PMA receiving the equalized training sequence specifically includes the number of equalized training sequences, the number of error information and the number of the current group of PMA data (the recorded group of equalized training sequences is received by PMA according to the current group of PMA data parameters, and the recorded information naturally includes the number of the current group of PMA data parameters), so as to record the corresponding information in the process of PMA receiving the equalized training sequence after the current group of PMA data is configured, so as to facilitate use in subsequent steps; and the time required to record a group of information is marked as t2.
[0022] At this point, the configuration of a group of PMA data is completed, and after the configuration, the corresponding information in the process of PMA receiving the equalization training sequence is recorded according to the adjusted electrical parameters.
[0023] Step S400, repeating steps S200-S300 until all PMA data configuration is completed and the corresponding information in the process of PMA receiving the equalized training sequence is recorded; through the above step S200, the parameter configuration of a group of PMA data and the recording after configuration are completed, but there are n groups of PMA data in the PMA that need to perform the above operation process, so it is necessary to repeat steps S200-S300 n times until all groups of PMA data are configured and the corresponding information in the process of receiving the equalized training sequence is recorded; wherein, as is well known, the entire master and slave machines need to send 65536 equalized training sequences to each other during link training, that is, the transmission of the equalized training sequence is repeated 65536 times, and the time of each transmission is 64ns, that is, the total transmission time is 4.194304ms, recorded as t3; therefore, in the present invention, repeating steps S200-S300 n times needs to be completed between the transmissions of 65536 equalized training sequences, and steps S200-S300 are repeated n times within time t3.
[0024] Step S500, select the PMA data parameters corresponding to a group of information with the smallest error in the recorded information and configure them to the PMA; in this step, the PMA data corresponding to the group of information with the smallest error is selected specifically by comparing the number of equalized training sequences, the number of error information and the number of the current group of PMA data stored in the RAM with the number of equalized training sequences, the number of error information and the number of the current group of PMA data (PMA data parameters) in each group of recorded information, that is, the number in the RAM is compared with the number in the recorded information, the number of equalized training sequences in the RAM is compared with the number of equalized training sequences in the recorded information, and the number of error information in the RAM is compared with the number of error information in the recorded information. After comparing these three parameters in the n groups of recorded information with the corresponding parameters in the RAM, select the PMA data parameters corresponding to the group of information with the smallest error in the recorded information as the configured PMA data parameters to configure the PMA, that is, complete the parameter configuration of the PMA. Among them, the PMA data corresponding to the group of information with the smallest error is a group of PMA data parameters with the largest number of consecutive equalization training sequences and the smallest number of error information selected on the basis of the same number; that is, the specific selection process is to first determine whether the numbers of each group of PMA data parameters are the same as the numbers recorded in the lookup table, abandon all PMA data parameters with different numbers after comparison, and then select one or more groups of PMA data parameters with the largest number of consecutive equalization training sequences from each group of PMA data parameters with the same number, so as to ensure the integrity and continuity of the equalization training sequence received by the PMA after the electrical parameters are adjusted according to the currently configured PMA data, and finally select a group of PMA data parameters with the smallest number of error information from the group or multiple groups of PMA data parameters with the largest number of consecutive equalization training sequences, and then configure them to the PMA, thereby completing the parameter configuration of the PMA; thus, after layers of comparison and selection, it is ensured that the last selected group of PMA data parameters is the best group among the current PMA data parameters, and this group of parameters is configured to the PMA, so as to achieve the optimal configuration of the PMA parameters.
[0025] So far, the dynamic configuration of the PMA parameters has been completed. However, in the present invention, in order to ensure that the PMA parameters can be directly applied to other subsequent operations after the configuration of the PMA parameters, it is specially arranged that the PMA parameter configuration is completed only after the receiving end waits for the set time t1, thereby ensuring that the output PMA data parameters after the configuration are stable and reliable, so as to provide a stable and reliable PMA data parameter for subsequent operations.
[0026] In addition, as is well known, the time for link training between the host and the slave is limited. In the present invention, in order to ensure the normal progress of the entire polling to achieve accurate configuration of the PMA data parameters, the specific operation time during the polling process is specifically limited. Specifically, the sum of the waiting time and the recording time corresponding to the information during the process of recording the PMA receive equalization training sequence each time, multiplied by the number of groups of PMA data, and then added with the sum of a waiting time should be less than the total transmission time of the entire system. That is, if the total transmission time of the entire system is set as t3, then: (t1 + t2) * n + t1 < t3; thereby ensuring that each group of PMA data parameters will be used to record the corresponding information during the process of the PMA receive equalization training sequence, and also ensuring that the finally selected parameters are the most suitable and optimal ones.
[0027] In summary, the method for dynamically configuring system parameters based on USB3.0 of the present invention configures the parameters of the current group of PMA data by extracting the parameter information corresponding to the current group of PMA data from the look-up table to form PMA data parameters. The PMA adjusts the electrical parameters according to the PMA data parameters, and records the corresponding information during the process of the PMA receive equalization training sequence according to the adjusted electrical parameters; and repeating this step can complete the parameter configuration of all PMA data and the recording of the information after configuration. After repetition, the PMA data parameters corresponding to the group of information with the smallest error are selected to complete the parameter configuration of the PMA, thereby realizing the dynamic configuration of the system parameters of USB3.0; and the above parameter configuration process is carried out during the link training between the USB3.0 host and the slave, without affecting the normal operation of the system, and at the same time realizing the rapid adaptation of the PMA data parameters between the USB3.0 host and the slave, solving the compatibility problem between the master and the slave; moreover, during the process of configuring the PMA data parameters, the configured parameters are compared and selected layer by layer, ensuring that the finally selected group of PMA data parameters is the optimal group among the current PMA data parameters, and realizing the optimal configuration of the PMA parameters.
[0028] The present invention has been described above in combination with the best embodiments, but the present invention is not limited to the disclosed embodiments above, and should cover various modifications and equivalent combinations made according to the essence of the present invention.
Claims
1. A method for dynamically configuring system parameters based on USB 3.0, characterized in that: The steps include: a. Load the parameters to be configured on the firmware into the lookup table; b. Extract the parameter information corresponding to the PMA data of the current group from the lookup table, configure the parameters to the PMA, and form the PMA data parameters; c.PMA adjusts the electrical parameters according to the PMA data parameters, and records the corresponding information during the PMA receiving the equalization training sequence according to the adjusted electrical parameters; d. Repeat steps bc until all PMA data configuration is completed and the corresponding information during the PMA receiving equalization training sequence is recorded; e. Select the PMA data parameters corresponding to a set of information with the smallest error in the recorded information and configure them into PMA.
2. The method for dynamic configuration of system parameters based on USB 3.0 according to claim 1, characterized in that: Specifically, in step b, the same number is found in the lookup table according to the number of the PMA data of the current group, and the parameter information corresponding to the number is configured to the PMA data of the current group.
3. The method for dynamic configuration of system parameters based on USB 3.0 according to claim 1, characterized in that: The corresponding information recorded during the PMA receiving the equalization training sequence includes the number of equalization training sequences, the number of error information and the serial number of the current group of PMA data parameters.
4. The method for dynamic configuration of system parameters based on USB 3.0 as claimed in claim 3, characterized in that: After completing the parameter configuration for the PMA data, the receiving end waits for a set time and then records the corresponding information during the PMA reception equalization training sequence.
5. The method for dynamic configuration of system parameters based on USB 3.0 as claimed in claim 4, characterized in that: After step e is completed, the receiving end waits for a set time before completing the parameter configuration of the PMA.
6. The method for dynamic configuration of system parameters based on USB 3.0 as claimed in claim 3, characterized in that: The step e specifically includes: comparing the number of equalized training sequences, the number of error messages and the serial number of the current group of PMA data corresponding to each standard group of PMA data stored in the RAM with the number of equalized training sequences, the number of error messages and the serial number of the current group of PMA data parameters in the recorded information, and selecting the PMA data parameters corresponding to the group of information with the smallest error to complete the parameter configuration of the PMA.
7. The method for dynamic configuration of system parameters based on USB 3.0 according to claim 6, characterized in that: The PMA data parameters corresponding to the group of information with the smallest error are selected based on the same number, and the group of PMA data parameters with the largest number of consecutive equalization training sequences and the smallest number of erroneous information is selected.
8. The method for dynamic configuration of system parameters based on USB 3.0 according to any one of claims 5 to 8, characterized in that: Assume that the waiting time for each recording of the information corresponding to the PMA receiving the equalization training sequence is t1, the time for each recording of the information corresponding to the PMA receiving the equalization training sequence is t2, the number of PMA data groups is n, and the transmission time of the entire system is t3, then: (t1+t2)*n+t1 <t3。