TW201805820A - Method for transferring command from host to device controller and system using the same - Google Patents

Method for transferring command from host to device controller and system using the same Download PDF

Info

Publication number
TW201805820A
TW201805820A TW105125784A TW105125784A TW201805820A TW 201805820 A TW201805820 A TW 201805820A TW 105125784 A TW105125784 A TW 105125784A TW 105125784 A TW105125784 A TW 105125784A TW 201805820 A TW201805820 A TW 201805820A
Authority
TW
Taiwan
Prior art keywords
segment
command
size
device controller
host
Prior art date
Application number
TW105125784A
Other languages
Chinese (zh)
Other versions
TWI625628B (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 TW105125784A priority Critical patent/TWI625628B/en
Publication of TW201805820A publication Critical patent/TW201805820A/en
Application granted granted Critical
Publication of TWI625628B publication Critical patent/TWI625628B/en

Links

Abstract

A method for transferring a command from a host to a device controller and a system using the method are disclosed. The method includes the steps of: A. determining a segment size; B. dividing a command into a number of sections each having a size the same as the segment size; C. sequentially distributing the sections to n groups and if the last section is smaller than a segment, then fill this section to a segment size; D. keeping the same distributing order in step C if a cycle of distribution is finished while there are sections left for distributing; E. restructuring the section(s) in each group as a sub-command after all sections are distributed; and F. providing the sub-commands to a device controller synchronously.

Description

由主機到設備控制器傳輸命令的方法及使用該方 法的系統 Method of transmitting commands from a host to a device controller and using the party Legal system

本發明關於一種用於由主機到設備控制器傳輸命令的方法與系統,特別是關於一種藉分割每一命令為數個子命令,用於由主機到設備控制器傳輸命令的方法與系統。 The present invention relates to a method and system for transmitting commands from a host to a device controller, and more particularly to a method and system for transferring commands from a host to a device controller by dividing each command into a number of subcommands.

傳統上,當一主機傳輸命令到一設備中時,必須通過一傳輸介面,一次傳輸作業傳輸一個命令。隨著命令傳輸科技的發展,主機可以傳送多個命令,例如命令佇列,而設備控制器也能處理二個或多個命令。因此,主機可以將一個命令分割成二個或多個子命令並發送到設備控制器,進而讓命令處理的速度可以加快。 Traditionally, when a host transmits commands to a device, it must transmit a command through a transport interface, one transfer operation. With the development of command transmission technology, the host can transmit multiple commands, such as command queues, and the device controller can handle two or more commands. Therefore, the host can split a command into two or more subcommands and send them to the device controller, which can speed up command processing.

命令傳輸的過程如第1圖所繪示。當主機開機時或命令傳輸前,主機驅動程式經由一介面發送一辨認命令到該設備控制器,用來辨認一獨立儲存設備(硬碟(Hard Disk Drive,HDD)、固態硬碟(Solid State Drive,SSD)或記憶卡)或設備控制器管理的儲存設備的資訊。該辨認命令與其它稍後會 提及的命令可符合某一總線協議。對非揮發性記憶體架構的儲存設備來說,該總線協議可以是由非揮發性記憶體高速(Non Volatile Memory Express)標準所發展的協議。非揮發性記憶體高速標準描述PCIe架構SSD的暫存器介面、命令組與特徵組。於是,該設備控制器發送回關於儲存設備的設備資訊給主機驅動程式。設備資訊可包含儲存設備單元大小,如快閃記憶體頁與塊的大小、快閃記憶體的種類、最快傳輸速度等等。依照該設備資訊,主機驅動程式可提供一準備執行命令的位址給設備控制器。設備控制器能讀取該位址的命令並執行之。 The process of command transmission is as shown in Figure 1. When the host is powered on or before the command is transmitted, the host driver sends an identification command to the device controller via an interface to identify a separate storage device (Hard Disk Drive (HDD), Solid State Drive (Solid State Drive). , SSD) or memory card) or device controller managed storage device information. The recognition command and other later will The commands mentioned can be adapted to a certain bus protocol. For non-volatile memory architecture storage devices, the bus protocol can be a protocol developed by the Non Volatile Memory Express standard. The non-volatile memory high-speed standard describes the scratchpad interface, command set, and feature set of the PCIe architecture SSD. The device controller then sends back device information about the storage device to the host driver. Device information can include the size of the storage device unit, such as the size of the flash memory page and block, the type of flash memory, the fastest transfer speed, and so on. According to the device information, the host driver can provide an address to prepare the command to the device controller. The device controller can read the command for the address and execute it.

