[go: up one dir, main page]

CN102176702A - Test system and test method - Google Patents

Test system and test method Download PDF

Info

Publication number
CN102176702A
CN102176702A CN2011100670512A CN201110067051A CN102176702A CN 102176702 A CN102176702 A CN 102176702A CN 2011100670512 A CN2011100670512 A CN 2011100670512A CN 201110067051 A CN201110067051 A CN 201110067051A CN 102176702 A CN102176702 A CN 102176702A
Authority
CN
China
Prior art keywords
usb
test
testing apparatus
test program
processing unit
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.)
Pending
Application number
CN2011100670512A
Other languages
Chinese (zh)
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.)
Via Technologies Inc
Original Assignee
Via Technologies Inc
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 Via Technologies Inc filed Critical Via Technologies Inc
Publication of CN102176702A publication Critical patent/CN102176702A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

A test system and a test method are provided. The test system comprises a test device, a USB concentrator and a host device. The USB hub is coupled between the test device and the host device. The host device performs data transmission with the test device through the USB concentrator, and comprises a storage unit and a processing unit. The storage unit is used for storing a first test program and a second test program. When the USB hub is coupled between the test device and the host device, the processing unit executes a first test program to enable the test device to operate in a USB 3.0 mode, and then executes a second test program to enable the test device to operate in a USB 2.0 mode. The processing unit reads the first test program and the second test program stored in the storage unit through different interfaces.

Description

测试系统及测试方法Test system and test method

技术领域technical field

本发明涉及一种测试系统及方法,特别是涉及一种测试USB集线器的测试系统及方法。The invention relates to a test system and method, in particular to a test system and method for testing USB hubs.

背景技术Background technique

随着科技的进步,愈来愈多的数字装置被设计产生如随身盘、外接式光盘机、外接式硬盘、数字相机、手机...等。为了让数字装置可连接计算机主机,数字装置通常具有一连接端口。当数字装置的连接端口与计算机主机的连接端口耦接在一起时,计算机主机便可存取数字装置上的数据。With the advancement of technology, more and more digital devices are designed and produced, such as flash drives, external CD drives, external hard drives, digital cameras, mobile phones, etc. In order for the digital device to be connected to a computer host, the digital device usually has a connection port. When the connection port of the digital device is coupled with the connection port of the computer host, the computer host can access the data on the digital device.

然而,计算机主机的连接端口数量有限。因此,使用者无法同时将多个数字装置与计算机主机作连接。为了解决连接端口数量不足的问题,现有的做法是利用一集线器(Hub),扩展计算机主机的连接端口。However, the host computer has a limited number of connection ports. Therefore, the user cannot connect multiple digital devices to the host computer at the same time. In order to solve the problem of insufficient number of connection ports, the existing method is to use a hub (Hub) to expand the connection ports of the host computer.

由于集线器可有效地让多个数字装置同时连接计算机主机,因此,集线器的重要性也随之增加。为了确保集线器可正常地传输数据,在集线器在出厂前,必需利用一测试系统及方法,对集线器进行测试。Hubs have grown in importance as they effectively allow multiple digital devices to simultaneously connect to a host computer. In order to ensure that the hub can transmit data normally, a test system and method must be used to test the hub before the hub leaves the factory.

发明内容Contents of the invention

本发明提供一种测试系统,包括一测试装置、一USB集线器以及一主机装置。USB集线器具有双总线结构,用以传送USB 3.0或USB 2.0信号,该USB集线器耦接于测试装置与主机装置之间。主机装置通过USB集线器,与测试装置进行数据传输,并包括一储存单元以及一处理单元。储存单元用以储存一第一测试程序以及一第二测试程序。当USB集线器耦接于测试装置与主机装置之间时,处理单元执行第一测试程序,用以进行USB 3.0传输功能的导通测试,处理单元执行第二测试程序,用以进行USB 2.0传输功能的导通测试。处理单元通过不同的接口,读取储存单元所储存的第一及第二测试程序。The invention provides a test system, which includes a test device, a USB hub and a host device. The USB hub has a dual-bus structure for transmitting USB 3.0 or USB 2.0 signals, and the USB hub is coupled between the test device and the host device. The host device transmits data with the test device through the USB hub, and includes a storage unit and a processing unit. The storage unit is used for storing a first test program and a second test program. When the USB hub is coupled between the test device and the host device, the processing unit executes the first test program for the conduction test of the USB 3.0 transmission function, and the processing unit executes the second test program for the USB 2.0 transmission function continuity test. The processing unit reads the first and second test programs stored in the storage unit through different interfaces.

本发明还提供一种测试方法,应用在一测试系统中。测试系统具有一主机装置、一USB集线器以及一测试装置。USB集线器耦接于主机装置以及测试装置之间。本发明的测试方法包括,令主机装置通过一第一接口,读取并执行一第一测试程序,用以与测试装置进行数据传输,并进行USB 3.0传输功能的导通测试;以及令该主机装置通过一第二接口,读取并执行一第二测试程序,用以与测试装置进行数据传输,并进行USB 2.0传输功能的导通测试。第一接口不同于第二接口。USB集线器具有双总线结构,用以传送USB 3.0或USB 2.0信号。The invention also provides a testing method, which is applied in a testing system. The test system has a host device, a USB hub and a test device. The USB hub is coupled between the host device and the test device. The testing method of the present invention includes, making the host device read and execute a first test program through a first interface, for data transmission with the test device, and conducting a conduction test of the USB 3.0 transmission function; and making the host device The device reads and executes a second test program through a second interface for data transmission with the test device and conduction test of the USB 2.0 transmission function. The first interface is different from the second interface. The USB hub has a dual-bus structure for transmitting USB 3.0 or USB 2.0 signals.

为使本发明的特征和优点能更明显易懂,下文特举出较佳实施例,并结合附图详细说明如下。In order to make the features and advantages of the present invention more comprehensible, preferred embodiments are specifically listed below and described in detail with reference to the accompanying drawings.

附图说明Description of drawings

图1为本发明的测试系统的示意图。Fig. 1 is a schematic diagram of the testing system of the present invention.

图2为本发明的主机装置的一可能实施例。FIG. 2 is a possible embodiment of the host device of the present invention.

