TWI829378B - Universal serial bus control device and control method therefore - Google Patents

Universal serial bus control device and control method therefore Download PDF

Info

Publication number
TWI829378B
TWI829378B TW111137998A TW111137998A TWI829378B TW I829378 B TWI829378 B TW I829378B TW 111137998 A TW111137998 A TW 111137998A TW 111137998 A TW111137998 A TW 111137998A TW I829378 B TWI829378 B TW I829378B
Authority
TW
Taiwan
Prior art keywords
usb
bus
host interface
control device
usb port
Prior art date
Application number
TW111137998A
Other languages
Chinese (zh)
Other versions
TW202334835A (en
Inventor
鍾健平
Original Assignee
威盛電子股份有限公司
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 威盛電子股份有限公司 filed Critical 威盛電子股份有限公司
Priority to CN202211333078.6A priority Critical patent/CN115693316A/en
Priority to US18/156,391 priority patent/US20230259484A1/en
Publication of TW202334835A publication Critical patent/TW202334835A/en
Application granted granted Critical
Publication of TWI829378B publication Critical patent/TWI829378B/en

Links

Images

Abstract

A universal serial bus (USB) control device and a control method therefore are provided. The USB control device includes a plurality of host interfaces, a plurality of USB ports, a bus physical layer circuit, a microprocessor, and a bus schedule controller. The bus schedule controller controls the bus physical layer circuit according to a USB task. The microprocessor obtains a USB task command by the host interface, and the USB task command includes a USB port number of a specific host interface. The microprocessor searches the USB port number of the specific host interface based on the index lookup table to obtain a specific USB port, generates the USB task according to the specific USB port, and transmits the USB task to the bus schedule controller. The index lookup table is configured to record relationship between a part of the USB ports that each host interface is responsible for and the USB port numbers.

Description

通用序列匯流排控制裝置及其控制方法Universal serial bus control device and control method thereof

本發明是有關於一種使用通用序列匯流排(USB)的計算機技術,且特別是有關於一種通用序列匯流排控制裝置及其控制方法。 The present invention relates to a computer technology using a universal serial bus (USB), and in particular to a universal serial bus control device and a control method thereof.

目前在電腦週邊裝置最為普遍使用的連接界面莫過於USB界面,從小型的行動裝置到大型的工作站台都仍持續使用USB界面。使用USB界面的裝置(以下稱為USB裝置)具備多種類型以及應用特性,如,顯示螢幕、高畫質攝影機、喇叭具備較高的頻寬傳輸需求;部分裝置(如,人臉辨識相機、指紋掃描裝置、隨身碟)具備資訊安全需求;作為一般用途的人機輸入裝置(如,鍵盤、滑鼠...等)、風扇、行動電源...等裝置則無特殊類型與應用特性。由於USB裝置的類型過多而難以對USB裝置進行分類,進而難以管理這些USB裝置。 Currently, the most commonly used connection interface in computer peripheral devices is the USB interface. From small mobile devices to large workstations, USB interfaces are still used. Devices using the USB interface (hereinafter referred to as USB devices) have various types and application characteristics. For example, display screens, high-definition cameras, and speakers have high bandwidth transmission requirements; some devices (such as face recognition cameras, fingerprint scanners, etc.) Scanning devices, flash drives) have information security requirements; general-purpose human-computer input devices (such as keyboards, mice, etc.), fans, mobile power supplies, etc. have no special types and application characteristics. Since there are too many types of USB devices, it is difficult to classify USB devices, and thus it is difficult to manage these USB devices.

因此,如何分類管理這些USB裝置,並且維持USB自身的彈性使用功能,便是USB裝置的管理技術在實際應用上的研究 趨勢。 Therefore, how to classify and manage these USB devices and maintain the flexible use function of USB itself is the research on the practical application of USB device management technology. trend.

本發明提供一種通用序列匯流排控制裝置及其控制方法,可使USB控制裝置透過多個主機界面分類管理多種類別的USB裝置,並使USB控制裝置中所有的USB埠仍然具備彈性使用功能。 The present invention provides a universal serial bus control device and a control method thereof, which enables the USB control device to manage multiple types of USB devices through multiple host interfaces, and allows all USB ports in the USB control device to still have flexible use functions.

本發明實施例的通用序列匯流排(USB)控制裝置包括多個主機界面、多個通用序列匯流排(USB)埠、匯流排實體層電路、微處理器,以及匯流排排程控制器。所述匯流排實體層電路耦接至所述USB埠。所述微處理器耦接所述主機界面。所述匯流排排程控制器耦接所述主機界面、所述微處理器以及所述匯流排實體層電路。所述匯流排排程控制器依據至少一USB任務控制所述匯流排實體層電路。所述微處理器透過所述主機界面獲得一USB任務指令,所述USB任務指令包括一特定主機界面的一USB埠編號,其中所述特定主機界面為所述主機界面的其中之一。所述微處理器基於一索引查找表查詢所述特定主機界面的所述USB埠編號為對應至一特定USB埠,依據所述特定USB埠產生所述至少一USB任務,並將所述至少一USB任務傳遞至所述匯流排排程控制器。所述特定USB埠是所述USB埠的其中之一,所述索引查找表用以記錄每個主機界面所負責的所述USB埠的一部分與所述USB埠編號之間的關係。 The universal serial bus (USB) control device according to the embodiment of the present invention includes multiple host interfaces, multiple universal serial bus (USB) ports, bus physical layer circuits, a microprocessor, and a bus schedule controller. The bus physical layer circuit is coupled to the USB port. The microprocessor is coupled to the host interface. The bus schedule controller is coupled to the host interface, the microprocessor and the bus physical layer circuit. The bus schedule controller controls the bus physical layer circuit according to at least one USB task. The microprocessor obtains a USB task command through the host interface, and the USB task command includes a USB port number of a specific host interface, wherein the specific host interface is one of the host interfaces. The microprocessor queries the USB port number of the specific host interface based on an index lookup table to determine whether it corresponds to a specific USB port, generates the at least one USB task based on the specific USB port, and transfers the at least one USB task to the specific USB port. USB tasks are passed to the bus schedule controller. The specific USB port is one of the USB ports, and the index lookup table is used to record the relationship between a part of the USB port that each host interface is responsible for and the USB port number.

本發明實施例所述一種用於通用序列匯流排控制裝置的控制方法包括以下步驟:透過多個主機界面獲得一USB任務指令,所述USB任務指令包括一特定主機界面的一USB埠編號,其中所述特定主機界面為所述主機界面的其中之一;基於一索引查找表查詢所述特定主機界面的所述USB埠編號為對應至一特定USB埠,依據所述特定USB埠產生所述至少一USB任務,其中所述特定USB埠是所述USB埠的其中之一,所述索引查找表用以記錄每個主機界面所負責的所述匯流排連接埠的一部分與所述USB埠編號之間的關係;以及,藉由一匯流排排程控制器以及一匯流排實體層電路以完成所述至少一USB任務。 A control method for a universal serial bus control device according to an embodiment of the present invention includes the following steps: obtaining a USB task command through multiple host interfaces, where the USB task command includes a USB port number of a specific host interface, wherein The specific host interface is one of the host interfaces; the USB port number of the specific host interface is queried based on an index lookup table to correspond to a specific USB port, and the at least one is generated based on the specific USB port. A USB task, wherein the specific USB port is one of the USB ports, and the index lookup table is used to record the portion of the bus connection port that each host interface is responsible for and the USB port number. The relationship between; and, completing the at least one USB task through a bus schedule controller and a bus physical layer circuit.