如上所述,因為主機的驅動程式能分割命令為數個(至少二個)子命令,以便設備控制器能從不同位址讀取子命令,並於單個處理器不同的作業程序(task)或是多個處理器執行之。這是可行的,但沒有實現它具體可行的方法。本發明揭露關於前述需求的解決方案。 As mentioned above, because the host driver can split the command into several (at least two) subcommands, so that the device controller can read the subcommands from different addresses, and on a single processor different task (task) or Multiple processors execute it. This is feasible, but there is no way to achieve it. The present invention discloses a solution to the aforementioned needs.

本段文字提取和編譯本發明的某些特點。其它特點將被揭露於後續段落中。其目的在涵蓋附加的申請專利範圍之精神和範圍中,各式的修改和類似的排列。 This paragraph of text extracts and compiles certain features of the present invention. Other features will be revealed in subsequent paragraphs. The intention is to cover various modifications and similar arrangements in the spirit and scope of the appended claims.

為了滿足上述需求,本發明提供之用於由主機到設備控制器傳輸命令的方法包含步驟:A.決定一區段大小;B.分割一命令為數個分段,每一分段具有的大小與該區段大小相 同;C.依序分佈該些分段至n群中,如果最後一個分段小於一個區段則補齊至一區段大小;D.如果分佈循環結束而仍有餘留分段待分佈,則繼續維持步驟C中相同的分佈順序;E.在所有分段分佈後,重建每一群的分段為一子命令;及F.同步提供該些子命令到一設備控制器。 In order to meet the above requirements, the method provided by the present invention for transmitting commands from a host to a device controller includes the steps of: A. determining a segment size; B. dividing a command into a plurality of segments, each segment having a size and The size of the section C. sequentially distribute the segments into the n-group, and if the last segment is smaller than one segment, fill up to a segment size; D. if the distribution cycle ends and there are remaining segments to be distributed, then Continue to maintain the same distribution order in step C; E. After all the segmentation distributions, reconstruct the segmentation of each group into a subcommand; and F. Synchronize to provide the subcommands to a device controller.

依照該方法,一命令最後分割的分段的大小必須與該區段大小相同。該區段大小可與一非揮發性記憶體晶片的一頁或是多頁相同。n為正整數且可大於等於2,n亦可為由該設備控制器所能同步取得並執行的子命令的最大數目。該些子命令提供方法為發送一主機中子命令位址到設備控制器而取得。如果非揮發性記憶體高速規範用於命令傳輸,該些位址可為提交佇列。 According to this method, the size of the segment that is finally divided by a command must be the same size as the segment. The segment size can be the same as one or more pages of a non-volatile memory chip. n is a positive integer and may be greater than or equal to 2, n may also be the maximum number of sub-commands that can be synchronously acquired and executed by the device controller. The subcommand providing methods are obtained by sending a host neutron command address to the device controller. If the non-volatile memory high speed specification is used for command transmission, the addresses may be submitted queues.

本發明的另一種態樣是使用前述方法的系統,該系統包含:一主機,安裝一驅動程式,具有一記憶體,用以儲存命令子命令,其中該驅動程式用以決定一區段大小;分割一命令為複數個分段,每一分段具有的大小與該區段大小相同;依序分佈該些分段至n群中;如果分佈循環結束而仍有餘留分段待分佈,則補齊至一區段大小如果該區塊小於一區段;在所有分段分佈於該記憶體後,重建每一群中該些分段為一子命令;及同步提供該些子命令;及一儲存設備,遠距或近端連接到該主機,用於儲存資料供存取,包含:數個非揮發性 記憶體晶片;及一設備控制器,連接到該主機,用以同步自一命令取得該些子命令及執行該些子命令。 Another aspect of the present invention is a system using the foregoing method, the system comprising: a host, a driver installed, and a memory for storing command subcommands, wherein the driver is used to determine a segment size; The split command is a plurality of segments, each segment having the same size as the segment; the segments are sequentially distributed to the n groups; if the distribution loop ends and there are remaining segments to be distributed, then If the block is smaller than a segment; after all the segments are distributed in the memory, the segments in each group are reconstructed into a sub-command; and the sub-commands are provided synchronously; and a storage The device is connected to the host remotely or proximally for storing data for access, including: several non-volatile a memory chip; and a device controller connected to the host for synchronizing the sub-commands from the command and executing the sub-commands.

依照本發明,一命令最後分割的分段的大小必須與該區段大小相同。該區段大小可與該些非揮發性記憶體晶片的一頁或多頁相同。N可為整數且大於等於2,n亦可為由該設備控制器所能同步取得並執行的子命令的最大數目。該些子命令提供方法為發送該主機中子命令位址到設備控制器而取得。如果非揮發性記憶體高速規範用於命令傳輸,該些位址為提交佇列。該設備控制器與驅動程式設定同步執行來自一命令的所有子命令以便該設備控制器能在該些子命令執行之後反饋該主機。 In accordance with the present invention, the size of the segment that was last divided by a command must be the same size as the segment. The segment size can be the same as one or more pages of the non-volatile memory chips. N can be an integer and greater than or equal to 2, and n can also be the maximum number of subcommands that can be synchronously acquired and executed by the device controller. The subcommand providing methods are obtained by sending the subcommand address in the host to the device controller. If the non-volatile memory high-speed specification is used for command transmission, the addresses are the commit queue. The device controller executes all subcommands from a command in synchronization with the driver settings so that the device controller can feed back the host after the subcommands are executed.