图3为本发明的测试方法的一可能实施例。Fig. 3 is a possible embodiment of the testing method of the present invention.

附图符号说明Description of reference symbols

100:测试系统;100: test system;

110:测试装置;110: test device;

130:USB集线器;130: USB hub;

150:主机装置;150: host device;

131:向上连接端口;131: upward connection port;

134~137:向下连接端口;134~137: downward connection ports;

151:储存单元;151: storage unit;

154:处理单元;154: processing unit;

157:USB连接端口;157: USB connection port;

152、153:测试程序;152, 153: Test procedures;

111~114:USB连接端口;111-114: USB connection port;

115~118:USB装置控制器;115-118: USB device controller;

132:USB 3.0集线控制器;132: USB 3.0 hub controller;

133:USB 2.0集线控制器;133: USB 2.0 hub controller;

155:USB 3.0主机控制器;155: USB 3.0 host controller;

156:USB 2.0主机控制器。156: USB 2.0 host controller.

具体实施方式Detailed ways

图1为本发明的测试系统的示意图。如图所示,测试系统100包括,一测试装置110、一USB集线器130以及一主机装置150。USB集线器130耦接于测试装置110与主机装置150之间。主机装置150通过USB集线器130,与测试装置110进行数据传输。在本实施例中,主机装置150根据测试装置110所回传的信号,得知USB集线器130是否可正常地传送数据。Fig. 1 is a schematic diagram of the testing system of the present invention. As shown in the figure, the test system 100 includes a test device 110 , a USB hub 130 and a host device 150 . The USB hub 130 is coupled between the test device 110 and the host device 150 . The host device 150 performs data transmission with the testing device 110 through the USB hub 130 . In this embodiment, the host device 150 knows whether the USB hub 130 can transmit data normally according to the signal sent back by the testing device 110 .

本发明并不限定测试装置110的内部架构。只要是能够通过USB集线器130,与主机装置150进行数据传输的装置,均可作为测试装置110。在本实施例中,测试装置110包括,USB连接端口111~114以及USB装置控制器115~118,但并非用以限制本发明。如图所示,USB连接端口111~114一对一地耦接USB装置控制器115~118。The present invention does not limit the internal structure of the testing device 110 . Any device capable of data transmission with the host device 150 via the USB hub 130 may be used as the test device 110 . In this embodiment, the test device 110 includes USB connection ports 111 - 114 and USB device controllers 115 - 118 , but the invention is not limited thereto. As shown in the figure, the USB ports 111 - 114 are coupled to the USB device controllers 115 - 118 one-to-one.

另外,本发明并不限定USB集线器130的内部架构。只要是能将主机装置150的USB连接端口扩展至多个连接端口,用以连接更多的USB周边装置的集线器,均可作为本发明的USB集线器130。在本实施例中,USB集线器130具有双总线结构(dual bus architecture),其可传送USB 2.0或3.0的信号。In addition, the present invention does not limit the internal structure of the USB hub 130 . Any hub that can expand the USB connection port of the host device 150 to multiple connection ports for connecting more USB peripheral devices can be used as the USB hub 130 of the present invention. In this embodiment, the USB hub 130 has a dual bus architecture, which can transmit USB 2.0 or 3.0 signals.

如图所示,USB集线器130包括,一向上连接端口131、一USB 3.0集线控制器132、一USB 2.0集线控制器133以及向下连接端口134~137。本发明并不限定USB集线器130的向上连接端口及向下连接端口的数量。在其它实施例中,USB集线器可具有多个向上连接端口以及至少二向下连接端口。在本实施例中,向上连接端口131用以耦接主机装置150。向下连接端口134~137用以耦接测试装置110。As shown in the figure, the USB hub 130 includes an upward connection port 131, a USB 3.0 hub controller 132, a USB 2.0 hub controller 133, and downward connection ports 134-137. The present invention does not limit the number of the upward connection port and the downward connection port of the USB hub 130 . In other embodiments, the USB hub may have multiple upward connection ports and at least two downward connection ports. In this embodiment, the upward connection port 131 is used to couple to the host device 150 . The downward connection ports 134 - 137 are used for coupling the testing device 110 .

当测试装置110操作于一USB 3.0模式时,USB 3.0集线控制器132负责主机装置150与测试装置110间的数据(如TX+/TX-/RX+/RX-)传输。相反地,当测试装置110操作于一USB 2.0模式时,USB 2.0集线控制器133负责主机装置150与测试装置110间的数据(如D+/D-)传输。When the test device 110 operates in a USB 3.0 mode, the USB 3.0 hub controller 132 is responsible for data (eg TX+/TX−/RX+/RX−) transmission between the host device 150 and the test device 110 . On the contrary, when the test device 110 operates in a USB 2.0 mode, the USB 2.0 hub controller 133 is responsible for the data (such as D+/D−) transmission between the host device 150 and the test device 110 .

举例而言,当测试装置110操作于一USB 3.0模式时,USB 3.0集线控制器132可处理向上连接端口131所接收到的USB 3.0信号,再将处理后的结果通过向下连接端口134~137,提供予测试装置110。在另一实施例中,USB 3.0集线控制器132可接收并处理向下连接端口134~137的一个所接收到的USB 3.0信号,再将处理后的结果通过向上连接端口131,提供予主机装置150。For example, when the test device 110 operates in a USB 3.0 mode, the USB 3.0 hub controller 132 can process the USB 3.0 signal received by the upward connection port 131, and then pass the processed result through the downward connection port 134- 137 , provide to the test device 110 . In another embodiment, the USB 3.0 hub controller 132 can receive and process a received USB 3.0 signal of the downward connection ports 134-137, and then provide the processed result to the host through the upward connection port 131 device 150.

