Switching device for read-write performance test and test system
By designing a read-write performance test switching device including a communication control module and a switch module, the problem of port damage caused by frequent plug-ins and unplugging in traditional testing methods is solved, and automatic switching of test channels is realized, which improves testing efficiency and safety.
Patent Information
- Application Number
- CN202411987863.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-25
AI Technical Summary
Traditional reading and writing performance testing methods require frequent plugging and unplugging of equipment, which can easily cause damage to the device port.
A switching device for reading and writing performance testing is designed, including a communication control module, a switch module, a first interface module and a second interface module. The communication control module controls the switch module to be turned on or off, and realizes the automatic switching test channel of the equipment to be tested, reducing the number of equipment plug-ins and unplugging times.
It effectively reduces the risk of port damage caused by frequent plugging and unplugging of devices, improves testing efficiency, and realizes two performance tests: automated testing and automatic switching.
Smart Images

Figure CN119883765A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field, and in particular to a switching device and a testing system for reading and writing performance testing. Background Art
[0002] After the device is manufactured, testing the device's read and write performance is a key step in ensuring product quality and performance. The traditional testing method is to unplug the device and plug it into the host's 3.0 port for the first performance test. After the test is completed, plug the device into the host's 2.0 port for the second performance test.
[0003] However, this method has certain defects. It requires frequent plugging and unplugging of devices, which can easily cause damage to device ports. Summary of the invention
[0004] The main purpose of the present invention is to provide a switching device and a testing system for reading and writing performance testing, aiming to solve the problem of port damage caused by frequent plugging and unplugging of devices in traditional testing methods.
[0005] To achieve the above object, the present invention provides a switching device for reading and writing performance testing, comprising: a communication control module, a switch module, a first interface module and a second interface module; One end of the communication control module is connected to the switch module, and the other end is connected to the test equipment; The switch module is connected to the first interface module and the second interface module respectively, the first interface module is used to connect to the device under test, and the second interface module is used to connect to the test device; When the first interface module is connected to the device under test, the communication control module is used to control the switch module to be turned on or off when receiving a test control instruction issued by the test device, so as to achieve an electrical connection between the device under test connected to the first interface module and the test device connected to the second interface module, and provide the test device with a performance test on the device under test, wherein the performance test includes a first performance test and a second performance test.
[0006] Further, the switch module includes a first channel module and a second channel module; When the first interface module is connected to the device under test, the communication control module is used to control the switch module to be turned on or off upon receiving a test control instruction issued by the test device, including: When the communication control module receives the first performance test instruction sent by the test device to perform the first performance test on the device under test, the communication control module controls the first channel module to be connected with the first interface module and the second interface module, and controls the second channel module to be connected with the first interface module and the second interface module, so as to realize the connection of the 3.0 test channel in the switching device; When the communication control module receives an instruction from the test device to perform a second performance test on the device under test, the communication control module controls the second channel module to be connected with the first interface module and the second interface module, and controls the first channel module to be disconnected from the first interface module and the second interface module, so as to realize the connection of the 2.0 test channel in the switching device. Further, the switching device also includes a power supply module, which is respectively connected to the first channel module, the second channel module, the first interface module, and the second interface module, and is used to provide working voltage for the first channel module, the second channel module, and the interface module; The power supply module is connected to the communication control module via a step-down circuit to provide a working voltage for the communication control module.
[0007] Furthermore, the switching device further comprises an indicator light, which is connected to the communication control module and is used to display the test channel currently turned on by the switching device.
[0008] Furthermore, the communication control module includes a control chip, a communication conversion chip and a serial interface module; One end of the communication conversion chip is connected to the test device through the serial interface module, and the other end is connected to the control chip to achieve data format conversion and communication between the test device and the control chip.
[0009] The present application also provides a test system, which includes a device to be tested, a test device, and a switching device for reading and writing performance testing as described in any of the above items, wherein the switching device is electrically connected to the device to be tested and the test device respectively based on a data port, and the test device performs a performance test on the device to be tested connected to the switching device by loading a test method.
[0010] Furthermore, the testing method comprises: Obtaining a test instruction triggered by a user, wherein the test instruction is a first performance test instruction or a second performance test instruction; Sending a test control instruction to the communication control module according to the test instruction to control the switch module to turn on the test channel corresponding to the test instruction; The device to be tested is tested through the currently turned-on test channel to obtain a corresponding test result, wherein the test result is a pass or fail of the first / second performance test.
[0011] Furthermore, after testing the device to be tested through the currently turned-on test channel and obtaining a corresponding test result, the test method further includes: If the test result is that the first performance test passes, obtaining a second performance test instruction triggered by the user; If the test result is that the second performance test is passed, a first performance test instruction triggered by the user is obtained.
[0012] Further, the testing of the device to be tested through the currently turned-on test channel to obtain a corresponding test result includes: Acquire the descriptor of the device under test according to the library currently called by the test device to determine the test value of the device under test; The test value is compared with a preset threshold to determine whether the first / second performance test of the device under test passes or fails, wherein the preset threshold includes a first performance threshold and a second performance threshold.
[0013] Further, obtaining a descriptor of the device under test according to the library currently called by the test device to determine a test value of the device under test includes: If the currently turned-on test channel is a 3.0 test channel, the test device calls the libusb library to obtain the bcdUSB, HighSpeed and SuperSpeed field values of the device under test to determine the 3.0 test value of the device under test; If the currently turned-on test channel is a 2.0 test channel, the test device calls the winusb library to obtain the bcdUSB and HighSpeed field values of the device under test to determine the 2.0 test value of the device under test.
[0014] In this embodiment, the device to be tested and the test device (computer host) are electrically connected through a switching device for read-write performance testing, and at the same time, a test method is loaded on the test device end. The first performance test and the second performance test of the device to be tested (there are different test channels in the switching device) can be implemented without frequent plugging and unplugging of the device to be tested (the switching device has multiple peripheral data ports, which can be used for the device to be tested to be plugged in and connected, and can also be connected to the test device through a data cable, so that the device to be tested does not need to be frequently plugged and unplugged from different ports of the test device), reducing the risk of port damage caused by frequent plugging and unplugging of the device to be tested and improving test efficiency. In addition, the test method loaded on the test device end cooperates with the switching device to implement automated testing based on user selection and automatic switching of two performance tests, thereby improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0018] Figure 1 A module flow chart of a switching device for a read-write performance test according to an embodiment of the present application; Figure 2 A flow chart of a switching device for a read-write performance test according to an embodiment of the present application; Figure 3 Another flow chart of a switching device for a read-write performance test according to an embodiment of the present application; Figure 4 This is a module diagram of the test system of the embodiment of the present application; Figure 5 This is a flow chart of the test method of the embodiment of the present application; DETAILED DESCRIPTION In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0019] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0020] As described in the background technology, after the device is manufactured, testing the read and write performance of the device is a key step in ensuring product quality and performance. The traditional testing method is to unplug the device and plug it into the 3.0 port of the host for a first performance test, and then plug the device into the 2.0 port of the host for a second performance test after the test is completed.
[0021] However, this method has certain defects. It requires frequent plugging and unplugging of devices, which can easily cause damage to device ports.
[0022] In order to solve the above technical problems, the embodiments of this specification provide a switching device for read-write performance testing, which can automatically switch the test mode, reduce the number of times the device is plugged in and out, and reduce the risk of damage to the device port.
[0023] Figure 1 A switching device for a read / write performance test provided in an embodiment of the present application includes: a communication control module, a switch module, a first interface module and a second interface module; One end of the communication control module is connected to the switch module, and the other end is connected to the test equipment; The switch module is connected to the first interface module and the second interface module respectively, the first interface module is used to connect to the device under test, and the second interface module is used to connect to the test device; When the first interface module is connected to the device under test, the communication control module is used to control the switch module to be turned on or off when receiving a test control instruction issued by the test device, so as to achieve an electrical connection between the device under test connected to the first interface module and the test device connected to the second interface module, and provide the test device with a performance test on the device under test, wherein the performance test includes a first performance test and a second performance test.
[0024] In this embodiment, the communication control module is used to receive and parse the test control instructions issued by the test device, and control the conduction or disconnection of the switch module according to the analysis results to connect the corresponding channel between the device to be tested and the test device, so that the test device can perform performance testing on the device to be tested through the conducted channel.
[0025] The device under test consists of a docking station and multiple USB devices, wherein the multiple USB devices are connected to the docking station, the docking station is connected to the first interface module, and the interface type of the docking station can be any USB interface type.
[0026] The test equipment is any performance test equipment that can issue test control instructions, receive and process test results, such as a computer. The embodiments of this specification do not limit the specific type of the test equipment, as long as the test equipment has test software that can perform performance testing on the device under test.
[0027] The switching device can be equipped with interface modules of multiple interface types, that is, the first interface module and the second interface module can be interface modules of multiple interface types, such as the first interface module and the second interface module can be USB-C interface modules, USB-A interface modules or microUSB interface modules. By setting interface modules of multiple interface types, it is possible to support devices under test of multiple interface types, meet the test requirements of devices under test of different interface types, improve test efficiency, avoid the need to purchase multiple test devices of different interface types, and reduce test costs.
[0028] Further, Figure 2 This is a flow chart of a switching device for a read / write performance test according to an embodiment of the present application. Figure 3 Another flow chart of a switching device for a read-write performance test according to an embodiment of the present application, wherein the switch module includes a first channel module and a second channel module; When the first interface module is connected to the device under test, the communication control module is used to control the switch module to be turned on or off upon receiving a test control instruction issued by the test device, including: When the communication control module receives the first performance test instruction sent by the test device to perform the first performance test on the device under test, the communication control module controls the first channel module to be connected with the first interface module and the second interface module, and controls the second channel module to be connected with the first interface module and the second interface module, so as to realize the connection of the 3.0 test channel in the switching device; When the communication control module receives an instruction from the test device to perform a second performance test on the device under test, the communication control module controls the second channel module to be connected with the first interface module and the second interface module, and controls the first channel module to be disconnected from the first interface module and the second interface module, so as to realize the connection of the 2.0 test channel in the switching device.
[0029] In this embodiment, when the interface type of the first interface module and the second interface module is USB-A, the first channel module is an AW3410S chip, and the second channel module is a BL1530 chip. When the device under test is connected to the first interface module, and the control chip receives a test control instruction issued by the test device to detect the USB3.0 read and write performance of the device under test, the control chip controls the first channel module to be connected to the first interface module and the second interface module, and controls the second channel module to be connected to the first interface module and the second interface module; In another embodiment, when the interface type of the first interface module and the second interface module is USB-C, the first channel module includes an AW3410S chip and a VL162 chip, and the second channel module is a BL1530 chip. When the device under test is connected to the first interface module, and the control chip receives a test control instruction issued by the test device to detect the USB2.0 read and write performance of the device under test, the control chip controls the first channel module to be connected to the first interface module and the second interface module, and controls the second channel module to be connected to the first interface module and the second interface module.
[0030] Further, the switching device also includes a power supply module, which is respectively connected to the first channel module, the second channel module, the first interface module, and the second interface module, and is used to provide working voltage for the first channel module, the second channel module, and the interface module; The power supply module is connected to the communication control module via a step-down circuit to provide a working voltage for the communication control module.
[0031] In this embodiment, the input voltage of the power module is 5V, and the power module is respectively connected to the first channel module, the second channel module, the first interface module, and the second interface module to provide a 5V working voltage to the above modules so that the modules can work normally.
[0032] Since the control chip and the communication control chip usually operate at a lower voltage, if they are powered directly by a 5V power supply, the chip may be damaged by overvoltage. Therefore, it is necessary to use a step-down circuit to reduce the 5V voltage to 3.3V and output the 3.3V operating voltage to the control chip and the communication control chip to improve the working stability of the control chip and the communication control chip, reduce failures caused by voltage fluctuations, and thus improve the energy efficiency of the entire switching device.
[0033] Furthermore, the switching device further comprises an indicator light, which is connected to the communication control module and is used to display the test channel currently turned on by the switching device.
[0034] In this embodiment, the indicator light includes a first indicator light and a second indicator light. The first indicator light is used to indicate whether the USB3.0 test channel is on. When the USB3.0 test channel is on, the first indicator light is on to show the user that the current state is in the USB3.0 test mode. The second indicator light is used to indicate whether the USB2.0 test channel is on. When the USB2.0 test channel is on, the second indicator light is on to show the user that the current state is in the USB2.0 test mode. By turning on and off the indicator light, the user can more intuitively understand whether the current test channel is a 2.0 test channel or a 3.0 test channel, which improves the user's experience and makes the test process clearer.
[0035] Furthermore, the communication control module includes a control chip, a communication conversion chip and a serial interface module; One end of the communication conversion chip is connected to the test device through the serial interface module, and the other end is connected to the control chip to achieve data format conversion and communication between the test device and the control chip.
[0036] In this embodiment, the control chip adopts CX32L003F8P6X chip, which is used to receive instructions from the test equipment to control the conduction or disconnection of the switch module and the lighting of the indicator light. At the same time, it can also send detection information (such as connection protocol) to the test equipment in reverse.
[0037] The communication conversion chip adopts CH340N chip, which converts the USB signal of the test equipment into a serial port signal so that the control chip can identify and process it; at the same time, it can also convert the serial port signal of the control chip into a USB signal to achieve normal communication with the test equipment.
[0038] The serial interface module is connected to the test device via a USB2.0 data line to transmit the test control instructions sent by the test device to the main control chip to realize the conduction or disconnection of the switch module, and transmit the test data generated by the device under test to the test device through the control chip so as to process and analyze the test data.
[0039] Reference Figure 4 , Figure 4 This is a module diagram of the test system of an embodiment of the present application. The present application also provides a test system, which includes a device to be tested, a test device, and a switching device for reading and writing performance testing as described in any of the above items, wherein the switching device is electrically connected to the device to be tested and the test device respectively based on a data port, and the test device performs a performance test on the device to be tested connected to the switching device by loading a test method.
[0040] In this embodiment, the device under test and the switching device are connected for communication via a USB2.0 data cable. The device under test inserts one end of the USB2.0 data cable into the serial interface module of the switching device and inserts the other end of the USB2.0 data cable into the communication interface of the test device to achieve communication between the test device and the switching device. Specifically, the serial interface module is a communication interface of the switching device peripheral, and the serial interface module can be a USB-C interface module, a USB-A interface module or a microUSB interface module, that is, the interface type of the communication interface is USB-C, USB-A or microUSB, and the communication interface on the device under test and the communication interface on the switching device can be the same or different, which is not limited here.
[0041] Further, as mentioned above, the first interface module of the switching device can be a variety of interface modules with different interface types, such as the first interface module can be a USB-C interface module, a USB-A interface module or a microUSB interface module. Specifically, the first interface module is a data interface of the switching device peripheral, the data interface is used for the device to be tested to be inserted, the interface type of the data interface is USB-C, USB-A or microUSB, and the interface of the device to be tested is the same as the interface type of the data interface. Further, the second interface module of the switching device can also be a variety of interface modules with different interface types, such as the second interface module can be a USB-C interface module, USB-A interface module or a microUSB interface module. Specifically, the second interface module is a data interface of the switching device peripheral, the data interface is used for the interface of the test device to be inserted, the interface type of the data interface is USB-C, USB-A or microUSB, and the interface of the data interface is the same as the interface type of the test device.
[0042] Further, Figure 5 This is a flow chart of the test method of the embodiment of the present application, and the test method includes: S301, obtaining a test instruction triggered by a user, wherein the test instruction is a first performance test instruction or a second performance test instruction; In one embodiment, when the device to be tested is produced, it is necessary to perform a performance test on it to determine whether the device to be tested is qualified. When the device to be tested is produced, it is electrically connected to the test device through a switching device, and the user selects and triggers the corresponding test instruction through a user interface (such as a test software interface). Specifically, if the user wants to perform a first performance test on the device to be tested first, the first performance test instruction is selected and triggered, and if the user wants to perform a second performance test on the device to be tested first, the second performance test instruction is selected and triggered.
[0043] S302, sending a test control instruction to the communication control module according to the test instruction, so as to control the switch module to turn on the test channel corresponding to the test instruction; In one embodiment, the test device generates a test control instruction corresponding to the test instruction according to the test instruction triggered by the user. The test device is connected to the switching device through a serial interface module, and converts the test control instruction into a UART instruction that can be read by the control chip through the communication control chip, and transmits it to the control chip. The control chip controls the first channel module to be connected or disconnected with the first interface module and the second interface module according to the UART instruction converted from the received test control instruction, and controls the second channel module to be connected or disconnected with the first interface module and the second interface module.
[0044] Specifically, the test instruction is divided into the following two cases: The first case: if the current test instruction is the first performance test instruction, that is, the test device sends a test control instruction to the communication control module according to the first performance test instruction to control the switch module to turn on the 3.0 test channel, that is, the test device sends a first performance test control instruction to the communication control module according to the first performance test instruction to control the first channel module to be turned on with the first interface module and the second interface module, and to control the second channel module to be turned on with the first interface module and the second interface module; The second case: if the current test instruction is the second performance test instruction, that is, the test device sends the second performance test control instruction to the communication control module according to the second performance test instruction to control the switch module to turn on the 2.0 test channel, that is, the test device sends the test control instruction to the communication control module according to the second performance test instruction to control the first two-channel module to be disconnected from the first interface module and the second interface module, and control the second channel module to be turned on from the first interface module and the second interface module. [1] By precisely controlling the on and off of the test channel, the test system can effectively avoid signal interference and misjudgment during the test process, thereby improving the accuracy and reliability of the test.
[0045] S303: Test the device to be tested through the currently turned-on test channel to obtain a corresponding test result, wherein the test result is whether the first / second performance test passes or fails.
[0046] In the embodiment of the present application, step S103 specifically includes the following sub-steps: S3031, obtaining a descriptor of the device under test according to the library currently called by the test device to determine a test value of the device under test; S3032. Compare the test value with a preset threshold to determine whether the first / second performance test of the device under test passes or fails, wherein the preset threshold includes a first performance threshold and a second performance threshold.
[0047] In the embodiment of the present application, the device under test is tested through the currently turned-on test channel, that is, the test value of the device under test is determined according to the descriptor of the device under test in the library currently called by the test device, and compared with the preset threshold value to obtain the test result. Further, it is determined whether the currently turned-on test channel is a 3.0 test channel or a 2.0 test channel according to the aforementioned test control instruction.
[0048] If the current conduction test channel is a 3.0 test channel, the test device calls the libusb library to obtain the bcdUSB, HighSpeed, and SuperSpeed field values of the device descriptor to determine the 3.0 test value of the device under test, and compares the 3.0 test value with the first performance threshold to determine whether the first performance test of the device under test passes or fails; If the current conduction test channel is the 2.0 test channel, the test device calls the winusb library to obtain the bcdUSB and HighSpeed field values of the device descriptor to determine the 2.0 test value of the device under test, and compares the 2.0 test value with the second performance threshold to determine whether the second performance test of the device under test passes or fails.
[0049] Specifically, if the currently turned-on test is the 3.0 test channel, the test device calls the libusb library to obtain the bcdUSB, HighSpeed, and SuperSpeed field values of the device descriptor, where bcdUSB is 0311, HighSpeed is 1, and SuperSpeed is 0, indicating that the first performance test has failed; bcdUSB is 0311, HighSpeed is 1, and SuperSpeed is 1, indicating that the first performance test has passed; If the current conduction test channel is the 2.0 test channel, the test device calls the winusb library to obtain the bcdUSB and HighSpeed field values of the device descriptor. If winUSB is 0211 and HighSpeed is 0, it means that the second performance test fails. If winUSB is 0211 and HighSpeed is 1, it means that the second performance test passes.
[0050] At this time, if the first performance test fails or the second performance test fails, the test device outputs and presents the first performance test result as a test failure or the second performance test result as a test failure in a visual manner, and the test ends at this time. If the first performance test passes or the second performance test passes, the next step needs to be performed. Specifically, the device to be tested is tested through the currently turned-on test channel. After obtaining the corresponding test result of passing the first performance test or passing the second performance test, the method of the present application also includes: If the test result is that the first performance test passes, obtaining a second performance test instruction triggered by the user; If the test result is that the second performance test is passed, a first performance test instruction triggered by the user is obtained.
[0051] Specifically, if the test result is that the first performance test is passed, then obtain the second performance test instruction triggered by the user; send a test control instruction to the communication control module according to the second performance test instruction to control the switch module to turn on the 2.0 test channel corresponding to the second performance test instruction; test the device to be tested through the currently turned-on 2.0 test channel to obtain the corresponding second performance test result. That is, return to execute steps S102 and S103. Specifically, if the second performance test result is a test failure, the test device outputs and visually presents the final test result as a test failure; if the second performance test result is a test pass, the test device outputs and visually presents the final test result as a test pass.
[0052] If the test result is that the second performance test is passed, then obtain the first performance test instruction triggered by the user; send a test control instruction to the communication control module according to the first performance test instruction to control the switch module to turn on the 3.0 test channel corresponding to the first performance test instruction; test the device to be tested through the currently turned-on 3.0 test channel to obtain the corresponding first performance test result. That is, return to execute steps S102 and S103. Specifically, if the first performance test result is a test failure, the test device outputs and visually presents the final test result as a test failure; if the first performance test result is a test pass, the test device outputs and visually presents the final test result as a test pass.
[0053] It is understandable that during the two tests, as long as one of the test results is a failure, the final test result output is a failure. That is, when the first test result is a failure, no matter whether the second test result is a pass or a failure, the final test result output is a failure. Therefore, when the first test result is a failure, the final test result can be directly output without executing the subsequent steps, which reduces the time required for the test and improves the test efficiency.
[0054] In this embodiment, taking the first performance test instruction as an example, when the first performance test result is a failure, the test device outputs and visually presents the first performance test result as a test failure, and the test ends at this time; if the first performance test result is a test pass, a second performance test instruction triggered by the user is obtained, and a test control instruction is sent to the communication control module according to the second performance test instruction to control the switch module to turn on the 2.0 test channel corresponding to the second performance test instruction; the device to be tested is tested through the currently turned on 2.0 test channel to obtain a corresponding test result, wherein the test result is a pass or fail of the second performance test.
[0055] It can be seen from the above embodiments that the process of the testing method in this embodiment is consistent with the above-mentioned detailed description of the first performance test and the second performance test, and will not be repeated here.
[0056] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0057] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A switching device for reading and writing performance testing, characterized in that: include: A communication control module, a switch module, a first interface module and a second interface module; One end of the communication control module is connected to the switch module, and the other end is connected to the test equipment; The switch module is connected to the first interface module and the second interface module respectively, the first interface module is used to connect to the device under test, and the second interface module is used to connect to the test device; When the first interface module is connected to the device under test, the communication control module is used to control the switch module to be turned on or off when receiving a test control instruction issued by the test device, so as to achieve an electrical connection between the device under test connected to the first interface module and the test device connected to the second interface module, and provide the test device with a performance test on the device under test, wherein the performance test includes a first performance test and a second performance test.
2. The switching device for reading and writing performance test according to claim 1, characterized in that: The switch module includes a first channel module and a second channel module; When the first interface module is connected to the device under test, the communication control module is used to control the switch module to be turned on or off upon receiving a test control instruction issued by the test device, including: When the communication control module receives the first performance test instruction sent by the test device to perform the first performance test on the device under test, the communication control module controls the first channel module to be connected with the first interface module and the second interface module, and controls the second channel module to be connected with the first interface module and the second interface module, so as to realize the connection of the 3.0 test channel in the switching device; When the communication control module receives an instruction from the test device to perform a second performance test on the device under test, the communication control module controls the second channel module to be connected with the first interface module and the second interface module, and controls the first channel module to be disconnected from the first interface module and the second interface module, so as to realize the connection of the 2.0 test channel in the switching device.
3. The switching device for reading and writing performance test according to claim 2, characterized in that: The switching device further includes a power supply module, which is respectively connected to the first channel module, the second channel module, the first interface module, and the second interface module, and is used to provide working voltage for the first channel module, the second channel module, and the interface module; The power supply module is connected to the communication control module via a step-down circuit to provide a working voltage for the communication control module.
4. The switching device for reading and writing performance test according to claim 2, characterized in that: The switching device further comprises an indicator light, which is connected to the communication control module and is used to display the test channel currently turned on by the switching device.
5. The switching device for reading and writing performance test according to claim 1, characterized in that: The communication control module includes a control chip, a communication conversion chip and a serial interface module; One end of the communication conversion chip is connected to the test device through the serial interface module, and the other end is connected to the control chip to achieve data format conversion and communication between the test device and the control chip.
6. A testing system, characterized in that: The test system includes a device to be tested, a test device, and a switching device for reading and writing performance testing as described in any one of claims 1 to 5, wherein the switching device is electrically connected to the device to be tested and the test device respectively based on a data port, and the test device performs a performance test on the device to be tested connected to the switching device by loading a test method.
7. The test system according to claim 6, characterized in that: The test method includes: Obtaining a test instruction triggered by a user, wherein the test instruction is a first performance test instruction or a second performance test instruction; Sending a test control instruction to the communication control module according to the test instruction to control the switch module to turn on the test channel corresponding to the test instruction; The device to be tested is tested through the currently turned-on test channel to obtain a corresponding test result, wherein the test result is a pass or fail of the first / second performance test.
8. The test system according to claim 7, characterized in that: After testing the device to be tested through the currently turned-on test channel and obtaining the corresponding test result, the testing method further includes: If the test result is that the first performance test passes, obtaining a second performance test instruction triggered by the user; If the test result is that the second performance test is passed, a first performance test instruction triggered by the user is obtained.
9. The test system according to claim 7, characterized in that: The device to be tested is tested through the currently turned-on test channel to obtain corresponding test results, including: Acquire the descriptor of the device under test according to the library currently called by the test device to determine the test value of the device under test; The test value is compared with a preset threshold to determine whether the first / second performance test of the device under test passes or fails, wherein the preset threshold includes a first performance threshold and a second performance threshold.
10. The test system according to claim 9, characterized in that: Obtaining a descriptor of the device under test according to a library currently called by the test device to determine a test value of the device under test, including: If the currently turned-on test channel is a 3.0 test channel, the test device calls the libusb library to obtain the bcdUSB, HighSpeed and SuperSpeed field values of the device under test to determine the 3.0 test value of the device under test; If the currently turned-on test channel is a 2.0 test channel, the test device calls the winusb library to obtain the bcdUSB and HighSpeed field values of the device under test to determine the 2.0 test value of the device under test.