基於上述,本發明實施例所述的通用序列匯流排控制裝置及其控制方法在USB控制裝置設置多個主機界面,並利用索引查找表對部分硬體元件進行配置與共享,從而利用多種判斷機制分類管理多種類別的USB裝置,並使USB控制裝置中所有的USB埠仍然具備彈性使用功能。 Based on the above, the universal serial bus control device and its control method according to the embodiments of the present invention set multiple host interfaces in the USB control device, and use index lookup tables to configure and share some hardware components, thereby utilizing multiple judgment mechanisms Classify and manage multiple types of USB devices, and ensure that all USB ports in the USB control device still have flexible usage functions.

11:主機控制器驅動器 11: Host controller driver

100:通用序列匯流排(USB)控制裝置 100: Universal Serial Bus (USB) Control Device

110-1、110-2:主機界面 110-1, 110-2: Host interface

120:微處理器 120:Microprocessor

125:韌體 125:Firmware

130:匯流排排程控制器 130: Bus schedule controller

140:索引查找表 140: Index lookup table

145:匯流排實體層電路 145:Bus physical layer circuit

150-1:低速(LS)/全速(FS)匯流排裝置 150-1: Low speed (LS)/full speed (FS) bus device

150-2:高速(HS)匯流排裝置 150-2: High speed (HS) bus device

150-3:超高速(SS)匯流排裝置 150-3: Super high speed (SS) bus device

160:埠路由集線器 160:Port routing hub

170-1~170-N:USB埠 170-1~170-N: USB port

210:虛框 210: virtual frame

S310~S350:步驟 S310~S350: steps

PPN:第一欄位 PPN: first column

HID:第二欄位 HID: second column

HPN:第三欄位 HPN: The third column

圖1是依照本發明一實施例的一種通用序列匯流排(USB)控制裝置100的方塊圖。 FIG. 1 is a block diagram of a universal serial bus (USB) control device 100 according to an embodiment of the present invention.

圖2是本實施例中索引查找表140的示意圖。 FIG. 2 is a schematic diagram of the index lookup table 140 in this embodiment.

圖3是依照本發明一實施例的一種用於通用序列匯流排 (USB)控制裝置100的控制方法的流程圖。 Figure 3 is a diagram for a universal serial bus according to an embodiment of the present invention. A flowchart of a control method of the (USB) control device 100.

基於USB裝置已十分普及與廣泛地出現在各種應用,因此如何依據USB裝置的類別或應用特性而對USB裝置進行分類管理,即為實作上的趨勢。然而,若USB控制裝置希望以偵測指定類別的作法管理USB裝置的時候,便需要使用此種類別所對應的判斷機制以及硬體。此種判斷機制經常需要另外制定,目前並無統一的判斷機制來對USB裝置進行分類管理。 Since USB devices have become very popular and widely used in various applications, how to classify and manage USB devices according to their categories or application characteristics is an implementation trend. However, if the USB control device wishes to manage the USB device by detecting a specified category, it needs to use the judgment mechanism and hardware corresponding to the category. This kind of judgment mechanism often needs to be formulated separately. Currently, there is no unified judgment mechanism to classify and manage USB devices.

例如,依據頻寬需求,將高頻寛需求的USB顯示裝置或USB音效裝置與低頻寛需求的USB鍵盤或滑鼠進行分類管理;依據資訊安全管控等級,將高度資訊安全管控等級的USB人臉辨識相機、指紋掃瞄裝置或隨身碟與普通資訊安全管控等級的一般USB設備(如,USB風扇、行動電源...等)進行分類管理。USB控制裝置可使用USB裝置的主機界面識別符(ID)為基礎來作為特定類別的判斷機制,以方便管理USB裝置與分配實體資源,且每種判斷機制需要對應的硬體執行。 For example, according to the bandwidth requirements, USB display devices or USB audio devices with high frequency bandwidth requirements and USB keyboards or mice with low frequency bandwidth requirements are classified and managed; according to the information security control level, USB faces with high information security control levels are classified and managed. Identify cameras, fingerprint scanning devices or flash drives and general USB devices with general information security control levels (such as USB fans, mobile power supplies, etc.) for classified management. The USB control device can use the host interface identifier (ID) of the USB device as a specific type of judgment mechanism to facilitate management of the USB device and allocate physical resources, and each judgment mechanism requires corresponding hardware execution.

若希望USB控制裝置以多種類別或應用特性來管理這些USB裝置的時候,除了需要多套判斷機制以及硬體以外,還需要將這些USB埠劃分為不同用途使用。例如,若一個電腦裝置具備十個USB埠,而USB控制裝置100希望能夠偵測兩個特殊用途(高速傳輸用途以及高度資訊安全用途)的話,在設計電腦裝置時便 可能需要將十個USB埠中的四個USB埠劃分給高速傳輸用途的USB裝置使用,十個USB埠中的另外六個USB埠則可能劃分給高度資訊安全用途的USB裝置使用。如此一來,反而失去了USB埠原本具備的彈性使用功能。 If you want a USB control device to manage these USB devices in multiple categories or application characteristics, in addition to multiple sets of judgment mechanisms and hardware, you also need to divide these USB ports for different uses. For example, if a computer device has ten USB ports and the USB control device 100 hopes to detect two special purposes (high-speed transmission purpose and high information security purpose), it is convenient when designing the computer device. It may be necessary to allocate four USB ports among the ten USB ports to USB devices for high-speed transmission purposes, and the other six USB ports among the ten USB ports may be allocated to USB devices for high-level information security purposes. As a result, the flexible use function originally provided by the USB port is lost.

因此,本發明實施例在USB控制裝置中使用多個主機控制器界面,並利用索引查找表來使這些主機界面將其餘的硬體元件進行配置與共享,便可利用多種判斷機制分類管理這些USB裝置,並使USB控制裝置中所有的USB埠仍然具備彈性使用功能。 Therefore, the embodiment of the present invention uses multiple host controller interfaces in the USB control device, and uses an index lookup table to enable these host interfaces to configure and share other hardware components, so that multiple judgment mechanisms can be used to classify and manage these USBs. device, so that all USB ports in the USB control device still have flexible use functions.

圖1是依照本發明一實施例的一種通用序列匯流排(USB)控制裝置100的方塊圖。本實施例的USB控制裝置100是符合USB的可擴展主機控制器界面(eXtensible Host Controller Interface;xHCI)作為其控制界面。USB控制裝置100也可以稱為是USB xHCI控制裝置。本實施例的USB控制裝置100受控於主機控制器驅動器(eXtensible Host Controller driver;xHCD)11。 FIG. 1 is a block diagram of a universal serial bus (USB) control device 100 according to an embodiment of the present invention. The USB control device 100 of this embodiment is a USB-compliant extensible host controller interface (eXtensible Host Controller Interface; xHCI) as its control interface. The USB control device 100 may also be called a USB xHCI control device. The USB control device 100 of this embodiment is controlled by a host controller driver (eXtensible Host Controller driver; xHCD) 11.