举例而言,主机装置150可先执行一第一测试程序,并通过第一路径(如TX-/TX+/RX-/RX+),将USB 3.0测试信号通过USB集线器130,传送到测试装置110。测试装置110根据主机装置150所提供的测试信号,产生一回复信号,并再通过该第一路径,回传至主机装置150。主机装置150根据该回复信号,便可得知USB集线器130是否可正确地传送USB 3.0信号。For example, the host device 150 can first execute a first test program, and transmit the USB 3.0 test signal to the test device 110 through the USB hub 130 through the first path (such as TX-/TX+/RX-/RX+). The test device 110 generates a reply signal according to the test signal provided by the host device 150 , and sends it back to the host device 150 through the first path. According to the reply signal, the host device 150 can know whether the USB hub 130 can transmit the USB 3.0 signal correctly.

在本实施例中,USB 2.0集线控制器133是将来自主机装置150的USB2.0信号通过向下连接端口134~137,提供予测试装置110,或是将测试装置110所提供的USB 2.0信号通过向上连接端口131,提供予主机装置150。In this embodiment, the USB 2.0 hub controller 133 provides the USB 2.0 signal from the host device 150 to the test device 110 through the downward connection ports 134-137, or the USB 2.0 signal provided by the test device 110 The signal is provided to the host device 150 through the upward connection port 131 .

举例而言,待完成USB集线器130的USB 3.0测试后,主机装置150再执行一第二测试程序,并通过第二路径(如D-/D+),将USB 2.0测试信号通过USB集线器130,传送到测试装置110。测试装置110根据主机装置150所提供的测试信号,产生一回复信号,并再通过该第二路径,回传至主机装置150。主机装置150根据该回复信号,便可得知USB集线器130是否可正确地传送USB 2.0信号。For example, after the USB 3.0 test of the USB hub 130 is completed, the host device 150 executes a second test program, and transmits the USB 2.0 test signal through the USB hub 130 through the second path (such as D-/D+). to test set 110. The test device 110 generates a reply signal according to the test signal provided by the host device 150 , and sends it back to the host device 150 through the second path. According to the reply signal, the host device 150 can know whether the USB hub 130 can transmit the USB 2.0 signal correctly.

在一可能实施例中,在进行USB 3.0及2.0测试前,主机装置150会先通过USB集线器130,提供一特定指令(vendor command)予测试装置110,用以使测试装置110操作在USB 3.0或2.0模式。In a possible embodiment, before performing the USB 3.0 and 2.0 tests, the host device 150 will first provide a specific command (vendor command) to the test device 110 through the USB hub 130, so as to make the test device 110 operate on USB 3.0 or USB 3.0 or USB 2.0. 2.0 mode.

另外,本发明并不限制USB 3.0及2.0测试的顺序。在本实施例中,主机装置150是先测试USB集线器130的USB 3.0传输功能,然后再测试USB集线器130的USB 2.0传输功能。在其它实施例中,主机装置150可先测试USB集线器130的USB 2.0传输功能,然后再测试USB集线器130的USB3.0传输功能。In addition, the present invention does not limit the sequence of USB 3.0 and 2.0 tests. In this embodiment, the host device 150 first tests the USB 3.0 transmission function of the USB hub 130, and then tests the USB 2.0 transmission function of the USB hub 130. In other embodiments, the host device 150 may first test the USB 2.0 transmission function of the USB hub 130, and then test the USB 3.0 transmission function of the USB hub 130.

图2为本发明的主机装置的一可能实施例。如图所示,主机装置150包括,一储存单元151、一处理单元154以及一USB连接端口157。储存单元151储存测试程序152及153。本发明并不限定测试程序152及153是在何种操作系统下执行。在本实施例中,测试程序152及153是在DOS操作系统下进行。FIG. 2 is a possible embodiment of the host device of the present invention. As shown in the figure, the host device 150 includes a storage unit 151 , a processing unit 154 and a USB connection port 157 . The storage unit 151 stores test programs 152 and 153 . The present invention does not limit the operating system under which the test programs 152 and 153 are executed. In this embodiment, the test programs 152 and 153 are performed under the DOS operating system.

在一可能实施例中,测试程序153为一基本输入输出系统(BIOS)。当测试装置110操作在USB 2.0模式下时,测试程序153便通过USB集线器130,与测试装置110进行USB 2.0数据传输,并根据传输结果,得知USB集线器130的USB 2.0传输功能是否正常。In a possible embodiment, the test program 153 is a basic input output system (BIOS). When the test device 110 is operating in the USB 2.0 mode, the test program 153 transmits USB 2.0 data with the test device 110 through the USB hub 130, and according to the transmission result, it is known whether the USB 2.0 transmission function of the USB hub 130 is normal.

处理单元154通过不同的接口,读取储存单元151的测试程序152及153。本发明并不限定处理单元154与测试程序152及153之间的接口种类。在本实施例中,处理单元154通过一扩展主控制器接口(Extended HostController Interface;xHCI),读取测试程序152,而通过一增强型主机控制器接口(Enhanced Host Controller Interface;eHCI),读取测试程序153。The processing unit 154 reads the test programs 152 and 153 of the storage unit 151 through different interfaces. The present invention does not limit the types of interfaces between the processing unit 154 and the test programs 152 and 153 . In this embodiment, the processing unit 154 reads the test program 152 through an extended host controller interface (Extended Host Controller Interface; xHCI), and reads the test program 152 through an enhanced host controller interface (Enhanced Host Controller Interface; eHCI). Test program 153.

扩展主控制器接口xHCI及增强型主机控制器接口eHCI主要是规范系统软件与硬件间的寄存器及数据结构,其中,扩展主控制器接口xHCI是一种USB 3.0主机控制器与USB 3.0周边驱动程序间的一种标准通信方式。The extended host controller interface xHCI and the enhanced host controller interface eHCI mainly standardize the registers and data structures between the system software and hardware. Among them, the extended host controller interface xHCI is a USB 3.0 host controller and USB 3.0 peripheral driver A standard way of communication between.

在本实施例中,处理单元154包括一USB 3.0主机控制器155以及一USB 2.0主机控制器156。USB 3.0主机控制器155通过扩展主控制器接口xHCI,读取并执行测试程序152,用以测试USB集线器130的USB 3.0传输功能。USB 2.0主机控制器156通过增强型主机控制器接口eHCI,读取并执行测试程序153,用以测试USB集线130的USB 2.0传输功能。In this embodiment, the processing unit 154 includes a USB 3.0 host controller 155 and a USB 2.0 host controller 156. The USB 3.0 host controller 155 reads and executes the test program 152 through the extended host controller interface xHCI to test the USB 3.0 transmission function of the USB hub 130. The USB 2.0 host controller 156 reads and executes the test program 153 through the enhanced host controller interface eHCI to test the USB 2.0 transmission function of the USB hub 130.

