CN112506820A - USB port hardware parameter analysis method, device, equipment and storage medium - Google Patents

USB port hardware parameter analysis method, device, equipment and storage medium Download PDF

Info

Publication number
CN112506820A
CN112506820A CN202011397300.XA CN202011397300A CN112506820A CN 112506820 A CN112506820 A CN 112506820A CN 202011397300 A CN202011397300 A CN 202011397300A CN 112506820 A CN112506820 A CN 112506820A
Authority
CN
China
Prior art keywords
hardware
parameter
usb
combination
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011397300.XA
Other languages
Chinese (zh)
Other versions
CN112506820B (en
Inventor
丁永波
王大平
杨梓
肖国良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Weibu Information Co Ltd
Original Assignee
Shenzhen Weibu Information Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Weibu Information Co Ltd filed Critical Shenzhen Weibu Information Co Ltd
Priority to CN202011397300.XA priority Critical patent/CN112506820B/en
Publication of CN112506820A publication Critical patent/CN112506820A/en
Application granted granted Critical
Publication of CN112506820B publication Critical patent/CN112506820B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/12Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
    • G06F13/122Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware performs an I/O function other than control of data transfer

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a method, a device, equipment and a storage medium for analyzing hardware parameters of a USB port, wherein the method comprises the following steps: after the USB equipment is connected, identifying the type of the USB equipment, and loading a hardware access drive file corresponding to the type of the USB equipment; running preset analysis software, calling a preset parameter setting interface function through the analysis software, calling a library function corresponding to the hardware access driving file based on the parameter setting interface function, and accessing a plurality of hardware parameters in the hardware register through the library function; enumerating different combinations of a plurality of hardware parameters based on the analysis software; the method comprises the steps of obtaining each running state of the USB equipment under each combination of hardware parameters, obtaining each trend information of compatibility of each hardware parameter to the USB equipment for each combination of which the running state is normal, and obtaining the hardware parameter under the optimal combination based on each trend information. The invention can improve the analysis efficiency of the hardware parameters of the USB port.

Description

USB port hardware parameter analysis method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for analyzing hardware parameters of a USB port.
Background
Signal Integrity (SI) is a series of metrics for the quality of electronic signals. As integrated circuit output switching speeds have increased and PCB board densities have increased, signal integrity has become one of the issues that must be addressed for high-speed digital PCB designs. The signal integrity problem can be caused by the parameters of the electronic components and the PCB, the layout of the components on the PCB, the wiring of high-speed signals and other factors, and the signal transmission can be attenuated by the influence of noise, transmission distance and other factors, so that the system is unstable in work and even does not work completely. USB is prone to some compatibility problems during the motherboard design phase, and experienced hardware engineers can notice a number of problems related to compatibility during the early design phase, such as: improper layout of components in the USB hardware system can cause the components which are easy to be interfered by the outside, and signal receiving is influenced. The transmission of USB signals increases the loss with the increase of the trace distance, thereby affecting the transmission of data and the reception of signals. In the ApolloLake platform, a small number of USB poor boards appear during each production, for example, the defective rate is about 1% per mill, but after the CPU is replaced, the USB function of the poor boards is normal. Through comparison and verification, the functions of the USB are normal after the CPU of the USB bad board is switched to other items of the same platform, the verification result shows that the CPU has differences and the USB has compatibility problems, and the integrity of USB signals and the compatibility of equipment can be improved by adjusting the hardware parameters of the USB port.
Taking an ApolloLake (processor) platform as an example, the USB port hardware parameters that affect the integrity of the USB signal include PERPORTRXISET, PERPORTTXPEHalf, PERPORTPETxiSet, PERPORTTxiSet, and TxEmphasis. PERPORTRXISET has 8 kinds of values, PERPORTTXPEHalf has 2 kinds of values, PERPORTPETxiSEt has 8 kinds of values, PERPORTTXISEt has 8 kinds of values, TxEmphasis has 4 kinds of values, in addition this platform supports 8 USB2.0 ports, therefore according to the theory of combination, this platform is in common: 8 × 2 × 8 × 8 × 8 ═ 32768 USB2.0 port hardware parameter settings. In the prior art, a manual exhaustion method is adopted to set, analyze and test the hardware parameters of the USB port, and obtain the optimal hardware parameters of the USB port. For this method, it is assumed that the testing of the hardware parameters of the USB port takes 5 minutes once, and the exhaustion scheme and the testing require 32768 × 5 ÷ 60 ≈ 2730 hours, so the method takes too long, and even if each USB port tests several sets of hardware parameters in the actual testing, such as 5 sets, the time consumed is very large, and the analysis efficiency of the hardware parameters of the USB port is low.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for analyzing hardware parameters of a USB port, and aims to improve the analysis efficiency of the hardware parameters of the USB port.
The invention provides a method for analyzing hardware parameters of a USB port, which comprises the following steps:
after the USB equipment is connected, identifying the type of the USB equipment, and loading a hardware access drive file corresponding to the type of the USB equipment;
running preset analysis software, calling a preset parameter setting interface function through the analysis software, calling a library function corresponding to the hardware access driving file based on the parameter setting interface function, and accessing a plurality of hardware parameters in a hardware register through the library function;
enumerating different combinations of the plurality of hardware parameters based on the analysis software;
the method comprises the steps of obtaining each running state of the USB equipment under each combination of hardware parameters, obtaining each trend information of compatibility of each hardware parameter to the USB equipment for each combination of which the running state is normal, and obtaining the hardware parameters under the optimal combination based on each trend information.
The invention also provides a device for analyzing the hardware parameters of the USB port, which comprises:
the loading module is used for identifying the type of the USB equipment after the USB equipment is connected and loading a hardware access drive file corresponding to the type of the USB equipment;
the access module is used for running preset analysis software, calling a preset parameter setting interface function through the analysis software, calling a library function corresponding to the hardware access driving file based on the parameter setting interface function, and accessing a plurality of hardware parameters in a hardware register through the library function;
an enumeration module to enumerate different combinations of the plurality of hardware parameters based on the analysis software;
the acquisition module is used for acquiring each running state of the USB equipment under each combination of hardware parameters, acquiring each trend information of compatibility of each hardware parameter to the USB equipment for each combination of which the running state is normal, and acquiring the hardware parameter under the optimal combination based on each trend information.
The invention also provides a computer device, which includes a memory and a processor connected with the memory, wherein the memory stores a computer program capable of running on the processor, and the processor executes the computer program to implement the steps of the USB port hardware parameter analysis method.
The present invention also provides a computer readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-mentioned USB port hardware parameter analysis method.
The invention has the beneficial effects that: the method automatically enumerates the combination of the USB port hardware parameters in a software mode, analyzes the influence of the hardware parameters under the combination on the compatibility of the USB equipment, provides a group of optimal hardware parameters, and can improve the analysis efficiency of the USB port hardware parameters; design defects are found through a software analysis mode, hardware parameters are optimized, the compatibility problem of the USB equipment is avoided, and product quality is improved.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for analyzing hardware parameters of a USB port according to an embodiment of the present invention;
FIG. 2 is a schematic workflow diagram of the analysis software of FIG. 1;
FIG. 3 is an eye diagram corresponding to a set of randomly extracted USB port hardware parameters;
FIG. 4 is an eye diagram corresponding to hardware parameters under the optimal combination;
FIG. 5 is a schematic structural diagram of an embodiment of a USB port hardware parameter analyzing apparatus according to the present invention;
FIG. 6 is a diagram illustrating a hardware architecture of an embodiment of a computer device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Fig. 1 is a schematic flow chart showing a method for analyzing hardware parameters of a USB port according to an embodiment of the present invention. The USB port hardware parameter analysis method comprises the following steps:
step S1, after connecting USB equipment, identifying the type of the USB equipment, and loading a hardware access drive file corresponding to the type of the USB equipment;
the embodiment is suitable for the equipment with the USB port on the Intel platform (the equipment comprises an AMI BIOS mainboard), when the equipment is implemented, the USB port is connected with the USB equipment, and the hardware parameters of the USB port are analyzed through the preset analysis software in the equipment with the USB port.
Types of USB devices include, for example, USB 1.1 and USB2.0 (USB 2.0 includes three classes, High-speed, Full-speed and Low-speed). Different types of USB devices correspond to different hardware access drive files, and a plurality of written hardware access drive files of different USB device types are stored in the device with the USB port. After the USB equipment is connected, the type of the USB equipment is identified, and a hardware access drive file corresponding to the type of the USB equipment is loaded so as to access the USB port hardware parameters in the hardware register.
Step S2, operating predetermined analysis software, calling a preset parameter setting interface function through the analysis software, calling a library function corresponding to the hardware access driving file based on the parameter setting interface function, and accessing a plurality of hardware parameters in a hardware register through the library function;
in this embodiment, a predetermined analysis software is usbsidbgntol, and a preset parameter setting interface function is void _ stdcall USB2PerPortSet, for example. The USB port hardware parameters are exemplified by ApolloLake platform, and include 5 hardware parameters, namely, PERPORTRXISET, PERPORTTXPEHalf, PERPORTPETxiSet, PERPORTTxiSet, and TxEmphasis.
In this embodiment, the access to the hardware under the operating system is protected, the application software cannot directly access the hardware register, and the hardware register needs to be accessed through a driving method, so that the access right of the hardware register is obtained through driving.
After the analysis software is run, the analysis software calls a preset parameter setting interface function, and in the presence of a hardware access driver file (for example, the hardware access driver file oemwnaiio 64.sys) corresponding to the type of the USB device, the parameter setting interface function calls a corresponding library function (for example, the library function oemwini 64.dll) to access a plurality of hardware parameters in hardware registers in the device with the USB port through the library function.
Step S3, enumerating different combinations of the plurality of hardware parameters based on the analysis software;
wherein enumerating different combinations of the plurality of hardware parameters based on the analysis software specifically comprises:
randomly selecting a hardware parameter as a changed hardware parameter, keeping the rest of the hardware parameters except the selected hardware parameter unchanged, changing the selected hardware parameter, and enumerating the combination of the selected hardware parameter;
randomly selecting one hardware parameter from the rest other hardware parameters as a changed hardware parameter to enumerate the combination of the selected hardware parameters until the combination corresponding to each hardware parameter is enumerated.
For example, for PERPOTRXISET, PERPOTTXPEHalf, PERPOTTPTETXISEt, PERPOTTXISEt and TxEmphasis, a first hardware parameter PERPOTRXISET can be selected for combination, namely the last 4 hardware parameters PERPOTTXPEHalf, PERPOTTETXISEt, PERPOTTXISEt and TxEmphasis are kept unchanged, and 8 values of PERPOTRXISET are respectively set to obtain corresponding combinations; then selecting a second hardware parameter PERPOTTXPEHalf, keeping other 4 hardware parameters unchanged, and respectively setting 2 values of PERPOTTXPEHalf to obtain a corresponding combination; and repeating the steps until the combinations corresponding to the hardware parameters are enumerated.
In this embodiment, different combinations of multiple hardware parameters are automatically enumerated in a software manner, and all combinations can be enumerated quickly and accurately.
Step S4, acquiring each operating state of the USB device under each combination of hardware parameters, acquiring each trend information of compatibility of each hardware parameter with the USB device for each combination of hardware parameters whose operating state is normal, and acquiring the hardware parameter under the optimal combination based on each trend information.
Further, the method specifically comprises the following steps:
for the hardware parameters under each combination, reading a preset file in the USB equipment, wherein if the reading is successful, the running state is normal, and if the reading is failed, the running state is abnormal;
the method comprises the steps of predefining direction marks of the hardware parameters, analyzing the compatibility influence of the change of each hardware parameter on the USB equipment on the hardware parameters under each combination with a normal running state, obtaining the direction marks corresponding to the hardware parameters based on the analysis result, obtaining each tendency information based on the direction marks corresponding to the hardware parameters, and obtaining the hardware parameters under the optimal combination based on the tendency information.
The working principle of the analysis software is as follows: the hardware parameters are automatically enumerated and set in a software mode, and whether the USB equipment can normally access is detected (the invention takes reading and writing of a specific file in the USB equipment as a basis) to judge whether the hardware parameters of a certain combination are PASS or FAIL, PASS: the hardware parameter setting is shown to meet the design requirements, and the USB equipment can normally access; FAIL: and the hardware parameter setting is not in accordance with the design requirement, and the USB equipment cannot be accessed. Software analysis of a set of hardware parameters only requires approximately 3 seconds (USB device access interval is delayed, enumeration is too fast, misjudgment can be caused because the device end is not ready), efficiency is much higher than that of a manual mode, and manual intervention is not needed.
In one embodiment, as shown in fig. 2, the workflow of the analysis software UsbSiDbgTool includes:
1. for 5 hardware parameters PERPORTRXISET, PERPORTTXPEHalf, PERPORTPETXISEt, PERPORTTXISEt and TxEmphasis of USB2.0, firstly keeping 4 hardware parameters unchanged, changing one hardware parameter for setting, and enumerating one hardware parameter by one hardware parameter;
2. after enumerating the hardware parameter combination, reading a specific file in the USB device, where the specific file exists and is successfully read, for example, usbsidbgtoolset. Representing the hardware parameter PASS of the combination, otherwise, the hardware parameter FAIL of the combination continues to enumerate the hardware parameter combination;
3. predefining a direction mark PERPOTRXISETDirFlag, PERPOTRPTETXISEtDirFlag, PERPOTTXISEtDirFlag, PERPOTTXPEHalfFlag and TxEmphasisDirFlag of each hardware parameter, and respectively recording the influence of the change direction of the hardware parameters on the compatibility of the USB device, wherein for example, the PERPOTRXISETDirFlag is 0, which indicates that the USB device is better compatible when the value of PERPOTRXISET is reduced; a value of 1 for PERPRETRXISETDirFlag indicates that a value of PERPRETRXISET increases USB device compatibility better. The values of these direction markers are used to analyze all hardware parameter trend information for the combination of PASS, providing a basis for finding an optimized set of hardware parameters.
4. Defining a variable UsbSiSetParasList for recording all hardware parameters of the combination of PASS;
5. enumerating hardware parameter combinations until enumeration is completed, after all the hardware parameter combinations are enumerated, sorting the hardware parameter combinations in a UsbSiSetList list according to fields according to direction marks of PERPOTRXISETDirFlag, PERPOTRPTPETSiSetSetDirFlag, PERPOTTxiSetDirFlag, PERPOTTXPEHalfFlag and TxEmphasisDirFlag, wherein the direction marks are 0, sorting the hardware parameter combinations in an ascending order, the direction marks are 1, and sorting the hardware parameter combinations in a descending order.
6. After the usbsisetplast list is sorted, the first element in the usbsisetplast list is the hardware parameter under the optimal combination.
The embodiment automatically enumerates the combination of the hardware parameters of the USB port in a software mode, analyzes the influence of the hardware parameters under the combination on the compatibility of the USB equipment, provides a group of optimal hardware parameters, and can improve the analysis efficiency of the hardware parameters of the USB port; the design defects are found in a software analysis mode, hardware parameters are optimized, the compatibility problem of the USB equipment is avoided, and the product quality is improved; for medium and small enterprises, because of the difference of the design of the mainboard, the BIOS codes can be tested only by professional test equipment (such as a high-bandwidth oscilloscope and a test fixture) and a professional knowledge background engineer (SI engineer) because of the signal integrity, and the general medium and small enterprises do not have the test conditions, so that the analysis software can just deal with the situation, the problem of evaluating the USB design quality of the mainboard of the medium and small enterprises is solved, and the analysis software is used as a simple tool for evaluating whether the design quality of the mainboard is reliable, is simple and easy to use and does not need manual intervention.
In an embodiment, after the step S4 obtains each operation state of the USB device under each combination of hardware parameters, obtains each trend information of compatibility of each hardware parameter with the USB device for each combination of hardware parameters whose operation state is normal, and obtains the hardware parameter under the optimal combination based on each trend information, the method further includes the following steps:
testing an eye diagram of the USB device based on the hardware parameters in the optimal combination;
and if the test is passed, importing the hardware parameters in the optimal combination into the basic input and output system.
Wherein, the eye diagram shows the comprehensive characteristics of the measured signal, the larger the eye diagram is opened, the larger the tolerance error of noise and jitter is, and the better the accuracy of the receiver judging the signal is. As shown in fig. 3, fig. 3 is an eye diagram corresponding to a set of hardware parameters of the USB port extracted randomly, and as can be seen from fig. 3, the eye diagram is not very open. As shown in fig. 4, fig. 4 is an eye diagram corresponding to the hardware parameters under the optimal combination, and as can be seen from fig. 4, the eye diagram is wider, and the comprehensive characteristics of the signals are better. And after the hardware parameters of the optimal combination are verified by the eye pattern, importing the hardware parameters in the optimal combination into a Basic Input Output System (BIOS).
In an embodiment, before the step S1, after connecting the USB device, identifying a type of the USB device, and loading the hardware access driver file corresponding to the type of the USB device, the method further includes: and calling a WinIo interface to write hardware access drive files corresponding to different types of USB equipment.
Different types of USB equipment correspond to different hardware access drive files, and the equipment with the USB port stores a plurality of written hardware access drive files of different USB equipment types. For some USB device types, if corresponding hardware access drive files are not stored, a WinIo interface is called to write, and storage is performed after writing.
In an embodiment, the present invention provides a USB port hardware parameter analyzing apparatus, which corresponds to the USB port hardware parameter analyzing methods in the above embodiments one to one. As shown in fig. 5, the apparatus includes:
the loading module 101 is configured to identify a type of a USB device after the USB device is connected, and load a hardware access driver file corresponding to the type of the USB device;
the access module 102 is configured to run predetermined analysis software, call a preset parameter setting interface function through the analysis software, call a library function corresponding to the hardware access driver file based on the parameter setting interface function, and access a plurality of hardware parameters in a hardware register through the library function;
an enumeration module 103 for enumerating different combinations of the plurality of hardware parameters based on the analysis software;
an obtaining module 104, configured to obtain each operating state of the USB device under each combination of hardware parameters, obtain each trend information of compatibility of each hardware parameter with the USB device for each combination of which the operating state is normal, and obtain a hardware parameter under an optimal combination based on each trend information.
For specific limitations of the USB port hardware parameter analysis apparatus, reference may be made to the above limitations of the USB port hardware parameter analysis method, which is not described herein again. The modules in the USB port hardware parameter analyzing apparatus may be wholly or partially implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which is a device capable of automatically performing numerical calculation and/or information processing according to instructions set or stored in advance. The Computer device may be a PC (Personal Computer), or a smart phone, a tablet Computer, a Computer, or a server group consisting of a single network server and a plurality of network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing, where cloud computing is one of distributed computing, and is a super virtual Computer consisting of a group of loosely coupled computers.
As shown in fig. 6, the computer device may include, but is not limited to, a memory 11, a processor 12, and a network interface 13, which are communicatively connected to each other through a system bus, wherein the memory 11 stores a computer program that is executable on the processor 12. It should be noted that fig. 6 only shows a computer device with components 11-13, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead.
The memory 11 may be a non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM). In this embodiment, the readable storage medium of the memory 11 is generally used for storing an operating system and various types of application software installed in the computer device, for example, program codes of a computer program in an embodiment of the present invention. Further, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 12 may be, in some embodiments, a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data Processing chip, and is used for executing program codes stored in the memory 11 or Processing data, such as executing computer programs.
The network interface 13 may comprise a standard wireless network interface, a wired network interface, and the network interface 13 is generally used for establishing communication connection between the computer device and other electronic devices.
The computer program is stored in the memory 11 and includes at least one computer readable instruction stored in the memory 11, which is executable by the processor 12 to implement the method of the embodiments of the present application.
In one embodiment, the present invention provides a computer-readable storage medium, which may be a non-volatile and/or volatile memory, and has a computer program stored thereon, where the computer program, when executed by a processor, implements the steps of the USB port hardware parameter analysis method in the above embodiments, such as the steps S1 to S4 shown in fig. 1. Alternatively, the computer program is executed by the processor to implement the functions of the modules/units of the USB port hardware parameter analyzing apparatus in the above embodiments, for example, the functions of the modules 101 to 104 shown in fig. 5. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program that instructs associated hardware to perform the processes of the embodiments of the methods described above when executed.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for analyzing hardware parameters of a USB port is characterized by comprising the following steps:
after the USB equipment is connected, identifying the type of the USB equipment, and loading a hardware access drive file corresponding to the type of the USB equipment;
running preset analysis software, calling a preset parameter setting interface function through the analysis software, calling a library function corresponding to the hardware access driving file based on the parameter setting interface function, and accessing a plurality of hardware parameters in a hardware register through the library function;
enumerating different combinations of the plurality of hardware parameters based on the analysis software;
the method comprises the steps of obtaining each running state of the USB equipment under each combination of hardware parameters, obtaining each trend information of compatibility of each hardware parameter to the USB equipment for each combination of which the running state is normal, and obtaining the hardware parameters under the optimal combination based on each trend information.
2. The method for analyzing hardware parameters of a USB port according to claim 1, wherein the step of enumerating different combinations of the plurality of hardware parameters based on the analysis software specifically comprises:
randomly selecting a hardware parameter as a changed hardware parameter, keeping the rest of the hardware parameters except the selected hardware parameter unchanged, changing the selected hardware parameter, and enumerating the combination of the selected hardware parameter;
randomly selecting one hardware parameter from the rest other hardware parameters as a changed hardware parameter to enumerate the combination of the selected hardware parameters until the combination corresponding to each hardware parameter is enumerated.
3. The method for analyzing hardware parameters of a USB port according to claim 1 or 2, wherein the steps of obtaining each operating state of the USB device under each combination of hardware parameters, obtaining each trend information of compatibility of each hardware parameter with the USB device for each combination of hardware parameters whose operating state is normal, and obtaining the hardware parameters under the optimal combination based on each trend information specifically include:
for the hardware parameters under each combination, reading a preset file in the USB equipment, wherein if the reading is successful, the running state is normal, and if the reading is failed, the running state is abnormal;
the method comprises the steps of predefining direction marks of the hardware parameters, analyzing the compatibility influence of the change of each hardware parameter on the USB equipment on the hardware parameters under each combination with a normal running state, obtaining the direction marks corresponding to the hardware parameters based on the analysis result, obtaining each tendency information based on the direction marks corresponding to the hardware parameters, and obtaining the hardware parameters under the optimal combination based on the tendency information.
4. The method for analyzing hardware parameters of a USB port according to claim 1, wherein the step of obtaining each running state of the USB device under each combined hardware parameter, obtaining each trend information of compatibility of each hardware parameter with the USB device for each combination with a normal running state, and obtaining the hardware parameter under the optimal combination based on each trend information further comprises:
testing an eye diagram of the USB device based on the hardware parameters in the optimal combination;
and if the test is passed, importing the hardware parameters in the optimal combination into the basic input and output system.
5. The method for analyzing hardware parameters of a USB port according to claim 1, wherein the step of identifying the type of the USB device after connecting the USB device and loading the hardware access driver file corresponding to the type of the USB device further comprises:
and calling a WinIo interface to write hardware access drive files corresponding to different types of USB equipment.
6. An apparatus for analyzing hardware parameters of a USB port, comprising:
the loading module is used for identifying the type of the USB equipment after the USB equipment is connected and loading a hardware access drive file corresponding to the type of the USB equipment;
the access module is used for running preset analysis software, calling a preset parameter setting interface function through the analysis software, calling a library function corresponding to the hardware access driving file based on the parameter setting interface function, and accessing a plurality of hardware parameters in a hardware register through the library function;
an enumeration module to enumerate different combinations of the plurality of hardware parameters based on the analysis software;
the acquisition module is used for acquiring each running state of the USB equipment under each combination of hardware parameters, acquiring each trend information of compatibility of each hardware parameter to the USB equipment for each combination of which the running state is normal, and acquiring the hardware parameter under the optimal combination based on each trend information.
7. A computer device comprising a memory and a processor coupled to the memory, the memory having stored therein a computer program operable on the processor, wherein the processor when executing the computer program implements the steps of:
after the USB equipment is connected, identifying the type of the USB equipment, and loading a hardware access drive file corresponding to the type of the USB equipment;
running preset analysis software, calling a preset parameter setting interface function through the analysis software, calling a library function corresponding to the hardware access driving file based on the parameter setting interface function, and accessing a plurality of hardware parameters in a hardware register through the library function;
enumerating different combinations of the plurality of hardware parameters based on the analysis software;
the method comprises the steps of obtaining each running state of the USB equipment under each combination of hardware parameters, obtaining each trend information of compatibility of each hardware parameter to the USB equipment for each combination of which the running state is normal, and obtaining the hardware parameters under the optimal combination based on each trend information.
8. The computer device according to claim 7, wherein the step of enumerating different combinations of the plurality of hardware parameters based on the analysis software specifically comprises:
randomly selecting a hardware parameter as a changed hardware parameter, keeping the rest of the hardware parameters except the selected hardware parameter unchanged, changing the selected hardware parameter, and enumerating the combination of the selected hardware parameter;
randomly selecting one hardware parameter from the rest other hardware parameters as a changed hardware parameter to enumerate the combination of the selected hardware parameters until the combination corresponding to each hardware parameter is enumerated.
9. The computer device according to claim 7 or 8, wherein the step of acquiring each operating state of the USB device under each combined hardware parameter, acquiring each trend information of compatibility of each hardware parameter with the USB device for each combined hardware parameter whose operating state is normal, and acquiring an optimal combined hardware parameter based on each trend information specifically includes:
for the hardware parameters under each combination, reading a preset file in the USB equipment, wherein if the reading is successful, the running state is normal, and if the reading is failed, the running state is abnormal;
the method comprises the steps of predefining direction marks of the hardware parameters, analyzing the compatibility influence of the change of each hardware parameter on the USB equipment on the hardware parameters under each combination with a normal running state, obtaining the direction marks corresponding to the hardware parameters based on the analysis result, obtaining each tendency information based on the direction marks corresponding to the hardware parameters, and obtaining the hardware parameters under the optimal combination based on the tendency information.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the USB port hardware parameter analysis method according to any one of claims 1 to 5.
CN202011397300.XA 2020-12-03 2020-12-03 USB port hardware parameter analysis method, device, equipment and storage medium Active CN112506820B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011397300.XA CN112506820B (en) 2020-12-03 2020-12-03 USB port hardware parameter analysis method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011397300.XA CN112506820B (en) 2020-12-03 2020-12-03 USB port hardware parameter analysis method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112506820A true CN112506820A (en) 2021-03-16
CN112506820B CN112506820B (en) 2024-07-02

