TWI587141B - Storage device and data access method thereof - Google Patents
Storage device and data access method thereof Download PDFInfo
- Publication number
- TWI587141B TWI587141B TW105108937A TW105108937A TWI587141B TW I587141 B TWI587141 B TW I587141B TW 105108937 A TW105108937 A TW 105108937A TW 105108937 A TW105108937 A TW 105108937A TW I587141 B TWI587141 B TW I587141B
- Authority
- TW
- Taiwan
- Prior art keywords
- task
- state
- tasks
- processor
- specific
- Prior art date
Links
Landscapes
- Memory System (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本發明係有關於一種記憶裝置,特別是有關於一種根據一狀態表裡的讀取狀態進行讀取操作的記憶裝置。 The present invention relates to a memory device, and more particularly to a memory device for performing a read operation based on a read state in a state table.
一般而言,記憶體可分為揮發性記憶體與非揮發性記憶體。非揮發性記憶體在無電源供應的情況下亦可保持其所儲存的資料,而揮發性記憶體僅僅在有電源供應的情況下才可保持其所儲存的資料。記憶體通常係配置於一記憶裝置中,用以為主機儲存資料。舉例來說,一記憶裝置通常具有一個處理器及一至多個記憶體。記憶裝置之記憶體係單純供儲存資料,而記憶裝置之處理器係依據主機之命令而為主機存取記憶體中之資料。 In general, memory can be divided into volatile memory and non-volatile memory. Non-volatile memory retains its stored data without a power supply, while volatile memory retains its stored data only when there is a power supply. The memory is usually arranged in a memory device for storing data for the host. For example, a memory device typically has a processor and one or more memories. The memory system of the memory device is purely for storing data, and the processor of the memory device accesses the data in the memory for the host according to the command of the host.
本發明提供一種記憶裝置,包括複數非揮發性記憶體、一揮發性記憶體以及一處理器。揮發性記憶體具有一命令佇列。處理器透過複數通道讀取非揮發性記憶體,並根據命令佇列裡的至少一命令產生一狀態表。狀態表記錄複數任務以及每一任務的一讀取狀態及一通道編號。處理器挑選該等任務中之多個特定任務作為一第一任務集合,並同時執行第一任務集合中的所有任務。第一任務集合裡的所有任務的通道編號均不相同。當第一任務集合中之一第一任務的讀取狀態為一第一 預設狀態時,處理器讀取非揮發性記憶體之一者,用以讀取關聯於第一任務的邏輯位址的一邏輯至實體轉換表。當第一任務的讀取狀態為一第二預設狀態時,處理器讀取非揮發性記憶體之一者,用以讀取關聯於第一任務的邏輯位址的資料。 The invention provides a memory device comprising a plurality of non-volatile memories, a volatile memory and a processor. Volatile memory has a command queue. The processor reads the non-volatile memory through the plurality of channels and generates a state table according to at least one command in the command queue. The status table records the complex tasks and a read status and a channel number for each task. The processor picks a plurality of specific tasks in the tasks as a first set of tasks and simultaneously executes all of the tasks in the first set of tasks. The channel numbers of all tasks in the first task set are different. When the read status of the first task in one of the first task sets is a first In the preset state, the processor reads one of the non-volatile memories to read a logical-to-entity conversion table associated with the logical address of the first task. When the read status of the first task is a second preset state, the processor reads one of the non-volatile memory to read the data associated with the logical address of the first task.
本發明另揭露一種資料讀取方法,適用於一記憶裝置。記憶裝置包括複數非揮發性記憶體以及一處理器。處理器透過複數通道讀取非揮發性記憶體。本發明之資料讀取方法包括,根據一命令佇列裡的至少一命令產生一狀態表,該狀態表記錄複數任務、每一任務的一讀取狀態及一通道編號;挑選多個任務作為一第一任務集合,並同時執行第一任務集合中的所有任務,其中第一任務集合裡的所有任務的通道編號均不相同;當該第一任務集合中之一第一任務的讀取狀態為一第一預設狀態時,讀取該等非揮發性記憶體之至少一者,用以讀取關聯於該第一任務的邏輯位址的一邏輯至實體轉換表;當該第一任務的讀取狀態為一第二預設狀態時,讀取該等非揮發性記憶體之至少一者,用以讀取關聯於該第一任務的邏輯位址的資料。 The invention further discloses a data reading method suitable for a memory device. The memory device includes a plurality of non-volatile memories and a processor. The processor reads non-volatile memory through a plurality of channels. The data reading method of the present invention comprises: generating a state table according to at least one command in a command queue, the state table recording a plurality of tasks, a read state of each task, and a channel number; selecting a plurality of tasks as one The first task set, and simultaneously execute all the tasks in the first task set, wherein the channel numbers of all the tasks in the first task set are different; when the read status of the first task in the first task set is Reading, in a first preset state, at least one of the non-volatile memories, for reading a logical-to-entity conversion table associated with the logical address of the first task; when the first task is When the read state is a second preset state, at least one of the non-volatile memories is read to read the data associated with the logical address of the first task.
為讓本發明之特徵和優點能更明顯易懂,下文特舉出較佳實施例,並配合所附圖式,作詳細說明如下: In order to make the features and advantages of the present invention more comprehensible, the preferred embodiments are described below, and are described in detail with reference to the accompanying drawings.
100‧‧‧存取系統 100‧‧‧Access system
110‧‧‧主機裝置 110‧‧‧Host device
120‧‧‧記憶裝置 120‧‧‧ memory device
130‧‧‧處理器 130‧‧‧Processor
140‧‧‧揮發性記憶體 140‧‧‧ volatile memory
150‧‧‧非揮發性記憶單元 150‧‧‧Non-volatile memory unit
141~143‧‧‧區塊 141~143‧‧‧ Block
160_1~160_4‧‧‧通道 160_1~160_4‧‧‧ channel
150_1~150_4‧‧‧非揮發性記憶體 150_1~150_4‧‧‧Non-volatile memory
S511~S515‧‧‧步驟 S511~S515‧‧‧Steps
第1圖為本發明之存取系統之示意圖。 Figure 1 is a schematic illustration of an access system of the present invention.
第2圖為本發明之初始化後的狀態表之示意圖。 Figure 2 is a schematic diagram of the state table after initialization of the present invention.
第3圖為本發明之更新後的狀態表示意圖。 Figure 3 is a schematic diagram of the updated state table of the present invention.
第4圖為本發明之更新後的另一狀態表示意圖。 Figure 4 is a schematic diagram of another state table after updating of the present invention.
第5圖為本發明之資料讀取方法的一流程圖。 Fig. 5 is a flow chart showing a method of reading data according to the present invention.
第1圖為本發明之存取系統之示意圖。如圖所示,存取系統100包括一主機裝置110以及一記憶裝置120。當主機裝置110發送寫入命令時,記憶裝置120根據寫入命令儲存資料。當主機裝置110發出讀取命令時,記憶裝置120根據讀取命令提供資料予主機裝置110。在本實施例中,記憶裝置120包括一處理器130、一揮發性記憶體140以及一非揮發性記憶單元150。 Figure 1 is a schematic illustration of an access system of the present invention. As shown, the access system 100 includes a host device 110 and a memory device 120. When the host device 110 transmits a write command, the memory device 120 stores the data according to the write command. When the host device 110 issues a read command, the memory device 120 provides the data to the host device 110 in accordance with the read command. In this embodiment, the memory device 120 includes a processor 130, a volatile memory 140, and a non-volatile memory unit 150.
處理器130接收來自主機裝置110的多個命令,並將該等命令依序儲存在揮發性記憶體140的一命令佇列(command queue)中。為方便說明,假設揮發性記憶體140的區塊141作為一命令佇列。在本實施例中,處理器130根據該命令佇列裡的至少一命令建立一狀態表。在一可能實施例中,該狀態表係儲存於揮發性記憶體140的區塊142之中,但並非用以限制本發明。在其它實施例中,該狀態表可能儲存於另一記憶體中,如非揮發性記憶單元150或是其它記憶體中。稍後將說明該狀態表所記錄的資訊。 The processor 130 receives a plurality of commands from the host device 110 and sequentially stores the commands in a command queue of the volatile memory 140. For convenience of explanation, it is assumed that the block 141 of the volatile memory 140 serves as a command queue. In this embodiment, the processor 130 establishes a state table according to at least one command in the command queue. In one possible embodiment, the status table is stored in block 142 of volatile memory 140, but is not intended to limit the invention. In other embodiments, the status table may be stored in another memory, such as non-volatile memory unit 150 or other memory. The information recorded in this status table will be explained later.
在一可能實施例中,揮發性記憶體140的區塊143儲存一邏輯至實體轉換表(logical-to-physical address mapping table)。邏輯至實體轉換表包括複數邏輯位址以及該等邏輯位址關聯的複數實體位址。處理器130根據邏輯至實體轉換表得知主機裝置110所提供的邏輯位址(Logical Block Address;LBA)的資料實際儲存於非揮發性記憶單元150的哪個非揮發性記憶 體中。 In one possible embodiment, block 143 of volatile memory 140 stores a logical-to-physical address mapping table. The logical-to-entity conversion table includes complex logical addresses and complex physical addresses associated with the logical addresses. The processor 130 learns, according to the logical-to-physical conversion table, which non-volatile memory of the non-volatile memory unit 150 is actually stored in the logical block address (LBA) provided by the host device 110. In the body.
在一些實施例中,揮發性記憶體140更儲存一轉換位址表,用以指示主機裝置110所提供的邏輯位址所對應的一特定邏輯至實體轉換表係儲存在非揮發性記憶單元150的哪個非揮發性記憶體中。舉例而言,當處理器130從揮發性記憶體140所儲存的一第一邏輯至實體轉換表中找不到主機裝置110所提供的邏輯位址所對應的實體位址時,處理器130改從揮發性記憶體140所儲存的一轉換位址表中,找出主機裝置110所提供的邏輯位址所對應的一第二邏輯至實體轉換表係儲存在非揮發性記憶單元150的哪個非揮發性記憶體中,並將第二邏輯至實體轉換表載入揮發性記憶體140中,再從揮發性記憶體140所儲存的第二邏輯至實體轉換表中找出主機裝置110所提供的邏輯位址所對應的資料係儲存在非揮發性記憶單元150的哪個位置。 In some embodiments, the volatile memory 140 further stores a conversion address table for indicating that a specific logical-to-physical conversion table corresponding to the logical address provided by the host device 110 is stored in the non-volatile memory unit 150. Which non-volatile memory is in it. For example, when the processor 130 cannot find the physical address corresponding to the logical address provided by the host device 110 from a first logic to entity conversion table stored in the volatile memory 140, the processor 130 changes From a conversion address table stored in the volatile memory 140, it is found out which non-volatile memory unit 150 of the second logical-to-physical conversion table corresponding to the logical address provided by the host device 110 is stored. In the volatile memory, the second logical-to-physical conversion table is loaded into the volatile memory 140, and the second logic-to-physical conversion table stored in the volatile memory 140 is used to find the provided by the host device 110. The data corresponding to the logical address is stored in the non-volatile memory unit 150.
揮發性記憶體140可為一動態隨機存取記憶體(Dynamic Random Access Memory;DRAM)或是一靜態隨機存取記憶體(Static Random Access Memory;SDRAM),但並非用以限制本發明。在其它實施例中,揮發性記憶體140可為其它種類的揮發性記憶體。在一可能實施例中,處理器130與揮發性記憶體140可整合成一控制器,用以根據主機裝置110所提供的命令,存取非揮發性記憶單元150。 The volatile memory 140 can be a dynamic random access memory (DRAM) or a static random access memory (SDRAM), but is not intended to limit the present invention. In other embodiments, the volatile memory 140 can be other types of volatile memory. In a possible embodiment, the processor 130 and the volatile memory 140 can be integrated into a controller for accessing the non-volatile memory unit 150 according to commands provided by the host device 110.
非揮發性記憶單元150可為一NAND型快閃記憶體(flash)。如圖所示,非揮發性記憶單元150包括非揮發性記憶體150_1~150_4,但並非用以限制本發明。在其它實施例中, 非揮發性記憶單元150包括其它數量的非揮發性記憶體。在本實施例中,處理器130透過不同通道存取不同的非揮發性記憶體。舉例而言,處理器130透過通道160_1存取非揮發性記憶體150_1,透過通道160_2存取非揮發性記憶體150_2,透過通道160_3存取非揮發性記憶體150_3,以及透過通道160_4存取非揮發性記憶體150_4。在一可能實施例中,非揮發性記憶體150_1~150_4儲存資料以及複數邏輯至實體轉換表。在本實施例中,處理器130讀取並輸出非揮發性記憶體150_1~150_4所儲存的資料予主機裝置110,但不會輸出邏輯至實體轉換表予主機裝置110。 The non-volatile memory unit 150 can be a NAND type flash memory. As shown, the non-volatile memory unit 150 includes non-volatile memory 150_1~150_4, but is not intended to limit the invention. In other embodiments, Non-volatile memory unit 150 includes other quantities of non-volatile memory. In this embodiment, the processor 130 accesses different non-volatile memories through different channels. For example, the processor 130 accesses the non-volatile memory 150_1 through the channel 160_1, the non-volatile memory 150_2 through the channel 160_2, the non-volatile memory 150_3 through the channel 160_3, and the non-volatile memory 150_4 through the channel 160_4. Volatile memory 150_4. In one possible embodiment, the non-volatile memory 150_1~150_4 stores data and a complex logic to entity conversion table. In this embodiment, the processor 130 reads and outputs the data stored in the non-volatile memory 150_1~150_4 to the host device 110, but does not output a logical-to-physical conversion table to the host device 110.
第2圖為本發明之狀態表的示意圖。如圖所示,狀態表記錄複數任務以及每一任務的一讀取狀態及執行該任務所對應的通道編號。為方便說明,第2圖的狀態表僅顯示8項任務,但並非用以限制本發明。在其它實施例中,狀態表記錄其它數量的任務。 Figure 2 is a schematic view of the state table of the present invention. As shown, the status table records the complex tasks and a read status of each task and the channel number corresponding to the task. For convenience of explanation, the state table of FIG. 2 shows only eight tasks, but is not intended to limit the present invention. In other embodiments, the state table records other numbers of tasks.
在一可能實施例中,處理器130係根據揮發性記憶體140的一命令佇列裡的至少一命令得知任務1~8,並根據任務1~8建立一狀態表。處理器130初始化任務1~8的讀取狀態。在本實施例中,處理器130將任務1~8之每一者的讀取狀態初始化成一預設狀態a。由於處理器130尚不知需透過哪個通道存取哪個非揮發性記憶體,因此,任務1~8所對應的通道編號以問號表示。 In a possible embodiment, the processor 130 learns the tasks 1-8 according to at least one command in a command queue of the volatile memory 140, and establishes a state table according to the tasks 1-8. The processor 130 initializes the read status of tasks 1-8. In this embodiment, the processor 130 initializes the read status of each of the tasks 1-8 to a preset state a. Since the processor 130 does not know which channel to access which non-volatile memory, the channel numbers corresponding to tasks 1-8 are indicated by question marks.
接著,處理器130解碼任務1~8,用以取得任務1~8的邏輯位址,並根據任務1~8的邏輯位址以及揮發性記憶體140 所儲存資訊,更新任務1~任務8的讀取狀態以及通道編號。第3圖顯示更新後的狀態表。以任務1為例,假設任務1的邏輯位址並未被記錄於揮發性記憶體140的邏輯至實體轉換表中,因此,處理器130將任務1的讀取狀態由預設狀態a更新為預設狀態b。預設狀態b表示處理器130需先找出任務1的邏輯位址所對應的一邏輯至實體轉換表係儲存在哪個非揮發性記憶體中,再根據找到的邏輯至實體轉換表得知任務1的邏輯位址所對應的資料係儲存在哪個非揮發性記憶體中。 Next, the processor 130 decodes the tasks 1-8 to obtain the logical addresses of the tasks 1-8, and according to the logical addresses of the tasks 1-8 and the volatile memory 140. The stored information updates the read status of task 1 to task 8 and the channel number. Figure 3 shows the updated status table. Taking task 1 as an example, it is assumed that the logical address of task 1 is not recorded in the logical-to-entity conversion table of the volatile memory 140. Therefore, the processor 130 updates the read status of task 1 from the preset state a to Preset state b. The preset state b indicates that the processor 130 first needs to find out in which non-volatile memory a logical-to-physical conversion table corresponding to the logical address of the task 1 is stored, and then learns the task according to the found logical-to-entity conversion table. The data corresponding to the logical address of 1 is stored in which non-volatile memory.
舉例而言,在一讀取期間,處理器130根據揮發性記憶體140所儲存的一轉換位址表,得知任務1的邏輯位址所對應的一特定邏輯至實體轉換表係儲存在非揮發性記憶體150_1中。由於處理器130係透過通道160_1存取非揮發性記憶體150_1,因此,處理器130將任務1所對應的通道編號設定為0。 For example, during a read, the processor 130 learns that a specific logical-to-entity conversion table corresponding to the logical address of the task 1 is stored in the non-transition address table stored in the volatile memory 140. Volatile memory 150_1. Since the processor 130 accesses the non-volatile memory 150_1 through the channel 160_1, the processor 130 sets the channel number corresponding to the task 1 to zero.
請再參考第3圖,假設,任務3的邏輯位址已被記錄於揮發性記憶體140所儲存的邏輯至實體轉換表中。在此例中,處理器130將任務3的讀取狀態設定為預設狀態c。由於任務3的邏輯位置的資料係儲存在非揮發性記憶體150_3中,故處理器130將任務3的通道編號更新為2。在本實施例中,通道編號0~3分別對應通道160_1~160_4。 Referring again to FIG. 3, it is assumed that the logical address of task 3 has been recorded in the logical-to-entity conversion table stored in the volatile memory 140. In this example, the processor 130 sets the read status of task 3 to the preset state c. Since the data of the logical position of task 3 is stored in the non-volatile memory 150_3, the processor 130 updates the channel number of task 3 to 2. In this embodiment, channel numbers 0~3 correspond to channels 160_1~160_4, respectively.
在更新完第2圖的所有任務的讀取狀態以及通道編號後,處理器130從更新後的狀態表(如第3圖所示)中,挑選多個任務作為一第一任務集合,並同時執行第一任務集合裡的所有任務。在本實施例中,第一任務集合裡的所有任務的通道編號均不相同。 After updating the read status and the channel number of all tasks in FIG. 2, the processor 130 selects a plurality of tasks as a first task set from the updated status table (as shown in FIG. 3), and simultaneously Execute all tasks in the first task set. In this embodiment, the channel numbers of all the tasks in the first task set are different.
舉例而言,第3圖所示的任務1-3及8的通道編號均不相同,故處理器130可能挑選第3圖中的任務1-3及8作為一第一任務集合。在此例中,任務1-3及8之至少一者的讀取狀態不同於另一者。在另一可能實施例中,處理器130挑選具有相同的讀取狀態但不同通道編號的任務。舉例而言,處理器130挑選任務1-2及7作為一第一任務集合,或是挑選任務3及8作為一第一任務集合。在其它實施例中,處理器130係根據通道編號挑選任務,用以使通道160_1~160_4皆處於忙錄狀態。換句話說,在每一讀取期間,處理器130透過通道160_1~160_4讀取非揮發性記憶體150_1~150_4。 For example, the channel numbers of tasks 1-3 and 8 shown in FIG. 3 are all different, so the processor 130 may select tasks 1-3 and 8 in FIG. 3 as a first task set. In this example, the read status of at least one of tasks 1-3 and 8 is different from the other. In another possible embodiment, processor 130 picks tasks that have the same read status but different channel numbers. For example, the processor 130 selects tasks 1-2 and 7 as a first task set, or selects tasks 3 and 8 as a first task set. In other embodiments, the processor 130 selects tasks based on the channel number to cause the channels 160_1~160_4 to be in the busy recording state. In other words, during each read, the processor 130 reads the non-volatile memory 150_1~150_4 through the channels 160_1~160_4.
為方便說明,以下係假設處理器130挑選第3圖的任務1-3作為一第一任務集合。在此例中,處理器130根據任務1-3的通道編號,透過通道160_1~160_3同時讀取非揮發性記憶體150_1~150_3。以任務1為例,由於任務1的讀取狀態為預設狀態b,故處理器130透過通道160_1讀取非揮發性記憶體150_1所儲存的一第一邏輯至實體轉換表。在處理器130取得第一邏輯至實體轉換表後,處理器130將任務1的讀取狀態更新為預設狀態c。在一可能實施例中,處理器130將第一邏輯至實體轉換表載入揮發性記憶體140中。處理器130根據第一邏輯至實體轉換表得知任務1的邏輯位址所對應的資料係儲存在非揮發性記憶體150_3。因此,處理器130任務1的通道編號更新為2,如第4圖所示。在一可能實施例中,如果任務1的邏輯位址所對應的資料也是儲存非揮發性記憶體150_1時,則處理器130將任務1的通道編號維持在0。 For convenience of explanation, the following assumes that the processor 130 selects the tasks 1-3 of FIG. 3 as a first task set. In this example, the processor 130 simultaneously reads the non-volatile memory 150_1~150_3 through the channels 160_1~160_3 according to the channel number of the task 1-3. Taking task 1 as an example, since the read state of task 1 is the preset state b, the processor 130 reads a first logical-to-entity conversion table stored by the non-volatile memory 150_1 through the channel 160_1. After the processor 130 obtains the first logical-to-entity conversion table, the processor 130 updates the read status of the task 1 to the preset state c. In one possible embodiment, processor 130 loads the first logical-to-physical conversion table into volatile memory 140. The processor 130 learns that the data corresponding to the logical address of the task 1 is stored in the non-volatile memory 150_3 according to the first logic to entity conversion table. Therefore, the channel number of task 1 of processor 130 is updated to 2, as shown in FIG. In a possible embodiment, if the data corresponding to the logical address of task 1 is also storing non-volatile memory 150_1, then processor 130 maintains the channel number of task 1 at zero.
針對任務2,在第3圖中,由於任務2的通道編號為1,故處理器130透過通道160_2讀取非揮發性記憶體150_2所儲存的一第二邏輯至實體轉換表,並將任務2的讀取狀態更新為預設狀態c,如第4圖所示。對於任務3,由於第3圖中的任務3的讀取狀態為預設狀態c,故處理器130透過通道160_3讀取非揮發性記憶體150_3所儲存的資料,並將任務3的讀取狀態更新為狀態d,如第4圖所示。狀態d表示處理器130已完成任務3。 For task 2, in FIG. 3, since the channel number of task 2 is 1, the processor 130 reads a second logical-to-entity conversion table stored in the non-volatile memory 150_2 through the channel 160_2, and the task 2 The read status is updated to the preset status c, as shown in Figure 4. For task 3, since the read state of task 3 in FIG. 3 is the preset state c, the processor 130 reads the data stored in the non-volatile memory 150_3 through the channel 160_3, and reads the state of the task 3. Updated to state d as shown in Figure 4. State d indicates that processor 130 has completed task 3.
在一可能實施例中,處理器130將讀取到的資料及邏輯至實體轉換表儲存於揮發性記憶體140中,但處理器130只會輸出資料予主機裝置110,並不會將邏輯至實體轉換表輸出予主機裝置110。 In a possible embodiment, the processor 130 stores the read data and the logical-to-physical conversion table in the volatile memory 140, but the processor 130 only outputs the data to the host device 110, and does not logically The entity conversion table is output to the host device 110.
第4圖為更新任務1-3後的狀態表示意圖。如圖所示,狀態1-3的讀取狀態及通道編號均已被修改。處理器130再從第4圖的狀態表中,挑選多個具有不同通道編號的任務作為一第二任務集合。在一可能實施例中,處理器130可能挑選具有相同讀取狀態的任務。舉例而言,處理器130可能挑選第4圖中的任務1-2作為第二集合任務,或是挑選任務4及7作為第二集合任務。在其它實施例中,處理器130可能挑選任務1-2及5作為第二集合任務。在此例中,第二集合任務裡的一第一任務(如任務1)的讀取狀態不同於第二集合任務裡的一第二任務(如任務5)的讀取狀態。 Figure 4 is a schematic diagram of the status table after updating tasks 1-3. As shown, the read status and channel number of status 1-3 have been modified. The processor 130 then selects a plurality of tasks having different channel numbers as a second task set from the state table of FIG. In a possible embodiment, processor 130 may pick tasks having the same read state. For example, the processor 130 may select task 1-2 in FIG. 4 as the second set task, or select tasks 4 and 7 as the second set task. In other embodiments, processor 130 may pick tasks 1-2 and 5 as second set tasks. In this example, the read status of a first task (eg, task 1) in the second set of tasks is different from the read status of a second task (eg, task 5) in the second set of tasks.
在一些實施例中,第二集合任務裡的所有任務具有相同的讀取狀態,並且相同或不同於第一集合任務裡的所有任務的讀取狀態。舉例而言,第二集合任務裡的所有任務的讀 取狀態均為預設狀態b,而第一集合任務裡的所有任務的讀取狀態均為預設狀態b或c。 In some embodiments, all of the tasks in the second set of tasks have the same read status and are the same or different from the read status of all of the tasks in the first set of tasks. For example, reading of all tasks in the second set of tasks The fetch status is the preset state b, and the read status of all tasks in the first set task is the preset state b or c.
處理器130執行第二集合任務,並更新第二集合任務裡的所有任務的讀取狀態及通道編號,並再從更新後的狀態圖中重新挑選多個任務作為一第三任務集合,直到第4圖的任務1~8的讀取狀態均為狀態d。在一可能實施例中,當處理器130讀取到關聯於任務1~8的邏輯位址的資料時,處理器130一併輸出讀取資料予主機裝置110。 The processor 130 executes the second set task, and updates the read status and the channel number of all the tasks in the second set task, and then re-selects the plurality of tasks from the updated state map as a third task set until the first The read status of tasks 1~8 of Figure 4 is state d. In a possible embodiment, when the processor 130 reads the data associated with the logical addresses of the tasks 1-8, the processor 130 outputs the read data to the host device 110.
第5圖為本發明之資料讀取方法,其可適用於一記憶裝置中。記憶裝置包括一揮發性記憶體、複數非揮發性記憶體以及一處理器。在一可能實施例中,處理器係透過複數通道讀取該等非揮發性記憶體。 Fig. 5 is a data reading method of the present invention, which is applicable to a memory device. The memory device includes a volatile memory, a plurality of non-volatile memories, and a processor. In a possible embodiment, the processor reads the non-volatile memory through a plurality of channels.
首先,處理器根據一命令佇列裡的至少一命令產生一狀態表(步驟S511)。在一可能實施例中,記憶裝置裡的揮發性記憶體140的一記憶區塊作為該命令佇列。另外,狀態表也可能儲存在記憶裝置裡的揮發性記憶體、非揮發性記憶體或是其它記憶體中。在本實施例中,狀態表記錄複數任務以及每一任務的一讀取狀態以及一通道編號。在建立狀態表後,處理器初始化狀態表裡的所有任務的讀取狀態。在一可能實施例中,處理器將狀態表裡的所有任務的讀取狀態初始化成一特定狀態,如一預設狀態a。第2圖顯示一可能的初始化結果。 First, the processor generates a state table based on at least one command in a command queue (step S511). In one possible embodiment, a memory block of volatile memory 140 in the memory device acts as the command queue. In addition, the status table may also be stored in volatile memory, non-volatile memory or other memory in the memory device. In this embodiment, the status table records a plurality of tasks and a read status of each task and a channel number. After the state table is established, the processor initializes the read status of all tasks in the state table. In a possible embodiment, the processor initializes the read status of all tasks in the status table to a specific state, such as a preset state a. Figure 2 shows a possible initialization result.
接著,處理器根據揮發性記憶體所儲存的資訊,更新狀態表裡每一任務的讀取狀態及通道編號(步驟S512)。因此,每一任務的讀取狀態與揮發性記憶體所儲存的資訊有關。 在一可能實施例中,處理器判斷狀態表裡的一第一任務的邏輯位址是否被記錄於揮發性記憶體所儲存的一邏輯至實體轉換表。 Then, the processor updates the read status and the channel number of each task in the status table according to the information stored in the volatile memory (step S512). Therefore, the read status of each task is related to the information stored in the volatile memory. In a possible embodiment, the processor determines whether the logical address of a first task in the status table is recorded in a logical-to-entity conversion table stored in the volatile memory.
當第一任務的邏輯位址未被記錄於揮發性記憶體所儲存的邏輯至實體轉換表時,處理器將第一任務的讀取狀態設定為一預設狀態b,並根據揮發性記憶體所儲存的一轉換位址表,更新第一任務的通道編號。然而,當第一任務的邏輯位址被記錄於揮發性記憶體所儲存的邏輯至實體轉換表時,處理器設定第一任務的讀取狀態為一預設狀態c。此時,處理器根據揮發性記憶體所儲存的邏輯至實體轉換表,更新第一任務的通道編號。 When the logical address of the first task is not recorded in the logical-to-physical conversion table stored in the volatile memory, the processor sets the read status of the first task to a preset state b, and according to the volatile memory The stored conversion address table updates the channel number of the first task. However, when the logical address of the first task is recorded in the logical-to-physical conversion table stored by the volatile memory, the processor sets the read status of the first task to a preset state c. At this time, the processor updates the channel number of the first task according to the logical-to-entity conversion table stored in the volatile memory.
接著,處理器從更新後的狀態表中,挑選多個任務作為一第一任務集合,並同時執行第一任務集合裡的所有任務(步驟S513)。在本實施例中,第一任務集合裡的所有任務的通道編號均不相同。在一可能實施例中,第一任務集合裡的所有任務的讀取狀態均為預設狀態b或c。在其它實施例中,第一任務集合裡的多個任務中之一者的讀取狀態不同於第一任務集合裡的多個任務中之另一者。 Next, the processor selects a plurality of tasks as a first task set from the updated state table, and simultaneously executes all tasks in the first task set (step S513). In this embodiment, the channel numbers of all the tasks in the first task set are different. In a possible embodiment, the read status of all tasks in the first task set is the preset state b or c. In other embodiments, the read status of one of the plurality of tasks in the first set of tasks is different from the other of the plurality of tasks in the first set of tasks.
以第3圖為例,假設,處理器挑選任務1-3作為第一任務集合。針對任務1及2,由於任務1及2的讀取狀態為預設狀態b,故處理器讀取非揮發性記憶體之至少一者,用以讀取關聯於任務1及2的邏輯位址的至少一邏輯至實體轉換表。接著,處理器將任務1-2的讀取狀態更新為預設狀態c,並根據讀取到的至少一邏輯至實體轉換表更新任務1及2的通道編號。 Taking Figure 3 as an example, assume that the processor picks tasks 1-3 as the first set of tasks. For tasks 1 and 2, since the read states of tasks 1 and 2 are the preset state b, the processor reads at least one of the non-volatile memory for reading the logical addresses associated with tasks 1 and 2. At least one logical to entity conversion table. Next, the processor updates the read status of task 1-2 to the preset state c, and updates the channel numbers of tasks 1 and 2 according to the read at least one logical-to-entity conversion table.
接著,針對任務3,由於任務3的讀取狀態為預設狀態c,故處理器讀取非揮發性記憶體之至少一者,用以讀取關聯於任務3的邏輯位址的資料。在讀取到資料後,處理器將任務3的讀取狀態更新為狀態d,第4圖顯示執行完第一任務集合後的狀態表示意圖。 Next, for task 3, since the read state of task 3 is the preset state c, the processor reads at least one of the non-volatile memory for reading the data associated with the logical address of task 3. After reading the data, the processor updates the read status of task 3 to state d, and FIG. 4 shows a schematic diagram of the status table after the first task set is executed.
在更新完第一任務集合裡的所有任務的讀取狀態後,處理器判斷第4圖的狀態表裡的所有讀取狀態是否均為狀態d。若是,表示處理器已完成命令佇列裡的一讀取命令(步驟S515)。因此,處理器輸出所有的讀取資料予一主機裝置。若第4圖的狀態表裡的所有讀取狀態並非狀態d時,則回到步驟S513,繼續挑選並同時執行第4圖裡的多個任務。此時,被挑選到的任務構成一第二任務集合。 After updating the read status of all tasks in the first task set, the processor determines whether all read states in the status table of FIG. 4 are state d. If so, it indicates that the processor has completed a read command in the command queue (step S515). Therefore, the processor outputs all the read data to a host device. If all the reading states in the state table of Fig. 4 are not the state d, the process returns to step S513, and the selection and simultaneous execution of the plurality of tasks in Fig. 4 are continued. At this time, the selected task constitutes a second task set.
處理器執行第二任務集合,並根據執行結果更新第二任務集合裡的每一任務的讀取狀態。在處理器執行完第二任務集合裡的所有任務後,若仍有部分任務的讀取狀態不為狀態d時,則處理器再次挑選多個任務作為一第三任務集合,並同時執行第亖任務集合裡的多個任務,直到第4圖的狀態表裡的任務1-8的讀取狀態均為狀態d。 The processor executes the second task set and updates the read status of each task in the second task set according to the execution result. After the processor executes all the tasks in the second task set, if there are still some tasks whose reading state is not the state d, the processor selects multiple tasks again as a third task set, and simultaneously executes the third Multiple tasks in the task set until the read status of tasks 1-8 in the status table of Figure 4 is state d.
處理器在不同的讀取期間執行不同的任務集合裡的多個任務。在一可能實施例中,在每一讀取期間,所有的通道均為忙錄狀態。當第4圖的對應表裡的任務1-8的讀取狀態均為狀態d時,處理器將關聯任務1-8的邏輯位址的資料輸出予主機裝置。在此例中,處理器並不會輸出邏輯至實體轉換表予主機裝置。 The processor performs multiple tasks in different sets of tasks during different reads. In a possible embodiment, all channels are in a busy state during each read. When the read status of the tasks 1-8 in the correspondence table of FIG. 4 is the state d, the processor outputs the data of the logical address associated with the tasks 1-8 to the host device. In this example, the processor does not output a logical-to-physical conversion table to the host device.
在一可能實施例中,第二任務集合裡的所有任務的讀取狀態均相同,並相同或不同於第一任務集合裡的所有任務的讀取狀態。在另一可能實施中,第二任務集合具有一第一任務以及一第二任務,其中第一任務的讀取狀態不同於第二任務的讀取狀態。在此例中,處理器可同時進行表格(邏輯至實體轉換表)的讀取以及資料的讀取。 In a possible embodiment, the reading states of all the tasks in the second task set are the same and are the same or different from the reading states of all the tasks in the first task set. In another possible implementation, the second task set has a first task and a second task, wherein the read status of the first task is different from the read status of the second task. In this example, the processor can simultaneously read the table (logical to physical conversion table) and read the data.
除非另作定義,在此所有詞彙(包含技術與科學詞彙)均屬本發明所屬技術領域中具有通常知識者之一般理解。此外,除非明白表示,詞彙於一般字典中之定義應解釋為與其相關技術領域之文章中意義一致,而不應解釋為理想狀態或過分正式之語態。 Unless otherwise defined, all terms (including technical and scientific terms) are used in the ordinary meaning Moreover, unless expressly stated, the definition of a vocabulary in a general dictionary should be interpreted as consistent with the meaning of an article in its related art, and should not be interpreted as an ideal state or an overly formal voice.
雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above preferred embodiments, it is not intended to limit the invention, and any one of ordinary skill in the art can make some modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.
S511~S515‧‧‧步驟 S511~S515‧‧‧Steps
Claims (20)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610636069.2A CN106547701B (en) | 2015-09-17 | 2016-08-05 | Memory device and data reading method |
US15/246,110 US10275187B2 (en) | 2015-09-17 | 2016-08-24 | Memory device and data read method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201562220038P | 2015-09-17 | 2015-09-17 |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201712557A TW201712557A (en) | 2017-04-01 |
TWI587141B true TWI587141B (en) | 2017-06-11 |
Family
ID=59256798
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW105108937A TWI587141B (en) | 2015-09-17 | 2016-03-23 | Storage device and data access method thereof |
TW106104594A TWI662413B (en) | 2015-09-17 | 2016-03-23 | Storage device and data access method thereof |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW106104594A TWI662413B (en) | 2015-09-17 | 2016-03-23 | Storage device and data access method thereof |
Country Status (1)
Country | Link |
---|---|
TW (2) | TWI587141B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090292865A1 (en) * | 2008-05-21 | 2009-11-26 | Samsung Electronics Co., Ltd. | Systems and methods for scheduling a memory command for execution based on a history of previously executed memory commands |
TW201104440A (en) * | 2009-04-09 | 2011-02-01 | Micron Technology Inc | Memory controllers, memory systems, solid state drives and methods for processing a number of commands |
TW201303591A (en) * | 2011-05-31 | 2013-01-16 | Micron Technology Inc | Apparatus including memory system controllers and related methods |
TW201329857A (en) * | 2011-09-30 | 2013-07-16 | Intel Corp | Apparatus and method for implementing a multi-level memory hierarchy over common memory channels |
-
2016
- 2016-03-23 TW TW105108937A patent/TWI587141B/en active
- 2016-03-23 TW TW106104594A patent/TWI662413B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090292865A1 (en) * | 2008-05-21 | 2009-11-26 | Samsung Electronics Co., Ltd. | Systems and methods for scheduling a memory command for execution based on a history of previously executed memory commands |
TW201104440A (en) * | 2009-04-09 | 2011-02-01 | Micron Technology Inc | Memory controllers, memory systems, solid state drives and methods for processing a number of commands |
TW201303591A (en) * | 2011-05-31 | 2013-01-16 | Micron Technology Inc | Apparatus including memory system controllers and related methods |
TW201329857A (en) * | 2011-09-30 | 2013-07-16 | Intel Corp | Apparatus and method for implementing a multi-level memory hierarchy over common memory channels |
Also Published As
Publication number | Publication date |
---|---|
TW201712557A (en) | 2017-04-01 |
TWI662413B (en) | 2019-06-11 |
TW201721446A (en) | 2017-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106547701B (en) | Memory device and data reading method | |
US8510502B2 (en) | Data writing method, and memory controller and memory storage apparatus using the same | |
US9323661B2 (en) | Memory system and control method thereof | |
US20150120988A1 (en) | Method of Accessing Data in Multi-Layer Cell Memory and Multi-Layer Cell Storage Device Using the Same | |
US10909031B2 (en) | Memory system and operating method thereof | |
US20090198875A1 (en) | Data writing method for flash memory, and controller and system using the same | |
JP2008009942A (en) | Memory system | |
JP2008507756A5 (en) | ||
US20160062883A1 (en) | Data storage device and operating method thereof | |
US20180039443A1 (en) | System and method for controlling a programmable deduplication ratio for a memory system | |
TWI403897B (en) | Memory device and data management method thereof | |
TWI512609B (en) | Methods for scheduling read commands and apparatuses using the same | |
US8423707B2 (en) | Data access method for flash memory and storage system and controller using the same | |
TW201543215A (en) | Flash memory control chip and data storage device and flash memory control method | |
CN104461384A (en) | Data write-in method and storage device | |
CN104133640B (en) | From the fast quick-recovery of dormancy | |
US10169160B2 (en) | Database batch update method, data redo/undo log producing method and memory storage apparatus | |
JP2020042890A (en) | Memory system and controlling method of memory system | |
TWI587141B (en) | Storage device and data access method thereof | |
US20140075103A1 (en) | Method capable of increasing performance of a memory and related memory system | |
TWI514136B (en) | Flash memory device and data writing method thereof | |
CN111324549B (en) | Memory and control method and device thereof | |
TW201935244A (en) | Logical block mapping based on an offset | |
US9817767B2 (en) | Semiconductor apparatus and operating method thereof | |
CN109426443B (en) | Memory control apparatus and method |