另外,在本实施例中,USB 3.0主机控制器155是通过一超高速总线接口(Super Speed Bus Interface)SSBI,耦接USB连接端口157,用以传输USB3.0信号。当USB连接端口157耦接USB集线器130时,便可通过USB集线器130,与测试装置110进行通讯。In addition, in this embodiment, the USB 3.0 host controller 155 is coupled to the USB port 157 through a Super Speed Bus Interface (SSBI) for transmitting USB 3.0 signals. When the USB port 157 is coupled to the USB hub 130 , it can communicate with the test device 110 through the USB hub 130 .

本发明并不限定主机装置150与测试装置110之间的通讯内容。在一可能实施例中,主机装置150会先载入测试程序152。测试程序152可通过接口xHCI,枚举(enumerate)USB集线器130是否已插入主机装置150之中。当USB集线器130耦接主机装置150时,处理单元154便可枚举到USB集线器130。The present invention does not limit the content of the communication between the host device 150 and the testing device 110 . In a possible embodiment, the host device 150 will first load the test program 152 . The test program 152 can enumerate whether the USB hub 130 has been inserted into the host device 150 through the interface xHCI. When the USB hub 130 is coupled to the host device 150 , the processing unit 154 can enumerate to the USB hub 130 .

接着,测试程序152读取USB集线器130的一装置描述符(devicedescriptor),用以识别此USB集线器130的类型。测试程序152可根据USB集线器130的装置描述符,得知USB集线器130的装置信息,例如USB集线器130具有一个向上连接端口131和4个向下连接端口134~137。此时,也表示完成USB集线器130的向上连接端口131与主机装置150间的导通测试。Next, the test program 152 reads a device descriptor of the USB hub 130 to identify the type of the USB hub 130 . The test program 152 can obtain the device information of the USB hub 130 according to the device descriptor of the USB hub 130 , for example, the USB hub 130 has an upward connection port 131 and four downward connection ports 134 - 137 . At this time, it also means that the continuity test between the upward connection port 131 of the USB hub 130 and the host device 150 is completed.

接着,测试程序152检测USB集线器130的4个向下连接端口134~137的连接状态,即检测向下连接端口134~137是否连接测试装置110的USB连接端口111~114。本发明并不限定测试程序152检测向下连接端口134~137的顺序。在一可能实施例中,测试程序152可依序或是依照一预设的顺序,检测向下连接端口134~137的连接状态。Next, the test program 152 detects the connection states of the four downward connection ports 134 - 137 of the USB hub 130 , that is, detects whether the downward connection ports 134 - 137 are connected to the USB connection ports 111 - 114 of the testing device 110 . The invention does not limit the order of the test program 152 to detect the down-connection ports 134 - 137 . In a possible embodiment, the test program 152 can detect the connection states of the downstream ports 134 - 137 sequentially or according to a preset sequence.

当向下连接端口134~137连接USB连接端口111~114时,测试程序152便可检测到向下连接端口134~137皆耦接一USB装置,接着,测试程序152读取向下连接端口134~137所连接的装置的一装置描述符。此时,USB装置控制器115~118与USB连接端口111~114被视为4个USB装置。因此,测试程序152可得知4个装置描述符。When the downward connection ports 134-137 are connected to the USB connection ports 111-114, the test program 152 can detect that the downward connection ports 134-137 are all coupled to a USB device, and then the test program 152 reads the downward connection port 134 ~137 A device descriptor for the connected device. At this time, the USB device controllers 115 - 118 and the USB ports 111 - 114 are regarded as four USB devices. Therefore, the test program 152 can know 4 device descriptors.

举例而言,在本实施例中,处理单元154利用超高速总线接口SSBI,发出一读取装置描述符指令(get device descriptor command)。当测试装置110接收到该读取装置描述符指令时,测试装置110将操作在一USB 3.0模式下,并根据该读取装置描述符指令,回报一USB 3.0装置描述符。由于向下连接端口134~137皆耦接一USB装置,故此读取及回报步骤会重复4次。For example, in this embodiment, the processing unit 154 issues a get device descriptor command (get device descriptor command) by using the super high speed bus interface SSBI. When the test device 110 receives the read device descriptor command, the test device 110 will operate in a USB 3.0 mode, and report a USB 3.0 device descriptor according to the read device descriptor command. Since the downward connection ports 134 - 137 are all coupled to a USB device, the steps of reading and reporting are repeated 4 times.

完成后,则表示完成向下连接端口134~137的USB 3.0总线导通测试。此时,测试程序152会发出一第一特定令(first vendor command),使测试装置110切换至一USB 2.0模式,以进行USB 2.0总线的导通测试。After completion, it means that the USB 3.0 bus conduction test of the downwardly connected ports 134-137 is completed. At this time, the test program 152 will issue a first specific order (first vendor command), so that the test device 110 is switched to a USB 2.0 mode to conduct a continuity test of the USB 2.0 bus.

当测试装置110操作在一USB 2.0模式时,测试程序153通过增强型主机控制器接口eHCI,枚举是否已插入USB集线器130。当USB集线器130耦接主机装置150时,处理单元154便可枚举到USB集线器130。When the test device 110 operates in a USB 2.0 mode, the test program 153 enumerates whether the USB hub 130 has been inserted through the enhanced host controller interface eHCI. When the USB hub 130 is coupled to the host device 150 , the processing unit 154 can enumerate to the USB hub 130 .

接着,测试程序153读取USB集线器130的一装置描述符,用以识别此USB集线器130的类型。当测试程序153可读取到USB集线器130的装置描述符时,表示已完成USB集线器130的向上连接端口131与主机装置150间的导通测试。Next, the test program 153 reads a device descriptor of the USB hub 130 to identify the type of the USB hub 130 . When the test program 153 can read the device descriptor of the USB hub 130 , it means that the continuity test between the upward connection port 131 of the USB hub 130 and the host device 150 has been completed.