本發明利用子命令大小較小及同步執行設備控制器中作業程序或多個處理器的優點,執行該些子命令的時間短於執行原始命令的時間,儲存被存取的整體表現可以提升。 The present invention utilizes the advantages of a small sub-command size and synchronous execution of an operating program or a plurality of processors in the device controller. The execution time of the sub-commands is shorter than the time at which the original commands are executed, and the overall performance of the stored access can be improved.

10‧‧‧系統 10‧‧‧System

100‧‧‧主機 100‧‧‧Host

110‧‧‧中央處理單元 110‧‧‧Central Processing Unit

115‧‧‧驅動程式 115‧‧‧Driver

120‧‧‧RAM模組 120‧‧‧RAM module

130‧‧‧PCIe控制器 130‧‧‧PCIe controller

200‧‧‧儲存設備 200‧‧‧Storage equipment

210‧‧‧設備控制器 210‧‧‧Device Controller

220‧‧‧揮發性記憶體單元 220‧‧‧ volatile memory unit

230‧‧‧非揮發性記憶體晶片 230‧‧‧ Non-volatile memory chips

300‧‧‧PCIe總線 300‧‧‧PCIe bus

第1圖繪示一命令傳輸的相關前案。 Figure 1 shows a related pre-transmission of a command transmission.

第2圖為依照本發明一種用於由主機到設備控制器傳輸命令的方法的流程圖。 2 is a flow chart of a method for transmitting commands from a host to a device controller in accordance with the present invention.

第3圖繪示使用該方法的一系統。 Figure 3 depicts a system using this method.

第4圖顯示一RAM模組中的資料結構。 Figure 4 shows the data structure in a RAM module.

第5圖顯示一命令如何被分割。 Figure 5 shows how a command is split.

第6圖顯示二個形成的子命令。 Figure 6 shows the two subcommands formed.

第7圖顯示另一個命令如何被分割。 Figure 7 shows how another command is split.

第8圖顯示三個形成的子命令。 Figure 8 shows the three subcommands formed.

本發明將藉由參照下列的實施方式而更具體地描述。 The invention will be more specifically described by reference to the following embodiments.

請參閱第2圖,第2圖為依照本發明一種用於由主機到設備控制器傳輸命令的方法的流程圖。該方法可藉由一系統來實現,該系統具有主機與設備控制器,用來執行讀寫命令到設備控制器管理的儲存設備中。要注意的是該系統可以指的是個人電腦、平板電腦、智慧型手機或用於特殊作業的獨立電子設備,如控制器車設備的車用電腦,主機與儲存設備整合為一體。該系統也可具有主機與可拆卸地連接的儲存設備。舉例來說,數位相機中的中央處理單元(Central Processing Unit)與該中央處理單元經由連接器間接連接的記憶卡。此外,本發明提及的系統也可以指的是客戶端電腦與遠端資料中心的雲端儲存設備(虛擬或實體)。讀寫命令可經由區域網路(Local Area Network)或網際網路傳送與接收。處理命令傳輸的方式對所有應用的態樣都一樣。一實施例將在下方利用本地應用來說明。 Please refer to FIG. 2. FIG. 2 is a flow chart of a method for transmitting commands from a host to a device controller in accordance with the present invention. The method can be implemented by a system having a host and a device controller for executing read and write commands to a storage device managed by the device controller. It should be noted that the system can refer to a personal computer, a tablet computer, a smart phone or a stand-alone electronic device for special operations, such as a car computer for a controller car device, and a host computer and a storage device are integrated. The system can also have a host and a detachably connected storage device. For example, a central processing unit in a digital camera and a memory card indirectly connected to the central processing unit via a connector. In addition, the system referred to in the present invention may also refer to a cloud storage device (virtual or physical) of a client computer and a remote data center. Read and write commands can be transmitted and received via the Local Area Network or the Internet. The way in which command transmissions are handled is the same for all applications. An embodiment will be described below using a local application.