Family

ID=74969672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011397300.XA Active CN112506820B (en) 2020-12-03 2020-12-03 USB port hardware parameter analysis method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112506820B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023155597A1 (en) * 2022-02-17 2023-08-24 浪潮(山东)计算机科技有限公司 Port management method, system and device, and computer readable storage medium
CN117312086A (en) * 2023-10-10 2023-12-29 上海合芯数字科技有限公司 Method, device, equipment and medium for adjusting USB interface of server

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040249933A1 (en) * 2003-06-04 2004-12-09 Priva Govindarajan Network interface parameters
US20100106684A1 (en) * 2008-10-26 2010-04-29 Microsoft Corporation Synchronization of a conceptual model via model extensions
US20120159010A1 (en) * 2009-12-02 2012-06-21 Jiang Wenchun Method and apparatus for modifying usb device driver matching information
CN104182374A (en) * 2013-05-28 2014-12-03 中兴通讯股份有限公司 USB (universal serial bus) equipment and automatic-identification method for Microsoft Windows operating system version of USB equipment
WO2017023310A1 (en) * 2015-08-05 2017-02-09 Hewlett Packard Enterprise Development Lp Selecting hardware combinations
US20190018802A1 (en) * 2017-07-14 2019-01-17 Intel Corporation Usb2 high speed connection for testing
US10661902B1 (en) * 2019-03-29 2020-05-26 QuantumID Technologies Inc Artificial intelligence system for estimating excess non-sapient payload capacity on mixed-payload aeronautic excursions

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040249933A1 (en) * 2003-06-04 2004-12-09 Priva Govindarajan Network interface parameters
US20100106684A1 (en) * 2008-10-26 2010-04-29 Microsoft Corporation Synchronization of a conceptual model via model extensions
US20120159010A1 (en) * 2009-12-02 2012-06-21 Jiang Wenchun Method and apparatus for modifying usb device driver matching information
CN104182374A (en) * 2013-05-28 2014-12-03 中兴通讯股份有限公司 USB (universal serial bus) equipment and automatic-identification method for Microsoft Windows operating system version of USB equipment
US20160124886A1 (en) * 2013-05-28 2016-05-05 Zte Corporation USB device and method thereof for automatically recognizing Microsoft windowing operating system version
WO2017023310A1 (en) * 2015-08-05 2017-02-09 Hewlett Packard Enterprise Development Lp Selecting hardware combinations
US20190018802A1 (en) * 2017-07-14 2019-01-17 Intel Corporation Usb2 high speed connection for testing
US10661902B1 (en) * 2019-03-29 2020-05-26 QuantumID Technologies Inc Artificial intelligence system for estimating excess non-sapient payload capacity on mixed-payload aeronautic excursions

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023155597A1 (en) * 2022-02-17 2023-08-24 浪潮(山东)计算机科技有限公司 Port management method, system and device, and computer readable storage medium
US12111910B2 (en) 2022-02-17 2024-10-08 Ieit Systems Co., Ltd. Port management method, system and device, and computer readable storage medium
CN117312086A (en) * 2023-10-10 2023-12-29 上海合芯数字科技有限公司 Method, device, equipment and medium for adjusting USB interface of server