然后,测试程序153再通过USB集线器130,读取测试装置110的装置描述符,用以进行USB集线器130的向下连接端口134~137的USB 2.0总线导通测试。接着,测试程序153检测USB集线器130的4个向下连接端口134~137的连接状态,即检测向下连接端口134~137是否连接测试装置110的USB连接端口111~114。Then, the test program 153 reads the device descriptor of the test device 110 through the USB hub 130 to perform the USB 2.0 bus conduction test on the downwardly connected ports 134-137 of the USB hub 130. Next, the test program 153 detects the connection states of the four downward connection ports 134 - 137 of the USB hub 130 , that is, detects whether the downward connection ports 134 - 137 are connected to the USB connection ports 111 - 114 of the testing device 110 .

当向下连接端口134~137连接USB连接端口111~114时,测试程序153便可检测到向下连接端口134~137皆耦接一USB装置,接着,测试程序153读取向下连接端口134~137所连接的装置的一USB 2.0装置描述符。此时,USB装置控制器115~118与USB连接端口111~114被视为4个USB装置。因此,测试程序153可得知4个装置描述符。When the downward connection ports 134-137 are connected to the USB connection ports 111-114, the test program 153 can detect that the downward connection ports 134-137 are all coupled to a USB device, and then the test program 153 reads the downward connection port 134 ~137 A USB 2.0 device descriptor for the connected device. At this time, the USB device controllers 115 - 118 and the USB ports 111 - 114 are regarded as four USB devices. Therefore, the test program 153 can know 4 device descriptors.

举例而言,在本实施例中,处理单元154利用总线接口BI,发出一读取装置描述符指令。由于测试装置110操作在一USB 2.0模式下,当测试装置110接收到该读取装置描述符指令时,将回报一USB 2.0装置描述符。由于向下连接端口134~137皆耦接一USB装置,故此读取及回报步骤会重复4次。For example, in this embodiment, the processing unit 154 uses the bus interface BI to issue a read device descriptor command. Since the test device 110 operates in a USB 2.0 mode, when the test device 110 receives the read device descriptor command, it will report a USB 2.0 device descriptor. Since the downward connection ports 134 - 137 are all coupled to a USB device, the steps of reading and reporting are repeated 4 times.

在完成USB 2.0及3.0的总线导通测试后,测试程序153可发出一第二特定指令(second vendor command),用以将测试装置110切回USB 3.0模式,并设定一标记值,用以结束所有测试流程。After completing the bus conduction test of USB 2.0 and 3.0, the test program 153 can issue a second specific command (second vendor command) to switch the test device 110 back to the USB 3.0 mode, and set a flag value for End all testing processes.

在一可能实施例中,测试程序153为BIOS内的一选项(如Legacy USBsupport)。当使用者在开机时进入BIOS后,可启用该选项。当测试装置110操作在一USB 2.0模式下时,BIOS内的测试程序(如153)便开始对USB集线器130进行USB 2.0总线导通测试。In a possible embodiment, the test program 153 is an option in the BIOS (such as Legacy USB support). This option can be enabled when the user enters the BIOS at boot time. When the test device 110 operates in a USB 2.0 mode, the test program (such as 153) in the BIOS starts to perform the USB 2.0 bus conduction test on the USB hub 130.

藉由BIOS内原本的测试功能,对USB集线器130进行USB 2.0总线导通测试,故可减少测试程序152的程序码,因测试人员不需再额外撰写USB2.0的测试码。By using the original test function in the BIOS, the USB 2.0 bus conduction test is performed on the USB hub 130, so the program code of the test program 152 can be reduced, because the tester does not need to write additional USB2.0 test code.

图3为本发明的测试方法的一可能实施例。本发明的测试方法是应用在一测试系统。该测试系统具有一主机装置、一USB集线器以及一测试装置,其中USB集线器耦接于主机装置以及测试装置之间。为方便说明,以下将结合图1所示的测试系统。Fig. 3 is a possible embodiment of the testing method of the present invention. The testing method of the present invention is applied to a testing system. The test system has a host device, a USB hub and a test device, wherein the USB hub is coupled between the host device and the test device. For convenience of description, the test system shown in FIG. 1 will be combined below.

首先,令主机装置150执行一第一测试程序,用以与测试装置110进行数据传输,并使测试装置110操作在一USB 3.0模式(步骤S310)。接着,令主机装置150执行一第二测试程序,用以与测试装置110进行数据传输,并使测试装置110操作在一USB 2.0模式(步骤S330)。First, make the host device 150 execute a first test program for data transmission with the test device 110, and make the test device 110 operate in a USB 3.0 mode (step S310). Next, make the host device 150 execute a second test program for data transmission with the test device 110, and make the test device 110 operate in a USB 2.0 mode (step S330).

在一可能实施例中,第一及第二测试程序是在一DOS操作系统下执行。另外,在其它实施例中,第二测试程序为一基本输入输出系统(BIOS)。该基本输入输出系统可通过USB集线器130,与测试装置110进行USB 2.0数据传输。In a possible embodiment, the first and second test programs are executed under a DOS operating system. In addition, in other embodiments, the second test program is a basic input output system (BIOS). The BIOS can perform USB 2.0 data transmission with the test device 110 through the USB hub 130 .

在本实施例中,主机装置150是通过不同的接口,读取第一及第二测试模式。举例而言,主机装置150利用一扩展主控制器接口xHCI,读取第一测试程序,并利用一增强型主机控制器接口eHCI,读取第二测试程序。In this embodiment, the host device 150 reads the first and second test patterns through different interfaces. For example, the host device 150 uses an extended host controller interface xHCI to read the first test program, and uses an enhanced host controller interface eHCI to read the second test program.

本发明并不限定步骤S310与S330的执行顺序。在本实施例中,是先执行步骤S310,再执行步骤S330。在其它实施例中,可先执行步骤S330,再执行步骤S310。The present invention does not limit the execution order of steps S310 and S330. In this embodiment, step S310 is executed first, and then step S330 is executed. In other embodiments, step S330 may be performed first, and then step S310 may be performed.