第3圖顯示一系統10,其具有應用本發明揭露方法的一主機100與一儲存設備200。主機100與儲存設備200設置於 一機殼(未繪示)中並經由一PCI(Peripheral Component Interconnect)express(PCIe)總線300連接。主機100具有一中央處理單元110、一RAM模組120與一PCIe控制器130,它也可能具有其它未於本發明範圍內的電子元件或設備,因此,不對該些電子元件或設備進行進一步說明。主機100安裝一驅動程式115,該驅動程式115在中央處理單元100上電後啟動運作。驅動程式115的主要功能包括:決定一區段大小;分割一命令為數個分段,每一分段具有的大小與該區段大小相同;依序分佈該些分段至n群中;如果分佈循環結束而仍有餘留分段待分佈,則補齊至一區段大小如果該區塊小於一區段;在所有分段分佈於記憶體後,重建每一群的分段為一子命令;及同步提供該些子命令到一設備控制器。每一功能的細節將於後說明。RAM模組120用來儲存命令與子命令。PCIe控制器130負責與一設備控制器210,透過PCIe總線300通聯。 Figure 3 shows a system 10 having a host 100 and a storage device 200 to which the disclosed method of the present invention is applied. The host 100 and the storage device 200 are disposed on A casing (not shown) is connected via a PCI (Peripheral Component Interconnect) express (PCIe) bus 300. The host 100 has a central processing unit 110, a RAM module 120, and a PCIe controller 130. It may also have other electronic components or devices that are not within the scope of the present invention. Therefore, the electronic components or devices are not further described. . The host 100 installs a driver 115 that is activated after the central processing unit 100 is powered on. The main functions of the driver 115 include: determining a segment size; dividing a command into a plurality of segments, each segment having the same size as the segment; sequentially distributing the segments to the n group; if distributed If the loop ends and there are still remaining segments to be distributed, then the size is added to a segment if the block is smaller than a segment; after all segments are distributed in the memory, the segment of each cluster is reconstructed as a subcommand; Synchronize the subcommands to a device controller. The details of each function will be explained later. The RAM module 120 is used to store commands and subcommands. The PCIe controller 130 is responsible for communicating with a device controller 210 via the PCIe bus 300.

儲存設備200於本地端連接到主機100,用以儲存資料於機殼內供存取。當然,如上所述,在其它實施例中,儲存設備200可遠端將由網際網路連接到主機100。依照本發明,儲存設備200應為非揮發性記憶體型儲存設備,諸如SSD或eMMC。因而,儲存設備200可具有數個非揮發性記憶體晶片230,用以儲存資料。實作上,每一非揮發性記憶體晶片230可以是NAND快閃記憶體晶片、NOR快閃記憶體晶片,或電荷缺陷儲存式快閃記憶體晶片。儲存設備200也具有一揮發性記 憶體單元220,如一動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)模組。揮發性記憶體單元220能用來暫時保存某些來自主機100,用於執行命令的重要資料。舉例來說,揮發性記憶體單元220可具有用於映射實體位址與對應邏輯位址的映射表以供存取作業執行。儲存設備200具有設備控制器210。儲存設備200利用設備控制器210,經由PCIe總線300以連接至主機100。設備控制器210能同步取得由一命令產生的子命令並執行該些子命令。以下為說明系統10如何由揭露的方法所運作的一例子。 The storage device 200 is connected to the host 100 at the local end for storing data in the casing for access. Of course, as noted above, in other embodiments, storage device 200 can be remotely connected to host 100 by the Internet. In accordance with the present invention, storage device 200 should be a non-volatile memory type storage device such as an SSD or eMMC. Thus, storage device 200 can have a plurality of non-volatile memory chips 230 for storing data. In practice, each non-volatile memory chip 230 can be a NAND flash memory chip, a NOR flash memory chip, or a charge-defect storage flash memory chip. The storage device 200 also has a volatile record The memory unit 220 is a dynamic random access memory (DRAM) module. The volatile memory unit 220 can be used to temporarily store certain important data from the host 100 for executing commands. For example, volatile memory unit 220 can have a mapping table for mapping physical addresses and corresponding logical addresses for access to job execution. The storage device 200 has a device controller 210. The storage device 200 is connected to the host 100 via the PCIe bus 300 using the device controller 210. The device controller 210 can synchronously acquire the sub-commands generated by a command and execute the sub-commands. The following is an example of how the system 10 operates by the disclosed method.

要強調的是本發明提供的方法是由驅動程式115與設備控制器210所實現。如果本發明進行商業化,驅動程式115應該與設備控制器210同時販售,不然系統10無法工作。依照該方法,一第一步驟為決定一區段大小(S01)。區段大小為一命令(讀取或寫入)分割的單元大小,區段大小建議相同於非揮發性記憶體晶片230的頁(page)或多頁的大小。常用的頁大小為4kB,本實施例使用4kB為區段大小。區段大小由驅動程式115設定。 It is emphasized that the method provided by the present invention is implemented by the driver 115 and the device controller 210. If the invention is commercialized, the driver 115 should be sold at the same time as the device controller 210, otherwise the system 10 will not work. According to the method, a first step is to determine a segment size (S01). The extent size is a commanded (read or write) split unit size, which is the same as the size of the page or pages of the non-volatile memory chip 230. The commonly used page size is 4kB, and this embodiment uses 4kB as the segment size. The extent size is set by the driver 115.