USB控制裝置100可支援PCI界面的匯流排/裝置/功能(bus/device/function;BDF)作為USB裝置的主機界面識別符(ID),以將這些USB裝置進行分類。也就是說,符合本發明的實施例可採用PCI界面的匯流排/裝置/功能(bus/device/function;BDF)作為USB裝置的主機界面識別符(ID),USB控制裝置100可偵測每個USB裝置對應的主機界面識別符來判斷此USB裝置的特性位於何種特殊用途(如,是否為高速傳輸用途、高度資訊安全用途...等)或為一般用途。 The USB control device 100 can support the bus/device/function (BDF) of the PCI interface as the host interface identifier (ID) of USB devices to classify these USB devices. That is to say, embodiments consistent with the present invention can use the bus/device/function (BDF) of the PCI interface as the host interface identifier (ID) of the USB device, and the USB control device 100 can detect each The host interface identifier corresponding to a USB device is used to determine whether the characteristics of the USB device are for special purposes (for example, whether it is a high-speed transmission purpose, a high-level information security purpose, etc.) or a general purpose.

本實施例的USB控制裝置100包括多個主機界面、微處理器120、匯流排排程控制器130、匯流排實體層電路145以及多個USB埠170-1~170-N(N為大於1的正整數)。本實施例的匯流排實體層電路145可包括基於不同傳輸速度的匯流排裝置以及埠路由集線器160。微處理器120中可儲存有韌體125。 The USB control device 100 of this embodiment includes multiple host interfaces, a microprocessor 120, a bus schedule controller 130, a bus physical layer circuit 145 and multiple USB ports 170-1~170-N (N is greater than 1 positive integer). The bus physical layer circuit 145 of this embodiment may include bus devices based on different transmission speeds and a port routing hub 160 . Firmware 125 may be stored in the microprocessor 120 .

本實施例以兩個主機界面110-1~110-2作為舉例,應用本實施例者可依其需求調整主機界面的數量。主機界面110-1~110-2可以為包括具備xHCI定義且依據此xHCI運行的硬體界面控制電路,以與可擴展主機控制器驅動器(xHCD)11相互通訊。xHCD 11受控於記憶體裝置中的作業系統,因此xHCD 11還可以稱為是作業系統主機驅動器。 This embodiment takes two host interfaces 110-1~110-2 as an example. Those who apply this embodiment can adjust the number of host interfaces according to their needs. The host interfaces 110-1~110-2 may include hardware interface control circuits having xHCI definitions and operating according to this xHCI to communicate with the extensible host controller driver (xHCD) 11. xHCD 11 is controlled by the operating system in the memory device, so xHCD 11 can also be called an operating system host driver.

舉例來說,當具備USB控制裝置100的計算機裝置需要存取某個USB埠所連接的USB裝置時,xHCD 11會將USB任務指令(task command)傳遞給主機界面110-1~110-2。主機界面110-1~110-2分別可從xHCD 11獲得各自的USB任務指令。這些USB任務指令主要由USB埠170-1~170-N的其中之一以及與前述單個USB埠所對應的USB任務(task)所組成。USB任務可以是與對應的USB埠所連接的USB裝置進行資料存取或相應的操作指令。 For example, when the computer device equipped with the USB control device 100 needs to access a USB device connected to a certain USB port, the xHCD 11 will pass the USB task command to the host interfaces 110-1~110-2. The host interfaces 110-1~110-2 can obtain respective USB task instructions from the xHCD 11 respectively. These USB task instructions mainly consist of one of the USB ports 170-1~170-N and a USB task corresponding to the aforementioned single USB port. The USB task may be data access or corresponding operation instructions with the USB device connected to the corresponding USB port.

微處理器120可透過運行儲存於其中的韌體而實現本發明實施例。本發明實施例的微處理器120分別透過主機界面110-1~110-2獲得前述USB埠所對應的USB任務,並將USB任務 依據USB任務指令的特性按照USB規格的定義指派與傳遞給匯流排排程控制器130。 The microprocessor 120 can implement embodiments of the present invention by running firmware stored therein. The microprocessor 120 in the embodiment of the present invention obtains the USB tasks corresponding to the aforementioned USB ports through the host interfaces 110-1~110-2 respectively, and transfers the USB tasks to According to the characteristics of the USB task command, it is assigned and passed to the bus schedule controller 130 according to the definition of the USB specification.

在本實施例中,基於不同傳輸速度的匯流排裝置可包括用於USB 1.1的低速(Low Speed;LS)/全速(Full Speed;FS)匯流排裝置150-1(可稱為是第一速率匯流排裝置)、用於USB 2.0的高速(High Speed;HS)匯流排裝置150-2(可稱為是第二速率匯流排裝置)以及用於USB 3.0的超高速(Super high Speed;SS)匯流排裝置150-3(可稱為是第三速率匯流排裝置)。換句話說,匯流排裝置150-1~150-3是用於處理USB協定中各自定義的傳輸速率的實體層硬體裝置或電路。 In this embodiment, bus devices based on different transmission speeds may include a Low Speed (LS)/Full Speed (FS) bus device 150-1 for USB 1.1 (which can be referred to as a first speed bus device), a High Speed (HS) bus device 150-2 for USB 2.0 (which can be called a second speed bus device), and a Super High Speed (SS) for USB 3.0 Bus device 150-3 (which may be referred to as a third rate bus device). In other words, the bus devices 150-1 to 150-3 are physical layer hardware devices or circuits used to handle transmission rates respectively defined in the USB protocol.

匯流排排程控制器130根據USB任務指令的要求而控制匯流排實體層電路145,以對於相對應USB匯流排的封包進行相應處理。詳細來說,匯流排排程控制器130基於微處理器120所排定的USB任務來控制埠路由集線器160以及匯流排裝置150-1~150-3,讓對應的USB埠170-1~170-N其中之一連接至匯流排裝置150-1~150-3其中之一,並控制經連結的匯流排裝置150-1~150-3其中之一來與前述USB埠170-1~170-N其中之一相連接的USB裝置存取資料,以完成USB任務。舉例來說,在與USB埠170-1相連接的USB裝置僅支援USB 1.1傳輸速率的情況下,當xHCD 11要與此USB裝置存取資料時,匯流排排程控制器130會控制埠路由集線器160以將USB埠170-1連接至支援USB 1.1傳輸速率的匯流排裝置150-1,從而完成xHCD 11與此USB裝置 存取資料的USB任務。在與USB埠170-2相連接的USB裝置能夠支援USB 3.0傳輸速率的情況下,當xHCD 11要與此USB裝置存取資料時,匯流排排程控制器130會控制埠路由集線器160以將USB埠170-3連接至支援USB 3.0傳輸速率的匯流排裝置150-3,從而完成xHCD 11與此USB裝置存取資料的USB任務。 The bus schedule controller 130 controls the bus physical layer circuit 145 according to the requirements of the USB task command to perform corresponding processing on the packets of the corresponding USB bus. Specifically, the bus schedule controller 130 controls the port routing hub 160 and the bus devices 150-1~150-3 based on the USB tasks scheduled by the microprocessor 120, so that the corresponding USB ports 170-1~170 One of -N is connected to one of the bus devices 150-1~150-3, and controls one of the connected bus devices 150-1~150-3 to communicate with the aforementioned USB port 170-1~170- One of the connected USB devices accesses data to complete the USB task. For example, when the USB device connected to the USB port 170-1 only supports the USB 1.1 transfer rate, when the xHCD 11 wants to access data from the USB device, the bus scheduler controller 130 will control the port routing. The hub 160 connects the USB port 170-1 to the bus device 150-1 that supports the USB 1.1 transmission rate, thereby completing the communication between the xHCD 11 and the USB device. USB task to access data. When the USB device connected to the USB port 170-2 can support the USB 3.0 transfer rate, when the xHCD 11 wants to access data from the USB device, the bus schedule controller 130 will control the port routing hub 160 to The USB port 170-3 is connected to the bus device 150-3 that supports the USB 3.0 transmission rate, thereby completing the USB task of data access by the xHCD 11 and the USB device.