另外,本发明并不限定第一及第二测试程序的测试过程。在本实施例中,藉由第一测试程序,主机装置150可先枚举USB集线器130是否插入(步骤S311)。若枚举到USB集线器130,主机装置150读取USB集线器130的一装置描述符(步骤S313)。In addition, the present invention does not limit the testing process of the first and second testing procedures. In this embodiment, through the first test procedure, the host device 150 can enumerate whether the USB hub 130 is plugged in (step S311 ). If the USB hub 130 is enumerated, the host device 150 reads a device descriptor of the USB hub 130 (step S313 ).

若主机装置150可读取USB集线器130的USB 2.0装置描述符时,表示已完成USB集线器130与主机装置150间的连接端口(如131)的USB 3.0导通测试。接着,主机装置150读取USB集线器130所连接的测试装置110的装置描述符(步骤S315)。若主机装置150可读取到USB集线器130所连接的测试装置110的装置描述符时,表示已完成USB集线器130与测试装置110间的连接端口(如134~137)的USB 3.0导通测试。If the host device 150 can read the USB 2.0 device descriptor of the USB hub 130, it means that the USB 3.0 continuity test of the connection port (such as 131) between the USB hub 130 and the host device 150 has been completed. Next, the host device 150 reads the device descriptor of the test device 110 connected to the USB hub 130 (step S315 ). If the host device 150 can read the device descriptor of the test device 110 connected to the USB hub 130, it means that the USB 3.0 continuity test of the connection ports (such as 134-137) between the USB hub 130 and the test device 110 has been completed.

在完成步骤S311~S315后,表示已完成USB集线器130的USB 3.0总线导通测试。在本实施例中,藉由执行第一测试程序,主机装置150发出一第一特定指令(步骤S317),用以将测试装置110设定在USB 2.0模式,以便进行USB集线器130的USB 2.0总线导通测试。After steps S311-S315 are completed, it means that the USB 3.0 bus continuity test of the USB hub 130 has been completed. In this embodiment, by executing the first test program, the host device 150 sends a first specific command (step S317) to set the test device 110 in the USB 2.0 mode, so as to perform the USB 2.0 bus of the USB hub 130 Continuity test.

当测试装置110操作在USB 2.0模式时,第二测试程序便枚举USB集线器130是否插入(步骤S331)。若枚举到USB集线器130,主机装置150读取USB集线器130的一装置描述符(步骤S333)。When the test device 110 operates in the USB 2.0 mode, the second test program enumerates whether the USB hub 130 is inserted (step S331). If the USB hub 130 is enumerated, the host device 150 reads a device descriptor of the USB hub 130 (step S333 ).

若主机装置150可读取USB集线器130的装置描述符时,表示已完成USB集线器130与主机装置150间的连接端口(如131)的USB 2.0导通测试。接着,主机装置150读取USB集线器130所连接的测试装置110的装置描述符(步骤S335)。若主机装置150可读取到USB集线器130所连接的测试装置110的装置描述符时,表示已完成USB集线器130与测试装置110间的连接端口(如134~137)的USB 2.0导通测试。If the host device 150 can read the device descriptor of the USB hub 130, it means that the USB 2.0 continuity test of the connecting port (such as 131) between the USB hub 130 and the host device 150 has been completed. Next, the host device 150 reads the device descriptor of the test device 110 connected to the USB hub 130 (step S335 ). If the host device 150 can read the device descriptor of the test device 110 connected to the USB hub 130, it means that the USB 2.0 continuity test of the connection ports (such as 134-137) between the USB hub 130 and the test device 110 has been completed.

在完成步骤S331~S335后,表示已完成USB集线器130的USB 2.0总线导通测试。在本实施例中,藉由执行第二测试程序,主机装置150发出一第二特定指令(步骤S337),用以将测试装置110设定在USB 3.0模式,并设定一标记值,用以结束测试流程。After steps S331-S335 are completed, it means that the USB 2.0 bus continuity test of the USB hub 130 has been completed. In this embodiment, by executing the second test program, the host device 150 sends a second specific command (step S337) to set the test device 110 in the USB 3.0 mode and set a flag value for End the testing process.

由于USB集线器130的USB 2.0总线导通测试是由一BIOS所执行,故测试人员在撰写测试程序时,不需再撰写USB 2.0的测试码,故可减少测试程序的程序码,并可减少撰写的时间。Since the USB 2.0 bus conduction test of the USB hub 130 is performed by a BIOS, the tester does not need to write the USB 2.0 test code when writing the test program, so the program code of the test program can be reduced, and the writing can be reduced. time.

除非另作定义,在此所有词汇(包含技术与科学词汇)均属本发明所属领域技术人员的一般理解。此外,除非明白表示,词汇于一般字典中的定义应解释为与其相关技术领域的文章中意义一致,而不应解释为理想状态或过分正式的语态。Unless otherwise defined, all terms (including technical and scientific terms) used herein are to be commonly understood by those skilled in the art to which this invention belongs. In addition, unless expressly stated, the definition of a word in a general dictionary should be interpreted as consistent with the meaning in the article in its related technical field, and should not be interpreted as an ideal state or an overly formal voice.

虽然本发明已以较佳实施例揭示如上,然其并非用以限定本发明,本领域的技术人员,在不脱离本发明的精神和范围的前提下,可作若干的更动与润饰,因此本发明的保护范围是以本发明的权利要求为准。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Those skilled in the art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore The scope of protection of the present invention is based on the claims of the present invention.

Claims (11)