Also Published As

Publication number Publication date
CN112506820B (en) 2024-07-02

Similar Documents

Publication Publication Date Title
CN111209152B (en) DRAM chip burn-in test apparatus, method, computer apparatus, and storage medium
CN112506820B (en) USB port hardware parameter analysis method, device, equipment and storage medium
CN115756984A (en) Memory test method, device, equipment and storage medium
KR100755021B1 (en) Method for electronically testing memory modules
CN220473935U (en) PCIE (peripheral component interface express) expansion system supporting identification detection
CN115602242B (en) Storage device and test method thereof
CN113377586A (en) Automatic server detection method and device and storage medium
CN111176757B (en) SoC starting method and device based on JTAG
CN102305906B (en) Chip testing method and device
CN111459730A (en) PCH (physical channel) end parameter adjusting method and system under Whitley platform
CN115422091B (en) Firmware debugging method and device, electronic equipment and storage medium
CN112216337A (en) Firmware parameter detection method and device and firmware setting method
CN109947656A (en) A kind of testing case management and device
CN110070906A (en) A kind of signal adjustment method of storage system
CN116048980A (en) FPGA prototype verification method and device
CN115757099A (en) Automatic test method and device for platform firmware protection recovery function
US20130124925A1 (en) Method and apparatus for checking a main memory of a processor
CN114780421A (en) Abnormity testing method, system and storage medium based on virtual instruction set platform
CN114496053A (en) Data anomaly detection method, device and equipment and computer readable storage medium
US20190310800A1 (en) Method for accessing code sram and electronic device
CN113160875A (en) Chip test system and test method
US20070169117A1 (en) Firmware loading device
CN111309529B (en) System and method for complete testing of communication links within a processor based on processor information
US7487399B2 (en) System and method for testing a component in a computer system using frequency margining
CN115061558B (en) Hot reset method and device of PCIE equipment, storage medium and PCIE equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant