TWI720426B - Electronic apparatus and method of extending peripheral device - Google Patents
Electronic apparatus and method of extending peripheral device Download PDFInfo
- Publication number
- TWI720426B TWI720426B TW108105259A TW108105259A TWI720426B TW I720426 B TWI720426 B TW I720426B TW 108105259 A TW108105259 A TW 108105259A TW 108105259 A TW108105259 A TW 108105259A TW I720426 B TWI720426 B TW I720426B
- Authority
- TW
- Taiwan
- Prior art keywords
- display card
- video graphics
- graphics array
- array display
- input
- Prior art date
Links
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
Description
本發明是有關於一種電子裝置及擴展周邊設備的方法,且特別是有關於一種電子裝置及擴展視訊圖形陣列顯示卡的方法。The present invention relates to an electronic device and a method for expanding peripheral equipment, and more particularly to an electronic device and a method for expanding a video graphics array display card.
近幾年全球興起挖礦(Mining)熱潮,過去廣泛提供給遊戲玩家使用的顯示卡,被用來當作挖礦的礦卡。挖礦必須透過顯示卡進行運算,因此對於挖礦來說,越多張顯示卡代表越高的挖礦效率。也就是說,礦工們需要大量顯示卡以加快挖礦的速度。另一方面,虛擬實境(Virtual Reality;VR)亦需要大量的硬體運算,若可將多張顯示卡的硬體運算功能加以串接,能強化虛擬實境的即時運算應用。In recent years, there has been an upsurge in mining around the world. In the past, graphics cards that were widely provided to gamers were used as mining cards for mining. Mining must be calculated through the graphics card, so for mining, the more graphics cards represent the higher the mining efficiency. In other words, miners need a large number of graphics cards to speed up mining. On the other hand, Virtual Reality (VR) also requires a lot of hardware computing. If the hardware computing functions of multiple graphics cards can be connected in series, it can strengthen the real-time computing applications of virtual reality.
然而,在目前的電腦系統中,理論上最多能支持16張視訊圖形陣列(Video Graphics Array;VGA)顯示卡。實際上,系統中還有其他周邊設備需要輸入輸出(Input/Output;I/O)資源,因此通常僅能支持13張VGA顯示卡。為此,如何在系統中配置更多張VGA顯示卡,便成為此領域的重要課題之一。However, in current computer systems, in theory, up to 16 Video Graphics Array (VGA) display cards can be supported. In fact, there are other peripheral devices in the system that require input and output (Input/Output; I/O) resources, so usually only 13 VGA display cards can be supported. For this reason, how to configure more VGA display cards in the system has become one of the important topics in this field.
本發明提供一種電子裝置及擴展周邊設備的方法,能夠不受I/O資源配置的限制而擴充更多張VGA顯示卡。The invention provides an electronic device and a method for expanding peripheral equipment, which can expand more VGA display cards without being restricted by the configuration of I/O resources.
本發明的電子裝置,包括:控制器;以及多個周邊設備,電性連接所述控制器,其中所述多個周邊設備包括多個視訊圖形陣列(VGA)顯示卡,其中所述控制器在所述電子裝置的初始化階段時,對所述視訊圖形陣列顯示卡中的第一部分分配輸入輸出(I/O)資源,且不對所述視訊圖形陣列顯示卡中的第二部分分配所述輸入輸出資源,其中被分配所述輸入輸出資源的所述視訊圖形陣列顯示卡中的所述第一部分用以在所述初始化階段顯示畫面。The electronic device of the present invention includes: a controller; and a plurality of peripheral devices electrically connected to the controller, wherein the plurality of peripheral devices include a plurality of video graphics array (VGA) display cards, wherein the controller is During the initialization phase of the electronic device, input and output (I/O) resources are allocated to the first part of the video graphics array display card, and the input and output are not allocated to the second part of the video graphics array display card Resources, wherein the first part of the video graphics array display card to which the input and output resources are allocated is used to display a screen in the initialization phase.
本發明的擴展周邊設備的方法,包括:在電子裝置的初始化階段時,對多個周邊設備中的多個視訊圖形陣列(VGA)顯示卡中的第一部分分配輸入輸出(I/O)資源,且不對所述視訊圖形陣列顯示卡中的第二部分分配所述輸入輸出資源,其中被分配所述輸入輸出資源的所述視訊圖形陣列顯示卡中的第一部分用以在所述初始化階段顯示畫面。The method for expanding peripheral devices of the present invention includes: during the initialization phase of the electronic device, allocating input and output (I/O) resources to the first part of the multiple video graphics array (VGA) display cards in the multiple peripheral devices, And the input and output resources are not allocated to the second part of the video graphics array display card, and the first part of the video graphics array display card to which the input and output resources are allocated is used for displaying images in the initialization phase .
本發明的電子裝置,包括:控制器;晶片組;多個周邊設備,包括至少一視訊圖形陣列顯示卡,其中所述控制器及所述周邊設備透過所述晶片組相互電性連接,在所述電子裝置顯示畫面後,所述晶片組從所述控制器獲得對所述至少一視訊圖形陣列顯示卡的配置循環讀取請求,將所述配置循環讀取請求傳遞給所述至少一視訊圖形陣列顯示卡,並從其獲得所述配置循環讀取請求對應的配置循環讀取資訊,所述晶片組分析所述配置循環讀取資訊並判斷所述配置循環讀取資訊中是否具備輸入輸出資源的請求,當所述配置循環讀取資訊中具備所述輸入輸出資源的所述請求時,所述晶片組利用空白數據替換所述配置循環讀取資訊中所述輸入輸出資源的所述請求,並且將經替換後的所述配置循環讀取資訊提供給所述控制器。The electronic device of the present invention includes: a controller; a chipset; a plurality of peripheral devices, including at least one video graphics array display card, wherein the controller and the peripheral devices are electrically connected to each other through the chipset, and After the electronic device displays the screen, the chipset obtains a configuration cyclic read request for the at least one video graphics array display card from the controller, and transmits the configuration cyclic read request to the at least one video graphics The display card is arrayed, and the configuration cycle reading information corresponding to the configuration cycle reading request is obtained therefrom. The chipset analyzes the configuration cycle reading information and determines whether the configuration cycle reading information has input and output resources When the request for the input and output resources is provided in the configuration cycle reading information, the chipset replaces the request for the input and output resources in the configuration cycle reading information with blank data, And the configuration cycle read information after the replacement is provided to the controller.
本發明的擴展周邊設備的方法,包括:在電子裝置顯示畫面後,從控制器獲得對至少一視訊圖形陣列顯示卡的配置循環讀取請求;將所述配置循環讀取請求傳遞給所述至少一視訊圖形陣列顯示卡,並從其獲得所述配置循環讀取請求對應的配置循環讀取資訊;分析所述配置循環讀取資訊並判斷所述配置循環讀取資訊中是否具備輸入輸出資源的請求;當所述配置循環讀取資訊中具備所述輸入輸出資源的所述請求時,利用空白數據替換所述配置循環讀取資訊中所述輸入輸出資源的所述請求;以及將經替換後的所述配置循環讀取資訊提供給所述控制器。The method for expanding peripheral equipment of the present invention includes: after the electronic device displays a screen, obtaining a configuration cyclic reading request for at least one video graphics array display card from a controller; and transmitting the configuration cyclic reading request to the at least one video graphics array display card; A video graphics array display card, from which the configuration cyclic reading information corresponding to the configuration cyclic reading request is obtained; analyzing the configuration cyclic reading information and determining whether the configuration cyclic reading information has input and output resources Request; when the configuration cyclic reading information has the request for the input and output resources, use blank data to replace the request for the input and output resources in the configuration cyclic reading information; and after the replacement The configuration of the cyclic reading information is provided to the controller.
基於上述,本發明實施例所提供的電子裝置及擴展周邊設備的方法,VGA顯示卡包括第一VGA顯示卡以及第二VGA顯示卡,藉由對第一VGA顯示卡分配I/O資源,並且不對第二VGA顯示卡分配I/O資源,而可不受I/O資源限制地擴充電子裝置中VGA顯示卡的數量,讓電子裝置在需要多個VGA顯示卡的情形下(例如,挖掘數位錢幣(又稱,挖礦)或虛擬實境)提供更高的硬體運算應用。Based on the above, in the electronic device and the method for expanding peripheral equipment provided by the embodiments of the present invention, the VGA display card includes a first VGA display card and a second VGA display card, by allocating I/O resources to the first VGA display card, and Without allocating I/O resources to the second VGA display card, the number of VGA display cards in the electronic device can be expanded without the limitation of I/O resources, so that the electronic device needs multiple VGA display cards (for example, mining digital coins). (Also known as mining) or virtual reality) provide higher hardware computing applications.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.
在電腦系統中,當每一視訊圖形陣列(VGA)顯示卡宣告其需要輸入輸出(I/O)資源時,基本輸入輸出系統(Basic Input/Output System;BIOS)經常配置I/O資源給每一VGA顯示卡。然而,在x86系統中,I/O空間最大為64K位元組(byte),且依據周邊互聯標準所要求:當VGA顯示卡宣告其需要I/O資源時,若VGA顯示卡位於PCI to PCI橋接器之後,BIOS最小必須配置4K位元組的I/O空間給PCI to PCI橋接器之後的裝置(包括:VGA顯示卡),因而理論上系統最多能支持16張VGA顯示卡,此時每個PCI to PCI橋接器各接1張VGA顯示卡。在實際應用上,系統中還有其他周邊設備需要I/O資源,因此通常僅能支持13張VGA顯示卡。In a computer system, when each video graphics array (VGA) display card announces that it needs input and output (I/O) resources, the Basic Input/Output System (BIOS) often allocates I/O resources to each A VGA display card. However, in the x86 system, the maximum I/O space is 64K bytes (byte), and according to the requirements of the peripheral interconnection standard: when the VGA display card announces that it needs I/O resources, if the VGA display card is located in PCI to PCI After the bridge, the BIOS must at least configure 4K bytes of I/O space for the devices behind the PCI to PCI bridge (including: VGA display card), so theoretically the system can support up to 16 VGA display cards. Each PCI to PCI bridge is connected to a VGA display card. In practical applications, there are other peripheral devices in the system that require I/O resources, so usually only 13 VGA display cards can be supported.
本發明為了在有限的I/O資源下擴充VGA顯示卡,藉由向至少一張VGA顯示卡分配I/O資源,使得電子裝置可在初始化階段利用這張分配有I/O資源的VGA顯示卡來顯示畫面,而對不夠分配或其他要求I/O資源的VGA顯示卡(或第二張以上的VGA顯示卡)僅分配記憶體映射輸入輸出(Memory-mapped Input/Output;MMIO)資源。如此一來,在電子裝置利用被分配I/O資源的VGA顯示卡顯示畫面後,即可驅動其餘被分配MMIO資源的VGA顯示卡。藉由上述方法,可不受I/O資源限制地擴充電子裝置中VGA顯示卡的數量,讓電子裝置在需要多個VGA顯示卡的情形下(例如,挖掘數位錢幣(又稱,挖礦)或虛擬實境)提供更高的硬體運算應用。In order to expand the VGA display card under limited I/O resources, the present invention allocates I/O resources to at least one VGA display card, so that the electronic device can use this VGA display with I/O resources allocated during the initialization phase. The card is used to display the picture, and the VGA display card (or the second or more VGA display card) that is insufficiently allocated or requires I/O resources is only allocated memory-mapped input/output (MMIO) resources. In this way, after the electronic device uses the VGA display card allocated with I/O resources to display a picture, it can drive the remaining VGA display cards allocated with MMIO resources. With the above method, the number of VGA display cards in an electronic device can be expanded without limitation of I/O resources, so that the electronic device needs multiple VGA display cards (for example, mining digital coins (also known as mining) or Virtual reality) provides higher hardware computing applications.
圖1繪示本發明一實施例的電子裝置的方塊圖。請參照圖1,電子裝置100包括控制器110以及多個周邊設備。電子裝置100例如為桌上型電腦(Desktop)、筆記型電腦(Notebook)、平板電腦(Tablet PC)等X86架構、具有擴充能力以提供擴展周邊設備功能的裝置,本發明並不加以限制。FIG. 1 is a block diagram of an electronic device according to an embodiment of the invention. Please refer to FIG. 1, the
為易於描述,本實施例的電子裝置100包括周邊設備121、周邊設備122及周邊設備123,然而周邊設備的數量本發明並不加以限制。周邊設備121、周邊設備122及周邊設備123電性連接控制器110,且周邊設備121、周邊設備122及周邊設備123中至少一者為VGA顯示卡。值得一提的是,非VGA顯示卡的周邊設備例如為網路卡、音效卡、數據機、電視卡、硬碟控制器、USB及串列埠等,本發明並不加以限制。For ease of description, the
控制器110在電子裝置100的初始化階段控制顯示畫面。控制器110例如為中央處理器(CPU)或是基本輸入輸出系統(BIOS),本發明並不加以限制。The
為了能夠在有限的輸入輸出(I/O)資源下擴展周邊設備,本發明實施例的控制器110在電子裝置100的初始化階段時,對多個VGA顯示卡中的第一部分分配I/O資源,且不對多個VGA顯示卡中的第二部分分配I/O資源,其中多個VGA顯示卡中的第一部分VGA顯示卡可視為第一VGA顯示卡;多個VGA顯示卡中的第二部分VGA顯示卡可視為第二VGA顯示卡。如此一來,電子裝置100可在初始化階段利用被分配I/O資源的VGA顯示卡控制顯示畫面,之後,便可顯示其餘未被分配I/O資源的VGA顯示卡的畫面,藉此可不受硬體限制地擴充電子裝置中VGA顯示卡的數量。In order to be able to expand peripheral equipment under limited input and output (I/O) resources, the
圖2繪示本發明一實施例的擴展周邊設備的方法的詳細流程圖。圖2實施例的擴展周邊設備的方法適用於圖1實施例的電子裝置100。以下將參照圖1實施例的各項元件來詳細說明圖2實施例的擴展周邊設備的方法。FIG. 2 shows a detailed flowchart of a method for expanding peripheral devices according to an embodiment of the present invention. The method for expanding peripheral devices in the embodiment in FIG. 2 is applicable to the
首先,控制器110判斷多個周邊設備中的VGA顯示卡的數量(步驟S220)。具體而言,控制器110依據周邊設備配置頭(Configuration Header)的設備資訊,例如設備標識(Device Identification)、供應商標識(vendor Identification),來判斷周邊設備是否為VGA顯示卡,並藉此獲取電子裝置100中VGA顯示卡的數量。隨後,控制器110判斷VGA顯示卡的數量是否大於或等於2。First, the
在一實施例中,若VGA顯示卡的數量未大於或等於2(即為1),控制器110將VGA顯示卡視為需要分配I/O資訊的VGA顯示卡,即在上述說明中,多個VGA顯示卡會包括第一部分和第二部分,而所述的僅有一個的VGA顯示卡是屬於上述說明中的「多個VGA顯示卡的第一部分,但數量為1」(步驟S240)。In one embodiment, if the number of VGA display cards is not greater than or equal to 2 (that is, 1), the
詳言之,在步驟S240中,因為VGA顯示卡的數量為1,控制器110優先將VGA顯示卡定義為第一VGA顯示卡(步驟S242)。即,第一VGA顯示卡屬於上述說明的「多個VGA顯示卡中的第一部分」。In detail, in step S240, because the number of VGA display cards is 1, the
在對VGA顯示卡進行定義後,控制器110判斷各VGA顯示卡是否為第一VGA顯示卡(步驟S244)。詳細而言,假設多個VGA顯示卡定義成第一和第二VGA顯示卡等兩種以上類型的VGA顯示卡,控制器110會判斷VGA顯示卡是否為第一VGA顯示卡(也就是多個VGA顯示卡的第一部分),以決定是否對VGA顯示卡分配I/O資源。After the VGA display card is defined, the
若在步驟S244中控制器110判斷VGA顯示卡為第一VGA顯示卡,則控制器110對所述VGA顯示卡分配I/O資源(步驟S246)。具體而言,控制器110在所述VGA顯示卡中的基本位址暫存器(Base Address Register;BAR)中配置I/O資源,並且將命令暫存器(Command Register)中I/O空間位元(IO Space bit)設置為1。基此,在致能I/O空間位元之後,控制器110才能訪問VGA顯示卡的I/O位址空間。If the
舉例來說,請參照圖1,周邊設備121、周邊設備122及周邊設備123中僅周邊設備121為VGA顯示卡,控制器110即判斷周邊設備中的VGA顯示卡的數量為1,且定義周邊設備121為第一VGA顯示卡,並對周邊設備121分配I/O資源。For example, referring to Figure 1, only the
值得一提的是,在另一實施例中,在控制器110判斷VGA顯示卡的數量不大於或等於2(即為1)後,控制器110不需執行步驟S242及步驟S244而直接將I/O資源分配給所述VGA顯示卡。詳細來說,控制器110分配I/O資源的方式如步驟S246所述,在此便不再次撰述。It is worth mentioning that, in another embodiment, after the
在另一實施例中,若VGA顯示卡的數量大於或等於2,控制器110依序訪問各個周邊設備中的多個基本位址暫存器(BAR)以取得周邊設備所需的記憶體資源要求,以決定對周邊設備中的多個VGA顯示卡的第一部分分配I/O資源,並初始化上述的VGA顯示卡的第一部分(步驟S260)。具體而言,控制器110依據各個周邊設備中的每個BAR的第0位元判斷各個周邊設備每個BAR需要I/O資源或MMIO資源,若BAR的第0位元為1,則所述周邊設備請求I/O資源;若BAR的第0位元為0,則所述周邊設備請求MMIO資源。接著,取得此周邊設備所需的空間大小。In another embodiment, if the number of VGA display cards is greater than or equal to 2, the
詳言之,在步驟S260中,若控制器110在取得周邊設備所需的I/O資源要求後發現:需要I/O資源,但I/O空間不足,控制器110將多個的VGA顯示卡分別定義為第一VGA顯示卡以及至少一第二VGA顯示卡(步驟S262)。也就是說,多張VGA顯示卡包括第一VGA顯示卡以及至少一第二VGA顯示卡。特別是,第一VGA顯示卡是屬於上述說明的「多個VGA顯示卡中的第一部分」,且至少一第二VGA顯示卡是屬於上述說明的「多個VGA顯示卡中的第二部分」。In detail, in step S260, if the
在對多個VGA顯示卡進行定義後,控制器110判斷各VGA顯示卡是否為第一VGA顯示卡(步驟S244)。詳細而言,控制器110依序判斷各VGA顯示卡是否為第一VGA顯示卡(也就是多個VGA顯示卡的第一部分),以決定是否對各VGA顯示卡分配I/O資源。After defining the multiple VGA display cards, the
若在步驟S244中控制器110判斷VGA顯示卡為第一VGA顯示卡,則對所述VGA顯示卡分配I/O資源(步驟S246)。若在步驟S244中控制器110判斷VGA顯示卡並非為第一VGA顯示卡,則不對所述VGA顯示卡分配I/O資源(步驟S266)。具體而言,控制器110在第一VGA顯示卡的BAR中配置I/O資源,並且將命令暫存器中I/O空間位元設置為1。基此,在致能I/O空間位元之後,控制器110才能訪問VGA顯示卡的I/O位址空間。If the
在此需特別注意的是,對於不分配I/O資源的第二VGA顯示卡,其配置資源的方式如下:在一實施例中,控制器110在第二VGA顯示卡的BAR中配置MMIO資源,並且將命令暫存器中I/O空間位元設置為0以及記憶體空間位元(Memory Space bit)設置為1。基此,在致能記憶體空間位元之後,控制器110才能訪問VGA顯示卡的MMIO位址空間。It should be noted here that for the second VGA display card that does not allocate I/O resources, the way to configure resources is as follows: In one embodiment, the
舉例來說,請參照圖1,周邊設備121、周邊設備122及周邊設備123中周邊設備121及周邊設備122為VGA顯示卡,控制器110即判斷周邊設備中的VGA顯示卡的數量為2,且依序訪問周邊設備121、周邊設備122及周邊設備123中的基本位址暫存器(BAR)以取得周邊設備121、周邊設備122及周邊設備123所需的記憶體資源要求,並定義周邊設備121為第一VGA顯示卡、周邊設備122為第二VGA顯示卡。接著,控制器110對周邊設備121分配I/O資源,並初始化周邊設備121,且對周邊設備122分配MMIO資源。For example, referring to FIG. 1, the
值得說明的是,在一實施例中,控制器110可以僅定義一張VGA顯示卡為第一VGA顯示卡,且其餘的VGA顯示卡皆為第二VGA顯示卡。在其他實施例中,控制器110可以定義多張VGA顯示卡為第一VGA顯示卡,但以不超過I/O資源的空間為限。舉例來說,若總共有17張VGA顯示卡,控制器110可定義13張VGA顯示卡(實際上系統可配置I/O資源的VGA顯示卡的數量)為第一VGA顯示卡、4張VGA顯示卡為第二VGA顯示卡。It is worth noting that, in one embodiment, the
圖3繪示本發明另一實施例的電子裝置的方塊圖。請參照圖3,圖3中的控制器110、多個周邊設備(周邊設備121、周邊設備122、周邊設備123)相同於圖1的控制器110、多個周邊設備(周邊設備121、周邊設備122、周邊設備123),然而周邊設備的數量本發明並不加以限制。兩者不同之處在於,圖3的電子裝置300更包括晶片組330,並且所述晶片組330包括快捷外設互聯標準(PCI-E)橋接器340,所述PCI-E橋接器340包括至少一PCI-E根端口(Root Port)341,控制器110透過對應的PCI-E根端口341與周邊設備121、周邊設備122及周邊設備123相互通訊。FIG. 3 is a block diagram of an electronic device according to another embodiment of the invention. 3, the
在本實施例中,先假設當挖礦模式(Mining Mode)或虛擬實境模式(VR Mode)無法致能,也就是對不分配I/O資源的第二VGA顯示卡(VGA顯示卡中的第二部分)無法致能時,晶片組330對於第二VGA顯示卡進行以下操作。為易於描述,在本實施例中,周邊設備121被分類為不分配I/O資源的第二VGA顯示卡。In this embodiment, it is assumed that the mining mode (Mining Mode) or the virtual reality mode (VR Mode) cannot be enabled, that is, for the second VGA display card (the second VGA display card in the VGA display card) that does not allocate I/O resources. Part 2) When it is unable to enable, the
圖4繪示本發明另一實施例的擴展周邊設備的方法的詳細流程圖。圖4實施例的擴展周邊設備的方法適用於圖3實施例的電子裝置300。以下將參照圖3實施例的各項元件來詳細說明圖4實施例的擴展周邊設備的方法。FIG. 4 shows a detailed flowchart of a method for expanding a peripheral device according to another embodiment of the present invention. The method for expanding peripheral devices in the embodiment in FIG. 4 is applicable to the
首先,晶片組330從控制器110獲得對周邊設備121的配置循環(Configuration Cycle;CFG)讀取請求(步驟S410)。First, the
接著,晶片組330將配置循環讀取請求傳遞給周邊設備121,並從周邊設備121獲得配置循環讀取請求對應的配置循環讀取資訊(步驟S420)。具體而言,晶片組330透過PCI-E根端口341將配置循環讀取請求傳遞給周邊設備121,並從周邊設備121獲得配置循環讀取請求對應的配置循環讀取數據(CFG read data)。Next, the
然後,晶片組330分析周邊設備121的配置循環讀取資訊並判斷配置循環讀取資訊中是否具備I/O資源的請求(步驟S430)。詳細而言,晶片組330取得周邊設備121的配置循環讀取地址offset 0x10至0x27中的資訊(即為BAR的資訊),若在配置循環讀取地址offset 0x10至0x27中具有位元0及位元1分別為1與0的BAR,則表示周邊設備121具備I/O資源的請求。相對地,若在配置循環讀取地址offset 0x10至0x27中具有位元0為0的BAR,則表示周邊設備121具備MMIO資源的請求。Then, the
若在步驟S430中晶片組330判斷配置循環讀取資訊中不具備I/O資源的請求,則分配周邊設備121所請求的資源給周邊設備121(步驟S440)。具體而言,若周邊設備121請求MMIO資源,則晶片組330分配MMIO資源給周邊設備121。If the
若在步驟S430中晶片組330判斷配置循環讀取資訊中具備I/O資源的請求,則利用空白數據替換配置循環讀取資訊中I/O資源的請求(步驟S450)。詳細而言,晶片組330利用0x00000000替換配置循環讀取地址offset 0x10至0x27中I/O資源的請求。If the
最後,晶片組330將經替換後的配置循環讀取資訊提供給控制器110(步驟S460)。具體而言,控制器110讀取替換後的配置循環讀取數據,藉此,晶片組330對控制器110隱藏周邊設備121對於I/O資源的請求,而不影響周邊設備121對於MMIO資源的請求,使得控制器110分配MMIO資源給周邊設備121。值得一提的是,以往的晶片組並不會對控制器去隱藏周邊設備對於I/O資源的請求,但在本實施例中,因為晶片組可以利用空白數據替換配置循環讀取資訊中I/O資源的請求,所以可以隱藏周邊設備對於I/O資源的請求。Finally, the
在一實施例中,在晶片組330將經替換後的配置循環讀取資訊提供給控制器110後,晶片組330還記錄周邊設備121(步驟S470)。詳細而言,晶片組330將周邊設備121的資訊紀錄於查找表中,查找表的資訊包括周邊設備121的總線號、設備號及功能號(Bus/Dev/Fun)以及是否對第二VGA顯示卡(不分配I/O資源的VGA顯示卡)致能。在本實施例中,晶片組330記錄周邊設備121為「致能」。舉例來說,周邊設備121的資訊如表一所示。當第二VGA顯示卡為致能狀態,表示周邊設備121定義為不分配I/O資源的VGA顯示卡,而可以在挖礦模式(Mining Mode)或虛擬實境模式操作。
<表一>
接著,晶片組330更可進一步修改周邊設備121中的命令暫存器(Command Register),以不分配IO BAR中對於I/O資源的請求(步驟S480)。詳細而言,晶片組330從控制器110獲得對周邊設備121的配置循環寫入請求,若配置循環寫入請求中的目標裝置的總線資訊/設備資訊/功能資訊記載於查找表中,且寫入請求的地址為命令暫存器,晶片組330將所述目標裝置中命令暫存器的I/O空間位元記載為0,並且修改周邊設備121中的命令暫存器。Then, the
值得一提的是,在一實施例中,上述晶片組330所進行的操作(如:步驟S450)可以是由晶片組330的PCI-E橋接器340中的PCI-E根端口341來執行。因此,由上述實施例以及對應的圖3和圖4可知,雖然晶片組330判斷配置循環讀取資訊中具備I/O資源的請求,但是PCI-E橋接器340透過利用空白數據替換配置循環讀取資訊中I/O資源的請求,而使晶片組330不分配I/O資源給對應的周邊設備121。如此一來,可以減少I/O資源的使用,以解決I/O使用空間的限制。It is worth mentioning that, in one embodiment, the operations performed by the chipset 330 (eg, step S450) may be performed by the PCI-
圖5繪示本發明另一實施例的電子裝置的方塊圖。請參照圖5,圖5中的控制器110、多個周邊設備(周邊設備121、周邊設備122、周邊設備123)、晶片組330相同於圖3的控制器110、多個周邊設備(周邊設備121、周邊設備122、周邊設備123)、晶片組330,然而周邊設備的數量本發明並不加以限制。兩者不同之處在於,圖5的電子裝置500更包括至少一PCI-E切換器(Switch)550,特別是,所述PCI-E切換器可被視為周邊設備。FIG. 5 is a block diagram of an electronic device according to another embodiment of the invention. Please refer to FIG. 5. In FIG. 5, the
為易於描述,本實施例的電子裝置500包括PCI-E切換器550,然而PCI-E切換器的數量本發明並不加以限制。PCI-E切換器550電性耦接至PCI-E根端口341,周邊設備121、周邊設備122、周邊設備123直接電性連接至PCI-E切換器550,且控制器110透過晶片組330中的PCI-E橋接器340的PCI-E根端口341以及PCI-E切換器550與周邊設備121、周邊設備122、周邊設備123相互通訊。For ease of description, the
在本實施例中,先假設當挖礦模式(Mining Mode)或虛擬實境模式(VR Mode)無法致能,也就是對不分配I/O資源的第二VGA顯示卡(VGA顯示卡中的第二部分)無法致能時,晶片組330對於第二VGA顯示卡進行以下操作。為易於描述,在本實施例中,周邊設備121被分類為不分配I/O資源的第二VGA顯示卡,而周邊設備122及周邊設備123非為VGA顯示卡。In this embodiment, it is assumed that the mining mode (Mining Mode) or the virtual reality mode (VR Mode) cannot be enabled, that is, for the second VGA display card (the second VGA display card in the VGA display card) that does not allocate I/O resources. Part 2) When it is unable to enable, the
圖6繪示本發明另一實施例的擴展周邊設備的方法的一部分詳細流程圖。圖6實施例的擴展周邊設備的方法適用於圖5實施例的電子裝置500。以下將參照圖5實施例的各項元件來詳細說明圖6實施例的擴展周邊設備的方法。在此須特別注意的是,電子裝置500的晶片組330在執行完圖6的步驟流程後,接續執行圖4的類似步驟流程(如:步驟S410~S480)。FIG. 6 shows a detailed flowchart of a part of a method for expanding a peripheral device according to another embodiment of the present invention. The method for expanding peripheral devices in the embodiment in FIG. 6 is applicable to the
首先,晶片組330從控制器110獲得對周邊設備的配置循環(Configuration Cycle;CFG)讀取請求(步驟S610)。First, the
接著,晶片組330將配置循環讀取請求傳遞給周邊設備,並從周邊設備獲得配置循環讀取請求對應的配置循環讀取資訊(步驟S620)。具體而言,晶片組330透過PCI-E根端口341將配置循環讀取請求傳遞給PCI-E切換器550。之後,PCI-E切換器550將配置循環讀取請求傳遞給周邊設備121、周邊設備122、周邊設備123,並從周邊設備121、周邊設備122、周邊設備123獲得配置循環讀取請求對應的配置循環讀取數據(CFG read data)。在PCI-E切換器550獲得配置循環讀取請求對應的配置循環讀取數據後,晶片組330從PCI-E切換器550獲得配置循環讀取請求對應的配置循環讀取數據。Next, the
然後,晶片組330分析周邊設備的配置循環讀取資訊並判斷配置循環讀取資訊中的設備資訊(例如:設備標識(Device Identification)、供應商標識(vendor Identification))是否為VGA顯示卡(步驟S630)。詳細而言,晶片組330取得周邊設備121、周邊設備122、周邊設備123、PCI-E切換器550的配置循環讀取地址offset 0x0E的資訊(即為配置頭的資訊),若配置循環讀取地址offset 0x0E的資訊為0x00,則表示周邊設備為VGA顯示卡。相對地,若配置循環讀取地址offset 0x0E的資訊不為0x00,則表示周邊設備不為VGA顯示卡。舉例來說,若配置循環讀取地址offset 0x0E的資訊為0x01,因為offset 0x0E的資訊不為0x00,則表示周邊設備為PCI-E切換器。Then, the
若在步驟S630中晶片組330判斷周邊設備為VGA顯示卡,則記錄周邊設備(步驟S640)。若在步驟S630中晶片組330判斷周邊設備不為VGA顯示卡,則不記錄周邊設備(步驟S650)。具體而言,晶片組330判斷周邊設備121為VGA顯示卡,晶片組330將周邊設備121的資訊紀錄於查找表中,查找表的資訊包括周邊設備121的總線號、設備號及功能號(Bus/Dev/Fun)以及將周邊設備121的有效位元記錄為「致能」(代表周邊設備121為VGA顯示卡)。舉例來說,如表二所示的第一項目的資訊。相對地,晶片組330判斷周邊設備122、周邊設備123、PCI-E切換器550不為VGA顯示卡,則不記錄周邊設備122、周邊設備123、PCI-E切換器550於查找表中。
<表二>
在完成此查找表後,因為查找表中有致能的VGA顯示卡(例如:周邊設備121為VGA顯示卡),所以對於查找表中記載的VGA顯示卡,晶片組330可以執行相同於圖4的類似步驟流程。即,如圖3的晶片組330透過利用空白數據替換配置循環讀取資訊中I/O資源的請求,可以使控制器110不分配IO資源給原本請求I/O資源的周邊設備121,而減少I/O資源的使用,甚至可進入挖礦模式(Mining Mode)或虛擬實境模式(VR Mode)。值得一提的是,以往的晶片組並不會對控制器去隱藏周邊設備對於I/O資源的請求,但在本實施例中,因為晶片組可以利用空白數據替換配置循環讀取資訊中I/O資源的請求,所以可以隱藏周邊設備對於I/O資源的請求。After completing this look-up table, because there are enabled VGA display cards in the look-up table (for example, the
惟須注意的是,不同於前述步驟S420,在本實施例的步驟S420中,晶片組330是透過PCI-E根端口341並經由PCI-E切換器550將配置循環讀取請求傳遞給周邊設備121,並從周邊設備121獲得配置循環讀取請求對應的配置循環讀取數據(CFG read data)。It should be noted that, different from the aforementioned step S420, in step S420 of this embodiment, the
在另一實施例中,電子裝置500更包括多個PCI-E切換器,所述PCI-E切換器彼此串聯聯接。因此,在藉由圖6的步驟流程先瞭解電子裝置的周邊環境並將為VGA顯示卡的一或多個周邊設備記錄於查找表後,晶片組330即可執行圖4的步驟流程以對所述VGA顯示卡進行I/O或是MMIO資源的分配。In another embodiment, the
在其他實施例中,圖4實施例的擴展周邊設備的方法適用於圖5實施例的電子裝置500。在本實施例中,電子裝置500是由PCI-E切換器550來執行圖4的擴展周邊設備的方法。In other embodiments, the method for expanding peripheral devices in the embodiment in FIG. 4 is applicable to the
綜上所述,本發明實施例所提供的電子裝置及擴展周邊設備的方法,VGA顯示卡包括第一VGA顯示卡以及第二VGA顯示卡,透過軟體操作,控制器可對第一VGA顯示卡分配I/O資源,並且不對第二VGA顯示卡分配I/O資源。如此一來,電子裝置可在初始化階段利用被分配I/O資源的第一VGA顯示卡顯示畫面,之後,便可顯示其餘未被分配I/O資源的第二VGA顯示卡的畫面。藉此,可不受I/O資源限制地擴充電子裝置中VGA顯示卡的數量,讓電子裝置在需要多個VGA顯示卡的情形下(例如,挖掘數位錢幣(又稱,挖礦)或虛擬實境)提供更高的硬體運算應用。In summary, in the electronic device and the method for expanding peripheral equipment provided by the embodiments of the present invention, the VGA display card includes a first VGA display card and a second VGA display card. Through software operation, the controller can control the first VGA display card. I/O resources are allocated, and I/O resources are not allocated to the second VGA display card. In this way, the electronic device can use the first VGA display card to which I/O resources are allocated to display images during the initialization phase, and then can display the images of the remaining second VGA display cards that are not allocated I/O resources. In this way, the number of VGA display cards in an electronic device can be expanded without being restricted by I/O resources, so that the electronic device needs multiple VGA display cards (for example, mining digital coins (also known as mining) or virtual reality). Environment) to provide higher hardware computing applications.
另一方面,也可以透過硬體的操作(如圖3及圖5的晶片組330),判斷配置循環讀取資訊中是否具備I/O資源的請求,以及是否利用空白數據替換配置循環讀取資訊中I/O資源的請求,藉此隱藏周邊設備對於I/O資源的請求,而提供更高的運算應用。On the other hand, you can also use hardware operations (such as the
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the relevant technical field can make some changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of the present invention shall be determined by the scope of the attached patent application.
100、300、500‧‧‧電子裝置
110‧‧‧控制器
121、122、123‧‧‧周邊裝置
330‧‧‧晶片組
340‧‧‧快捷外設互聯標準橋接器
341‧‧‧快捷外設互聯標準根端口
550‧‧‧快捷外設互聯標準切換器
S220、S240、S242、S244、S246、S260、S262、S266、S410、S420、S430、S440、S450、S460、S470、S480、S610、S620、S630、S640、S650‧‧‧步驟100, 300, 500‧‧‧
圖1繪示本發明一實施例的電子裝置的方塊圖。 圖2繪示本發明一實施例的擴展周邊設備的方法的詳細流程圖。 圖3繪示本發明另一實施例的電子裝置的方塊圖。 圖4繪示本發明另一實施例的擴展周邊設備的方法的詳細流程圖。 圖5繪示本發明另一實施例的電子裝置的方塊圖。 圖6繪示本發明另一實施例的擴展周邊設備的方法的一部分詳細流程圖。FIG. 1 is a block diagram of an electronic device according to an embodiment of the invention. FIG. 2 shows a detailed flowchart of a method for expanding peripheral devices according to an embodiment of the present invention. FIG. 3 is a block diagram of an electronic device according to another embodiment of the invention. FIG. 4 shows a detailed flowchart of a method for expanding a peripheral device according to another embodiment of the present invention. FIG. 5 is a block diagram of an electronic device according to another embodiment of the invention. FIG. 6 shows a detailed flowchart of a part of a method for expanding a peripheral device according to another embodiment of the present invention.
100‧‧‧電子裝置 100‧‧‧Electronic device
110‧‧‧控制器 110‧‧‧Controller
121、122、123‧‧‧周邊裝置 121, 122, 123‧‧‧peripheral devices
Claims (22)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910222569.5A CN109933434B (en) | 2018-04-12 | 2019-03-22 | Electronic device and method for expanding peripheral equipment |
US16/373,649 US10657076B2 (en) | 2018-04-12 | 2019-04-03 | Electronic apparatus and method of extending peripheral device |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201862656943P | 2018-04-12 | 2018-04-12 | |
US62/656,943 | 2018-04-12 | ||
US201862656985P | 2018-04-13 | 2018-04-13 | |
US62/656,985 | 2018-04-13 |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201944215A TW201944215A (en) | 2019-11-16 |
TWI720426B true TWI720426B (en) | 2021-03-01 |
Family
ID=69184536
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108105259A TWI720426B (en) | 2018-04-12 | 2019-02-18 | Electronic apparatus and method of extending peripheral device |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI720426B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200928956A (en) * | 2007-12-31 | 2009-07-01 | S3 Graphics Inc | Method and system for supporting multiple display devices |
CN102314372A (en) * | 2010-05-25 | 2012-01-11 | 微软公司 | The configuration of virtual machine I/O multipath |
US20150058517A1 (en) * | 2013-08-23 | 2015-02-26 | International Business Machines Corporation | ALLOCATING LANES IN A PERIPHERAL CONNECT INTERFACE EXPRESS ('PCIe') BUS |
TWM547702U (en) * | 2017-05-10 | 2017-08-21 | 鋒厚科技股份有限公司 | Multi-input multi-output ports switch |
-
2019
- 2019-02-18 TW TW108105259A patent/TWI720426B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200928956A (en) * | 2007-12-31 | 2009-07-01 | S3 Graphics Inc | Method and system for supporting multiple display devices |
CN102314372A (en) * | 2010-05-25 | 2012-01-11 | 微软公司 | The configuration of virtual machine I/O multipath |
US20150058517A1 (en) * | 2013-08-23 | 2015-02-26 | International Business Machines Corporation | ALLOCATING LANES IN A PERIPHERAL CONNECT INTERFACE EXPRESS ('PCIe') BUS |
TWM547702U (en) * | 2017-05-10 | 2017-08-21 | 鋒厚科技股份有限公司 | Multi-input multi-output ports switch |
Also Published As
Publication number | Publication date |
---|---|
TW201944215A (en) | 2019-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3204862B1 (en) | Emulated endpoint configuration | |
US7529860B2 (en) | System and method for configuring an endpoint based on specified valid combinations of functions | |
US9531668B2 (en) | Micro server, method of allocating MAC address, and computer readable recording medium | |
JP6753412B2 (en) | Computers, device allocation management methods and programs | |
US10846254B2 (en) | Management controller including virtual USB host controller | |
US9423958B2 (en) | System and method for managing expansion read-only memory and management host thereof | |
CN101373448B (en) | Computer system with remote management | |
US20130110960A1 (en) | Method and system for accessing storage device | |
US10592285B2 (en) | System and method for information handling system input/output resource management | |
US20210271500A1 (en) | Virtual serial ports for virtual machines | |
US8700807B2 (en) | High speed baseboard management controller and transmission method thereof | |
EP2633402A1 (en) | Zoning data to a virtual machine | |
CN115298656A (en) | System and method for scheduling sharable PCIE endpoint devices | |
US20240104029A1 (en) | Network instantiated peripheral devices | |
CN109933434B (en) | Electronic device and method for expanding peripheral equipment | |
US20060282585A1 (en) | Method and system for identifying peripheral component interconnect device information | |
TWI720426B (en) | Electronic apparatus and method of extending peripheral device | |
US20050182615A1 (en) | Method and system for creating an automatically adjusting USB mass storage device | |
TW202311978A (en) | Transport control word architecture for physical port mirroring | |
US8892784B2 (en) | Adaptive apparatus | |
CN117412059B (en) | Video coding and decoding system, equipment and method based on virtualization | |
US20230350824A1 (en) | Peripheral component interconnect express device and operating method thereof | |
KR20080010791A (en) | Web-based monitoring module, hardware system including the same and monitoring method of web-based monitoring module | |
KR100467519B1 (en) | Computers and methods for storing P & Pyrisource in ROM | |
CN115269477A (en) | Display control method and server system |