匯流排排程控制器130根據USB任務指令的要求而對於相對應USB匯流排的封包進行相應處理。如果有需要使用或是存取系統記憶體(例如,記憶體裝置中的雙倍資料率(DDR)同步動態隨機存取記憶體(SDRAM))時,匯流排排程控制器130會將與此存取操作相關的USB裝置所對應的主機界面識別符帶入存取記憶體的交易(transaction)當中,並依據前述流程的基礎控制埠路由集線器160以讓對應的USB埠170-1~170-N其中之一連接至匯流排裝置150-1~150-3其中之一,並控制經連結的匯流排裝置150-1~150-3其中之一來與前述USB埠170-1~170-N其中之一連接的USB裝置存取資料以完成USB任務。 The bus schedule controller 130 performs corresponding processing on the packets corresponding to the USB bus according to the requirements of the USB task command. If there is a need to use or access system memory (eg, double data rate (DDR) synchronous dynamic random access memory (SDRAM) in a memory device), the bus scheduler controller 130 will The host interface identifier corresponding to the USB device related to the access operation is brought into the transaction of accessing the memory, and the port routing hub 160 is controlled based on the foregoing process to allow the corresponding USB ports 170-1~170- One of N is connected to one of the bus devices 150-1~150-3, and controls one of the connected bus devices 150-1~150-3 to communicate with the aforementioned USB port 170-1~170-N One of the connected USB devices accesses data to complete USB tasks.

當主機界面110-1~110-2皆使用同一種判斷機制的時候,USB裝置所對應的用途(例如:高速傳輸或是高資訊安全要求)只能是唯一的。然而,若主機界面110-1與主機界面110-2使用不同的判斷機制的時候,由於每個判斷機制會對應不同用途於各自的主機界面識別符,而這些判斷機制針對同個主機界面識別符所控的USB裝置可能會有與主機界面識別符所定義的用途產生不一致的情況,因而造成混亂。例如,當不同用途所定義的主機 界面識別符皆為相同數值的時候,主機界面110-1、110-2會因而相同數值的主機界面識別符發生產生混淆,無法知道是何種用途所定義的主機界面識別符。 When the host interfaces 110-1~110-2 all use the same judgment mechanism, the purpose corresponding to the USB device (for example: high-speed transmission or high information security requirements) can only be unique. However, if the host interface 110-1 and the host interface 110-2 use different judgment mechanisms, each judgment mechanism will correspond to the respective host interface identifier for different purposes, and these judgment mechanisms are for the same host interface identifier. The controlled USB device may be inconsistent with the purpose defined by the host interface identifier, thus causing confusion. For example, when hosts are defined for different purposes When the interface identifiers have the same value, the host interfaces 110-1 and 110-2 will be confused by the host interface identifiers with the same value, making it impossible to know what purpose the host interface identifier is defined for.

為避免前述問題,本發明實施例透過設立索引查找表140,這個索引查找表140用以記錄每個主機界面110-1~110-2以及這些主機界面110-1~110-2所負責的USB埠的關係,讓微處理器120可根據索引查找表140中的內容得知每個主機界面110-1~110-2所負責的USB埠為何,並將USB任務經由對應的主機界面來執行。換句話說,本實施例的索引查找表可記錄每個主機界面所負責的USB埠,並且xHCD 11可透過指令修改索引查找表中的資料,從而不需實體地、非彈性地指派特定的多個USB埠給特定主機界面,而是可以彈性地透過修改索引查找表中的資料而將某個USB埠連接的USB裝置從一個主機界面改由另一個主機界面進行負責,並且在前述的修改中並不需要使用者將USB裝置從某一USB埠轉而插到另一USB埠。 In order to avoid the aforementioned problems, the embodiment of the present invention establishes an index lookup table 140. This index lookup table 140 is used to record each host interface 110-1~110-2 and the USB interfaces responsible for these host interfaces 110-1~110-2. The relationship between the ports allows the microprocessor 120 to know the USB ports that each host interface 110-1~110-2 is responsible for based on the content in the index lookup table 140, and execute USB tasks through the corresponding host interface. In other words, the index lookup table of this embodiment can record the USB port responsible for each host interface, and the xHCD 11 can modify the data in the index lookup table through instructions, so that there is no need to physically and inflexibly assign a specific multiplexer. A USB port is assigned to a specific host interface, but the USB device connected to a certain USB port can be flexibly changed from one host interface to another host interface by modifying the data in the index lookup table, and in the aforementioned modification There is no need for the user to plug the USB device from one USB port to another.

本實施例將索引查找表140設立在匯流排排程控制器130中,應用本實施例者可依其需求調整索引查找表140的設立位置,例如,可將索引查找表140設立於微處理器120或另一記憶元件(未繪示)中,讓需要使用的元件(如,微處理器120、主機界面110-1~110-2、匯流排排程控制器130...等)能進行存取即可。 In this embodiment, the index lookup table 140 is set up in the bus schedule controller 130. Users of this embodiment can adjust the location of the index lookup table 140 according to their needs. For example, the index lookup table 140 can be set up in the microprocessor. 120 or another memory component (not shown), so that the components that need to be used (such as the microprocessor 120, the host interface 110-1~110-2, the bus schedule controller 130..., etc.) can Just access it.

圖2是本實施例中索引查找表140的示意圖。索引查找表140的欄位PPN(亦稱為是第一欄位)用以表示USB埠的編號, 欄位HID(亦稱為是第二欄位)用以表示負責前述USB埠的主機界面所對應的主機界面識別符,欄位HPN(亦稱為是第三欄位)用以表示主機界面所負責的USB埠編號。 FIG. 2 is a schematic diagram of the index lookup table 140 in this embodiment. The field PPN (also called the first field) of the index lookup table 140 is used to represent the number of the USB port. The field HID (also called the second field) is used to represent the host interface identifier corresponding to the host interface responsible for the aforementioned USB port, and the field HPN (also called the third field) is used to represent the host interface identifier. Responsible USB port number.

在此假設圖1中USB埠的數量為6(即,N=6),且在索引查找表140中以USB埠170-1~170-6呈現,因此欄位PPN中列出USB埠170-1~170-6。圖1主機界面110-1的主機界面識別符為「Bus0 Dev3 Func0」且在索引查找表140的欄位HID中以「000300」呈現;圖1主機界面110-2的主機界面識別符為「Bus0 Dev4 Func0」且在索引查找表140的欄位HID中以「000400」呈現。主機界面110-1用以負責USB埠170-1、170-3、170-5的USB任務,因此欄位PPN「170-1」、「170-3」、「170-5」所對應的欄位HID皆為「000300」,且欄位PPN「170-1」、「170-3」、「170-5」所對應的欄位HPN分別為「01」、「02」、「03」,用以表示主機界面110-1中USB埠編號為「01」的是USB埠170-1、USB埠編號為「02」的是USB埠170-3、USB埠編號為「03」的是USB埠170-5。依此類推,欄位PPN「170-2」、「170-4」、「170-6」所對應的欄位HID皆為表示主機界面110-2的「000400」,且主機界面110-2中USB埠編號為「01」的是USB埠170-2、USB埠編號為「02」的是USB埠170-4、USB埠編號為「03」的是USB埠170-6。 It is assumed here that the number of USB ports in Figure 1 is 6 (ie, N=6), and they are presented as USB ports 170-1~170-6 in the index lookup table 140, so the USB port 170-170 is listed in the field PPN. 1~170-6. The host interface identifier of the host interface 110-1 in Figure 1 is "Bus0 Dev3 Func0" and is represented as "000300" in the field HID of the index lookup table 140; the host interface identifier of the host interface 110-2 in Figure 1 is "Bus0" Dev4 Func0" and appears as "000400" in the field HID of the index lookup table 140. The host interface 110-1 is responsible for the USB tasks of USB ports 170-1, 170-3, and 170-5, so the fields corresponding to the fields PPN "170-1", "170-3", and "170-5" The HIDs of all bits are "000300", and the field HPNs corresponding to the fields PPN "170-1", "170-3", and "170-5" are "01", "02", and "03" respectively. Use It means that the USB port number "01" in the host interface 110-1 is USB port 170-1, the USB port number "02" is USB port 170-3, and the USB port number "03" is USB port 170. -5. By analogy, the field HID corresponding to the fields PPN "170-2", "170-4", and "170-6" are all "000400" representing the host interface 110-2, and the host interface 110-2 The USB port number "01" is USB port 170-2, the USB port number "02" is USB port 170-4, and the USB port number "03" is USB port 170-6.