第二步驟為分割一命令為數個分段,每一分段具有的大小與該區段大小相同(S02)。為了能有較佳的理解,請見第5圖,該圖顯示一命令如何被分割。一命令1具有18kB的大小,佔據RAM模組120中0到17的位址。因為區段大小為4kB,由命令1分割的4個位址中的資料形成分段:一第一分段(從0 到3)、一第二分段(從4到7)、一第三分段(從8到11)、一第四分段(從12到15)與一第五分段(從16到17)。。在多數情形下,一命令最後分割的分段(如第五分段)大小可能小於該區段大小,所以將第五分段補齊到4kB。 The second step is to divide a command into a plurality of segments, each segment having the same size as the segment (S02). For a better understanding, see Figure 5, which shows how a command is split. A command 1 has a size of 18 kB and occupies an address of 0 to 17 in the RAM module 120. Since the extent size is 4kB, the data in the 4 addresses divided by the command 1 form a segment: a first segment (from 0) To 3), a second segment (from 4 to 7), a third segment (from 8 to 11), a fourth segment (from 12 to 15) and a fifth segment (from 16 to 17) ). . In most cases, the size of the last segment (eg, the fifth segment) of a command may be smaller than the segment size, so the fifth segment is padded to 4kB.

接著,依序分佈該些分段至n群中(S03)。如第6圖所示的分布結果,n設為2以便形成兩群。第一分段分佈到第一群,接著第二分段分佈到第二群。如果分佈循環結束而還有分段餘留待分佈,就維持步驟S03中相同的分佈順序(S04)。第三分段分佈到第一群,第四分段分佈到第二群且最終第五分段分佈到第一群。第一群依序具有第一分段、第三分段與第五分段。第二群依序具有第二分段與第四分段。分佈的結果顯示於第6圖中。 Then, the segments are sequentially distributed to the n group (S03). As a result of the distribution shown in Fig. 6, n is set to 2 to form two groups. The first segment is distributed to the first group, and then the second segment is distributed to the second group. If the distribution loop ends and there is still a segment remaining to be distributed, the same distribution order in step S03 is maintained (S04). The third segment is distributed to the first group, the fourth segment is distributed to the second group, and finally the fifth segment is distributed to the first group. The first group has a first segment, a third segment and a fifth segment in sequence. The second group has a second segment and a fourth segment in sequence. The results of the distribution are shown in Figure 6.

下一個步驟為在所有分段分佈後,重建每一群的分段為一子命令(S05)。如第6圖所示,上方顯示的第一群重建為一子命令1,下方顯示的第二群重建為一子命令2。 The next step is to reconstruct the segment of each group into a subcommand after all the segments are distributed (S05). As shown in Fig. 6, the first group displayed above is reconstructed as a sub-command 1, and the second group shown below is reconstructed as a sub-command 2.

該方法最後的步驟為同步提供該些子命令(子命令1與子命令2)到設備控制器210(S06),這意味子命令1與子命令2不應為設備控制器210分別取得因為它們同屬一命令。子命令應佇列於RAM模組120中。請見第4圖。第4圖顯示RAM模組120中的資料結構。二命令C1與C2依照中央處理單元110原定計畫而佇列。在驅動程式115處理後,命令C1分割為子命令SC1-1與SC1-2。命令C2分割為子命令SC2-1與SC2-2。依照非 揮發性記憶體高速規範,子命令SC1-1、SC1-2、SC2-1與SC2-2視為各別的提交佇列。接著,子命令的提供方法為藉由主機100中子命令的發送位址(RAM模組120)給設備控制器210而取得。因非揮發性記憶體高速規範用於命令傳輸,該些位址在本例中為提交佇列。 The final step of the method is to provide the subcommands (subcommand 1 and subcommand 2) to the device controller 210 (S06), which means that subcommand 1 and subcommand 2 should not be acquired separately for the device controller 210 because they The same as a command. The subcommands should be listed in the RAM module 120. Please see figure 4. FIG. 4 shows the data structure in the RAM module 120. The two commands C1 and C2 are queued according to the original plan of the central processing unit 110. After the driver 115 processes, the command C1 is divided into sub-commands SC1-1 and SC1-2. Command C2 is divided into subcommands SC2-1 and SC2-2. According to non Volatile memory high-speed specifications, sub-commands SC1-1, SC1-2, SC2-1, and SC2-2 are considered separate submission queues. Then, the sub-command is provided by the device controller 210 by the transmission address (RAM module 120) of the sub-command in the host 100. Because of the non-volatile memory high-speed specification for command transmission, these addresses are in this case a commit queue.

