Test macro and the device of simulation USB hot plug process
Technical field
The present invention relates to electronic equipment quality test technical field, relate in particular to a kind of test macro and device of the USB of simulation hot plug process.
Background technology
At present, with USB (universal serial bus) (universal serial bus, USB) electronic equipment of port (for example computer) is more and more, USB device is also more and more universal, for ensureing that USB HOST and USB DEVICE can normally work, often in the time of electronic equipment factory inspection and daily servicing, need the quality of test USB HOST and USB DEVICE.
USB HOST test refers to that model machine passes through OTG line circumscribed USB device equipment (as USB flash disk, USB keyboard/mouse, USB portable hard drive etc.), and by being connected and operating with the USB HOST interface of model machine.USB DEVICE test refers to that model machine connects computer equipment, and model machine is operated the data of model machine internal storage region by computer equipment as USB DEVICE.
Generally, USB HOST test is connected or is pulled out OTG connecting line and carry out by craft, and USB DEVICE connects by craft or pulls out usb line and carry out.But, when the USB HOST testing when needs and the quantity of USB DEVICE are more, even need manually to carry out the connections of up to ten thousand times or pull out the operation of usb line, the dull like this operation of frequent repetition again makes the test duration longer, and efficiency is lower.
Summary of the invention
Embodiment of the present invention technical matters to be solved is, a kind of test macro and device of the USB of simulation hot plug process is provided, and improves the efficiency of USB DEVICE and USB HOST test.
For solving the problems of the technologies described above, the invention provides a kind of test macro of the USB of simulation hot plug process, comprise USB external equipment, model machine and computing machine, this test macro also comprises proving installation, and this proving installation comprises a USB DEVICE converting interface, the 2nd USB DEVICE converting interface, a USB HOST converting interface, the 2nd USB HOST converting interface, the first speed-sensitive switch, the second speed-sensitive switch, load module and control module.The 2nd USB HOST converting interface is connected with this USB external equipment, and is connected with this first speed-sensitive switch, the 2nd USB HOST converting interface successively.The 2nd USB HOST converting interface is connected with the USB HOST interface of this model machine.The 2nd USB DEVICE converting interface is connected with the USB interface of this computing machine, and is connected with this second speed-sensitive switch, a USB DEVICE converting interface successively.The one USB DEVICE converting interface is also connected with the USB DEVICE interface of this model machine, and this load module is connected with control module, and this control module is also connected with this first speed-sensitive switch and the second speed-sensitive switch respectively.
This load module carries out the setting of testing time for operation response personnel's setting.
Testing time control this first speed-sensitive switch or the second speed-sensitive switch break-make of this control module for setting according to this load module, to control being connected or disconnection or control being connected or disconnection of a USB DEVICE converting interface and the 2nd USB DEVICE converting interface of a USB HOST converting interface and the 2nd USB HOST converting interface.
The present invention also provides a kind of proving installation of the USB of simulation hot plug process, and this proving installation comprises a USB DEVICE converting interface, the 2nd USB DEVICE converting interface, a USB HOST converting interface, the 2nd USB HOST converting interface, the first speed-sensitive switch, the second speed-sensitive switch, load module and control module.The 2nd USB HOST converting interface is used for being connected with a USB external equipment, and is connected with this first speed-sensitive switch, the 2nd USB HOST converting interface successively.The 2nd USB HOST converting interface is for being connected with the USB HOST interface of a model machine.The 2nd USB DEVICE converting interface is used for being connected with the USB interface of a computing machine, and is connected with this second speed-sensitive switch, a USB DEVICE converting interface successively.The one USB DEVICE converting interface is also connected with the USB DEVICE interface of this model machine, and this load module is connected with control module, and this control module is also connected with this first speed-sensitive switch and the second speed-sensitive switch respectively.
This load module carries out the setting of testing time for operation response personnel's setting.
Testing time control this first speed-sensitive switch or the second speed-sensitive switch break-make of this control module for setting according to this load module, to control being connected or disconnection or control being connected or disconnection of a USB DEVICE converting interface and the 2nd USB DEVICE converting interface of a USB HOST converting interface and the 2nd USB HOST converting interface.
A kind of test macro and device of simulating USB hot plug process provided by the invention, by the break-make of a pair of speed-sensitive switch being controlled to realize the control of the connection/disconnection of USB HOST converting interface and the connection/port of USB DEVICE converting interface, thus simulation USB HOST test and USB DEVICE test.Utilize the present invention, by the manual operation that connects or extract USB line or OTG line of break-make control simulation of speed-sensitive switch, thereby improve the efficiency of USB HOST and USB DEVICE test.
Brief description of the drawings
Fig. 1 is the structural representation of a kind of test macro of simulating USB hot plug process in embodiment of the present invention.
Label declaration
Test macro 1
Proving installation 10
The one USB DEVICE converting interface 11
The 2nd USB DEVICE converting interface 12
The one USB HOST converting interface 13
The 2nd USB HOST converting interface 14
The first speed-sensitive switch 15
The second speed-sensitive switch 16
Load module 17
Control module 18
Display module 19
USB external equipment 20
Model machine 30
USB HOST interface 31
USB DEVICE interface 32
Computing machine 40
USB interface 41
Embodiment
By describing technology contents of the present invention, structural attitude in detail, being realized object and effect, below in conjunction with embodiment and coordinate accompanying drawing to be explained in detail.
Please refer to Fig. 1, is the structural representation of a kind of test macro of simulating USB hot plug process in embodiment of the present invention, and this system 1 comprises proving installation 10, USB external equipment 20, model machine 30 and computing machine 40.Wherein, this proving installation 10 comprises a USB DEVICE converting interface 11, the 2nd USB DEVICE converting interface 12, a USB HOST converting interface 13, the 2nd USB HOST converting interface 14, the first speed-sensitive switch 15, the second speed-sensitive switch 16, load module 17, control module 18 and display module 19.In the present embodiment, this display module 19 is LCD MODULE, and this control module 18 is the microcontroller of a MUC, and this load module 17 can be keyboard.
Wherein, the 2nd USB HOST converting interface 14 is connected with this USB external equipment 20, and be connected with the first speed-sensitive switch 15, the 2nd USB HOST converting interface 14 successively, the 2nd USB HOST converting interface 14 is connected with the USB HOST interface 31 of a model machine 30 by USB extended line.The 2nd USB DEVICE converting interface 12 is connected with the PC end USB interface 41 of this computing machine 40 by USB extended line, and be connected with the second speed-sensitive switch 16, a USB DEVICE converting interface 11 successively, a USB DEVICE converting interface 11 is also connected with the USB DEVICE interface 32 of this model machine 30 by USB extended line.This load module 17 is connected successively with control module 18 and display module 19, and this control module 18 is also connected with this first speed-sensitive switch 15 and the second speed-sensitive switch 16 respectively.
It is as described below that the test macro 1 of this simulation USB hot plug process carries out the principle of work of USB HOST and USB DEVICE test.
In the time that needs are tested USB HOST, tester sets by load module 17 number of times that needs test, this the first speed-sensitive switch 15 of the testing time control that this control module 18 is set according to load module 17 break-make rapidly, to control being connected or disconnection of a USB HOST converting interface 13 and the 2nd USB HOST converting interface 14, and then the operation that connects or disconnect in simulation USB HOST test.
In the time that needs are tested USB DEVICE, tester sets by load module 17 number of times that needs test, this the second speed-sensitive switch 16 of the testing time control that this control module 18 is set according to load module 17 break-make rapidly, to control being connected or disconnection of a USB DEVICE converting interface 11 and the 2nd USB DEVICE converting interface 12, and then the operation that connects or disconnect in simulation USB DEVICE test.
In the present embodiment, this display module 19 passes through the number of times of the needs test that load module 17 sets for showing tester.
And, utilize the test macro 1 of the process of this USB simulation hot plug can carry out the test of USB DEVICE and USB HOST simultaneously, be independent of each other.
A kind of test macro and device of simulating USB hot plug process provided by the invention, by the break-make of a pair of speed-sensitive switch being controlled to realize the control of the connection/disconnection of USB HOST converting interface and the connection/port of USB DEVICE converting interface, thus simulation USB HOST test and USB DEVICE test.Utilize the present invention, by the manual operation that connects or extract USB line or OTG line of break-make control simulation of speed-sensitive switch, thereby improve the efficiency of USB HOST and USB DEVICE test.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.