索引查找表140可固定在計算機裝置開機時透過微處理器120運行其韌體125時進行建立。另一方面,由於USB技術支援熱插拔,且在計算機裝置關機時,USB裝置的連接關係可能有 所改變,因此也可動態地由微處理器120運行其韌體時透過預設的屬性建立索引查找表140,或是由xHCD 11根據管理所需的分類來建立索引查找表140。 The index lookup table 140 can be established when the computer device is powered on by the microprocessor 120 running its firmware 125 . On the other hand, since USB technology supports hot plugging, and when the computer device is shut down, the connection relationship of the USB device may be compromised. Therefore, the index lookup table 140 can also be dynamically created by the microprocessor 120 through preset attributes when running its firmware, or the xHCD 11 can create the index lookup table 140 according to the classification required for management.

進行分類管理的屬性舉例來說可以是以效能屬性來分類,或是是以安全屬性來分類。換句話說,用於分類的前述判斷機制可由系統廠商或製造廠商的設定來進行彈性規畫設置或實現,應用本實例者並不限制用於分類管理的前述判斷機制的應用方式。例如,可將主機界面識別符「Bus0 Dev3 Func0」設定為高效能,而主機界面識別符「Bus0 Dev4 Func0」設定為一般效能;或者將主機界面識別符「Bus0 Dev3 Func0」設定為高安全性,而主機界面識別符「Bus0 Dev4 Func0」設定為低安全或是一般安全性。舉例而言,實現輸入輸出記憶體管理單元(IOMMU)或是系統記憶體管理單元(SMMU)的計算機裝置可以根據不同的主機界面識別符(或是,PCI界面的匯流排/裝置/功能(BDF))來達成屬性特徵的功能。例如,IOMMU或是SMMU可根據不同的主機界面識別符來決定系統安全性的存取權限;例如低安全性的主機界面識別符將不允許存取到高安全性資料存放的區域,故以不同的主機界面識別符來發出存取交易是達成分類屬性特徵的基本構成要件。 For example, the attributes that are classified and managed can be classified by performance attributes or safety attributes. In other words, the foregoing judgment mechanism for classification can be set or implemented by system vendors or manufacturers for flexible planning. Those who apply this example do not limit the application method of the foregoing judgment mechanism for classification management. For example, the host interface identifier "Bus0 Dev3 Func0" can be set to high performance, and the host interface identifier "Bus0 Dev4 Func0" can be set to normal performance; or the host interface identifier "Bus0 Dev3 Func0" can be set to high security. The host interface identifier "Bus0 Dev4 Func0" is set to low security or normal security. For example, a computer device that implements an input-output memory management unit (IOMMU) or a system memory management unit (SMMU) can be configured with different host interface identifiers (or bus/device/function (BDF) of the PCI interface). )) to achieve the function of attribute characteristics. For example, IOMMU or SMMU can determine system security access permissions based on different host interface identifiers; for example, a low-security host interface identifier will not allow access to an area where high-security data is stored, so different The host interface identifier to issue access transactions is the basic component to achieve classification attribute characteristics.

請參見圖2,在此假設,主機界面110-1用以處理高安全性的任務,主機界面110-2用以處理低安全性或一般安全性的任務。當具備高安全性的USB裝置(如,指紋掃瞄器)接入USB埠 170-2時,xHCD 11識別到指紋掃瞄器的設定被連接到用以處理低安全性或一般安全性的任務的主機界面110-2。因此,xHCD 11發動索引查找表140的修改指令,並如圖2虛框210所示,將欄位PPN為「170-2」的欄位HID以及欄位HPN由原本的「000400」、「01」修改成「000300」、「04」,相當於將指紋掃瞄器從主機界面110-2的USB埠編號「01」移除再插入主機界面110-1的USB埠編號「04」,藉此以讓指紋掃瞄器受到主機界面110-1的控制。因此,xHCD 11可以再度重新啟動USB控制裝置100來識別指紋掃瞄器,並因安全性已經符合要求條件而順利地完成實際操作的相關功能。 Referring to Figure 2, it is assumed here that the host interface 110-1 is used to process high-security tasks, and the host interface 110-2 is used to process low-security or general security tasks. When a high-security USB device (such as a fingerprint scanner) is connected to the USB port At 170-2, the xHCD 11 recognizes that the fingerprint scanner is configured to be connected to the host interface 110-2 for handling low security or normal security tasks. Therefore, xHCD 11 activates the modification command of the index lookup table 140, and as shown in the dotted box 210 in Figure 2, the field HID and the field HPN of the field PPN "170-2" are changed from the original "000400", "01 ” is changed to “000300” and “04”, which is equivalent to removing the fingerprint scanner from the USB port number “01” of the host interface 110-2 and then inserting it into the USB port number “04” of the host interface 110-1. To allow the fingerprint scanner to be controlled by the host interface 110-1. Therefore, the xHCD 11 can restart the USB control device 100 to recognize the fingerprint scanner, and successfully complete the relevant functions of the actual operation because the security has met the required conditions.

另一方面,當計算機裝置準備關機時,USB處理裝置110可將當前配置的索引查找表140存入計算機裝置的非揮發性記憶體裝置中(例如,基本輸入輸出系統(BIOS)、特定的硬碟區間...等)。當下次計算機裝置開機時,如果在基本輸入輸出系統(BIOS)或特定的硬碟區間中發現有效的索引查找表140時,則本實施例的USB處理裝置110可直接將前述非揮發性記憶體裝置中的內容直接載入到索引查找表140,以供USB處理裝置110使用。藉此,本發明實施例提供以軟體修改的方式修改索引查找表140,可維持USB埠在使用上的彈性。 On the other hand, when the computer device is preparing to shut down, the USB processing device 110 may store the currently configured index lookup table 140 into a non-volatile memory device of the computer device (eg, Basic Input Output System (BIOS), specific hardware disc interval...etc.). When the computer device is turned on next time, if a valid index lookup table 140 is found in the basic input and output system (BIOS) or a specific hard disk area, the USB processing device 110 of this embodiment can directly store the aforementioned non-volatile memory. The content in the device is directly loaded into the index lookup table 140 for use by the USB processing device 110 . Therefore, the embodiment of the present invention provides for modifying the index lookup table 140 in the form of software modification, which can maintain the flexibility in use of the USB port.