由步驟S01到步驟S06,所有的步驟能由驅動程式115完成。也就是說,當驅動程式115由步驟S01到步驟S06執行時,所有必要的計算由中央處理單元110執行,相關的資料儲存於RAM模組120中。設備控制器210與驅動程式115必須設定同步執行一命令的子命令,以便設備控制器210在子命令執行之後能反饋主機100。同時,在運作過程中,區段大小與數字n對設備控制器21與驅動程式115來說應該是相同的。 From step S01 to step S06, all the steps can be completed by the driver 115. That is, when the driver 115 is executed from step S01 to step S06, all necessary calculations are performed by the central processing unit 110, and the related data is stored in the RAM module 120. The device controller 210 and the driver 115 must set a subcommand to execute a command in synchronization so that the device controller 210 can feed back the host 100 after the subcommand is executed. At the same time, the segment size and the number n should be the same for the device controller 21 and the driver 115 during operation.

依照本發明,n為由該設備控制器210所能同步取得並執行的子命令的最大數目。如果設備控制器210能同步處理2個命令,n為2;如果設備控制器210同步處理4個命令,n為4;以此類推。最後,n應為大於或等於2的正整數。在本實施例中,使用n=2。在接下來的實施例中,一個例子顯示本方法如何應用在n為3的情況。 In accordance with the present invention, n is the maximum number of subcommands that can be synchronously retrieved and executed by the device controller 210. If device controller 210 can process 2 commands synchronously, n is 2; if device controller 210 processes 4 commands synchronously, n is 4; and so on. Finally, n should be a positive integer greater than or equal to 2. In the present embodiment, n = 2 is used. In the following embodiments, an example shows how the method is applied when n is 3.

請見第7圖與第8圖。第8圖顯示一命令分割形成3個子命令,第7圖顯示分段分佈的結果。命令2具有19kB的大小,佔據RAM模組120從0到18的位址。在步驟S01中,區段大小決定為3kB,而非前個實施例中的4kB。接著,在步驟S02中,命 令2分割為7個分段:一第一分段(從0到2)、一第二分段(從3到5)、一第三分段(從6到8)、一第四分段(從9到11)、一第五分段(從12到14)、一第六分段(從5到17)與一第七分段(18)。由於第七分段為最後分段且小於區段大小,所以需要補滿一個區段大小(從18到20)。 See Figure 7 and Figure 8. Figure 8 shows a command splitting to form three subcommands, and Fig. 7 shows the results of the segmentation distribution. Command 2 has a size of 19kB and occupies an address from 0 to 18 of RAM module 120. In step S01, the extent size is determined to be 3kB instead of 4kB in the previous embodiment. Next, in step S02, the life Divide 2 into 7 segments: a first segment (from 0 to 2), a second segment (from 3 to 5), a third segment (from 6 to 8), and a fourth segment. (from 9 to 11), a fifth segment (from 12 to 14), a sixth segment (from 5 to 17) and a seventh segment (18). Since the seventh segment is the last segment and is smaller than the segment size, it is necessary to fill a segment size (from 18 to 20).

接著,在步驟S03中,命令依序分佈到3群中:一第一群,一第二群與一第三群。第一分段分佈到第一群,第二分段分佈到第二群,第三分段分佈到第三群。在分佈循環結束後,維持步驟S03中相同的分佈順序於第一循環後的所有分佈。第四分段分佈到第一群,第五分段分佈到第二群,第六分段分佈到第三群及最後第七分段分佈到第一群。第一群依序具有第一分段、第四分段與第七分段。第二群依序具有第二分段與第五分段。第三群依序具有第三分段與第六分段。 Next, in step S03, the commands are sequentially distributed to the three groups: a first group, a second group, and a third group. The first segment is distributed to the first group, the second segment is distributed to the second group, and the third segment is distributed to the third group. After the end of the distribution cycle, the same distribution order in step S03 is maintained for all distributions after the first cycle. The fourth segment is distributed to the first group, the fifth segment is distributed to the second group, and the sixth segment is distributed to the third group and the last seventh segment is distributed to the first group. The first group has a first segment, a fourth segment and a seventh segment in sequence. The second group has a second segment and a fifth segment in sequence. The third group has a third segment and a sixth segment in sequence.

在步驟S05重建步驟之後,於第8圖中,第一群重建為一子命令,第二群重建為一子命令2,第三群重建為一子命令3。3個子命令由設備控制器210取得,因而可能要3個作業程序同步運作該3個子命令,以便原來的命令能依此更快速地執行。 After the step of reconstructing in step S05, in FIG. 8, the first group is reconstructed into a subcommand, the second group is reconstructed as a subcommand 2, and the third group is reconstructed as a subcommand 3. The three subcommands are controlled by the device controller 210. Acquired, so it may be necessary for three operating programs to simultaneously operate the three subcommands so that the original commands can be executed more quickly.

