201235838 六、發明說明: 【發明所屬之技術領域】 本發明係有關於-_㈣統及方法,特別是有關於 一種測试USB集線|§的測試系統及方法。 【先前技術】 隨著科技的進步,愈來愈多的數位裴置被設計產生如 隨身碟、外接式光碟機、外接式硬碟、數位相機、手機... 等。為了讓數位裝置可連接電腦主機,數位裝置通常具有 一連接埠。當數位裝置的連接埠與電腦主機的連接崞輛接 在一起時,電腦主機便可存取數位裝置上的資料。 然而’電腦主機的連接埠數量有限。因此,使用者無 法同時將多個數位裝置與電腦主機作連接。為了解決連^ 埠數量不足的問題,習知的做法係利用一集線器(Hub),擴 展電腦主機的連接蟫。 、 由於集線器可有效地讓多個數位裝置同時連接電腦主 機,因此,集線器的重要性也隨之增加。為了確保集線器 可正常地傳輸資料,在集線器在出廠前,必需利用一測試 系統及方法,對集線器進行測試。 【發明内容】 本發明係提供一種測試系統’包括一測試裝置、—USB 集線器以及一主機裝置。USB集線器具有雙匯流排結構, 用以傳送USB 3.0或USB 2.0信號。USB集線器耦接於测 試裝置與主機裝置之間。主機裝置透過USB集線器,與測 試裝置進行資料傳輸,並包括一儲存單元以及一處理單 元。儲存單元用以儲存一第一測試程式以及一第二測試程 VITIl-0〇〇3I〇〇-TW/〇608-A42845-TW/Final 4 201235838 式。當USB集線器耦接於測試裝置與主機 理單元執行第—顯程式,用以進行USB 時,處 處理單元執行第二測試程式,用以進== 專輪功此的導通測試。處理單元係透過 儲存單元所儲存的第—及第二測試程式。”,讀取 本發明另提供-種測試方法,應用在201235838 VI. Description of the Invention: TECHNICAL FIELD OF THE INVENTION The present invention relates to the -_(4) system and method, and more particularly to a test system and method for testing a USB hub|§. [Prior Art] With the advancement of technology, more and more digital devices have been designed to produce such as flash drives, external CD players, external hard drives, digital cameras, mobile phones, etc. In order for a digital device to be connected to a computer host, the digital device typically has a port. When the connection of the digital device is connected to the connection of the host computer, the host computer can access the data on the digital device. However, the number of ports connected to the computer is limited. Therefore, the user cannot connect a plurality of digital devices to the host computer at the same time. In order to solve the problem of insufficient number of connections, the conventional method utilizes a hub to expand the connection of the host computer. Since hubs can effectively connect multiple digital devices to a computer host at the same time, the importance of the hub increases. In order to ensure that the hub can transmit data normally, the hub must be tested with a test system and method before the hub leaves the factory. SUMMARY OF THE INVENTION The present invention provides a test system 'including 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. The USB hub is coupled between the test device and the host device. The host device transmits data to and from the test device via a USB hub, and includes a storage unit and a processing unit. The storage unit is configured to store a first test program and a second test program VITIl-0〇〇3I〇〇-TW/〇608-A42845-TW/Final 4 201235838. When the USB hub is coupled to the test device and the host unit to execute the first display program for performing USB, the processing unit executes the second test program for the conduction test of the == special wheel. The processing unit transmits the first and second test programs stored in the storage unit. The invention provides another test method, which is applied to
測試系統具有:主機裝置、——集線心:::裝 置。USB集線⑱接於主齡置以及測 … 明之測試方法包括,令主機裝置透過—第二介面,μ本么 執行-第-賴程式,用以與剛試裝置進 二取fThe test system has: a host device, a hub::: device. The USB hub 18 is connected to the master and the test method includes: the host device is passed through the second interface, and the μ device is executed to perform the first-in-first program.
^tUSB ,-第二介面,讀取並執行—第二測試程式,用㈣ 裝置進行㈣傳輸,並進行USB2.G傳輪魏料通測γ 第-介面不同於第二介面。USB集線器具有雙匯流排結 構’用以傳送USB 3.0或USB 2.0信號。 為讓本發明之特徵和優點能更明顯易僅,下文特舉出 較佳實施例,並配合所附圖式,作詳細說明如下:牛 【實施方式】 第1圖係為本發明之測試系統之示意圖。如圖所示, 測試系統100包括,一測試装置11〇、一 USB集線器13〇 以及一主機裝置150。USB集線器130耦接於測試裝置11〇 與主機裝置150之間。主機裝置150透過USB集線器130, 與測試裝置110進行資料傳輸。在本實施例中,主機裝置 150根據測試裝置110所回傳的信號,得知USB集線器13〇 是否可正常地傳送資料。 VITIl-0003I00-TW/0608-A42845-TW/Final 5 201235838 本發明並不限定測試裝置110的内部架構。只要是能 夠透過USB集線器13〇,與主機裝置15〇進行資料傳輸的 裝置,均可作為測試裝置11〇。在本實施例中,測試裝置 110包括’ USB連接埠ηι〜114以及USB裝置控制器 115〜118,但並非用以限制本發明。如圖所示,USB連接埠 111〜114 一對一地耦接USB裝置控制器115〜118。 另外’本發明並不限定USB集線器130的内部架構。 只要是能將主機裝置150的USB連接蟑擴展至多個連接 埠’用以連接更多的USB週邊裝置的集線器,均可作為本 發明的USB集線器130。在本實施例中,USB集線器130 具有雙匯流排結構(dual bus architecture),其可傳送usb 2.0或3.0的信號。 如圖所示,USB集線器130包括,一向上連接埠131、 一 USB 3.0集線控制器132、一 USB 2.0集線控制器133 以及向下連接埠134〜137。本發明並不限定USB集線器13〇 的向上連接埠及向下連接埠的數量。在其它實施例中,USB 集線器可具有複數向上連接埠以及至少二向下連接埠。在 本實施例中,向上連接埠131用以耦接主機裝置15〇。向 下連接埠134〜137用以耦接測試裝置11〇。 當測試裝置110操作於一 USB3.0模式時,USB3 0集 線控制器132負責主機裝置150與測試裝置1丨〇間的USB 3·〇資料(如TX+/TX-/RX+/RX-)傳輸。相反地,當測試裝置 110操作於一 USB 2.0模式時,USB 2.0集線控制器133負 責主機裝置150與測試裝置110間的USB 2.0資料(如 D+/D-)傳輸。當測試裝置11〇操作於一 USB 3.0模式時,s VITIl-〇〇〇3l〇〇.TW/〇6〇8.A42845.TW/Final 6 201235838 USB裝置控制器115〜118回報一 USB 3 〇裝置描述符;告 測試裝置11〇操作於一 USB 2 0模式時’ USB裝置控制^ 115〜118回報一 USB 2.〇裝置描述符;上述裝置描述符= 查找表(look-up table)的形式存放在測試裝置11()中。 舉例而言,當測試裝置110操作於一 USB3 〇模式時, USB 3.0集線控制器132可處理向上連接埠131所接收到 的USB 3.0信號,再將處理後的結果透過向下連接埠 134〜137’提供予測試裝置11〇。在另一實施例中,3 〇 • 集線控制器132可接收並處理向下連接埠134〜137之一者 所接收到的USB 3.0信號,再將處理後的結果透過向上連 接埠131 ’提供予主機裝置15〇。 舉例而言,主機裝置150可先執行一第一測試程式, 並透過第一路徑(如TX-/TX+/RX_/RX+),將USB 3 〇測試 信號透過USB集線器130,傳送到測試裝置11〇。測試裝 置110根據主機裝置150所提供的測試信號,產生一回覆 信號,並再透過該第一路徑,回傳至主機裝置15〇。主機 鲁裝置150根據該回覆信號,便可得知USB集線器13〇是否 可正確地傳送USB 3.0信號。 在本實施例中,USB 2.0集線控制器133係將來自主機 裝置150的USB 2.0信號透過向下連接蜂134〜137 ,提供 予測試裝置11〇,或是將測試裝置110所提供的USB 2 〇 信號透過向上連接埠131,提供予主機裝置15〇。 舉例而5 ’待完成USB集線器13〇的USB 3.〇測試後, 主機裝置150再執行一第二測試程式,並透過第二路徑(如 D /D+) ’將USB 2.0測试信號透過USB集線器13〇,傳送 VITI1 -0003I00-TW/0608-A42845-TW/Final 7 201235838 到測:式,置110。測試裝置11〇根據主機裝置所提供 的貝J -式虎產生一回覆信號,並再透過該第二路徑,回 傳至主機裝置15〇。主機裝置15Q根據該回覆信號,便可 得知USB集線器13G是否可正確地傳送卿2力信號。 在一可能實施例中’在進行USB 3.G及2.G測試前,主 機裝置150會先透過USB⑽器13〇,提供一特定指令 (vendor command)予測試襄置11〇,用以使測試裝置ιι〇二 作在USB 3.0或2.0模式。 本 —另外’本發明並不限制USB 3.0及2.〇測試的順序。在 本實施例中,主機裝置15〇係先進行USB集線器⑽的 USB 3.0傳輸功能的導通測試,然後再進行usb集線器⑽ 的USB 2.0傳輸功能的導通測試。在其它實施例中,主機 裝置150可先進行USB集_ 13㈣腦2讀輪功能的 導通測试,然後再進行USB集線器130的USB 3 〇 能的導通測試。 侧刀 第2圖為本發明之主機裝置之一可能實施例。如圖所 不,主機裝置150包括,一儲存單元151、一處理單元154 以及一 USB連接埠157。儲存單元151儲存測試程式Μ] 及153。本發明並不限定測試程式152及153係在何種作 業系統下執行。在本實施例中,測試程式152及153係在 DOS作業糸統下進行。 ,、 在一可能實施例中,測試程式153係為一基本輸入輸 出系統(BIOS)。當測試裝置1丨〇操作在USB 2 〇模式下時二 測試程式153便透過USB集線器130,與測試裝置11〇進 行USB 2.0資料傳輸,並根據傳輸結果,得知USB集線器 VITIl-0003I00-TW/0608-A42845-TW/Final » ^ 201235838 130的USB 2.0傳輸功能是否正常。 處理單元154透過不同的介面,讀取儲存單元Η】的 測試程式152及153。本發明並不限定處理單元154與測 ,程式152及153之間的介面種類。在本實施例中,處理 單兀154透過一擴展主控制器介面η⑽ Controller Interface ; xHCI),讀取測試程式 152,而透過一 增強型主機控制器介面(Enhanced H〇st c〇ntr〇iier Interface ; eHCI),讀取測試程式 153。 擴展主控制器介面xHCI及增強型主機控制器介面 eHCI主要是規範系統軟體與硬體間的寄存器及資料結 構’其中’擴展主控制器介面xHCI是一種USB 3 〇主機控 制器與USB 3.0週邊驅動程式間的一種標準通信方式。 在本實施例中,處理單元154包括一 USB 3 〇主機控 制器155以及一 USB 2.0主機控制器156。USB 3.0主機控 制器155透過擴展主控制器介面χΗα,讀取並執行測試程 式152,用以進行USB集線器13〇的USB 3 〇傳輸功能測 忒。USB 2.0主機控制器156透過增強型主機控制器介面 eHCI,讀取並執行測試程式153,用以進行USB集線 的USB 2.0傳輸功能測試。 另外,在本實施例中,USB 3.〇主機控制器155係透過 一超局速匯流排介面(Super Speed Bus Interface)SSBI,搞接 USB連接埠157,用以傳輸USB 3·〇信號。當USB連接埠 157耦接USB集線器13〇時,便可透過USB集線器13〇, 與測試裝置110進行通訊。 本發明並不限定主機裝置150與測試裝置110之間的 VITIl-〇〇〇3I〇〇_TW/〇608-A42845-TW/Final 9 201235838 通訊内容。在一可能實施例中,主機裝置150會先載入測 試程式152。測試程式152可透過介面xHCI,牧舉 (emimerate)USB集線器130是否已插入主機裝置15〇之 中。當USB集線器130耦接主機裝置15〇時,處理單元154 便可牧舉到USB集線器130。 接著,測試程式152讀取USB集線器130的一裝置描 述符(device descriptor),用以辨認此USB集線器130的類 型。測試程式152可根據USB集線器130的裝置描述符, 得知USB集線器130的裝置資訊,例如USB集線器13〇 具有一個向上連接埠131和4個向下連接埠134〜137。此 時,也表示完成USB集線器130的向上連接埠131與主機 裝置150間的導通測試。 接著,測試程式152偵測USB集線器130的4個向下 連接埠134〜137的連接狀態,即偵測向下連接埠134〜137 是否連接測試裝置110的USB連接埠1U〜114。本發明並 不限定測試程式152偵測向下連接埠134〜137的順序。在 一可能貫施例中,測試程式152可依序或是依照一預設的 順序,偵測向下連接埠134〜137的連接狀態。 當向下連接埠134〜137連接USB連接埠lu〜114時, 測試程式152便可偵測到向下連接埠134〜137皆耦接一 USB裝置,接著,測试程式152讀取向下連接痒I%〜137 所連接的裝置的-裝置描述符。此時,咖纟置控制器 115〜118與USB連接埠ιιι〜114被視為4個USB裝置。因 此,測試程式152可得知4個裝置描述符。 舉例而言,在本實施例中,處理單元154 超高 VITIl-〇〇〇3l〇〇.TW/0608-A42845-TW/Final 10 201235838 匯流排介面测’發出―讀取m述符 descnptor command)。當測試裝 述符指令時,測财f 110^ 接收到該讀取裝置描 ^ 衮置1〇將操作在一 USB 3 f)描-Vnr 並根據該讀取裝置描述符指令,· ^ , 符。由於向下連接埠134〜137皆=一:B 3‘。裝置描述 取及回報步驟會重覆4次。 裝置’故此讀 完成後,則表示已完成向下連接埠134〜137❺聰Μ^tUSB, -Second interface, read and execute - the second test program, (4) device (4) transmission, and USB2.G transmission and measurement γ interface - interface is different from the second interface. The USB hub has a dual bus structure' to carry USB 3.0 or USB 2.0 signals. In order to make the features and advantages of the present invention more obvious, the preferred embodiments are described below, and the detailed description is given below with reference to the following: cattle [Embodiment] FIG. 1 is a test system of the present invention. Schematic diagram. As shown, the test system 100 includes a test device 11A, a USB hub 13A, and a host device 150. The USB hub 130 is coupled between the test device 11A and the host device 150. The host device 150 transmits data to and from the test device 110 via the USB hub 130. In the present embodiment, the host device 150 knows whether the USB hub 13 is capable of transmitting data normally based on the signal returned by the test device 110. VITIl-0003I00-TW/0608-A42845-TW/Final 5 201235838 The present invention does not limit the internal architecture of the test device 110. Any device that can transmit data to and from the host device 15 via the USB hub 13 can be used as the test device. In the present embodiment, the test apparatus 110 includes 'USB ports' 111 to 118 and USB device controllers 115 to 118, but is not intended to limit the present invention. As shown, the USB ports 111 to 114 are coupled to the USB device controllers 115 to 118 one-to-one. Further, the present invention does not limit the internal architecture of the USB hub 130. Any of the USB hubs of the present invention can be used as long as it can extend the USB port of the host device 150 to a plurality of hubs for connecting more USB peripheral devices. In this embodiment, the USB hub 130 has a dual bus architecture that can transmit signals of usb 2.0 or 3.0. As shown, the USB hub 130 includes an upward port 131, a USB 3.0 hub controller 132, a USB 2.0 hub controller 133, and down ports 134-137. The present invention does not limit the number of up-and-down ports of the USB hub 13A. In other embodiments, the USB hub can have a plurality of uplinks and at least two downlinks. In this embodiment, the upper port 131 is coupled to the host device 15A. The lower ports 134 to 137 are connected to the test device 11A. When the test device 110 is operating in a USB 3.0 mode, the USB 30 hub controller 132 is responsible for the transfer of USB 3 data (e.g., TX+/TX-/RX+/RX-) between the host device 150 and the test device 1. Conversely, when the test device 110 is operating in a USB 2.0 mode, the USB 2.0 hub controller 133 is responsible for USB 2.0 data (e.g., D+/D-) transmissions between the host device 150 and the test device 110. When the test device 11 is operating in a USB 3.0 mode, s VITIl-〇〇〇3l〇〇.TW/〇6〇8.A42845.TW/Final 6 201235838 USB device controller 115~118 returns a USB 3 device Descriptor; when the test device 11 is operating in a USB 2 mode, the USB device control ^ 115 to 118 returns a USB 2. device descriptor; the device descriptor = lookup table is stored in the form of a lookup table. In the test device 11 (). For example, when the test device 110 is operating in a USB3 mode, the USB 3.0 hub controller 132 can process the USB 3.0 signal received by the up port 131, and then pass the processed result through the down port 埠134~137. 'Provided to the test device 11〇. In another embodiment, the 3 〇 • hub controller 132 can receive and process the USB 3.0 signal received by one of the down ports 134 137 137, and provide the processed result to the up port 埠 131 ' The host device 15〇. For example, the host device 150 may first execute a first test program and transmit the USB 3 test signal to the test device 11 through the USB hub 130 through the first path (eg, TX-/TX+/RX_/RX+). . The test device 110 generates a reply signal according to the test signal provided by the host device 150, and transmits the signal back to the host device 15 through the first path. Based on the reply signal, the host device 150 can know whether the USB hub 13 can correctly transmit the USB 3.0 signal. In the present embodiment, the USB 2.0 hub controller 133 transmits the USB 2.0 signal from the host device 150 to the test device 11A through the down connection bees 134 to 137, or the USB 2 provided by the test device 110. The signal is supplied to the host device 15 through the upward connection port 131. For example, after 5's USB USB port is completed, the host device 150 executes a second test program and transmits the USB 2.0 test signal through the USB hub through the second path (eg D/D+). 13〇, transfer VITI1 -0003I00-TW/0608-A42845-TW/Final 7 201235838 To test: type, set 110. The test device 11 generates a reply signal according to the B-type tiger provided by the host device, and transmits the signal to the host device 15 through the second path. Based on the reply signal, the host device 15Q can know whether or not the USB hub 13G can correctly transmit the qing 2 force signal. In a possible embodiment, before performing the USB 3.G and 2.G tests, the host device 150 first sends a specific command (vendor command) to the test device 11 through the USB (10) device 13 for testing. The device ιι〇 is made in USB 3.0 or 2.0 mode. The present invention does not limit the order of USB 3.0 and 2. test. In the present embodiment, the host device 15 performs the continuity test of the USB 3.0 transmission function of the USB hub (10) first, and then performs the continuity test of the USB 2.0 transmission function of the usb hub (10). In other embodiments, the host device 150 may first perform a continuity test of the USB set _ 13 (four) brain 2 read wheel function, and then perform a USB 3 的 continuity test of the USB hub 130. Side Knife Figure 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 port 157. The storage unit 151 stores test programs Μ] and 153. The present invention does not limit the operating system in which the test programs 152 and 153 are executed. In the present embodiment, the test programs 152 and 153 are performed under the DOS job system. In one possible embodiment, the test program 153 is a basic input output system (BIOS). When the test device 1 is operated in the USB 2 〇 mode, the second test program 153 performs USB 2.0 data transmission with the test device 11 through the USB hub 130, and according to the transmission result, the USB hub VITIl-0003I00-TW/ is known. 0608-A42845-TW/Final » ^ 201235838 130 USB 2.0 transfer function is normal. The processing unit 154 reads the test programs 152 and 153 of the storage unit through different interfaces. The present invention is not limited to the type of interface between the processing unit 154 and the programs 152 and 153. In this embodiment, the processing unit 154 reads the test program 152 through an extended host controller interface η(10) Controller Interface; xHCI), and passes through an enhanced host controller interface (Enhanced H〇st c〇ntr〇iier Interface ; eHCI), read the test program 153. Extended host controller interface xHCI and enhanced host controller interface eHCI is mainly to regulate the register and data structure between system software and hardware 'where' extended host controller interface xHCI is a USB 3 〇 host controller and USB 3.0 peripheral driver A standard means of communication between programs. In the present embodiment, processing unit 154 includes a USB 3® 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 χΗα for USB 3 〇 transfer function measurement of the USB hub 13〇. The USB 2.0 host controller 156 reads and executes the test program 153 through the enhanced host controller interface eHCI for USB 2.0 transfer function testing of the USB hub. In addition, in the embodiment, the USB 3.〇 host controller 155 is connected to the USB port 157 via a Super Speed Bus Interface (SSBI) for transmitting the USB 3·〇 signal. When the USB port 157 is coupled to the USB hub 13A, the test device 110 can be communicated through the USB hub 13A. The present invention does not limit the communication content between VITI1-〇〇〇3I〇〇_TW/〇608-A42845-TW/Final 9 201235838 between the host device 150 and the test device 110. In one possible embodiment, host device 150 will first load test program 152. The test program 152 can immerse the USB hub 130 into the host device 15 through the interface xHCI. When the USB hub 130 is coupled to the host device 15 , the processing unit 154 can be advertised to the USB hub 130 . Next, the test program 152 reads a device descriptor of the USB hub 130 for identifying the type of the USB hub 130. The test program 152 can know the device information of the USB hub 130 based on the device descriptor of the USB hub 130. For example, the USB hub 13 has an upward port 131 and four down ports 134 137 137. At this time, it is also indicated that the continuity test between the upward connection port 131 of the USB hub 130 and the host device 150 is completed. Next, the test program 152 detects the connection state of the four downward ports 134 to 137 of the USB hub 130, that is, detects whether the down ports 134 to 137 are connected to the USB ports 埠 1U to 114 of the test device 110. The present invention does not limit the order in which the test program 152 detects the downward connections 埠 134 137 137. In a possible embodiment, the test program 152 can detect the connection status of the down connection ports 134 to 137 sequentially or in a predetermined order. When the 埠134~137 is connected to the USB port 〜lu~114, the test program 152 can detect that the down port 埠134~137 is coupled to a USB device, and then the test program 152 reads the down link. Itch I%~137 - Device descriptor of the connected device. At this time, the curb controllers 115 to 118 and the USB connection 埠ιιι 114 are regarded as four USB devices. Therefore, the test program 152 can know the four device descriptors. For example, in this embodiment, the processing unit 154 is ultra-high VITIl-〇〇〇3l〇〇.TW/0608-A42845-TW/Final 10 201235838 bus interface test 'issue-read m descriptor descnptor command) . When the tester command is tested, the test f 110^ receives the read device description, and will operate on a USB 3 f) trace -Vnr and according to the read device descriptor instruction, · ^ , . Since the downward connections 埠134~137 are all = one: B 3 '. Device Description The take and return steps are repeated 4 times. After the device is completed, it indicates that the downward connection has been completed. 埠134~137❺聪Μ
匯流排導通载。此時,測試程式152會發出—第一特定 令卬加Vend〇r C〇mmand),使測試裝置1H)\刀換至一 us^ 2.0模式,以進行USB 2.G匯流排之導通測試。 ^測試裝置m操作在—USB 2 G模式時,測試程式 ⑸=強型1機控制器介面㈣,枚舉是否已插入 USB集線$ 13G。當USB集線器13〇麵接主機震置15〇時, 處理單το 154便可枚舉到USB集線器13〇。 接著,測試程幻53讀取USB集線器13〇的一裝置描 述符’用以辨認此USB集線器13〇的類型。當測 3 可讀取到USB集線器130的裝置描述符時,表示^完成 USB集線器130的向上連接埠131與主機裝置15〇間=導 通測試。 然後,測試程幻53再透過USB集線器13〇,讀取測 試裝置no的裝置描述符,用卩進行USB集線器13〇的向 下連接埠134〜137的USB 2.0匯流排導通測試。接著,測 試程式153偵測USB集線器13〇的4個向下連接埠134〜137 的連接狀態,即偵測向下連接埠134〜137是否連接測試裝 置110的USB連接埠m〜114。 VITI1 -0003!00-TW/0608-A42845-TW/Final n 201235838 當向下連接埠134〜137連接USB連接埠lu〜114時, 測試程式153便可偵測到向下連接埠134〜137皆耦接一 USB裝置,接著,測試程式153讀取向下連接崞i34~l37 所連接的裝置的一 USB 2.0裝置描述符。此時,USB裝置 控制器115〜118與USB連接埠ill〜114被視為4個USB 裝置。因此,測試程式153可得知4個裝置描述符。 舉例而言,在本實施例中,處理單元154利用匯流排 h面BI ’發出一讀取裝置描述符指令。由於測試裝置η 〇 操作在一 USB 2.0模式下,當測試裝置u〇接收到該讀取 裝置描述符指令時,將回報一 USB 2.0裝置描述符。由於 向下連接埠134〜137皆耦接一 USB裝置,故此讀取及回報 步驟會重覆4次。 在完成USB 2.0及3.0的匯流排導通測試後,測試程式 153可發出一第二特定指令(second vendor command),用以 將測試裝置110切回USB 3.0模式,並設定一旗標值,用 以結束所有測試流程。 在一可能實施例中,測試程式153係為BIOS内的一選 項(如Legacy USB support)。當使用者在開機時進入BIOS 後’可啟用該選項。當測試裝置110操作在一 USB 2.0模 式下時,BIOS内的測試程式(如153)便開始對USB集線器 130進行USB 2.0匯流排導通測試。 藉由BIOS内原本的測試功能,對USB集線器130進 行USB 2.0匯流排導通測試,故可減少測試程式152的程 式碼,因測試人員不需再額外撰寫USB 2.0的測試碼。 第3圖為本發明之測試方法之一可能實施例。本發明5 VITIl-0003I00-TW/0608-A42845-TW/Final 12 201235838 之測試方法係應用在一洌試系統。該測試系統具有—主機 裝置、一USB集線器以及—測試裝置,其中USB集線器 耦接於主機裝置以及測試裝置之間,並具有雙匯流排么士 構,用以傳送USB 2.0或3 〇信號。為方便說明,以下= 搭配第1圖所示的測試系統。The busbar leads to the load. At this point, the test program 152 will issue - the first specific command plus Vend〇r C〇mmand), and the test device 1H)\ knife is switched to a us^ 2.0 mode for the continuity test of the USB 2.G bus. ^ When the test device m is operated in the USB 2 G mode, the test program (5) = the strong 1 controller interface (4), and whether the USB set line $13G has been inserted. When the USB hub 13 is connected to the host for 15 ,, the processing unit το 154 can be enumerated to the USB hub 13 〇. Next, the test program 53 reads a device descriptor ' of the USB hub 13' to identify the type of the USB hub 13A. When the device descriptor of the USB hub 130 can be read by the test 3, it indicates that the upward connection 埠131 of the USB hub 130 and the host device 15 are turned on = conduction test. Then, the test program 53 transmits the device descriptor of the test device no through the USB hub 13A, and performs the USB 2.0 bus continuity test of the USB hub 13〇 downward connection 埠134 to 137. Next, the test program 153 detects the connection state of the four down ports 134 to 137 of the USB hub 13 , that is, detects whether the down ports 134 to 137 are connected to the USB ports 〜m to 114 of the test device 110. VITI1 -0003!00-TW/0608-A42845-TW/Final n 201235838 When the 埠134~137 is connected to the USB port 埠lu~114, the test program 153 can detect the downward connection 埠134~137 Coupled with a USB device, the test program 153 then reads a USB 2.0 device descriptor of the device connected to the 崞i34~l37. At this time, the USB device controllers 115 to 118 and the USB ports 埠 ill to 114 are regarded as four USB devices. Therefore, the test program 153 can know the four device descriptors. For example, in the present embodiment, processing unit 154 issues a read device descriptor instruction using bus bar h-face BI'. Since the test device η 〇 operates in a USB 2.0 mode, when the test device u 〇 receives the read device descriptor command, it will report a USB 2.0 device descriptor. Since the down connections 埠 134 137 137 are all coupled to a USB device, the reading and reporting steps are repeated four times. After the USB 2.0 and 3.0 bus continuity test is completed, the test program 153 can issue a 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. In one possible embodiment, test program 153 is an option in the BIOS (e.g., Legacy USB support). This option can be enabled when the user enters the BIOS at boot time. When the test device 110 is operating in a USB 2.0 mode, the test program (e.g., 153) in the BIOS begins a USB 2.0 bus conductance test on the USB hub 130. The USB 2.0 bus conductance test is performed on the USB hub 130 by the original test function in the BIOS, so that the program code of the test program 152 can be reduced, because the tester does not need to write an additional USB 2.0 test code. Figure 3 is a possible embodiment of the test method of the present invention. The test method of the present invention 5 VITIl-0003I00-TW/0608-A42845-TW/Final 12 201235838 is applied to a test 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 and has a dual bus slogan for transmitting USB 2.0 or 3 〇 signals. For convenience of explanation, the following = match the test system shown in Figure 1.
…首先,令主機裝置150執行一第一測試程 <,用以與 測试裝置110進行資料傳輪,並進行USB 3 0傳輪功能的 導通測試(步驟S3 10)。接著,令主機裝置15〇執行—第二 測试程式’用讀測試| f丨1()進行資料傳輸,並進行咖 2.〇傳輸功能的導通測試(步驟S33〇)。First, the host device 150 is caused to execute a first test procedure <RTIgt;</RTI> to perform data transfer with the test device 110 and perform a continuity test of the USB 3 transfer function (step S3 10). Next, the host device 15 is caused to execute - the second test program uses the read test | f 丨 1 () for data transfer, and performs the continuity test of the coffee transfer function (step S33 〇).
在一可能實施例中,第一及第二測試程式係在一 D〇s 作業系統下執行。另外’在其它實施射,第二測試程 係為一基本輸入輸出系統(Bl〇s)。該基本輸入輪出系^ 透過USB集線器130,與測試裝置11〇進行USB 指終„ ^·υ貢料 在本實施例中,主機裝置15〇係透過不同的介面,^ 取第一及第二測試模式。舉例而言,主機裝置15〇利貝 擴展主控制器介面xHCI,讀取第一測試程式,並利用二二 強型主機控制器介面eHCI,讀取第二測試程式。 —增 本發明並不限定步驟S310與S330的執行顺序。 實施例中,係先執行步驟S310,再執行步驟S33〇。在本 實施例中,可先執行步驟S330,再執行步驟S3l〇。在其匕 另外,本發明並不限定第-&第二測試程式的測 程。在本實施例中,藉由第一測試程式,主機襞置、° k 先枚舉USB集線器130是否插入(步驟S3ln。4 可 )。右枚龜$|丨In a possible embodiment, the first and second test programs are executed under a D〇s operating system. In addition, in other implementations, the second test procedure is a basic input/output system (Bl〇s). The basic input wheel system is connected to the test device 11 through the USB hub 130, and the USB device is terminated. In this embodiment, the host device 15 passes through different interfaces, and the first and second are taken. The test mode. For example, the host device 15 extends the main controller interface xHCI, reads the first test program, and reads the second test program by using the second and second strong host controller interface eHCI. The execution sequence of steps S310 and S330 is not limited. In the embodiment, step S310 is performed first, and then step S33 is performed. In this embodiment, step S330 may be performed first, and then step S3l is performed. The present invention does not limit the measurement procedure of the first-and-second test program. In the embodiment, by the first test program, the host device, the k k first enumerates whether the USB hub 130 is inserted (step S3ln. 4 can ). Right turtle #|丨
VITIl-〇〇〇3l〇〇.TW/0608-A42845-TW/Final ” J 201235838 USB集線器130,主機裝置150讀取USB集線器130的一 裝置描述符(步驟S313)。 若主機裝置150可讀取USB集線器130的USB 3.0裝 置描述符時’表示已完成USB集線器130與主機裝置150 間的連接埠(如131)的USB 3.0導通測試。接著,主機裝置 150讀取USB集線器130所連接的測試裝置11〇的裝置描 述符(步驟S315)。若主機裝置150可讀取到USB集線器13〇 所連接的測試裝置11〇的裝置描述符時,表示已完成USB 集線器130與測試裝置11〇間的連接埠(如134〜137)的usb 3·0導通測試。 在完成步驟S311〜S315後,表示已完成USB集線器13〇 的USB 3.0匯流排傳輸功能的導通測試。在本實施例中, 藉由執行第一測試程式,主機裝置15〇發出一第一特定指 令(步驟S317)’用以將測試裝置11〇設定在USB 2 〇模式, 以便進行USB集線器13〇 #USB 2.〇 s流排傳輸功能的導 通測試。 當測試裝置110操作在USB 2.0模式時,第二測試程 式便枚舉USB集線器13〇是否插入(步驟S33l)。若枚舉到 USB集線器130’主機裝置15〇讀取USB集線器13〇的一 裝置描述符(步驟S333)。 若主機裝置150可讀取USB集線器13〇的1;犯2 〇裝 置描述符時,表示已完成USB集線器13〇與主機裝置15^〇 間的連接埠(如131)的USB 2.〇傳輸功能的導通測試。接 著,主機裝置15〇讀取USB集線器!3〇所連接的測試裝置 no的裝置描述符(㈣S335)。若主機裝£ 15〇 到 VITIl-〇〇〇3I〇〇-TW/〇608-A42845-TW/Final Μ ' 201235838 接的測試裝置110的褒㈣ 表不已元成USB集線器n〇與測試裝置 H37)的USB2.G傳輸功能的導 間的連接埠(如 在元成步驟S331〜S335後,表_、 的USB 2.0匯流排傳輪功能的導=二★完成USB集線器13〇 藉由執行第二測試程式,主機°式。在本實施例中, 啊教置15〇狹φ ..VITIl-〇〇〇3l〇〇.TW/0608-A42845-TW/Final ” J 201235838 USB hub 130, the host device 150 reads a device descriptor of the USB hub 130 (step S313). If the host device 150 can read The USB 3.0 device descriptor of the USB hub 130 'represents the USB 3.0 continuity test that has completed the connection (e.g., 131) between the USB hub 130 and the host device 150. Next, the host device 150 reads the test device to which the USB hub 130 is connected. 11〇 device descriptor (step S315). If the host device 150 can read the device descriptor of the test device 11〇 connected to the USB hub 13〇, it indicates that the connection between the USB hub 130 and the test device 11 is completed. Us (such as 134~137) usb 3·0 continuity test. After completing steps S311 to S315, it indicates that the continuity test of the USB 3.0 bus transmission function of the USB hub 13〇 has been completed. In this embodiment, by performing In the first test program, the host device 15 sends a first specific command (step S317) to set the test device 11 to the USB 2 mode for USB hub 13 〇 # USB 2. 〇 s stream transmission function Guide When the test device 110 is operating in the USB 2.0 mode, the second test program enumerates whether the USB hub 13 is plugged in (step S33l). If enumerated to the USB hub 130' the host device 15 reads the USB hub 13〇 a device descriptor (step S333). If the host device 150 can read the 1 of the USB hub 13; when the device descriptor is violated, it indicates that the connection between the USB hub 13 and the host device 15 is completed ( The continuity test of the USB 2.〇 transmission function as in 131). Next, the host device 15 reads the device descriptor of the connected test device no ((4) S335). If the host installs £15 to VITIl- 〇〇〇3I〇〇-TW/〇608-A42845-TW/Final Μ ' 201235838 Connected test device 110 四 (4) Table has not been built into USB hub n〇 and test device H37) USB2.G transmission function guide The connection port (such as after the steps S331 to S335, the table _, the USB 2.0 bus transfer function guide = two ★ complete the USB hub 13 〇 by executing the second test program, the host ° type. In this implementation In the example, ah teaches 15 〇 narrow φ..
令(步驟S337),用以將測試襞置ΐι〇讯出—第二特定指 並設定一旗標值,用以結束剛試沪。叹疋在咖3.〇模式, 由於USB集線器13〇的藤 通測試係由一 BI0S所執行,故貝:排傳輪功能的導 時,不需再撰寫USB 2.0的測^ 4人員在撰寫測試程式 程式碼,並可減少撰寫的時間。* ,文可減)謂試程式的 除非另作定義’在此所有 均屬本發明所屬技術領域中且 3技術與科學詞彙) 此外,除非明白表示,詞囊;者之-般理解。 與其相關技術領域之文章中立盖子一干之定義應解釋為 狀態或過分正式之語態。、致’而不應解釋為理想 -I:本么明已以較佳實施例揭露如上,然其並非用以 限^發明’任何所屬技術領域中具有通常知識者 :離明之精神剛内,當可作些許之更動與潤飾, 二。么明之保濩乾圍當視後附之申請專利範圍所界定者 -广 【圖式簡單說明】 第1圖係為本發明之測試系統之示意圖。 第2圖為本發明之主機襞置之一可能實施例。 VITI1 -〇〇〇3I〇〇-TW/0608-A42845-TW/Final 201235838 第3圖為本發明之測試方法之一可能實施例 【主要元件符號說明】 100 :測試系統; 110 :測試裝置; 130 : USB集線器; 150 :主機裝置; 131 :向上連接埠; 134〜137 :向下連接蟀 151 :儲存單元; 154 :處理單元; 157 : USB連接埠; 111〜114 : USB連接埠 152、153 :測試程式; , 115〜118 : USB裝置控制器; 132 : USB 3.0集線控制器; 133 : USB 2.0集線控制器; 155 : USB 3.0主機控制器; 156 : USB 2.0主機控制器。 VITIl-0003I00-TW/0608-A42845-TW/Final 16The order (step S337) is used to set the test to the second specific finger and set a flag value to end the test. Sigh in the coffee 3. 〇 mode, because the USB hub 13 〇 藤 通 test system is executed by a BI0S, so the shell: the timing of the wheel function, no need to write USB 2.0 test ^ 4 personnel writing test Program code and reduce the time of writing. *, the text can be reduced. Unless otherwise defined, 'all of which are in the technical field of the present invention and 3 technical and scientific terms. In addition, unless clearly indicated, the word capsule; the general understanding. The definition of a neutral cover in an article related to its technical field should be interpreted as a state or an overly formal voice. And I should not be construed as ideal - I: I have disclosed the above in the preferred embodiment, but it is not intended to limit the invention to anyone with ordinary knowledge in the field of technology: Can make some changes and retouching, two. The definition of the scope of the patent application attached to the 明 之 - - - - - - - - 广 【 【 【 【 【 【 【 【 【 【 【 第 第 第 第 第 第 第 第 第 第 第Figure 2 is a possible embodiment of a host device of the present invention. VITI1 -〇〇〇3I〇〇-TW/0608-A42845-TW/Final 201235838 Figure 3 is a possible embodiment of the test method of the present invention [Major component symbol description] 100: Test system; 110: Test device; 130 : USB hub; 150 : Host device; 131 : Up connection 埠; 134~137 : Down connection 蟀 151 : Storage unit; 154 : Processing unit; 157 : USB connection 埠; 111~114 : USB connection 埠 152, 153 : Test program; , 115~118 : USB device controller; 132: USB 3.0 hub controller; 133: USB 2.0 hub controller; 155: USB 3.0 host controller; 156: USB 2.0 host controller. VITIl-0003I00-TW/0608-A42845-TW/Final 16