圖3是依照本發明一實施例的一種用於通用序列匯流排(USB)控制裝置100的控制方法的流程圖。圖3所述的方法可由圖1中USB控制裝置100中的微處理器120實現,或是,圖3 所述的方法可為微處理器120中所執行的韌體實現。於步驟S310中,可由微處理器120或是xHCD 11透過微處理器120來初始化索引查找表。如前述,在具備USB控制裝置100的計算機裝置進行開機或是USB裝置透過USB埠170-1~170-N接入USB控制裝置100時,微處理器120可根據所需的分類管理的判斷機制設定所需的索引查找表140或透過BIOS預存的內容載入來初始化索引查找表140。 FIG. 3 is a flow chart of a control method for a universal serial bus (USB) control device 100 according to an embodiment of the present invention. The method described in Figure 3 can be implemented by the microprocessor 120 in the USB control device 100 in Figure 1, or, Figure 3 The method described may be implemented by firmware executed in the microprocessor 120 . In step S310, the index lookup table may be initialized by the microprocessor 120 or the xHCD 11 through the microprocessor 120. As mentioned above, when the computer device equipped with the USB control device 100 is turned on or the USB device is connected to the USB control device 100 through the USB ports 170-1~170-N, the microprocessor 120 can determine the required classification management according to the mechanism. Set the required index lookup table 140 or initialize the index lookup table 140 by loading pre-stored content in the BIOS.

於步驟S320中,微處理器120透過主機界面110-1~110-2接收USB任務指令。本實施例假設此USB任務指令中包含由主機界面110-1(本實施例稱為,特定主機界面)發出USB埠編號為「02」的USB任務。換句話說,xHCD 11發出USB任務指令到主機界面110-1,微處理器120透過主機界面110-1接收由主機界面110-1發出的、具備與主機界面對應的USB埠編號的USB任務。特定主機界面為主機界面110-1~110-2的其中之一。 In step S320, the microprocessor 120 receives the USB task command through the host interface 110-1~110-2. This embodiment assumes that the USB task command includes a USB task with USB port number "02" issued by the host interface 110-1 (referred to as a specific host interface in this embodiment). In other words, xHCD 11 sends a USB task command to the host interface 110-1, and the microprocessor 120 receives the USB task sent by the host interface 110-1 and having a USB port number corresponding to the host interface through the host interface 110-1. The specific host interface is one of the host interfaces 110-1~110-2.

於步驟S330中,微處理器120基於索引查找表140查詢特定主機界面(主機界面110-1)的USB埠編號(「02」)為對應至特定USB埠,並依據此特定USB埠產生至少一個USB任務。詳細來說,微處理器120依據主機界面110-1對應的主機界面識別符「000300」以及USB埠編號「02」透過索引查找表140查詢第三列的資料,從而查詢與前述資訊對應且位於索引查找表140欄位PPN的USB埠170-3來作為前述特定USB埠。並且,微處理器120依據此特定USB埠(USB埠170-3)基於USB任務指令的 要求產生至少一個USB任務。本實施例的特定USB埠是USB埠170-1~170-N的其中之一。索引查找表140用以記錄每個主機界面110-1~110-2所負責的USB埠的一部分與USB埠編號之間的關係。例如,從索引查找表140可知,主機界面識別符(欄位HID)為「000300」且USB編號(對應欄位HPN)為「02」所對應的欄位PPN為「170-3」。 In step S330, the microprocessor 120 queries the USB port number ("02") of the specific host interface (host interface 110-1) based on the index lookup table 140 to determine whether it corresponds to the specific USB port, and generates at least one USB port based on the specific USB port. USB tasks. Specifically, the microprocessor 120 queries the data in the third column through the index lookup table 140 based on the host interface identifier "000300" and the USB port number "02" corresponding to the host interface 110-1, thereby querying the data corresponding to the aforementioned information and located at The USB port 170-3 of the PPN in field 140 of the index lookup table is used as the aforementioned specific USB port. Moreover, the microprocessor 120 executes the USB task command based on the specific USB port (USB port 170-3). It is required to generate at least one USB task. The specific USB port in this embodiment is one of the USB ports 170-1~170-N. The index lookup table 140 is used to record the relationship between a part of the USB port that each host interface 110-1~110-2 is responsible for and the USB port number. For example, it can be seen from the index lookup table 140 that the host interface identifier (field HID) is "000300" and the USB number (corresponding field HPN) is "02" and the corresponding field PPN is "170-3".

於步驟S340中,微處理器120便將USB埠170-3的USB任務依據USB任務指令的特性且按照USB規格的定義傳遞給匯流排排程控制器130,以藉由匯流排排程控制器130以及匯流排實體層電路145以完成前述USB任務。 In step S340, the microprocessor 120 passes the USB task of the USB port 170-3 to the bus schedule controller 130 according to the characteristics of the USB task command and the definition of the USB specification, so that the bus schedule controller 130 and bus physical layer circuit 145 to complete the aforementioned USB tasks.

於步驟S350中,匯流排排程控制器130根據USB任務指令的要求來完成相對應的USB任務並產生USB封包。此USB封包回傳到xHCD 11以實現與USB裝置的資料存取。在執行對應於特定USB埠(例如,USB埠170-3)的USB任務時,如果有需要發出使用或是存取系統記憶體(例如,記憶體裝置中的雙倍資料率(DDR)同步動態隨機存取記憶體(SDRAM))時,會根據索引查找表140來決定透過哪一個主機界面110-1~110-2對應的主機界面識別符且帶入存取系統記憶體的交易(transaction)中,並依據前述流程的基礎來完成USB任務。 In step S350, the bus schedule controller 130 completes the corresponding USB task and generates a USB packet according to the requirements of the USB task command. This USB packet is sent back to xHCD 11 for data access with the USB device. When executing a USB task corresponding to a specific USB port (e.g., USB port 170-3), if there is a need to issue a double data rate (DDR) synchronization dynamic using or accessing system memory (e.g., a memory device) random access memory (SDRAM), the index lookup table 140 will be used to determine which host interface identifier corresponding to the host interface 110-1~110-2 is used to bring the transaction to access the system memory. , and complete the USB task based on the aforementioned process.

基於前述步驟與操作,本發明實施例可透過索引查找表140而實現將其餘的硬體元件(如,圖1微處理器120、匯流排排程控制器130、匯流排裝置150-1~150-3、埠路由集線器160以及 USB埠170-1~170-N...等)共享到多個主機界面(如,圖1主機界面110-1~110-2),便可利用多種判斷機制分類管理這些USB裝置,例如可透過不同的主機界面對應不同的判斷機制,並使USB控制裝置中所有的USB埠仍然具備彈性使用功能。 Based on the foregoing steps and operations, the embodiment of the present invention can use the index lookup table 140 to realize the integration of other hardware components (such as the microprocessor 120, the bus schedule controller 130, the bus devices 150-1~150 in Figure 1 -3. Port routing hub 160 and USB ports 170-1~170-N...etc.) are shared to multiple host interfaces (e.g., host interfaces 110-1~110-2 in Figure 1), and multiple judgment mechanisms can be used to classify and manage these USB devices. For example, Different host interfaces correspond to different judgment mechanisms, and all USB ports in the USB control device still have flexible use functions.

