TWI824658B - Super speed universal serial bus control method and computer system therefor - Google Patents
Super speed universal serial bus control method and computer system therefor Download PDFInfo
- Publication number
- TWI824658B TWI824658B TW111130008A TW111130008A TWI824658B TW I824658 B TWI824658 B TW I824658B TW 111130008 A TW111130008 A TW 111130008A TW 111130008 A TW111130008 A TW 111130008A TW I824658 B TWI824658 B TW I824658B
- Authority
- TW
- Taiwan
- Prior art keywords
- endpoint
- streaming
- state
- list
- transmission
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 24
- 230000005540 biological transmission Effects 0.000 claims abstract description 140
- 238000012546 transfer Methods 0.000 claims description 12
- 238000002360 preparation method Methods 0.000 claims description 7
- 230000003993 interaction Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 5
- 238000007792 addition Methods 0.000 description 4
- 238000012217 deletion Methods 0.000 description 4
- 230000037430 deletion Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 239000000872 buffer Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4498—Finite state machines
Abstract
Description
本發明是關於超高速通用序列匯流排(USB 3.0)之控制技術,支援UASP(通用序列匯流排附加小型計算機系統接口協定,即USB Attached SCSI Protocol)裝置。The present invention relates to ultra-high-speed Universal Serial Bus (USB 3.0) control technology and supports UASP (Universal Serial Bus Attached Small Computer System Interface Protocol, USB Attached SCSI Protocol) devices.
USB 3.0支援UASP裝置,所採用的面向流協定(stream protocol,或稱流式協定)允許裝置進行批量傳輸,系統效能大幅提升。USB 3.0 supports UASP devices, and the stream protocol (stream protocol) used allows the device to perform batch transfers, greatly improving system performance.
然而,為了優化如此批量傳輸能力,裝置端各端點(endpoint)的操作狀態需要相當資源進行管理。如何耗費最少資源達到最高效能,為本技術領域重要課題。However, in order to optimize such batch transmission capabilities, considerable resources are required to manage the operating status of each endpoint on the device side. How to consume the least resources to achieve the highest performance is an important issue in this technical field.
本案提供一種超高速通用序列匯流排控制技術。This case provides an ultra-high-speed universal serial bus control technology.
根據本案一種實施方式實現的一電腦系統包括一接口控制器。該一接口控制器具有一緩存空間儲存一端點列表,並運行一邏輯,動態增刪該端點列表。該接口控制器在接收到一第一流式端點發出的一未就緒數據包時,將該第一流式端點記錄於該端點列表。該第一流式端點的一第一流式狀態機係隨著該未就緒數據包之發出,切換到一閒置狀態,等待進入一預備傳輸狀態。該端點列表記錄有該第一流式端點時,該接口控制器略過將該第一流式狀態機自該閒置狀態切換為一總管線狀態。該接口控制器在該第一流式端點的所有目標傳輸完成後,將該第一流式端點自該端點列表刪除。A computer system implemented according to an embodiment of the present invention includes an interface controller. The interface controller has a cache space to store an endpoint list, and runs a logic to dynamically add and delete the endpoint list. When receiving a not-ready data packet sent by a first streaming endpoint, the interface controller records the first streaming endpoint in the endpoint list. A first streaming state machine of the first streaming endpoint switches to an idle state as the not-ready data packet is sent, waiting to enter a ready transmission state. When the endpoint list records the first streaming endpoint, the interface controller skips switching the first streaming state machine from the idle state to a total pipeline state. The interface controller deletes the first streaming endpoint from the endpoint list after all target transmissions of the first streaming endpoint are completed.
一種實施方式中,該接口控制器是在接收到對準該第一流式端點的端點操作門鈴時,檢查該端點列表。在檢查到該端點列表尚未記錄該第一流式端點時,該接口控制器提供一通知封包給該第一流式端點,使該第一流式狀態機進入該總管線狀態,發出該未就緒數據包給該接口控制器。In one implementation, the interface controller checks the endpoint list when receiving an endpoint operation doorbell aimed at the first streaming endpoint. When it is detected that the first streaming endpoint has not been recorded in the endpoint list, the interface controller provides a notification packet to the first streaming endpoint, causing the first streaming state machine to enter the total pipeline state and issue the not ready packet to the interface controller.
一種實施方式中,對準該第一流式端點的複數個端點操作門鈴載有複數個標籤值,標示該第一流式端點的複數段目標傳輸。該閒置狀態的該第一流式狀態機,係根據該第一流式端點對應一目標標籤值所發出的一就緒數據包,切換為該預備傳輸狀態,以更切換為一傳輸狀態,使該目標標籤值所代表的一段目標傳輸在該第一流式端點與該接口控制器互動下完成,致使該第一流式狀態機切換回該閒置狀態。該接口控制器是在該第一流式端點告知該目標標籤值所代表的該段目標傳輸完成時,判斷與該第一流式端點是否有任何標籤值的目標傳輸未完成。若都完成,該接口控制器將該第一流式端點自該端點列表刪除。In one implementation, the plurality of endpoint operation doorbells directed at the first streaming endpoint carry a plurality of tag values, indicating the target transmission of a plurality of segments of the first streaming endpoint. The first streaming state machine in the idle state switches to the ready transmission state according to a ready data packet sent by the first streaming endpoint corresponding to a target tag value, and further switches to a transmission state so that the target A segment of target transmission represented by the tag value is completed when the first streaming endpoint interacts with the interface controller, causing the first streaming state machine to switch back to the idle state. The interface controller determines whether any target transmission with a tag value associated with the first streaming endpoint has not been completed when the first streaming endpoint notifies that the segment of target transmission represented by the target tag value is completed. If all are completed, the interface controller deletes the first streaming endpoint from the endpoint list.
一種實施方式中,該接口控制器更在該緩存空間儲存一任務狀態註記,為該第一流式端點提供對應複數個標籤值的第一組位元。各位元常態為一第一狀態,在對應之標籤值配置標示一段目標傳輸時,經該接口控制器切換為一第二狀態,直至該段目標傳輸完成才切回該第一狀態。該接口控制器係根據都為該第一狀態的第一組位元,判定該第一流式端點的所有目標傳輸完成。In one implementation, the interface controller further stores a task status note in the cache space to provide the first streaming endpoint with a first set of bits corresponding to a plurality of tag values. Each bit is normally in a first state. When the corresponding tag value is configured to mark a segment of target transmission, it is switched to a second state through the interface controller. It is not switched back to the first state until the segment of target transmission is completed. The interface controller determines that all target transmissions of the first streaming endpoint are completed based on the first group of bits that are in the first state.
更有實施方式將本案概念實現為超高速通用序列匯流排控制方法。There is also an implementation method to implement the concept of this project into an ultra-high-speed universal serial bus control method.
下文特舉實施例,並配合附圖,詳細說明本發明內容。The following is a detailed description of the present invention with examples and accompanying drawings.
以下敘述列舉本發明的多種實施例。以下敘述介紹本發明的基本概念,且並非意圖限制本發明內容。實際發明範圍應依照申請專利範圍來界定。The following description sets forth various embodiments of the invention. The following description introduces the basic concepts of the invention and is not intended to limit the scope of the invention. The actual scope of the invention should be defined according to the scope of the patent application.
第1圖為方塊圖,根據本案一種實施方式圖解一電腦系統,支援UASP裝置(USB 3.0裝置)。如圖所示,一主機100可連結複數個UASP裝置。Figure 1 is a block diagram illustrating a computer system supporting UASP devices (USB 3.0 devices) according to an embodiment of the present invention. As shown in the figure, a
以USAP裝置102為例,其中具有一指令端點(command endpoint)104、一資料輸出端點(data-out endpoint)106、一資料輸入端點(data-in endpoint)108、以及一狀態端點(status endpoint)110。指令端點104供主機100實現指令之非流式批量輸出(bulk-out and non-streaming)。不同於指令端點104的非流式設計,資料輸出端點106供主機100實現寫入資料的流式批量輸出(bulk-out and streaming),而資料輸入端點108、以及狀態端點110供主機100實現讀取資料、與裝置狀態的流式批量輸入(bulk-in and streaming)。流式端點106、108、以及110大幅提升主機100讀寫UASP裝置102的速度。Taking the USAP
主機100係運行一作業系統(Operating System)112操作一協定驅動器(UAS driver)114,使驅動一接口驅動器(xHCI driver)116,繼而驅動一接口控制器(xHCI controller)118,控制所有UASP裝置上的端點,使各端點的狀態機運作。本案特別介紹流式端點(包括資料輸出端點106、資料輸入端點108、以及一狀態端點110)的控制;所介紹的接口控制器118可實現於晶片組(chipset)中。所述電腦系統解讀為該接口控制器118、或包括接口控制器118的一晶片組、或包括該晶片組的該主機100、或整個第1圖架構。The
各流式端點(資料輸出端點106、資料輸入端點108、以及狀態端點110)設有特殊的流式狀態機(stream state machine)。傳統流式端點進行多段目標傳輸前,其流式狀態機可能反覆在總管線狀態PrimePipe以及閒置狀態Idle間切換,耗時許久才回歸閒置狀態Idle,等待進入一預備傳輸狀態StartStream。本案接口控制器118在一緩存空間119管理一端點列表120,直接標註已啟用之流式端點(一切入閒置狀態Idle即記載),使其流式狀態機不再耗費時間於總管線狀態PrimePipe以及閒置狀態Idle間切換。特別是,接口控制器118所運行的邏輯122具有動態增刪列表之能力。邏輯122可由電路或/以及程式碼實現。邏輯122不只會將新啟用的流式端點增添至端點列表120,還會將完成所有目標傳輸的流式端點自該端點列表120刪除。如此一來,端點列表120尺寸適中,可以節省緩存空間。Each streaming endpoint (
端點列表120可儲存在複數個暫存器(registers)中。一種實施方式中,一流式端點是以4B資料註記在端點列表120,其中可包括裝置編號Slot#、以及裝置上端點編號EP#。The
一種實施方式中,接口控制器118更在緩存空間119管理一任務狀態註記124。邏輯122可參考該任務狀態註記124得知目標之流式端點是否完成其所有目標傳輸,得以自該端點列表120刪除。任務狀態註記124也可以暫存器儲存。In one implementation, the
第2圖為資料輸入端點108的流式狀態機,包括一除能狀態Disabled、一總管線狀態PrimePipe、一閒置狀態Idle、一預備傳輸狀態StartStream、以及一傳輸狀態MoveData。同採流式傳輸的資料輸出端點106、以及狀態端點110也有類似的流式狀態機。Figure 2 shows the streaming state machine of the
傳統技術相應複數段目標傳輸,會反覆將流式狀態機在總管線狀態PrimePipe、以及閒置狀態Idle間切換。本案以低硬件成本,成功降低流式狀態機在總管線狀態PrimePipe以及閒置狀態Idle間切換的機會。Traditional technology will repeatedly switch the streaming state machine between the total pipeline state PrimePipe and the idle state Idle when transmitting multiple segments of targets. With low hardware cost, this case successfully reduces the chance of the streaming state machine switching between the total pipeline state PrimePipe and the idle state Idle.
根據本案設計,流式端點發出一未就緒數據包NRDY後,此流式端點就被記錄下來,以控管其流式狀態機盡量維持在閒置狀態Idle,等待為各段目標傳輸所發出的就緒數據包ERDY。就緒數據包ERDY會使得流式狀態機切入預備傳輸狀態StartStream與傳輸狀態MoveData,完成相應的一段目標傳輸。待此流式端點的所有目標傳輸完成,此流式端點的控管即結束,使得控管成本合理。According to the design of this case, after the streaming endpoint sends a not-ready data packet NRDY, the streaming endpoint is recorded to control its streaming state machine to remain in the idle state as much as possible, waiting for the transmission of each target segment. Ready packet ERDY. The ready data packet ERDY will cause the streaming state machine to switch to the preparatory transmission state StartStream and the transmission state MoveData to complete the corresponding target transmission. When all target transmissions of this streaming endpoint are completed, the control of this streaming endpoint ends, making the control cost reasonable.
以下以讀取操作為例進行說明。第3圖圖解操作時序。The following description takes the read operation as an example. Figure 3 illustrates the sequence of operations.
作業系統112要求讀取UASP裝置102時,會發出一讀取指令(Data-in Transfer Command)300,告知該協定驅動器114一讀取地址、以及一讀取尺寸。協定驅動器114會發出要求Itr(Stat)、Itr(Data-in)、以及Otr(Cmd, CIU)給接口驅動器116,使接口驅動器116驅動該接口控制器118。要求Itr(Stat)、以及Itr(Data-in)係用來設定主機硬件,準備好接收UASP裝置102回應的狀態(如,感測信息單元SIU)、以及讀取資料。要求Otr(Cmd, CIU)是最後發送,用於傳送命令信息單元(CIU)。When the
以下討論資料輸入端點108、以及狀態端點110的流式狀態機如何回應該讀取指令300。How the
首先討論資料輸入端點108。根據要求Itr(Data-in),接口控制器118產生一通知封包InAck(Data-in, Prime),使資料輸入管線(Data-in pipe)的流式狀態機(第2圖)進入總管線狀態PrimePipe,通知UASP裝置102該主機100已經準備妥當,預備接收UASP裝置102回應的讀取資料。響應該通知封包InAck(Data-in, Prime),UASP裝置102是回應一未就緒數據包NRDY(Data-in, Prime), 使流式狀態機從總管線狀態PrimePipe切入閒置狀態Idle,以方便切入預備傳輸狀態StartStream。參閱第1圖,接口控制器118便是在此時,以邏輯122,將資料輸入端點108增添至端點列表120,表示資料輸入端點108之流式狀態機已作過總管線狀態PrimePipe、再閒置狀態Idle之設定。
此段討論狀態端點110。根據要求Itr(Stat),接口控制器118產生一通知封包InAck(Stat, Prime),使狀態管線(status pipe)的流式狀態機(類似第2圖)進入總管線狀態PrimePipe,通知UASP裝置102該主機100已經準備妥當,預備接收UASP裝置102回應的狀態(如,感測信息單元SIU)。響應該通知封包InAck(Stat, Prime),UASP裝置102是回應一未就緒數據包NRDY(Stat, Prime),使流式狀態機從總管線狀態PrimePipe切入閒置狀態Idle,方便切入預備傳輸狀態StartStream。參閱第1圖,接口控制器118便是在此時,以邏輯122,將狀態端點110增添至端點列表120,表示狀態端點110之流式狀態機已作過總管線狀態PrimePipe、再閒置狀態Idle之設定。This section discusses
資料輸入管線、以及狀態管線的流式狀態機都確實在閒置狀態Idle後,根據要求Otr(Cmd, CIU),接口控制器118產生一指令封包DP(Cmd, CIU),做命令信息單元CIU傳輸。UASP裝置102收到該指令封包DP(Cmd, CIU)後,回應一通知封包ACK(Cmd),表示成功接收命令信息單元CIU。接口控制器118以要求OTc(Cmd)一路回報接口驅動器116以及協定驅動器114。由於接口控制器118非流式端點,故無需填入端點列表120。After the data input pipeline and the streaming state machine of the status pipeline are indeed in the idle state, according to the request Otr (Cmd, CIU), the
特別是,讀取指令300要求讀取的資料可分為數段讀取。例如,讀取指令300要求的10K讀取資料,可分10段各讀出1K。In particular, the data required to be read by the read
傳統設計中,用於資料輸入端點108以及狀態端點110初始設定的封包組302將重複10次,接著,指令傳輸之封包組304也重複10次。不同段讀取的封包組302/304以不同標籤值(tag values)區別。一種實施方式是令封包帶有一流式編碼(SID),其值設定為對應的標籤值。特別是,關於流式端點,重複執行的封包組302將令資料輸入管線、以及狀態管線的流式狀態機頻繁在總管線狀態PrimePipe以及閒置狀態Idle間切換。In the traditional design, the
然而,應用本案技術,封包組302第一次進行,端點列表120就會標有資料輸入端點108以及狀態端點110,表示資料輸入端點108以及狀態端點110之流式狀態機已作過總管線狀態PrimePipe、再閒置狀態Idle之設定。接口控制器118藉由查詢該端點列表120,可避免再次將資料輸入端點108以及狀態端點110的流式狀態機從閒置狀態Idle切換成總管線狀態PrimePipe。因此,本案封包組302不會重複進行,其封包也無需載有標籤值。唯非流式端點通信的封包組304重複進行。系統效能大幅提升。However, using the technology of this case, the first time the
經前述步驟,各端點完成讀取資料的前置步驟。以下開始進行讀取資料之傳輸。After the above steps, each endpoint completes the pre-steps of reading data. The transmission of read data begins below.
UASP裝置102產生一就緒數據包ERDY(Data_in),通知接口控制器118,該UASP裝置102已準備好傳送某標籤值的讀取資料。根據就緒數據包ERDY(Data_in),資料輸入管線之流式狀態機自閒置狀態Idle切入預備傳輸狀態StartStream。The
相應就緒數據包ERDY(Data_in),接口控制器118傳送一通知封包InAck(Data-in)給UASP裝置102。根據通知封包InAck(Data-in),資料輸入管線之流式狀態機自預備傳輸狀態StartStream切入傳輸狀態MoveData,開始傳送讀取資料,UASP裝置102發出資料封包DP(Data-in)。In response to the ready data packet ERDY (Data_in), the
相應資料封包DP(Data-in),接口控制器118傳送一通知封包InAck(Data-in)給UASP裝置102,表示成功接收到讀取資料之封包。封包DP(Data-in)、InAck(Data-in)多對互動後,其標籤值代表的該段讀取資料傳輸完成,接口控制器118以要求ITc(Data-in),一路回報接口驅動器116以及協定驅動器114。資料輸入管線之流式狀態機回到閒置狀態Idle。Corresponding to the data packet DP (Data-in), the
以前述10次各1K分段讀取為例,封包組306會重複10次,各自對應一標籤值。各封包是以流式編碼(SID)標示標籤值。Taking the aforementioned 10 times of 1K segment reading as an example, the
特別是,所有分段之讀取資料傳送完後(重複封包組306後),接口控制器118會以邏輯122將資料輸入端點108自端點列表120刪除,使緩存空間119利用最佳化。一種實施方式中,任務狀態註記124有32位元內容是為資料輸入端點108提供,分別對應一標籤值之讀取資料之傳輸。各位元常態為1。0值代表該標籤值讀取資料尚未完成傳輸。若此32位元皆為1,則接口控制器118認定資料輸入端點108所有分段之讀取資料傳送完畢,將資料輸入端點108自端點列表120刪除。In particular, after the read data of all segments has been transmitted (after the repeated packet group 306), the
所有分段之讀取資料傳輸完畢後,UASP裝置102發出就緒數據包ERDY(Stat),通知接口控制器118,該UASP裝置102已準備好透過狀態管線傳送感測信息單元SIU。就緒數據包ERDY(Stat)也有標示標籤值。根據該就緒數據包ERDY(Stat),狀態管線之流式狀態機自閒置狀態Idle切入預備傳輸狀態StartStream。After the read data transmission of all segments is completed, the
相應該就緒數據包ERDY(Stat),接口控制器118傳送一通知封包InAck(Stat)給UASP裝置102。根據通知封包InAck(Stat),狀態管線之流式狀態機自預備傳輸狀態StartStream切入傳輸狀態MoveData,產生狀態封包DP(Stat, SIU)傳送感測信息單元SIU。相應狀態封包DP(Stat, SIU),接口控制器118產生通知封包ACK(Stat),表示成功接收感測信息單元SIU。狀態管線之流式狀態機回到閒置狀態Idle。Corresponding to the ready packet ERDY(Stat), the
以前述10次各段1K讀取為例,封包組308會重複10次,各自對應一標籤值。各封包是以流式編碼(SID)標示標籤值。Taking the above-mentioned 10 times of reading 1K in each segment as an example, the
特別是,所有分段讀取之裝置狀態傳送完後(重複封包組308後),接口控制器118會以邏輯122將狀態端點110自端點列表120刪除,使緩存空間119利用最佳化。一種實施方式中,任務狀態註記124有32位元內容是為狀態端點110提供,分別對應一標籤值之狀態傳輸。各位元常態為1。0值代表該標籤值狀態尚未完成傳輸。若此32位元皆為1,則接口控制器118認定狀態端點110所有分段之狀態傳輸完成,將狀態端點110自端點列表120刪除。In particular, after all segmented device statuses have been transmitted (after repeating the packet group 308), the
作業系統112以一寫入指令(Data-out Transfer Command)發起的寫入操作之時序,類似第3圖之讀取操作時序。同樣以小尺寸緩存空間119,實現流式端點(包括資料輸出端點106以及狀態端點110)的高效運作。The timing of the write operation initiated by the
以上流式端點操作概念可應用在各式各樣流式端點,不限定於資料輸出端點106、資料輸入端點108、狀態端點110。The above streaming endpoint operation concepts can be applied to various streaming endpoints, and are not limited to the
第4圖為流程圖,根據本案一種實施方式圖解接口控制器118的一操作流程,其中涉及邏輯122之運作,說明該接口控制器118如何建立該端點列表120。Figure 4 is a flow chart illustrating an operation process of the
步驟S402,接口控制器118收到端點操作門鈴(EP doorbell,ITr、或Otr),其中包括裝置編號Slot#、裝置上端點編號EP#、以及標籤值Stream#(#代表編號)。一種實施方式中,接口控制器118可將任務狀態註記124裡,對應裝置編號Slot#、裝置上端點編號EP#的暫存器,其中對應標籤值Stream#的位元設0,代表待完成的一段目標傳輸。Step S402, the
步驟S404,根據裝置編號Slot#、以及裝置上端點編號EP#,接口控制器118查詢端點列表120,判斷此流式端點是否已啟用(已作過總管線狀態PrimePipe、閒置狀態Idle設定)。Step S404: According to the device number Slot# and the endpoint number EP# on the device, the
若目前要求操作的流式端點尚未啟用,並未列在端點列表120,接口控制器118循步驟S406發出一通知封包,使該流式端點的流式狀態機切換到總管線狀態PrimePipe,再循步驟S408,接收該流式端點回應的未就緒數據包NRDY。此時,該流式狀態機自總管線狀態PrimePipe切換成閒置狀態Idle。接口控制器118循步驟S410將此流式端點的資訊(包括裝置編號Slot#、以及裝置上端點編號EP#)載入該端點列表120,記錄為已啟用端點。流程結束。If the streaming endpoint currently required to operate has not been enabled and is not listed in the
反之,若目前要求操作的流式端點早已啟用,已列在端點列表120,接口控制器118跳過步驟S406以及S408,該流式狀態機不會再作總管線狀態PrimePipe、閒置狀態Idle切換。流式狀態機原本早已處在閒置狀態Idle。On the contrary, if the streaming endpoint currently required to operate has been enabled and is listed in the
第5圖為流程圖,根據本案一種實施方式圖解接口控制器118的一操作流程,其中涉及邏輯122之運作,說明該接口控制器118如何應用該端點列表120,並動態刪減該端點列表120內容。Figure 5 is a flow chart illustrating an operation process of the
步驟S502,接口控制器118接收到一流式端點(由裝置編號Slot#、以及裝置上端點編號EP#標註)傳來的一就緒數據包ERDY,其中帶有一標籤值Stream#。該流式狀態機隨著該就緒數據包ERDY進入該預備傳輸狀態StartStream、以及該傳輸狀態MoveData,進行該標籤值Stream#所標示的一段目標傳輸。此時,接口控制器118以步驟S504自該流式端點接收封包DP。步驟S506,接口控制器118獲知該流式端點完成標籤值Stream#之目標傳輸,將任務狀態註記124中,對應該流式端點的暫存器,其中對應標籤值Stream#的位元設1。步驟S508,接口控制器118判斷該暫存器是否全重置為預設值1。若是,表示該流式端點所有目標傳輸都完成,接口控制器118循步驟S510將該流式端點自該端點列表120刪除。若否,流程不調整該端點列表120即結束。In step S502, the
整理之,本案令完成所有目標傳輸的流式端點,得以自端點列表120刪除。如此一來,端點列表120使用的暫存器數量可以大幅減少。以UASP裝置102為例,資料輸出端點106與資料輸入端點108不會同時啟用。端點列表120至多只需要為UASP裝置102提供兩個條目:標示資料輸出端點106與狀態端點110;或者,標示資料輸入端點108與狀態端點110。相較於為三個流式端點(資料輸出端點106、資料輸入端點108、狀態端點110)各備妥暫存器記錄目標傳輸之傳輸進度,本案動態增、刪該端點列表120的技術,更是節省緩存空間119。In summary, this case allows streaming endpoints that have completed all target transmissions to be deleted from the
另外,以支援32個UASP裝置的電腦系統為例,通常不會同時使用32個UASP裝置。例如,大部分應用只會使用到15個UASP裝置。端點列表120設計上可以應付20個UASP裝置為目標,即具有20*2*4B(160B)儲存能力即可。相較於為所有裝置的所有流式端點備妥32*3*4B (=384B)空間,160B的端點列表120在緩存空間利用上更好。In addition, taking a computer system that supports 32 UASP devices as an example, 32 UASP devices are usually not used at the same time. For example, most applications will only use 15 UASP devices. The
以下表格1舉例說明端點列表120的增刪。
步驟3,裝置0x0E上、編號0x04流式端點(資料輸出端點)添入該端點列表120,為(E,4);除了代表該流式端點(E,4)已為標籤值0x02的傳輸作好準備(Idle狀態),也代表該流式端點(E,4)有能力應付標籤值0x04(步驟7)、以及0x09(步驟12)之傳輸要求。步驟7以及步驟12之要求,都沒有再觸發流式狀態機的總管線狀態PrimePipe、閒置狀態Idle切換。Step 3. The streaming endpoint numbered 0x04 (data output endpoint) on device 0x0E is added to the
步驟6,裝置0x0E上編號0x07的流式端點(狀態端點) 添入該端點列表120,為(E,7);除了代表流式端點(E,7)已為標籤值0x02的傳輸作好準備(Idle狀態),也代表該流式端點(E,7)有能力應付標籤值0x04(步驟8)、以及0x09(步驟14)之傳輸要求。步驟8以及步驟14之要求,都沒有再觸發流式狀態機的總管線狀態PrimePipe、閒置狀態Idle切換。Step 6. The streaming endpoint (status endpoint) numbered 0x07 on device 0x0E is added to the
步驟20,裝置0x0C上編號0x03的流式端點(資料輸入端點) 添入該端點列表120,為(C,3);除了代表該流式端點(C,3)已為標籤值0x02的傳輸作好準備(Idle狀態),也代表該流式端點(C,3)有能力應付標籤值0x05(步驟24)、以及0x09(步驟28)之傳輸要求。步驟24以及步驟28之要求,都沒有再觸發流式狀態機的總管線狀態PrimePipe、閒置狀態Idle切換。Step 20, the streaming endpoint numbered 0x03 (data input endpoint) on device 0x0C is added to the
步驟23,裝置0x0C上編號0x07的流式端點(狀態端點)添入該端點列表120,為(C,7);除了代表該流式端點(C,7)已為標籤值0x02的傳輸作好準備(Idle狀態),也代表該流式端點(C,7)有能力應付標籤值0x05(步驟26)、以及0x09(步驟29)之傳輸要求。步驟26以及步驟29之要求,都沒有再觸發流式狀態機的總管線狀態PrimePipe、閒置狀態Idle切換。Step 23, the streaming endpoint (status endpoint) numbered 0x07 on device 0x0C is added to the
特別是,步驟25,隨著標籤值0x09的資料輸出傳輸完成,裝置0x0E上編號0x04的資料輸出端點完成所有任務(標籤值0x02、0x04、以及0x09所標示的三段資料輸出傳輸都完成),記錄(E,4)自端點列表120刪除。In particular, step 25, as the data output transmission with tag value 0x09 is completed, the data output endpoint numbered 0x04 on device 0x0E completes all tasks (the three data output transmissions marked with tag values 0x02, 0x04, and 0x09 are all completed) , record (E,4) is deleted from
步驟27,隨著標籤值0x09的狀態傳輸完成,裝置0x0E上編號0x07的狀態端點完成所有任務(標籤值0x02、0x04、以及0x09所標示的三段狀態傳輸都完成),記錄(E,7)自端點列表120刪除。Step 27, as the status transmission of tag value 0x09 is completed, the status endpoint numbered 0x07 on device 0x0E completes all tasks (the three status transmissions marked by tag values 0x02, 0x04, and 0x09 are completed), and records (E,7 ) is removed from the
步驟37,隨著標籤值0x09的資料輸入傳輸完成,裝置0x0C上編號0x03的資料輸入端點完成所有任務(標籤值0x02、0x05、以及0x09所標示的三段資料輸入傳輸都完成),記錄(C,3)自端點列表120刪除。Step 37, as the data input and transmission of tag value 0x09 is completed, the data input endpoint numbered 0x03 on device 0x0C completes all tasks (the three data input and transmission segments marked by tag values 0x02, 0x05, and 0x09 are all completed), and records ( C,3) Delete from
步驟38,隨著標籤值0x09的狀態傳輸完成,裝置0x0C上編號0x07的狀態端點完成所有任務(標籤值0x02、0x05、以及0x09所標示的三段狀態傳輸都完成),記錄(C,7)自端點列表120刪除。Step 38, as the status transmission of tag value 0x09 is completed, the status endpoint numbered 0x07 on device 0x0C completes all tasks (the three status transmissions marked by tag values 0x02, 0x05, and 0x09 are completed), and records (C,7 ) is removed from the
表格1顯示端點列表120之動態增刪。本案接口控制器118明顯優化端點列表120所佔用的緩存空間119。Table 1 shows the dynamic addition and deletion of the
本案為超高速通用序列匯流排(USB 3.0)提出高效的接口控制器118。This project proposes an
以上概念更可實現為超高速通用序列匯流排(USB 3.0)控制方法,包括:在一緩存空間119儲存一端點列表120,並運行一邏輯122,動態增刪該端點列表120;相應一第一流式端點發出的一未就緒數據包NRDY,將該第一流式端點記錄於該端點列表120,其中,該第一流式端點的一第一流式狀態機係隨著該未就緒數據包NRDY之發出,切換到一閒置狀態Idle,等待進入一預備傳輸狀態StartStream;在該端點列表120記錄有該第一流式端點時,略過將該第一流式狀態機自該閒置狀態Idle切換為一總管線狀態PipePrime;且在該第一流式端點的所有目標傳輸完成後,將該第一流式端點自該端點列表120刪除。The above concept can be implemented as an ultra-high-speed universal serial bus (USB 3.0) control method, including: storing an
一種實施方式中,所述控制方法更包括:相應對準該第一流式端點的端點操作門鈴,檢查該端點列表120;且在檢查到該端點列表120尚未記錄該第一流式端點時,提供一通知封包InAck給該第一流式端點,使該第一流式狀態機進入該總管線狀態PrimePipe,發出該未就緒數據包NRDY。該第一流式狀態機係切換到該閒置狀態Idle,且該第一流式端點增添入該端點列表120。In one embodiment, the control method further includes: operating a doorbell corresponding to the endpoint of the first streaming endpoint, checking the
一種實施方式中,對準該第一流式端點的複數個端點操作門鈴載有複數個標籤值,標示該第一流式端點的複數段目標傳輸。該閒置狀態Idle的該第一流式狀態機,係根據該第一流式端點對應一目標標籤值所發出的一就緒數據包ERDY,切換為該預備傳輸狀態StartStream,以更切換為一傳輸狀態MoveData,完成該目標標籤值所代表的一段目標傳輸,致使該第一流式狀態機切換回該閒置狀態Idle。所述控制方法更在該第一流式端點完成該目標標籤值所代表的該段目標傳輸時,判斷與該第一流式端點是否有任何標籤值的目標傳輸未完成;若都完成,將該第一流式端點自該端點列表120刪除。In one implementation, the plurality of endpoint operation doorbells directed at the first streaming endpoint carry a plurality of tag values, indicating the target transmission of a plurality of segments of the first streaming endpoint. The first streaming state machine of the idle state Idle switches to the preparatory transmission state StartStream according to a ready data packet ERDY sent by the first streaming endpoint corresponding to a target tag value, and further switches to a transmission state MoveData. , completing a segment of target transmission represented by the target tag value, causing the first streaming state machine to switch back to the idle state Idle. The control method further determines whether any target transmission with a tag value associated with the first streaming endpoint has not been completed when the first streaming endpoint completes the target transmission represented by the target tag value; if all are completed, the The first streaming endpoint is deleted from the
雖然本發明已以較佳實施例揭示如上,然其並非用以限定本發明,任何熟悉本技術領域者,在不脫離本發明的精神和範圍內,當可做些許更動與潤飾,因此本發明的保護範圍以權利要求書界定為準。Although the present invention has been disclosed above in terms of preferred embodiments, they are not intended to limit the present invention. Anyone familiar with the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection shall be determined by the claims.
100:主機 102:UASP(通用序列匯流排附加小型計算機系統接口協定)裝置 104:指令端點 106:資料輸出端點 108:資料輸入端點 110:狀態端點 112:作業系統(OS) 114:協定驅動器(UAS driver) 116:接口驅動器(xHCI driver) 118:接口控制器(xHCI controller) 119:緩存空間 120:端點列表 122:動態增刪列表的邏輯 124:任務狀態註記 300:讀取指令 302、304、306、308:封包組 Disabled:除能狀態 DP(Cmd, CIU)、DP(Data-in)、DP(Stat, SIU):指令、資料、狀態封包 ERDY、ERDY(Data-in)、ERDY(Stat):就緒數據包 Idle:閒置狀態 ITr(Stat)、ITr(Data-in)、OTr(Cmd, CIU)、OTc(Cmd)、ITc(Data-in)、ITc(Stat, SIU):要求 InACK(Data-in, Prime)、InACK(Stat, Prime)、ACK(Cmd)、InACK(Data-in)、InACK(Stat)、ACK(Stat):通知封包 MoveData:傳輸狀態 NRDY、NRDY(Data-in, Prime)、NRDY(Stat, Prime):未就緒數據包 PrimePipe:總管線狀態 S402…S410、S502…S510:步驟 StartStream:預備傳輸狀態 100:Host 102: UASP (Universal Serial Bus Attached Small Computer System Interface Protocol) device 104:Command endpoint 106: Data output endpoint 108: Data input endpoint 110: Status endpoint 112: Operating system (OS) 114: Protocol driver (UAS driver) 116:Interface driver (xHCI driver) 118: Interface controller (xHCI controller) 119: Cache space 120: Endpoint list 122: Logic of dynamic addition and deletion of lists 124:Task status notes 300: Read instructions 302, 304, 306, 308: Packet group Disabled: disabled state DP(Cmd, CIU), DP(Data-in), DP(Stat, SIU): command, data, status packet ERDY, ERDY(Data-in), ERDY(Stat): ready data packet Idle: idle state ITr(Stat), ITr(Data-in), OTr(Cmd, CIU), OTc(Cmd), ITc(Data-in), ITc(Stat, SIU): Requirements InACK(Data-in, Prime), InACK(Stat, Prime), ACK(Cmd), InACK(Data-in), InACK(Stat), ACK(Stat): notification packet MoveData:transmission status NRDY, NRDY(Data-in, Prime), NRDY(Stat, Prime): Not ready data packet PrimePipe:Total pipeline status S402…S410, S502…S510: steps StartStream: Preparatory transmission status
第1圖為方塊圖,根據本案一種實施方式圖解一電腦系統,支援UASP裝置(USB 3.0裝置);
第2圖為資料輸入端點108的流式狀態機;
第3圖以讀取操作為例圖解操作時序;
第4圖為流程圖,根據本案一種實施方式圖解接口控制器118的一操作流程,其中涉及邏輯122之運作,說明該接口控制器118如何建立該端點列表120;且
第5圖為流程圖,根據本案一種實施方式圖解接口控制器118的一操作流程,其中涉及邏輯122之運作,說明該接口控制器118如何應用該端點列表120,並動態刪減該端點列表120內容。
Figure 1 is a block diagram illustrating a computer system that supports UASP devices (USB 3.0 devices) according to an embodiment of the present invention;
Figure 2 shows the streaming state machine of the
無without
100:主機 100:Host
102:UASP(通用序列匯流排附加小型計算機系統接口協定)裝置 102: UASP (Universal Serial Bus Attached Small Computer System Interface Protocol) device
104:指令端點 104:Command endpoint
106:資料輸出端點 106: Data output endpoint
108:資料輸入端點 108: Data input endpoint
110:狀態端點 110: Status endpoint
112:作業系統(OS) 112: Operating system (OS)
114:協定驅動器(UAS driver) 114: Protocol driver (UAS driver)
116:接口驅動器(xHCI driver) 116:Interface driver (xHCI driver)
118:接口控制器(xHCI controller) 118: Interface controller (xHCI controller)
119:緩存空間 119: Cache space
120:端點列表 120: Endpoint list
122:動態增刪列表的邏輯 122: Logic of dynamic addition and deletion of lists
124:任務狀態註記 124:Task status notes
Claims (20)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111130008A TWI824658B (en) | 2022-08-10 | 2022-08-10 | Super speed universal serial bus control method and computer system therefor |
CN202211030883.1A CN115422113A (en) | 2022-08-10 | 2022-08-26 | Super-high speed universal serial bus control method and computer system for realizing same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111130008A TWI824658B (en) | 2022-08-10 | 2022-08-10 | Super speed universal serial bus control method and computer system therefor |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI824658B true TWI824658B (en) | 2023-12-01 |
TW202407554A TW202407554A (en) | 2024-02-16 |
Family
ID=84200021
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW111130008A TWI824658B (en) | 2022-08-10 | 2022-08-10 | Super speed universal serial bus control method and computer system therefor |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115422113A (en) |
TW (1) | TWI824658B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200820003A (en) * | 2006-06-07 | 2008-05-01 | Standard Microsyst Smc | Low power and low pin count bi-directional dual data rate device interconnect interface |
TW201437800A (en) * | 2013-03-29 | 2014-10-01 | Silicon Motion Inc | Status switching method |
CN105630718A (en) * | 2014-09-12 | 2016-06-01 | 亚信电子股份有限公司 | Electronic device for providing instant switching and sharing of universal serial bus electronic equipment by host |
US20180285308A1 (en) * | 2017-04-03 | 2018-10-04 | Futurewei Technologies, Inc. | Universal serial bus network switch |
US20200174956A1 (en) * | 2015-08-14 | 2020-06-04 | Icron Technologies Corporation | Systems for enhancing boardroom tables to include usb type-c power and connectivity functionality |
CN113778918A (en) * | 2020-12-14 | 2021-12-10 | 西安网虫信息科技有限公司 | USB device management system and management method |
-
2022
- 2022-08-10 TW TW111130008A patent/TWI824658B/en active
- 2022-08-26 CN CN202211030883.1A patent/CN115422113A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200820003A (en) * | 2006-06-07 | 2008-05-01 | Standard Microsyst Smc | Low power and low pin count bi-directional dual data rate device interconnect interface |
TW201437800A (en) * | 2013-03-29 | 2014-10-01 | Silicon Motion Inc | Status switching method |
CN105630718A (en) * | 2014-09-12 | 2016-06-01 | 亚信电子股份有限公司 | Electronic device for providing instant switching and sharing of universal serial bus electronic equipment by host |
US20200174956A1 (en) * | 2015-08-14 | 2020-06-04 | Icron Technologies Corporation | Systems for enhancing boardroom tables to include usb type-c power and connectivity functionality |
US20180285308A1 (en) * | 2017-04-03 | 2018-10-04 | Futurewei Technologies, Inc. | Universal serial bus network switch |
CN113778918A (en) * | 2020-12-14 | 2021-12-10 | 西安网虫信息科技有限公司 | USB device management system and management method |
Also Published As
Publication number | Publication date |
---|---|
CN115422113A (en) | 2022-12-02 |
TW202407554A (en) | 2024-02-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9696942B2 (en) | Accessing remote storage devices using a local bus protocol | |
US9727503B2 (en) | Storage system and server | |
US9292224B2 (en) | Providing indirect data addressing for a control block at a channel subsystem of an I/O processing system | |
EP1899830B1 (en) | Automated serial protocol target port transport layer retry mechanism | |
US20050060479A1 (en) | High speed and flexible control for bridge controllers | |
JP5185289B2 (en) | Content end type DMA | |
EP2028595B1 (en) | Hierarchical cache memory system | |
WO2018232736A1 (en) | Memory access technology and computer system | |
CA2511046A1 (en) | Multi-node system, internodal crossbar switch, node and medium embodying program | |
CN111159075A (en) | Data transmission method and data transmission device | |
US10929332B2 (en) | USB transmission device and transmission method | |
CN102843435A (en) | Access and response method and access and response system of storing medium in cluster system | |
TWI824658B (en) | Super speed universal serial bus control method and computer system therefor | |
TW202244725A (en) | Accelerating method of executing comparison functions and accelerating system of executing comparison functions | |
US7127530B2 (en) | Command issuing apparatus for high-speed serial interface | |
US7818472B2 (en) | Repeat CCW count argument for device command word processing | |
JPH10334037A (en) | Communication dma device | |
JP2007004710A (en) | Storage access system, data transfer device, storage accessing method and program | |
US7430634B2 (en) | Data transfer apparatus and data transfer method | |
JP2001222396A (en) | Printer controller and printer language switching method | |
JP2000132507A (en) | Command processing method for scsi protocol and device used for the processing method | |
JPH11252150A (en) | Network connection device and network connection control method | |
JP2853607B2 (en) | Communication system between jobs | |
US7028131B1 (en) | Reverse message writes and reads | |
JPH0955070A (en) | Magnetic disk device |