1. test macro comprises:
One testing apparatus;
One usb hub has dual-bus structure, and in order to transmit USB 3.0 or USB 2.0 signals, this usb hub couples this testing apparatus; And
One host apparatus, by this usb hub, carry out transfer of data with this testing apparatus, and comprise:
One storage element is in order to store one first test program and one second test program;
One processing unit, when this usb hub is coupled between this testing apparatus and this host apparatus, this processing unit is carried out this first test program, in order to carry out the continuity test of USB 3.0 transfer functions, this processing unit is carried out this second test program, in order to carry out the continuity test of USB 2.0 transfer functions;
Wherein this processing unit reads this stored first and second test program of this storage element by different interfaces.
2. test macro as claimed in claim 1, wherein when this processing unit is carried out this first test program, this testing apparatus operates under a USB 3.0 patterns, this processing unit reads the unit describe symbol of this testing apparatus, after this processing unit receives this unit describe symbol, this processing unit is carried out this second test program, and this processing unit sends one first specific instruction and give this testing apparatus, with so that this testing apparatus operate under a USB 2.0 patterns.
3. test macro as claimed in claim 2, wherein when this processing unit is carried out this second test program, under these USB 2.0 patterns, this processing unit reads the unit describe symbol of this testing apparatus once more, after this processing unit receives this unit describe symbol, this processing unit sends one second specific instruction and gives this testing apparatus, with so that this testing apparatus operate in once more under these USB 3.0 patterns.
4. test macro as claimed in claim 1, wherein this processing unit is by one first interface, read this first test program, this processing unit is by one second interface, read this second test program, wherein this first interface is an expansion Host Controler Interface, and this second interface is an enhancement mode host controller interface.
5. test macro as claimed in claim 1, wherein this processing unit comprises:
One USB, 3.0 console controllers are in order to carry out this first test program; And
One USB, 2.0 console controllers, in order to carry out this second test program, wherein these USB 3.0 console controllers couple this usb hub by a ultrahigh speed bus interface, and these USB 2.0 console controllers couple this usb hub by a bus interface.
6. test macro as claimed in claim 1, wherein this second test program is a basic input output system, this basic input output system can be passed through this usb hub, carries out the USB2.0 transfer of data with this testing apparatus.
7. test macro as claimed in claim 1, wherein this usb hub comprises:
One connectivity port upwards is in order to couple this host apparatus;
A plurality of downward connectivity ports are in order to couple this testing apparatus;
One USB, 3.0 line concentration controllers, when this testing apparatus operated in these USB 3.0 patterns, these USB 3.0 line concentration controllers were responsible for the transfer of data between this host apparatus and this testing apparatus; And
One USB, 2.0 line concentration controllers, when this testing apparatus operated in these USB 2.0 patterns, these USB 2.0 line concentration controllers were responsible for the transfer of data between this host apparatus and this testing apparatus;
Wherein this testing apparatus comprises:
A plurality of usb connecting ports couple these downward connectivity ports one to one; And
A plurality of USB Setup Controllers couple these usb connecting ports one to one.
8. a method of testing is applied in the test macro, and this test macro has a host apparatus, a usb hub and a testing apparatus, and this usb hub is coupled between this host apparatus and this testing apparatus, and this method of testing comprises:
Make this host apparatus by one first interface, read and carry out one first test program, in order to carrying out transfer of data, and carry out the continuity test of USB 3.0 transfer functions with this testing apparatus; And
Make this host apparatus by one second interface, read and carry out one second test program, in order to carrying out transfer of data, and carry out the continuity test of USB 2.0 transfer functions with this testing apparatus;
Wherein this first interface is different from second interface;
Wherein this usb hub has dual-bus structure, in order to transmit USB 3.0 or USB 2.0 signals.
9. method of testing as claimed in claim 8, wherein this second test program is a basic input output system, this basic input output system can be passed through this usb hub, carries out the USB2.0 transfer of data with this testing apparatus.
10. method of testing as claimed in claim 8, wherein when carrying out this first test program, this testing apparatus operates under a USB 3.0 patterns, make this host apparatus read the unit describe symbol of this testing apparatus, after receiving this unit describe symbol, carry out this second test program, and send one first specific instruction and give this testing apparatus, with so that this testing apparatus operate under a USB 2.0 patterns.
11. test macro as claimed in claim 10, wherein when carrying out this second test program, under these USB 2.0 patterns, read the unit describe symbol of this testing apparatus once more, after receiving this unit describe symbol, send one second specific instruction and give this testing apparatus, with so that this testing apparatus operate in once more under these USB 3.0 patterns.
CN2011100670512A 2011-02-18 2011-03-21 Test system and test method Pending CN102176702A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
TW100105365A TWI436204B (en) 2011-02-18 2011-02-18 Testing system and method for usb hub
TW100105365 2011-02-18

Publications (1)

Publication Number Publication Date
CN102176702A true CN102176702A (en) 2011-09-07

Family

ID=44519807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100670512A Pending CN102176702A (en) 2011-02-18 2011-03-21 Test system and test method

Country Status (2)