若以安全性作為判斷機制的舉例,計算機裝置上的作業系統在IOMMU的設定上可以規劃,圖1主機界面110-2(其主機界面識別符為「000400」)的所有交易只能存取較低安全性或是一般安全性的記憶體位址區塊。因此,故如果某一低安全性的USB裝置假設違反安全原則而希望使用高安全性的位址區塊的話,將會由IOMMU發出拒絕存取的結果。因此,xHCD 11在識別完連接至USB控制裝置100上USB埠170-1~170-N其中之一的USB裝置的設備類別之後,就會分配符合其安全性原則的記憶體區塊來操作此USB裝置,以完成符合其安全性的設定。 If security is used as an example of the judgment mechanism, the operating system on the computer device can be programmed in the settings of the IOMMU. All transactions in the host interface 110-2 in Figure 1 (its host interface identifier is "000400") can only access larger A low-security or normal-security memory address block. Therefore, if a low-security USB device violates security principles and wishes to use a high-security address block, the IOMMU will issue an access denial result. Therefore, after the xHCD 11 identifies the device type of the USB device connected to one of the USB ports 170-1~170-N on the USB control device 100, it will allocate a memory block that complies with its security principles to operate this device. USB device to complete settings consistent with its security.

綜上所述,本發明實施例所述的通用序列匯流排控制裝置及其控制方法在USB控制裝置設置多個主機界面,並利用索引查找表對部分硬體元件進行配置與共享,從而利用多種判斷機制分類管理多種類別的USB裝置,並使USB控制裝置中所有的USB埠仍然具備彈性使用功能。 To sum up, the universal serial bus control device and its control method according to the embodiments of the present invention set multiple host interfaces in the USB control device, and use the index lookup table to configure and share some hardware components, thereby utilizing a variety of The judgment mechanism classifies and manages multiple types of USB devices, and enables all USB ports in the USB control device to still have flexible usage functions.

11:主機控制器驅動器 11: Host controller driver

100:通用序列匯流排(USB)控制裝置 100: Universal Serial Bus (USB) Control Device

110-1、110-2:主機界面 110-1, 110-2: Host interface

120:微處理器 120:Microprocessor

125:韌體 125:Firmware

130:匯流排排程控制器 130: Bus schedule controller

140:索引查找表 140: Index lookup table

145:匯流排實體層電路 145:Bus physical layer circuit

150-1:低速(LS)/全速(FS)匯流排裝置 150-1: Low speed (LS)/full speed (FS) bus device

150-2:高速(HS)匯流排裝置 150-2: High speed (HS) bus device

150-3:超高速(SS)匯流排裝置 150-3: Super high speed (SS) bus device

160:埠路由集線器 160:Port routing hub

170-1~170-N:USB埠 170-1~170-N: USB port

Claims (11)

一種通用序列匯流排(USB)控制裝置,包括:多個主機界面;多個通用序列匯流排(USB)埠;一微處理器,耦接所述主機界面;以及一匯流排排程控制器,耦接所述主機界面以及所述微處理器,其中所述微處理器透過所述主機界面獲得一USB任務指令,所述USB任務指令包括一特定主機界面的一USB埠編號,其中所述特定主機界面為所述主機界面的其中之一,所述微處理器基於一索引查找表查詢所述特定主機界面的所述USB埠編號為對應至一特定USB埠,依據所述特定USB埠產生至少一USB任務,並將所述至少一USB任務傳遞至所述匯流排排程控制器,其中所述特定USB埠是所述USB埠的其中之一,所述索引查找表用以記錄每個主機界面所負責的所述USB埠的一部分與所述USB埠編號之間的關係,所述通用序列匯流排控制裝置還包括:一匯流排實體層電路,耦接至所述USB埠,其中所述匯流排排程控制器依據所述至少一USB任務控制所述匯流排實體層電路,其中所述匯流排實體層電路包括:多個匯流排裝置,每個匯流排裝置用以透過互不相同的USB 傳輸速率與一USB裝置通訊,其中所述USB裝置透過所述USB埠的其中之一耦接至所述通用序列匯流排控制裝置;以及一埠路由集線器,耦接所述USB埠以及所述匯流排裝置,用以受控於所述匯流排排程控制器而將所述USB埠的其中之一或多個電性連接至所述匯流排裝置的其中之一。 A universal serial bus (USB) control device includes: multiple host interfaces; multiple universal serial bus (USB) ports; a microprocessor coupled to the host interface; and a bus schedule controller, The host interface and the microprocessor are coupled, wherein the microprocessor obtains a USB task command through the host interface, the USB task command includes a USB port number of a specific host interface, wherein the specific The host interface is one of the host interfaces. The microprocessor queries the USB port number of the specific host interface based on an index lookup table to determine whether it corresponds to a specific USB port, and generates at least one based on the specific USB port. a USB task, and transfer the at least one USB task to the bus schedule controller, wherein the specific USB port is one of the USB ports, and the index lookup table is used to record each host The relationship between the part of the USB port that the interface is responsible for and the USB port number, the universal serial bus control device further includes: a bus physical layer circuit coupled to the USB port, wherein the The bus schedule controller controls the bus physical layer circuit according to the at least one USB task, wherein the bus physical layer circuit includes: a plurality of bus devices, each bus device is used to pass a different USB a transfer rate for communicating with a USB device, wherein the USB device is coupled to the universal serial bus control device through one of the USB ports; and a port routing hub is coupled to the USB port and the bus A bus device is used to electrically connect one or more of the USB ports to one of the bus devices under the control of the bus schedule controller. 如請求項1所述的通用序列匯流排控制裝置,其中所述匯流排排程控制器儲存所述索引查找表。 The universal sequence bus control device as claimed in claim 1, wherein the bus schedule controller stores the index lookup table. 如請求項1所述的通用序列匯流排控制裝置,其中所述微處理器接收有關於所述索引查找表的一修改指令來修改所述索引查找表中的資料。 The universal sequence bus control device as claimed in claim 1, wherein the microprocessor receives a modification instruction regarding the index lookup table to modify the data in the index lookup table. 如請求項1所述的通用序列匯流排控制裝置,其中通用序列匯流排控制裝置受控於一主機控制器驅動器,耦接所述主機界面,用以提供所述USB任務指令至所述主機界面,或是,用以提供有關於所述索引查找表的一修改指令至所述微處理器。 The universal serial bus control device as claimed in claim 1, wherein the universal serial bus control device is controlled by a host controller driver and coupled to the host interface to provide the USB task command to the host interface. , or used to provide a modification instruction regarding the index lookup table to the microprocessor. 如請求項1所述的通用序列匯流排控制裝置,其中所述微處理器還用以初始化所述索引查找表。 The universal sequence bus control device as claimed in claim 1, wherein the microprocessor is also used to initialize the index lookup table. 如請求項1所述的通用序列匯流排控制裝置,其中所述索引查找表包括多個欄位,所述欄位包括:一第一欄位,用以表示所述USB埠位於所述通用序列匯流排控制裝置的一本地編號;一第二欄位,用以表示所述主機界面對應的主機界面識別符;以及 一第三欄位,用以表示所述主機界面對應的所述USB埠編號。 The universal serial bus control device according to claim 1, wherein the index lookup table includes a plurality of fields, and the fields include: a first field to indicate that the USB port is located in the universal serial bus control device. a local number of the bus control device; a second field used to represent the host interface identifier corresponding to the host interface; and A third field used to indicate the USB port number corresponding to the host interface. 如請求項1所述的通用序列匯流排控制裝置,其中所述匯流排裝置包括:第一速率匯流排裝置,用以依據一第一速率與所述USB裝置通訊;第二速率匯流排裝置,用以依據一第二速率與所述USB裝置通訊;以及第三速率匯流排裝置,用以依據一第三速率與所述USB裝置通訊,其中所述第一速率、所述第二速率及所述第三速率互不相同。 The universal serial bus control device as claimed in claim 1, wherein the bus device includes: a first speed bus device for communicating with the USB device according to a first speed; a second speed bus device, for communicating with the USB device according to a second rate; and a third rate bus device for communicating with the USB device according to a third rate, wherein the first rate, the second rate and the The third rates are different from each other. 一種用於通用序列匯流排控制裝置的控制方法,包括:透過多個主機界面獲得一USB任務指令,所述USB任務指令包括一特定主機界面的一USB埠編號,其中所述特定主機界面為所述主機界面的其中之一;基於一索引查找表查詢所述特定主機界面的所述USB埠編號為對應至一特定USB埠,並依據所述特定USB埠產生至少一USB任務,其中所述特定USB埠是所述USB埠的其中之一,所述索引查找表用以記錄每個主機界面所負責的所述USB埠的一部分與所述USB埠編號之間的關係;藉由所述通用序列匯流排控制裝置中的一匯流排排程控制器 完成所述至少一USB任務,其中所述通用序列匯流排控制裝置還包括一匯流排實體層電路,所述匯流排實體層電路耦接至所述USB埠,其中所述匯流排排程控制器依據所述至少一USB任務控制所述匯流排實體層電路,其中所述匯流排實體層電路包括:多個匯流排裝置,每個匯流排裝置用以透過互不相同的USB傳輸速率與一USB裝置通訊,其中所述USB裝置透過所述USB埠的其中之一耦接至所述通用序列匯流排控制裝置;以及一埠路由集線器,耦接所述USB埠以及所述匯流排裝置,用以受控於所述匯流排排程控制器而將所述USB埠的其中之一或多個電性連接至所述匯流排裝置的其中之一。 A control method for a universal serial bus control device, including: obtaining a USB task command through multiple host interfaces, the USB task command including a USB port number of a specific host interface, wherein the specific host interface is the One of the host interfaces; query the USB port number of the specific host interface based on an index lookup table to correspond to a specific USB port, and generate at least one USB task based on the specific USB port, wherein the specific A USB port is one of the USB ports, and the index lookup table is used to record the relationship between the part of the USB port that each host interface is responsible for and the USB port number; through the universal sequence A bus schedule controller in a bus control device Complete the at least one USB task, wherein the universal serial bus control device further includes a bus physical layer circuit, the bus physical layer circuit is coupled to the USB port, and the bus schedule controller Control the bus physical layer circuit according to the at least one USB task, wherein the bus physical layer circuit includes: a plurality of bus devices, each bus device is used to communicate with a USB through different USB transmission rates Device communication, wherein the USB device is coupled to the universal serial bus control device through one of the USB ports; and a port routing hub is coupled to the USB port and the bus device for One or more of the USB ports are electrically connected to one of the bus devices under control of the bus schedule controller. 如請求項8所述的控制方法,還包括:接收有關於所述索引查找表的一修改指令來修改所述索引查找表中的資料。 The control method as described in claim 8 further includes: receiving a modification instruction regarding the index lookup table to modify the data in the index lookup table. 如請求項8所述的控制方法,其中所述索引查找表包括多個欄位,所述欄位包括:一第一欄位,用以表示所述USB埠位於所述通用序列匯流排控制裝置的一本地編號;一第二欄位,用以表示所述主機界面對應的主機界面識別符;以及一第三欄位,用以表示所述主機界面對應的所述USB埠編 號。 The control method according to claim 8, wherein the index lookup table includes a plurality of fields, and the fields include: a first field to indicate that the USB port is located in the universal serial bus control device a local number; a second field used to represent the host interface identifier corresponding to the host interface; and a third field used to represent the USB port number corresponding to the host interface No. 如請求項8所述的控制方法,還包括:初始化所述索引查找表。 The control method as described in claim 8 further includes: initializing the index lookup table.
TW111137998A 2022-02-15 2022-10-06 Universal serial bus control device and control method therefore TWI829378B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211333078.6A CN115693316A (en) 2022-02-15 2022-10-28 Universal serial bus control device and control method thereof
US18/156,391 US20230259484A1 (en) 2022-02-15 2023-01-19 Universal serial bus control device and control method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202263310118P 2022-02-15 2022-02-15
US63/310,118 2022-02-15