要強調的是雖然上述實施例使用非揮發性記憶體高速規範,然而,實作上,本發明能應用其它的規範,該些規範允許多個命令收發於主機與設備控制器之間。舉例來說,通用快閃儲存設備(Universal Flash Storage)規範。 It is emphasized that while the above embodiments use a non-volatile memory high speed specification, in practice, the present invention can apply other specifications that allow multiple commands to be transceived between the host and the device controller. For example, the Universal Flash Storage specification.

雖然本發明已以實施方式揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the invention, and those skilled in the art can make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.

Claims (15)

一種由主機到設備控制器傳輸命令的方法,包含步驟:A.決定一區段大小;B.分割一命令為複數個分段,每一分段具有的大小與該區段大小相同;C.依序分佈該些分段至n群中,如果最後一個分段小於一個區段則補齊至一區段大小;D.如果分佈循環結束而仍有餘留分段待分佈,則繼續維持步驟C中相同的分佈順序;E.在所有分段分佈後,重建每一群的分段為一子命令;及F.同步提供該些子命令到一設備控制器。 A method for transmitting a command from a host to a device controller, comprising the steps of: A. determining a segment size; B. dividing a command into a plurality of segments, each segment having a size equal to the segment size; C. The segments are sequentially distributed to the n-group, and if the last segment is smaller than one segment, it is added to a segment size; D. If the distribution cycle ends and there are remaining segments to be distributed, continue to maintain step C. The same distribution order; E. After all the segments are distributed, the segments of each group are reconstructed into a sub-command; and F. Synchronously provides the sub-commands to a device controller. 如申請專利範圍第1項所述的方法,其中一命令最後分割的分段的大小與該區段大小相同。 The method of claim 1, wherein a segment of the last segment of the command is the same size as the segment. 如申請專利範圍第1項所述的方法,其中該區段大小與一非揮發性記憶體晶片的一頁或是多頁相同。 The method of claim 1, wherein the segment size is the same as one or more pages of a non-volatile memory chip. 如申請專利範圍第1項所述的方法,其中n為正整數且大於等於2。 The method of claim 1, wherein n is a positive integer and greater than or equal to 2. 如申請專利範圍第4項所述的方法,其中n為由該設備控制器所能同步取得並執行的子命令的最大數目。 The method of claim 4, wherein n is the maximum number of subcommands that are synchronously fetched and executed by the device controller. 如申請專利範圍第1項所述的方法,其中該些子命令提供方法為發送一主機中子命令位址到設備控制器而取得。 The method of claim 1, wherein the subcommand providing method is obtained by sending a host neutron command address to the device controller. 如申請專利範圍第6項所述的方法,其中如果非揮發性記憶體高速(Non Volatile Memory Express)規範用於命令傳輸,該些位址為提交佇列。 The method of claim 6, wherein if a non-volatile memory (Non Volatile Memory Express) specification is used for command transmission, the addresses are submitted queues. 一系統,包含:一主機,安裝一驅動程式,具有一記憶體,用以儲存命令子命令,其中該驅動程式用以決定一區段大小;分割一命令為複數個分段,每一分段具有的大小與該區段大小相同;依序分佈該些分段至n群中;如果分佈循環結束而仍有餘留分段待分佈,則補齊至一區段大小如果該區塊小於一區段;在所有分段分佈於該記憶體後,重建每一群中該些分段為一子命令;及同步提供該些子命令;及一儲存設備,遠距或近端連接到該主機,用於儲存資料供存取,包含:複數個非揮發性記憶體晶片;及一設備控制器,連接到該主機,用以同步自一命令取得該些子命令及執行該些子命令。 A system comprising: a host, a driver installed, a memory for storing command subcommands, wherein the driver is used to determine a segment size; and a command is divided into a plurality of segments, each segment The size of the segment is the same as the size of the segment; the segments are sequentially distributed to the n group; if the distribution loop ends and there are still remaining segments to be distributed, the segment is added to a segment size if the block is smaller than a region a segment; after all the segments are distributed in the memory, reconstructing the segments in each group as a subcommand; and providing the subcommands in synchronization; and a storage device, connecting the remote or near end to the host, For storing data for access, comprising: a plurality of non-volatile memory chips; and a device controller connected to the host for synchronizing obtaining the sub-commands from a command and executing the sub-commands. 如申請專利範圍第8項所述的系統,其中一命令最後分割的分段的大小與該區段大小相同或較小。 The system of claim 8, wherein the size of the last segment of the command is the same as or smaller than the size of the segment. 如申請專利範圍第8項所述的系統,其中該區段大小與該些非揮發性記憶體晶片的一頁相同。 The system of claim 8 wherein the segment size is the same as a page of the non-volatile memory wafers. 如申請專利範圍第8項所述的系統,其中n為整數且大於等 於2。 The system of claim 8 wherein n is an integer and greater than At 2. 如申請專利範圍第11項所述的系統,其中n為由該設備控制器所能同步取得並執行的子命令的最大數目。 The system of claim 11, wherein n is the maximum number of subcommands that can be synchronously acquired and executed by the device controller. 如申請專利範圍第8項所述的系統,其中該些子命令提供方法為發送該主機中子命令位址到設備控制器而取得。 The system of claim 8, wherein the sub-command providing method is obtained by sending the sub-command address of the host to the device controller. 如申請專利範圍第13項所述的系統,其中如果非揮發性記憶體高速規範用於命令傳輸,該些位址為提交佇列。 The system of claim 13, wherein if the non-volatile memory high speed specification is used for command transmission, the addresses are submitted queues. 如申請專利範圍第8項所述的系統,其中該設備控制器與驅動程式設定同步執行來自一命令的所有子命令以便該設備控制器能在該些子命令執行之後反饋該主機。 The system of claim 8 wherein the device controller executes all subcommands from a command in synchronization with the driver settings so that the device controller can feed back the host after the subcommands are executed.
TW105125784A 2016-08-12 2016-08-12 Method for transferring command from host to device controller and system using the same TWI625628B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105125784A TWI625628B (en) 2016-08-12 2016-08-12 Method for transferring command from host to device controller and system using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105125784A TWI625628B (en) 2016-08-12 2016-08-12 Method for transferring command from host to device controller and system using the same