Country Link
CN (1) CN102176702A (en)
TW (1) TWI436204B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294636A (en) * 2012-05-09 2013-09-11 威盛电子股份有限公司 Concentrator control chip
CN103984656A (en) * 2013-02-07 2014-08-13 银灿科技股份有限公司 Automatic addressing and port setting method of USB3.0 hub
CN104102561A (en) * 2013-04-09 2014-10-15 广达电脑股份有限公司 Universal sequence bus testing device
WO2015043431A1 (en) * 2013-09-24 2015-04-02 Huawei Technologies Co., Ltd. Methods and Apparatuses to Improve Reception of Direct Detection Optical Signals
CN104679620A (en) * 2013-11-28 2015-06-03 英业达科技有限公司 Hot swapping/hot plugging device and method for conducting automatic switching of protocols to establish and test data channel
CN104937575A (en) * 2013-01-25 2015-09-23 惠普发展公司,有限责任合伙企业 USB controllers coupled to USB ports
CN105301480A (en) * 2015-11-19 2016-02-03 四川和芯微电子股份有限公司 Test method of SOC chip
CN105589771A (en) * 2015-07-24 2016-05-18 杭州华三通信技术有限公司 Test method and apparatus
CN106201943A (en) * 2015-05-29 2016-12-07 创惟科技股份有限公司 Hub device and method for universal serial bus connecting different types of connection ports
CN107391405A (en) * 2017-05-15 2017-11-24 联发科技(新加坡)私人有限公司 Usb circuit and USB device
CN107783865A (en) * 2016-08-26 2018-03-09 神讯电脑(昆山)有限公司 USB testers
CN110687363A (en) * 2018-07-04 2020-01-14 佛山市顺德区顺达电脑厂有限公司 SFP port test fixture
CN112579369A (en) * 2019-09-29 2021-03-30 北京小米移动软件有限公司 Multithreading flashing system, method, device, equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI461907B (en) * 2012-10-11 2014-11-21 Mstar Semiconductor Inc Integrated system and test system with multiple applications
TWI512480B (en) * 2012-10-30 2015-12-11 Innostor Technology Corp Switch - based communication interface detection method and device thereof
TWI512481B (en) * 2013-01-31 2015-12-11 Innostor Technology Corp USB 3.0 bus mapping of the USB port method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6393588B1 (en) * 1998-11-16 2002-05-21 Windbond Electronics Corp. Testing of USB hub
CN1525330A (en) * 2003-02-27 2004-09-01 义隆电子股份有限公司 Method for testing storage device with universal serial bus interface and storage device
CN1661867A (en) * 2004-02-24 2005-08-31 希旺科技股份有限公司 USB hub with built-in storage
CN200947207Y (en) * 2006-05-11 2007-09-12 北京飞天诚信科技有限公司 Combined USB concentrator equipment
CN101059770A (en) * 2007-06-12 2007-10-24 北京中星微电子有限公司 System for automatic testing USB compatibility

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6393588B1 (en) * 1998-11-16 2002-05-21 Windbond Electronics Corp. Testing of USB hub
CN1525330A (en) * 2003-02-27 2004-09-01 义隆电子股份有限公司 Method for testing storage device with universal serial bus interface and storage device
CN1661867A (en) * 2004-02-24 2005-08-31 希旺科技股份有限公司 USB hub with built-in storage
CN200947207Y (en) * 2006-05-11 2007-09-12 北京飞天诚信科技有限公司 Combined USB concentrator equipment
CN101059770A (en) * 2007-06-12 2007-10-24 北京中星微电子有限公司 System for automatic testing USB compatibility

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294636A (en) * 2012-05-09 2013-09-11 威盛电子股份有限公司 Concentrator control chip
CN104937575A (en) * 2013-01-25 2015-09-23 惠普发展公司,有限责任合伙企业 USB controllers coupled to USB ports
CN103984656A (en) * 2013-02-07 2014-08-13 银灿科技股份有限公司 Automatic addressing and port setting method of USB3.0 hub
CN103984656B (en) * 2013-02-07 2017-06-06 银灿科技股份有限公司 Automatic addressing and port setting method of USB3.0 hub
CN104102561A (en) * 2013-04-09 2014-10-15 广达电脑股份有限公司 Universal sequence bus testing device
CN104102561B (en) * 2013-04-09 2017-07-14 广达电脑股份有限公司 Universal sequence bus testing device
US9621391B2 (en) 2013-09-24 2017-04-11 Huawei Technologies Co., Ltd. Methods and apparatuses to improve reception of direct detection optical signals
WO2015043431A1 (en) * 2013-09-24 2015-04-02 Huawei Technologies Co., Ltd. Methods and Apparatuses to Improve Reception of Direct Detection Optical Signals
CN104679620A (en) * 2013-11-28 2015-06-03 英业达科技有限公司 Hot swapping/hot plugging device and method for conducting automatic switching of protocols to establish and test data channel
CN106201943A (en) * 2015-05-29 2016-12-07 创惟科技股份有限公司 Hub device and method for universal serial bus connecting different types of connection ports
US10445274B2 (en) 2015-05-29 2019-10-15 Genesys Logic, Inc. Universal serial bus (USB) hub for connecting different port types and method thereof
CN105589771A (en) * 2015-07-24 2016-05-18 杭州华三通信技术有限公司 Test method and apparatus
CN105301480A (en) * 2015-11-19 2016-02-03 四川和芯微电子股份有限公司 Test method of SOC chip
CN107783865A (en) * 2016-08-26 2018-03-09 神讯电脑(昆山)有限公司 USB testers
CN107391405A (en) * 2017-05-15 2017-11-24 联发科技(新加坡)私人有限公司 Usb circuit and USB device
CN110687363A (en) * 2018-07-04 2020-01-14 佛山市顺德区顺达电脑厂有限公司 SFP port test fixture
CN112579369A (en) * 2019-09-29 2021-03-30 北京小米移动软件有限公司 Multithreading flashing system, method, device, equipment and storage medium
CN112579369B (en) * 2019-09-29 2024-04-30 北京小米移动软件有限公司 Multithreading brushing system, method, device, equipment and storage medium

Also Published As

Publication number Publication date
TW201235838A (en) 2012-09-01
TWI436204B (en) 2014-05-01

Similar Documents

Publication Publication Date Title
CN102176702A (en) Test system and test method
CN107423169B (en) Method and system for testing high speed peripheral device interconnection equipment
CN107907814B (en) Method for improving mass production test efficiency of chips
CN107077409B (en) Method and apparatus for multi-interface debugging in an electronic system
CN106775434A (en) A kind of implementation method of NVMe networkings storage, terminal, server and system
CN105808396A (en) Chip debugging device, debugging method and SOC (System of Chip) chip system
JP6483142B2 (en) Universal serial bus emulation of peripheral devices
CN112041827B (en) Automatic USB host detection and port configuration method and device
CN102339236B (en) Method for detecting pluggable storage device and electronic device
CN101699415A (en) Core logic circuit, computer system and peripheral equipment initialization method
CN102053898A (en) Test method for bus interface on PCIE slot of host and read-write test method thereof
US11882038B2 (en) Transaction analyzer for communication bus traffic
US20080021695A1 (en) ROM emulator and ROM testing method using the same
CN213365381U (en) Main board
US9158609B2 (en) Universal serial bus testing device
CN108153624B (en) Test circuit board suitable for NGFF slot
CN102305906B (en) Chip testing method and device
CN102866755A (en) Power-on reset device for integrated test system
CN107704417A (en) The method and its communication system to be communicated with equipment under test
WO2014036725A1 (en) Method, device and equipment for pcie port configuration
CN102087626B (en) Automatic test system and automatic test method thereof
CN101118268B (en) System and method for testing external component interconnection extension slot
CN102082715A (en) Test method for network card reset
US9607715B1 (en) Memory internal comparator testing system
CN107818064B (en) Operation method of universal serial bus concentrator supporting master-slave conversion

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110907