Publications (2)

Publication Number Publication Date
TW202334835A TW202334835A (en) 2023-09-01
TWI829378B true TWI829378B (en) 2024-01-11

Family

ID=88927491

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111137998A TWI829378B (en) 2022-02-15 2022-10-06 Universal serial bus control device and control method therefore

Country Status (1)

Country Link
TW (1) TWI829378B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060164454A1 (en) * 2004-05-27 2006-07-27 Silverbrook Research Pty Ltd Method for at least partially compensating for errors in ink dot placement due to erroneous rotational displacement
CN101620578A (en) * 2009-06-23 2010-01-06 上海北大方正科技电脑系统有限公司 Method for managing USB equipment based on virtualized system
TWI502352B (en) * 2009-03-18 2015-10-01 Aten Int Co Ltd Kvm extender system and signal extending method
TWI636396B (en) * 2012-11-20 2018-09-21 佩多查爾斯I Solid state drive architectures
TWI741765B (en) * 2020-08-28 2021-10-01 和碩聯合科技股份有限公司 Connection device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060164454A1 (en) * 2004-05-27 2006-07-27 Silverbrook Research Pty Ltd Method for at least partially compensating for errors in ink dot placement due to erroneous rotational displacement
TWI502352B (en) * 2009-03-18 2015-10-01 Aten Int Co Ltd Kvm extender system and signal extending method
CN101620578A (en) * 2009-06-23 2010-01-06 上海北大方正科技电脑系统有限公司 Method for managing USB equipment based on virtualized system
TWI636396B (en) * 2012-11-20 2018-09-21 佩多查爾斯I Solid state drive architectures
TWI741765B (en) * 2020-08-28 2021-10-01 和碩聯合科技股份有限公司 Connection device

Also Published As

Publication number Publication date
TW202334835A (en) 2023-09-01

Similar Documents

Publication Publication Date Title
US7412544B2 (en) Reconfigurable USB I/O device persona
US6779083B2 (en) Security for logical unit in storage subsystem
US7657727B2 (en) Security for logical unit in storage subsystem
US7043575B2 (en) Bus function authentication method, apparatus and computer program
US7529860B2 (en) System and method for configuring an endpoint based on specified valid combinations of functions
US20080276012A1 (en) Driver Loading via a PnP Device
US7107382B2 (en) Virtual peripheral component interconnect multiple-function device
JP4671353B2 (en) Storage apparatus and control method thereof
US9223734B2 (en) Switch with synthetic device capability
EP2892212B1 (en) Micro server and method of allocating a mac address
JP2003316713A (en) Storage device system
WO2017113879A1 (en) Method and device for controlling smart interface card
US20220327080A1 (en) PCIe DEVICE AND OPERATING METHOD THEREOF
US20230259484A1 (en) Universal serial bus control device and control method thereof
US11928070B2 (en) PCIe device
US20050125538A1 (en) Assigning logical storage units to host computers
TW202240415A (en) Pcie device and operating method thereof
TWI829378B (en) Universal serial bus control device and control method therefore
US7464228B2 (en) System and method to conserve conventional memory required to implement serial ATA advanced host controller interface
TW202240414A (en) Pcie function and operating method thereof
JP3509062B2 (en) Remote access method and data processing system
US20230350824A1 (en) Peripheral component interconnect express device and operating method thereof
JP2001023281A (en) Magnetic disk device