Publications (2)

Publication Number Publication Date
TW201805820A true TW201805820A (en) 2018-02-16
TWI625628B TWI625628B (en) 2018-06-01

Family

ID=62014360

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105125784A TWI625628B (en) 2016-08-12 2016-08-12 Method for transferring command from host to device controller and system using the same

Country Status (1)

Country Link
TW (1) TWI625628B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111326161A (en) * 2020-02-26 2020-06-23 北京声智科技有限公司 Voiceprint determination method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4391548B2 (en) * 2007-04-20 2009-12-24 株式会社メディアロジック Device driver
JP5066209B2 (en) * 2010-03-18 2012-11-07 株式会社東芝 Controller, data storage device, and program
EP2862062B1 (en) * 2012-06-15 2024-03-06 Intel Corporation A virtual load store queue having a dynamic dispatch window with a distributed structure
KR101818967B1 (en) * 2012-06-15 2018-01-16 인텔 코포레이션 A disambiguation-free out of order load store queue

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111326161A (en) * 2020-02-26 2020-06-23 北京声智科技有限公司 Voiceprint determination method and device
CN111326161B (en) * 2020-02-26 2023-06-30 北京声智科技有限公司 Voiceprint determining method and device

Also Published As

Publication number Publication date
TWI625628B (en) 2018-06-01

Similar Documents

Publication Publication Date Title
US9678666B2 (en) Techniques to configure a solid state drive to operate in a storage mode or a memory mode
TWI610187B (en) Methods and systems for autonomous memory searching
CN107430566B (en) Direct memory access descriptor handling
US9607120B2 (en) Implementing system irritator accelerator FPGA unit (AFU) residing behind a coherent attached processors interface (CAPI) unit
US10339079B2 (en) System and method of interleaving data retrieved from first and second buffers
CN104951252A (en) Data access method and PCIe storage devices
TWI636366B (en) Processing method and computer system of data redundancy
CN111831220B (en) Apparatus, method and memory module for memory write operations
EP3223162B1 (en) Configurable on-chip interconnection system and method and apparatus for implementing same, and storage medium
US10592113B2 (en) Method for transferring command from host to device controller and system using the same
US10318474B1 (en) Data storage system with heterogenous parallel processors
TW202011203A (en) Command processing method and storage controller using the same
CN108628760B (en) Method and device for atomic write command
US20170047119A1 (en) Data Storage Method, Storage Apparatus, and Computing Device
TWI625628B (en) Method for transferring command from host to device controller and system using the same
US10168937B2 (en) Storage space allocation
US20180364946A1 (en) Data storage device
EP2620876A1 (en) Method and apparatus for data processing, pci-e bus system and server
US20150278299A1 (en) External merge sort method and device, and distributed processing device for external merge sort
CN108628761B (en) Atomic command execution method and device
TWI474254B (en) Method and apparatus for executing commands in a memory system and data storage system
US20160378402A1 (en) Apparatus, System, and Method of Look-Ahead Address Scheduling and Autonomous Broadcasting Operation to Non-Volatile Storage Memory
US10108340B2 (en) Method and system for a common processing framework for memory device controllers
US9965193B2 (en) Apparatus, system, and method of sequencing, shadowing, and queuing operations in a non-volatile storage memory
WO2022063273A1 (en) Resource allocation method and apparatus based on numa attribute

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees