TW201445312A - Data read method, and flash memory controller and storage system using the same - Google Patents

Data read method, and flash memory controller and storage system using the same Download PDF

Info

Publication number
TW201445312A
TW201445312A TW103129176A TW103129176A TW201445312A TW 201445312 A TW201445312 A TW 201445312A TW 103129176 A TW103129176 A TW 103129176A TW 103129176 A TW103129176 A TW 103129176A TW 201445312 A TW201445312 A TW 201445312A
Authority
TW
Taiwan
Prior art keywords
host
flash memory
data
host read
read command
Prior art date
Application number
TW103129176A
Other languages
Chinese (zh)
Other versions
TWI537726B (en
Inventor
Chih-Kang Yeh
Original Assignee
Phison Electronics Corp
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 Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to TW103129176A priority Critical patent/TWI537726B/en
Publication of TW201445312A publication Critical patent/TW201445312A/en
Application granted granted Critical
Publication of TWI537726B publication Critical patent/TWI537726B/en

Links

Abstract

A data read method for reading data to be accessed by a host system from a plurality of flash memory modules is provided. The data read method includes receiving command sequence information about a plurality of host read commands, wherein each of the host read commands corresponds to one of data input/output buses coupled to the flash memory modules. The data read method also includes re-arranging the host read commands according to the data input/output buses corresponding to the host read commands and thereby generating a command sequence, and receiving and processing a host read command among the host read commands from the host system based on the command sequence while pre-reading data of the host read commands after the processed host read command.

Description

資料讀取方法、快閃記憶體控制器與儲存系統 Data reading method, flash memory controller and storage system

本發明是有關於一種用於快閃記憶體的資料讀取方法,且特別是有關於一種用於從多個快閃記憶體模組中讀取資料的資料讀取方法以及使用此方法的快閃記憶體控制器與快閃記憶體儲存系統。 The present invention relates to a data reading method for flash memory, and more particularly to a data reading method for reading data from a plurality of flash memory modules and using the method Flash memory controller and flash memory storage system.

由於快閃記憶體(Flash Memory)具有資料非揮發性、省電、體積小與無機械結構等的特性,最適合使用於由電池供電的可攜式電子產品上。例如,固態硬碟就是一種以NAND快閃記憶體作為儲存媒體的儲存裝置,並且已廣泛配置於筆記型電腦中作為主要的儲存裝置。 Because Flash Memory has the characteristics of non-volatile data, power saving, small size and no mechanical structure, it is most suitable for battery-operated portable electronic products. For example, a solid state hard disk is a storage device that uses NAND flash memory as a storage medium, and has been widely deployed in notebook computers as a main storage device.

一般來說,當主機系統欲讀取儲存在快閃記憶體儲存裝置中的資料時,快閃記憶體儲存裝置的控制電路會依據來自於主機系統的主機讀取指令透過快閃記憶體介面從快閃記憶體晶片中讀取對應的資料,之後,控制電路再將所讀取的資料經由連接器 傳送給主機系統。在此,從快閃記憶體晶片中讀取資料的部分稱為內部資料傳輸(transfer),而將資料傳送給主機系統的部分稱為外部傳輸。 Generally, when the host system wants to read the data stored in the flash memory storage device, the control circuit of the flash memory storage device passes the flash memory interface according to the host read command from the host system. The corresponding data is read in the flash memory chip, and then the control circuit passes the read data through the connector. Transfer to the host system. Here, the portion that reads data from the flash memory chip is called internal data transfer, and the portion that transfers data to the host system is called external transmission.

隨著傳輸技術的發展,使得連接器的傳輸速度已大幅提昇,例如,序列先進附件(Serial Advanced Technology Attachment,SATA)連接器已可達到每秒15億位元(Gigabit,Gb),甚至每秒30Gb。然而,在上述內部資料傳輸的速度低於連接器的速度下,整體儲存的效能仍無法有效改善,因此如何縮短執行主機讀取指令的時間是此領域技術人員所致力的目標。 With the development of transmission technology, the transmission speed of connectors has been greatly improved. For example, Serial Advanced Technology Attachment (SATA) connectors can reach Gigabit (Gb) per second, even per second. 30Gb. However, when the speed of the internal data transmission is lower than the speed of the connector, the overall storage performance cannot be effectively improved, so how to shorten the time for executing the host read command is a goal of those skilled in the art.

本發明提供一種資料讀取方法以及使用此方法的快閃記憶體控制器與快閃記憶體儲存裝置,其能夠有效地縮短執行來自於主機系統之多個主機讀取指令的時間。 The present invention provides a data reading method and a flash memory controller and a flash memory storage device using the same, which can effectively shorten the time for executing a plurality of host read commands from the host system.

本發明範例實施例一種資料讀取方法,適用於由一快閃記憶體控制器處理來自於一主機系統的多個主機讀取指令以從多個快閃記憶體模組中讀取對應此些主機讀取指令的資料,其中快閃記憶體控制器分別地經由多條資料輸入/輸出匯流排耦接至快閃記憶體模組並且每一快閃記憶體模組具有多個實體區塊。本資料讀取方法包括配置多個邏輯區塊,其中邏輯區塊對映快閃記憶體模組中的部分實體區塊。本資料讀取方法也包括從主機系統中接收關於此些主機讀取指令的指令排序資訊,其中每一主機讀取指 令對應邏輯區塊的其中之一且每一邏輯區塊對應資料輸入/輸出匯流排的其中之一。本資料讀取方法亦包括依據主機讀取指令所對應的資料輸入/輸出匯流排來重新排列主機讀取指令的順序與產生下達指令順序,以及將所產生的下達指令順序傳送給主機系統。本資料讀取方法更包括依據此下達指令順序從主機系統中依序地接收主機讀取指令並且依據主機讀取指令從快閃記憶體模組中讀取對應此些主機讀取指令的資料。 An embodiment of the present invention is a data reading method, which is suitable for processing, by a flash memory controller, a plurality of host read commands from a host system to read from a plurality of flash memory modules. The host reads the data of the instruction, wherein the flash memory controller is respectively coupled to the flash memory module via the plurality of data input/output bus bars and each of the flash memory modules has a plurality of physical blocks. The data reading method includes configuring a plurality of logical blocks, wherein the logical block maps a part of the physical blocks in the flash memory module. The data reading method also includes receiving, from the host system, instruction sequencing information about the host read commands, wherein each host read finger One of the corresponding logical blocks and each logical block corresponds to one of the data input/output bus bars. The data reading method also includes rearranging the order of the host read command and the order of generating the command according to the data input/output bus corresponding to the host read command, and sequentially transmitting the generated command to the host system. The data reading method further includes sequentially receiving the host read command from the host system according to the order of the release instruction, and reading the data corresponding to the host read command from the flash memory module according to the host read command.

在本發明之一實施例中,上述之從主機系統中接收關於主機讀取指令的指令排序資訊的步驟包括:使用一原生指令排序(Native Command Queuing,NCQ)協定從主機系統中接收關於此些主機讀取指令的指令排序資訊。 In an embodiment of the invention, the step of receiving the instruction ordering information about the host read command from the host system includes: receiving, by using a Native Command Queuing (NCQ) protocol, from the host system. The instruction sequence information of the host read instruction.

在本發明之一實施例中,當從主機系統中接收到此些主機讀取指令之中的一第一主機讀取指令時,經由上述資料輸入/輸出匯流排從快閃記憶體模組中同步地讀取對應此第一主機讀取指令的資料和此些主機讀取指令之中的至少一第二主機讀取指令的資料,並且將對應此第一主機讀取指令的資料傳送給主機系統,其中此第一主機讀取指令和此第二主機讀取指令是對應不同的資料輸入/輸出匯流排。 In an embodiment of the present invention, when a first host read command of the host read commands is received from the host system, the bus is input from the flash memory module via the data input/output bus Synchronizing reading data corresponding to the first host read command and at least one second host read command among the host read commands, and transmitting the data corresponding to the first host read command to the host The system, wherein the first host read command and the second host read command correspond to different data input/output bus bars.

在本發明之一實施例中,上述之資料讀取方法更包括將對應此第二主機讀取指令的資料暫存於快閃記憶體控制器的緩衝記憶體中。 In an embodiment of the present invention, the data reading method further includes temporarily storing data corresponding to the second host read command in a buffer memory of the flash memory controller.

在本發明之一實施例中,當從主機系統接收到上述第二 主機讀取指令時,從緩衝記憶體中將對應此第二主機讀取指令的資料傳送給主機系統。 In an embodiment of the invention, when the second is received from the host system When the host reads the instruction, the data corresponding to the second host read command is transmitted from the buffer memory to the host system.

在本發明之一實施例中,上述之資料讀取方法更包括將上述邏輯區塊分組為多個邏輯區域,以及為每一邏輯區域配置一邏輯區塊-實體區塊對映表,其中每一邏輯區塊對應此些邏輯區塊-實體區塊對映表的其中之一。此外,上述之資料讀取方法更包括載入邏輯區塊-實體區塊對映表的其中之一至上述緩衝記憶體中。 In an embodiment of the present invention, the data reading method further includes grouping the logical blocks into a plurality of logical regions, and configuring a logical block-physical block mapping table for each logical region, wherein each A logical block corresponds to one of the logical block-physical block mapping tables. In addition, the data reading method described above further includes loading one of the logical block-physical block mapping table into the buffer memory.

在本發明之一實施例中,上述依據主機讀取指令所對應的資料輸入/輸出匯流排重新排列主機讀取指令的順序與產生下達指令順序的步驟包括依據此些主機讀取指令所對應的資料輸入/輸出匯流排與邏輯區域來重新排列此些主機讀取指令的順序與產生下達指令順序。 In an embodiment of the present invention, the step of rearranging the order of the host read command according to the data input/output bus corresponding to the host read command and the step of generating the command sequence include: corresponding to the read command of the host The data input/output bus and logic area are used to rearrange the order of the host read instructions and generate the order of the instructions.

在本發明之一實施例中,上述之依據主機讀取指令所對應的資料輸入/輸出匯流排與邏輯區域來重新排列主機讀取指令的順序與產生下達指令順序的步驟包括:在上述下達指令順序中優先安排此些主機讀取指令之中的至少一主機讀取指令,其中此主機讀取指令所對應的邏輯區塊是對應被載入於緩衝記憶體中的邏輯區塊-實體區塊對映表。 In an embodiment of the present invention, the step of rearranging the order of the host read command and the order of generating the command according to the data input/output bus and the logical area corresponding to the host read command includes: issuing the command at the foregoing At least one of the host read commands is preferentially arranged in the sequence, wherein the logical block corresponding to the host read command is a logical block-physical block corresponding to being loaded in the buffer memory. Mapping table.

本發明範例實施例一種快閃記憶體控制器,用於處理來自於一主機系統的多個主機讀取指令以從多個快閃記憶體模組中讀取對應此些主機讀取指令的資料,其中每一快閃記憶體模組具有多個實體區塊。本快閃記憶體控制器包括微處理器單元、快閃 記憶體介面單元、主機介面單元與記憶體管理單元。快閃記憶體介面單元是耦接至微處理器單元,並且用以經由多條資料輸入/輸出匯流排耦接至此些快閃記憶體模組。主機介面單元是耦接至微處理器單元,並且用以連接主機系統。記憶體管理單元是耦接至微處理器單元,並且用以配置多個邏輯區塊,其中此些邏輯區塊對映快閃記憶體模組中的部分實體區塊。在此,記憶體管理單元經由主機介面單元從主機系統中接收關於此些主機讀取指令的指令排序資訊,其中每一主機讀取指令對應此些邏輯區塊的其中之一且每一邏輯區塊對應此些資料輸入/輸出匯流排的其中之一。並且,記憶體管理單元依據此些主機讀取指令所對應的資料輸入/輸出匯流排來重新排列此些主機讀取指令的順序與產生一下達指令順序,並且將所產生的下達指令順序傳送給主機系統。再者,記憶體管理單元依據此下達指令順序經由主機介面單元從主機系統中依序地接收此些主機讀取指令並且依據此些主機讀取指令經由快閃記憶體介面單元從快閃記憶體模組中讀取對應此些主機讀取指令的資料。 According to an exemplary embodiment of the present invention, a flash memory controller is configured to process a plurality of host read commands from a host system to read data corresponding to the host read commands from the plurality of flash memory modules. Each of the flash memory modules has a plurality of physical blocks. The flash memory controller includes a microprocessor unit, flashing Memory interface unit, host interface unit and memory management unit. The flash memory interface unit is coupled to the microprocessor unit and coupled to the flash memory modules via a plurality of data input/output bus bars. The host interface unit is coupled to the microprocessor unit and is configured to connect to the host system. The memory management unit is coupled to the microprocessor unit and configured to configure a plurality of logical blocks, wherein the logical blocks map a portion of the physical blocks in the flash memory module. Here, the memory management unit receives instruction sequencing information about the host read commands from the host system via the host interface unit, wherein each host read instruction corresponds to one of the logical blocks and each logical region The block corresponds to one of these data input/output busses. Moreover, the memory management unit rearranges the order of the host read instructions and generates the order of the instructions according to the data input/output bus corresponding to the host read commands, and sequentially transmits the generated instructions to the sequence. Host system. Moreover, the memory management unit sequentially receives the host read commands from the host system via the host interface unit according to the order of the release instructions, and according to the host read commands, flash memory from the flash memory interface unit according to the host read commands. The module reads the data corresponding to the read commands of the host.

在本發明之一實施例中,上述之主機介面單元支援一原生指令排序協定。 In an embodiment of the invention, the host interface unit supports a native instruction ordering protocol.

在本發明之一實施例中,當主機介面單元從主機系統中接收到此些主機讀取指令之中的一第一主機讀取指令時,記憶體管理單元經由上述資料輸入/輸出匯流排從快閃記憶體模組中同步地讀取對應此第一主機讀取指令的資料和此些主機讀取指令之中 的至少一第二主機讀取指令的資料,並且將對應此第一主機讀取指令的資料傳送給主機系統,其中此第一主機讀取指令和此第二主機讀取指令是對應不同的資料輸入/輸出匯流排。 In an embodiment of the present invention, when the host interface unit receives a first host read command from the host read commands, the memory management unit passes through the data input/output bus The flash memory module synchronously reads the data corresponding to the first host read command and among the host read commands At least one second host reads the data of the instruction, and transmits the data corresponding to the first host read instruction to the host system, wherein the first host read command and the second host read command are different data. Input/output bus.

在本發明之一實施例中,上述之快閃記憶體控制器更包括一緩衝記憶體,其耦接至微處理器單元,其中記憶體管理單元將對應此第二主機讀取指令的資料暫存於此緩衝記憶體中。 In an embodiment of the present invention, the flash memory controller further includes a buffer memory coupled to the microprocessor unit, wherein the memory management unit temporarily stores the data corresponding to the second host read command. Stored in this buffer memory.

在本發明之一實施例中,當記憶體管理單元從主機系統中接收到上述第二主機讀取指令時,記憶體管理單元從緩衝記憶體中將對應此第二主機讀取指令的資料傳送給主機系統。 In an embodiment of the present invention, when the memory management unit receives the second host read command from the host system, the memory management unit transfers the data corresponding to the second host read command from the buffer memory. Give the host system.

在本發明之一實施例中,上述之記憶體管理單元將上述邏輯區塊分組為多個邏輯區域,並且為每一邏輯區域配置一邏輯區塊-實體區塊對映表,其中每一邏輯區塊對應此些邏輯區塊-實體區塊對映表的其中之一。此外,上述記憶體管理單元載入此些邏輯區塊-實體區塊對映表的其中之一至上述緩衝記憶體。 In an embodiment of the present invention, the memory management unit groups the logical blocks into a plurality of logical regions, and configures a logical block-physical block mapping table for each logical region, wherein each logical The block corresponds to one of the logical block-physical block mapping tables. In addition, the memory management unit loads one of the logical block-physical block mapping tables to the buffer memory.

在本發明之一實施例中,上述之記憶體管理單元更依據此些主機讀取指令所對應的資料輸入/輸出匯流排與邏輯區域來重新排列此些主機讀取指令的順序與產生上述下達指令順序。 In an embodiment of the present invention, the memory management unit further rearranges the order of the host read commands and generates the foregoing according to the data input/output bus and the logical area corresponding to the host read commands. Order of instructions.

在本發明之一實施例中,上述之記憶體管理單元在上述下達指令順序中優先安排此些主機讀取指令之中的至少一主機讀取指令,其中此主機讀取指令所對應的邏輯區塊是對應被載入於緩衝記憶體中的邏輯區塊-實體區塊對映表。 In an embodiment of the present invention, the memory management unit preferentially arranges at least one host read command among the host read commands in the order of the release instructions, wherein the host reads the logical region corresponding to the instruction The block is a logical block-physical block mapping table corresponding to the buffer memory.

本發明範例實施例一種快閃記憶體儲存系統,其包括快 閃記憶體晶片、快閃記憶體控制器與連接器。快閃記憶體晶片具有多個快閃記憶體模組,並且每一快閃記憶體模組具有多個實體區塊。快閃記憶體控制器經由多條資料輸入/輸出匯流排耦接至此些快閃記憶體模組,並且用以配置多個邏輯區塊,其中此些邏輯區塊對映快閃記憶體模組中的部分實體區塊。連接器是耦接至快閃記憶體控制器並且用以耦接一主機系統。在此,快閃記憶體控制器經由連接器從主機系統中接收關於多個主機讀取指令的指令排序資訊,其中每一主機讀取指令對應此些邏輯區塊的其中之一且每一邏輯區塊對應此些資料輸入/輸出匯流排的其中之一。並且,快閃記憶體控制器依據此些主機讀取指令所對應的資料輸入/輸出匯流排來重新排列此些主機讀取指令的順序與產生一下達指令順序,並且將所產生的下達指令順序傳送給主機系統。再者,快閃記憶體控制器依據該下達指令順序經由連接器從主機系統中依序地接收此些主機讀取指令並且依據此些主機讀取指令經由資料輸入/輸出匯流排從快閃記憶體模組中讀取對應此些主機讀取指令的資料。 An exemplary embodiment of the present invention is a flash memory storage system including fast Flash memory chips, flash memory controllers and connectors. The flash memory chip has a plurality of flash memory modules, and each flash memory module has a plurality of physical blocks. The flash memory controller is coupled to the flash memory modules via a plurality of data input/output bus bars, and configured to configure a plurality of logic blocks, wherein the logic blocks are mapped to the flash memory module. Some of the physical blocks in the middle. The connector is coupled to the flash memory controller and coupled to a host system. Here, the flash memory controller receives instruction sequencing information about the plurality of host read instructions from the host system via the connector, wherein each host read instruction corresponds to one of the logical blocks and each logic The block corresponds to one of these data input/output bus bars. Moreover, the flash memory controller rearranges the order of the host read instructions and the order of the generated instructions according to the data input/output bus corresponding to the host read commands, and sequentially generates the generated instructions. Transfer to the host system. Moreover, the flash memory controller sequentially receives the host read commands from the host system via the connector according to the order of the release instructions, and according to the host read commands, the data is input from the flash memory via the data input/output bus. The data corresponding to the read commands of the host is read in the body module.

在本發明之一實施例中,上述之連接器支援原生指令排序協定。 In one embodiment of the invention, the connector described above supports a native instruction ordering protocol.

在本發明之一實施例中,當快閃記憶體控制器從主機系統中接收到此些主機讀取指令之中的一第一主機讀取指令時,快閃記憶體控制器經由上述資料輸入/輸出匯流排從快閃記憶體模組中同步地讀取對應此第一主機讀取指令的資料和此些主機讀取指 令之中的至少一第二主機讀取指令的資料,並且將對應此第一主機讀取指令的資料傳送給主機系統,其中此第一主機讀取指令和此第二主機讀取指令是對應不同的資料輸入/輸出匯流排。 In an embodiment of the invention, when the flash memory controller receives a first host read command from the host read commands, the flash memory controller inputs via the data input. /output bus bar synchronously reads the data corresponding to the first host read command from the flash memory module and the host read fingers At least one second host reads the data of the instruction, and transmits the data corresponding to the first host read instruction to the host system, where the first host read instruction and the second host read instruction correspond to Different data input/output busses.

在本發明之一實施例中,上述快閃記憶體儲存系統更包括一緩衝記憶體,其中快閃記憶體控制器將對應第二主機讀取指令的資料暫存於此緩衝記憶體中。 In an embodiment of the invention, the flash memory storage system further includes a buffer memory, wherein the flash memory controller temporarily stores the data corresponding to the second host read command in the buffer memory.

在本發明之一實施例中,當快閃記憶體控制器從主機系統中接收上述第二主機讀取指令時,快閃記憶體控制器從緩衝記憶體中將對應此第二主機讀取指令的資料傳送給主機系統。 In an embodiment of the invention, when the flash memory controller receives the second host read command from the host system, the flash memory controller will read the second host read command from the buffer memory. The data is transferred to the host system.

在本發明之一實施例中,上述之快閃記憶體控制器將上述邏輯區塊分組為多個邏輯區域,並且為每一邏輯區域配置一邏輯區塊-實體區塊對映表,其中每一邏輯區塊對應此些邏輯區塊-實體區塊對映表的其中之一。此外,上述快閃記憶體控制器載入此些邏輯區塊-實體區塊對映表的其中之一至緩衝記憶體。 In an embodiment of the invention, the flash memory controller groups the logical blocks into a plurality of logical regions, and configures a logical block-physical block mapping table for each logical region, wherein each A logical block corresponds to one of the logical block-physical block mapping tables. In addition, the flash memory controller loads one of the logical block-physical block mapping tables to the buffer memory.

在本發明之一實施例中,上述之快閃記憶體控制器依據上述主機讀取指令所對應的資料輸入/輸出匯流排與邏輯區域來重新排列此些主機讀取指令的順序與產生上述下達指令順序。 In an embodiment of the present invention, the flash memory controller rearranges the order of the host read commands and generates the release according to the data input/output bus and the logical area corresponding to the host read command. Order of instructions.

在本發明之一實施例中,上述之快閃記憶體控制器在上述下達指令順序中優先安排此些主機讀取指令之中的至少一主機讀取指令,其中此主機讀取指令所對應的邏輯區塊是對應暫存於該緩衝記憶體中的邏輯區塊-實體區塊對映表。 In an embodiment of the present invention, the flash memory controller preferentially arranges at least one host read command among the host read commands in the order of the release instructions, wherein the host read command corresponds to The logical block is a logical block-physical block mapping table corresponding to the temporary storage in the buffer memory.

在本發明之一實施例中,上述之緩衝記憶體配置在上述 快閃記憶體控制器中。 In an embodiment of the invention, the buffer memory is configured as described above Flash memory controller.

基於上述,本發明範例實施例可大幅地縮短執行多個主機讀取指令的時間,由此有效地提升快閃記憶體儲存裝置的效能。 Based on the above, the exemplary embodiment of the present invention can greatly shorten the time for executing a plurality of host read commands, thereby effectively improving the performance of the flash memory storage device.

為讓本發明之上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 The above described features and advantages of the present invention will be more apparent from the following description.

1000‧‧‧主機系統 1000‧‧‧Host system

1100‧‧‧電腦 1100‧‧‧ computer

1102‧‧‧微處理器 1102‧‧‧Microprocessor

1104‧‧‧隨機存取記憶體 1104‧‧‧ Random access memory

1106‧‧‧輸入/輸出裝置 1106‧‧‧Input/output devices

1108‧‧‧系統匯流排 1108‧‧‧System Bus

1110‧‧‧資料傳輸介面 1110‧‧‧Data transmission interface

1202‧‧‧滑鼠 1202‧‧‧ Mouse

1204‧‧‧鍵盤 1204‧‧‧ keyboard

1206‧‧‧顯示器 1206‧‧‧ display

1208‧‧‧印表機 1208‧‧‧Printer

1212‧‧‧隨身碟 1212‧‧‧USB flash drive

1214‧‧‧記憶卡 1214‧‧‧ memory card

1216‧‧‧固態硬碟 1216‧‧‧ Solid State Drive

1310‧‧‧數位相機 1310‧‧‧ digital camera

1312‧‧‧SD卡 1312‧‧‧SD card

1314‧‧‧MMC卡 1314‧‧‧MMC card

1316‧‧‧記憶棒 1316‧‧‧ Memory Stick

1318‧‧‧CF卡 1318‧‧‧CF card

1320‧‧‧嵌入式儲存裝置 1320‧‧‧Embedded storage device

100‧‧‧快閃記憶體儲存裝置 100‧‧‧Flash memory storage device

102‧‧‧連接器 102‧‧‧Connector

104‧‧‧快閃記憶體控制器 104‧‧‧Flash Memory Controller

106‧‧‧快閃記憶體晶片 106‧‧‧Flash memory chip

122‧‧‧第0快閃記憶體模組 122‧‧‧0th flash memory module

122-(0)~122(N)、124(0)~124-(N)‧‧‧實體區塊 122-(0)~122(N), 124(0)~124-(N)‧‧‧ physical blocks

124‧‧‧第1快閃記憶體模組 124‧‧‧1st flash memory module

132‧‧‧第0資料輸入/輸出匯流排 132‧‧‧0th data input/output bus

134‧‧‧第1資料輸入/輸出匯流排 134‧‧‧1st data input/output bus

202‧‧‧微處理器單元 202‧‧‧Microprocessor unit

204‧‧‧記憶體管理單元 204‧‧‧Memory Management Unit

206‧‧‧主機介面單元 206‧‧‧Host interface unit

208‧‧‧快閃記憶體介面單元 208‧‧‧Flash memory interface unit

210‧‧‧緩衝記憶體 210‧‧‧ Buffer memory

250‧‧‧轉換層 250‧‧‧Transfer layer

260-(0)、260-(1)‧‧‧邏輯區塊-實體區塊對映表 260-(0), 260-(1)‧‧‧ Logical Block-Physical Block Mapping Table

270‧‧‧邏輯區塊-邏輯區域對映表 270‧‧‧ Logical Block-Logical Area Mapping

292‧‧‧錯誤校正單元 292‧‧‧Error Correction Unit

294‧‧‧電源管理單元 294‧‧‧Power Management Unit

302‧‧‧系統區 302‧‧‧System Area

304‧‧‧資料區 304‧‧‧Information area

306‧‧‧備用區 306‧‧‧ spare area

308‧‧‧取代區 308‧‧‧Substitute area

350-(0)~350-(H)‧‧‧邏輯區塊 350-(0)~350-(H)‧‧‧ Logical Block

360-(0)~360-(1)‧‧‧邏輯區域 360-(0)~360-(1)‧‧‧ logical area

CM1‧‧‧第1主機讀取指令 CM1‧‧‧1st host read command

CM2‧‧‧第2主機讀取指令 CM2‧‧‧2nd host read command

CM3‧‧‧第3主機讀取指令 CM3‧‧‧3rd host read command

CM4‧‧‧第4主機讀取指令 CM4‧‧‧4th host read command

S601、S603、S605、S607、S609、S611、S613、S615、S617、S619‧‧‧資料讀取步驟 S601, S603, S605, S607, S609, S611, S613, S615, S617, S619‧‧‧ data reading steps

S901、S903、S905、S907、S909、S911、S913、S915、S917、S919‧‧‧資料讀取步驟 S901, S903, S905, S907, S909, S911, S913, S915, S917, S919‧‧‧ data reading steps

圖1A是根據本發明第一範例實施例繪示使用快閃記憶體儲存裝置的主機系統。 1A is a diagram showing a host system using a flash memory storage device in accordance with a first exemplary embodiment of the present invention.

圖1B是根據本發明範例實施例所繪示的電腦、輸入/輸出裝置與快閃記憶體儲存裝置的示意圖。 FIG. 1B is a schematic diagram of a computer, an input/output device, and a flash memory storage device according to an exemplary embodiment of the invention.

圖1C是根據本發明另一範例實施例所繪示的主機系統與快閃記憶體儲存裝置的示意圖。 FIG. 1C is a schematic diagram of a host system and a flash memory storage device according to another exemplary embodiment of the invention.

圖1D是繪示圖1A所示快閃記憶體儲存裝置的概要方塊圖。 FIG. 1D is a schematic block diagram showing the flash memory storage device of FIG. 1A.

圖2是根據本發明另一範例實施例所繪示的快閃記憶體控制器的概要方塊圖。 FIG. 2 is a schematic block diagram of a flash memory controller according to another exemplary embodiment of the invention.

圖3A是根據本發明第一範例實施例所繪示之快閃記憶體晶片的方塊圖。 FIG. 3A is a block diagram of a flash memory chip according to a first exemplary embodiment of the present invention.

圖3B是根據本發明第一範例實施例所繪示記錄邏輯區塊與實體區塊之間的對映示意圖。 FIG. 3B is a schematic diagram showing the mapping between a logical block and a physical block according to the first exemplary embodiment of the present invention.

圖4是根據本發明第一範例實施例所繪示的邏輯區塊與實體 區塊的對映範例示意圖。 4 is a logical block and an entity according to a first exemplary embodiment of the present invention. Schematic diagram of the mapping of blocks.

圖5A與圖5B是根據本發明第一範例實施例所繪示記憶體管理單元重新排列主機讀取指令以產生下達指令順序的範例示意圖。 5A and FIG. 5B are schematic diagrams showing an example of rearranging a host read command by a memory management unit to generate a command sequence according to a first exemplary embodiment of the present invention.

圖6是根據本發明第一範例實施例所繪示快閃記憶體控制器執行資料讀取方法的流程圖。 FIG. 6 is a flow chart showing a method for reading data by a flash memory controller according to a first exemplary embodiment of the present invention.

圖7A、圖7B與圖7C是根據本發明第二範例實施例所繪示記憶體管理單元重新排列主機讀取指令以產生下達指令順序的範例示意圖。 7A, FIG. 7B and FIG. 7C are schematic diagrams showing an example of rearranging a host read command by a memory management unit to generate a command sequence according to a second exemplary embodiment of the present invention.

圖8A、圖8B與圖8C是根據本發明第二範例實施例所繪示記憶體管理單元重新排列主機讀取指令以產生下達指令順序的範例示意圖。 8A, FIG. 8B and FIG. 8C are schematic diagrams showing an example of rearranging a host read command by a memory management unit to generate a command sequence according to a second exemplary embodiment of the present invention.

圖9根據本發明第二範例實施例所繪示快閃記憶體控制器執行資料讀取方法的流程圖。 FIG. 9 is a flowchart of a method for reading data by a flash memory controller according to a second exemplary embodiment of the present invention.

快閃記憶體儲存裝置一般而言包括快閃記憶體晶片與控制器(亦稱,控制電路)。通常快閃記憶體儲存裝置會與主機系統一起使用,以使主機系統可將資料寫入至快閃記憶體儲存裝置或從快閃記憶體儲存裝置中讀取資料。另外,亦有快閃記憶體儲存裝置是包括嵌入式快閃記憶體與可執行於主機系統上以實質地作為此嵌入式快閃記憶體之控制器的軟體。 Flash memory storage devices generally include a flash memory chip and controller (also referred to as a control circuit). Typically, the flash memory storage device is used with the host system to enable the host system to write data to or read data from the flash memory storage device. In addition, there are also flash memory storage devices that include embedded flash memory and software executable on the host system to substantially act as a controller for the embedded flash memory.

[第一範例實施例] [First Exemplary Embodiment]

圖1A是根據本發明第一範例實施例所繪示的使用快閃記憶體儲存裝置的主機系統。 FIG. 1A is a schematic diagram of a host system using a flash memory storage device according to a first exemplary embodiment of the present invention.

請參照圖1A,主機系統1000包括電腦1100與輸入/輸出(input/output,I/O)裝置1106。電腦1100包括微處理器1102、隨機存取記憶體(random access memory,RAM)1104、系統匯流排1108以及資料傳輸介面1110。輸入/輸出裝置1106包括如圖1B所示的滑鼠1202、鍵盤1204、顯示器1206與印表機1208。必須瞭解的是,圖1B所示的裝置非限制輸入/輸出裝置1106,輸入/輸出裝置1106可更包括其他裝置。 Referring to FIG. 1A, the host system 1000 includes a computer 1100 and an input/output (I/O) device 1106. The computer 1100 includes a microprocessor 1102, a random access memory (RAM) 1104, a system bus 1108, and a data transmission interface 1110. The input/output device 1106 includes a mouse 1202, a keyboard 1204, a display 1206, and a printer 1208 as shown in FIG. 1B. It must be understood that the device shown in FIG. 1B is not limited to the input/output device 1106, and the input/output device 1106 may further include other devices.

在本發明實施例中,快閃記憶體儲存裝置100是透過資料傳輸介面1110與主機系統1000的其他元件耦接。藉由微處理器1102、隨機存取記憶體1104與輸入/輸出裝置1106的處理主機系統1000可將資料寫入至快閃記憶體儲存裝置100或從快閃記憶體儲存裝置100中讀取資料。例如,快閃記憶體儲存裝置100可以是如圖1B所示的隨身碟1212、記憶卡1214或固態硬碟(Solid State Drive,SSD)1216。 In the embodiment of the present invention, the flash memory storage device 100 is coupled to other components of the host system 1000 through the data transmission interface 1110. The processing host system 1000 of the microprocessor 1102, the random access memory 1104, and the input/output device 1106 can write data to or read data from the flash memory storage device 100. . For example, the flash memory storage device 100 may be a flash drive 1212, a memory card 1214, or a solid state drive (SSD) 1216 as shown in FIG. 1B.

一般而言,主機系統1000可實質地為可儲存資料的任意系統。雖然在本範例實施例中,主機系統1000是以電腦系統來作說明,然而,在本發明另一範例實施例中,主機系統1000亦可以是數位相機、攝影機、通信裝置、音訊播放器或視訊播放器等系統。例如,在主機系統為數位相機1310時,快閃記憶體儲存裝置 則為其所使用的SD卡1312、MMC卡1314、記憶棒(memory stick)1316、CF卡1318或嵌入式儲存裝置1320(如圖1C所示)。嵌入式儲存裝置1320包括嵌入式多媒體卡(Embedded MMC,eMMC)。值得一提的是,嵌入式多媒體卡是直接耦接於主機系統的基板上。 In general, host system 1000 can be substantially any system that can store data. In the exemplary embodiment, the host system 1000 is illustrated by a computer system. However, in another exemplary embodiment of the present invention, the host system 1000 may also be a digital camera, a camera, a communication device, an audio player, or a video. Players and other systems. For example, when the host system is a digital camera 1310, the flash memory storage device Then, it is used for the SD card 1312, the MMC card 1314, the memory stick 1316, the CF card 1318, or the embedded storage device 1320 (as shown in FIG. 1C). The embedded storage device 1320 includes an embedded multimedia card (Embedded MMC, eMMC). It is worth mentioning that the embedded multimedia card is directly coupled to the substrate of the host system.

圖1D是繪示圖1A所示的快閃記憶體儲存裝置100的概要方塊圖。 FIG. 1D is a schematic block diagram showing the flash memory storage device 100 shown in FIG. 1A.

請參照圖1D,快閃記憶體儲存裝置100包括連接器102、快閃記憶體控制器104與快閃記憶體晶片106。 Referring to FIG. 1D, the flash memory storage device 100 includes a connector 102, a flash memory controller 104, and a flash memory chip 106.

連接器102是耦接至快閃記憶體控制器104並且用以耦接至主機系統1000。在本範例實施例中,連接器102為序列先進附件(Serial Advanced Technology Attachment,SATA)連接器。然而,本發明不限於此,在本發明另一範例實施例中,連接器102可以是其他適合的連接器。 The connector 102 is coupled to the flash memory controller 104 and is coupled to the host system 1000. In the present exemplary embodiment, the connector 102 is a Serial Advanced Technology Attachment (SATA) connector. However, the present invention is not limited thereto, and in another exemplary embodiment of the present invention, the connector 102 may be other suitable connectors.

快閃記憶體控制器104會執行以硬體型式或韌體型式實作的多個邏輯閘或控制指令,並且根據主機系統1000的指令在快閃記憶體晶片106中進行資料的寫入、讀取與抹除等運作。快閃記憶體控制器104包括微處理器單元202、記憶體管理單元204、主機介面單元206、快閃記憶體介面單元208與緩衝記憶體210。 The flash memory controller 104 executes a plurality of logic gates or control instructions implemented in a hard type or a firmware type, and writes and reads data in the flash memory chip 106 in accordance with an instruction from the host system 1000. Take and erase and other operations. The flash memory controller 104 includes a microprocessor unit 202, a memory management unit 204, a host interface unit 206, a flash memory interface unit 208, and a buffer memory 210.

微處理器單元202為快閃記憶體控制器104的主控單元,用以與記憶體管理單元204、主機介面單元206、快閃記憶體介面單元208與緩衝記憶體210等協同合作以進行快閃記憶體儲 存裝置100的各種運作。 The microprocessor unit 202 is a main control unit of the flash memory controller 104, and cooperates with the memory management unit 204, the host interface unit 206, the flash memory interface unit 208, and the buffer memory 210 to perform fast. Flash memory Various operations of the device 100 are stored.

記憶體管理單元204是耦接至微處理器單元202,用以執行根據本範例實施例的資料讀取機制與區塊管理機制,記憶體管理單元204的運作將於以下配合圖式作詳細說明。 The memory management unit 204 is coupled to the microprocessor unit 202 for performing the data reading mechanism and the block management mechanism according to the exemplary embodiment. The operation of the memory management unit 204 will be described in detail below. .

在本範例實施例中,記憶體管理單元204是以一韌體型式實作在快閃記憶體控制器104中。例如,將包括多個控制指令的記憶體管理單元204燒錄至一程式記憶體(例如,唯讀記憶體(Read Only Memory,ROM))中並且將此程式記憶體嵌入在快閃記憶體控制器104中,當快閃記憶體儲存裝置100運作時,記憶體管理單元204的多個控制指令會由微處理器單元202來執行以完成根據本發明實施例的資料讀取機制與區塊管理機制。 In the present exemplary embodiment, the memory management unit 204 is implemented in the flash memory controller 104 in a firmware version. For example, the memory management unit 204 including a plurality of control instructions is burned into a program memory (for example, a read only memory (ROM)) and the program memory is embedded in the flash memory control. In the processor 104, when the flash memory storage device 100 operates, a plurality of control commands of the memory management unit 204 are executed by the microprocessor unit 202 to complete the data reading mechanism and the block management according to the embodiment of the present invention. mechanism.

在本發明另一範例實施例中,記憶體管理單元204的控制指令亦可以程式碼型式儲存於快閃記憶體晶片106的特定區域(例如,快閃記憶體晶片中專用於存放系統資料的系統區)中。同樣的,當快閃記憶體儲存裝置100運作時,記憶體管理單元204的多個控制指令會由微處理器單元202來執行。此外,在本發明另一範例實施例中,記憶體管理單元204亦可以一硬體型式實作在快閃記憶體控制器104中。 In another exemplary embodiment of the present invention, the control command of the memory management unit 204 may also be stored in a specific area of the flash memory chip 106 in a coded format (for example, a system dedicated to storing system data in a flash memory chip). District). Similarly, when the flash memory storage device 100 operates, a plurality of control commands of the memory management unit 204 are executed by the microprocessor unit 202. In addition, in another exemplary embodiment of the present invention, the memory management unit 204 can also be implemented in the flash memory controller 104 in a hardware format.

主機介面單元206是耦接至微處理器單元202並且用以接收與識別主機系統1000所傳送的指令與資料。也就是說,主機系統1000所傳送的指令與資料會透過主機介面單元206來傳送至微處理器單元202。在本範例實施例中,主機介面單元206是對應 連接器204為SATA介面。然而,必須瞭解的是本發明不限於此,主機介面單元206亦可以是其他適合的資料傳輸介面。 The host interface unit 206 is coupled to the microprocessor unit 202 and is configured to receive and identify instructions and materials transmitted by the host system 1000. That is to say, the instructions and data transmitted by the host system 1000 are transmitted to the microprocessor unit 202 through the host interface unit 206. In the present exemplary embodiment, the host interface unit 206 is corresponding. Connector 204 is a SATA interface. However, it must be understood that the present invention is not limited thereto, and the host interface unit 206 may also be other suitable data transmission interfaces.

快閃記憶體介面單元208是耦接至微處理器單元202並且用以存取快閃記憶體晶片106。也就是說,欲寫入至快閃記憶體晶片106的資料會經由快閃記憶體介面單元208轉換為快閃記憶體晶片106所能接受的格式。 The flash memory interface unit 208 is coupled to the microprocessor unit 202 and is used to access the flash memory chip 106. That is, the data to be written to the flash memory chip 106 is converted to a format acceptable to the flash memory chip 106 via the flash memory interface unit 208.

緩衝記憶體210是耦接至微處理器單元202並且用以暫存來自於主機系統1000的資料與指令或來自於快閃記憶體晶片106的資料。值得一提的是,在本範例實施例中,緩衝記憶體210是配置在快閃記憶體控制器104中,然而,本發明不限於此,緩衝記憶體210亦可不配置在快閃記憶體控制器104中。 The buffer memory 210 is coupled to the microprocessor unit 202 and is used to temporarily store data and instructions from the host system 1000 or data from the flash memory chip 106. It should be noted that, in the exemplary embodiment, the buffer memory 210 is disposed in the flash memory controller 104. However, the present invention is not limited thereto, and the buffer memory 210 may not be configured in the flash memory control. In the device 104.

在本發明另一範例實施例中,快閃記憶體控制器亦可更包括其他功能模組。圖2是根據本發明另一範例實施例所繪示的快閃記憶體控制器的概要方塊圖。 In another exemplary embodiment of the present invention, the flash memory controller may further include other functional modules. FIG. 2 is a schematic block diagram of a flash memory controller according to another exemplary embodiment of the invention.

請參照圖2,除了微處理器單元202、記憶體管理單元204、主機介面單元206與、快閃記憶體介面單元208與緩衝記憶體210之外,快閃記憶體控制器104'更包括錯誤校正單元292與電源管理單元294。 Referring to FIG. 2, in addition to the microprocessor unit 202, the memory management unit 204, the host interface unit 206, the flash memory interface unit 208, and the buffer memory 210, the flash memory controller 104' further includes an error. Correction unit 292 and power management unit 294.

錯誤校正單元292是耦接至微處理器單元202並且用以執行一錯誤校正程序以確保資料的正確性。具體來說,當主機介面單元206從主機系統1000中接收到主機寫入指令時,錯誤校正單元292會為對應此主機寫入指令的寫入資料產生對應的錯誤檢 查與校正碼(Error Checking and Correcting Code,ECC Code),並且記憶體管理單元204會將此寫入資料與對應的錯誤校正碼寫入至快閃記憶體晶片106中。而,當主機介面單元206從主機系統1000中接收到主機讀取指令時,記憶體管理單元204會從快閃記憶體晶片106中讀取對應此主機讀取指令的資料及其錯誤校正碼,並且錯誤校正單元292會依據此錯誤校正碼對所讀取的資料執行錯誤校正。 The error correction unit 292 is coupled to the microprocessor unit 202 and is configured to perform an error correction procedure to ensure the correctness of the data. Specifically, when the host interface unit 206 receives a host write command from the host system 1000, the error correcting unit 292 generates a corresponding error check for the write data corresponding to the host write command. The Error Checking and Correcting Code (ECC Code) is written, and the memory management unit 204 writes the write data and the corresponding error correction code into the flash memory chip 106. When the host interface unit 206 receives the host read command from the host system 1000, the memory management unit 204 reads the data corresponding to the host read command and the error correction code from the flash memory chip 106. And the error correction unit 292 performs error correction on the read data according to the error correction code.

電源管理單元294是耦接至微處理器單元202並且用以控制快閃記憶體儲存裝置100的電源。 The power management unit 294 is coupled to the microprocessor unit 202 and is used to control the power of the flash memory storage device 100.

快閃記憶體晶片106是耦接至快閃記憶體控制器104並且用以儲存資料。快閃記憶體晶片106包括第0快閃記憶體模組122與第1快閃記憶體模組124。第0快閃記憶體模組122具有實體區塊122-(0)~122-(N),並且第1快閃記憶體模組124具有實體區塊124-(0)~124-(N)。實體區塊為抹除之最小單位。亦即,每一實體區塊含有最小數目之一併被抹除之記憶胞。每一實體區塊具有數個實體頁面(page)。在本範例實施例中,實體頁面為程式化的最小單元。換言之,實體頁面為寫入資料或讀取資料的最小單元。每一實體頁面通常包括使用者資料區與冗餘區。使用者資料區用以儲存使用者的資料,而冗餘區用以儲存系統的資料(例如,錯誤檢查與校正碼)。在本範例實施例中,第0快閃記憶體模組122與第1快閃記憶體模組124為多層記憶胞(Multi Level Cell,MLC)NAND快閃記憶體模組。然而,本發明不限於此,第0快閃 記憶體模組122與第1快閃記憶體模組124亦可是單層記憶胞(Single Level Cell,SLC)NAND快閃記憶體模組。 The flash memory chip 106 is coupled to the flash memory controller 104 and is used to store data. The flash memory chip 106 includes a 0th flash memory module 122 and a first flash memory module 124. The 0th flash memory module 122 has physical blocks 122-(0)~122-(N), and the first flash memory module 124 has physical blocks 124-(0)~124-(N) . The physical block is the smallest unit of erasure. That is, each physical block contains one of the smallest number of erased memory cells. Each physical block has several physical pages. In this exemplary embodiment, the physical page is the smallest unit that is stylized. In other words, the physical page is the smallest unit for writing data or reading data. Each physical page typically includes a user data area and a redundant area. The user data area is used to store user data, while the redundant area is used to store system data (eg, error checking and correction codes). In the exemplary embodiment, the 0th flash memory module 122 and the first flash memory module 124 are multi-level cell (MLC) NAND flash memory modules. However, the present invention is not limited to this, the 0th flash The memory module 122 and the first flash memory module 124 may also be a single level cell (SLC) NAND flash memory module.

值得一提的是,由於快閃記憶體的記憶胞僅能從“1”程式化為“0”,因此要更新實體區塊內的資料時必須先抹除實體區塊內的資料。然而,快閃記憶體的寫入是以頁面為單位,而抹除是以實體區塊為單位,所以在本範例實施例中,實體區塊會以輪替方式來儲存資料。 It is worth mentioning that since the memory cells of the flash memory can only be programmed from "1" to "0", the data in the physical block must be erased first when updating the data in the physical block. However, the writing of the flash memory is in units of pages, and the erasing is in units of physical blocks, so in the present exemplary embodiment, the physical blocks store data in a rotating manner.

圖3A是根據本發明第一範例實施例所繪示之快閃記憶體晶片的方塊圖。必須瞭解的是,在此描述快閃記憶體之實體區塊的運作時,以“提取”、“交換”、“分組”、“輪替”等詞來操作實體區塊是邏輯上的概念。也就是說,快閃記憶體之實體區塊的實際位置並未更動,而是邏輯上對快閃記憶體的實體區塊進行操作。 FIG. 3A is a block diagram of a flash memory chip according to a first exemplary embodiment of the present invention. It must be understood that when describing the operation of the physical block of the flash memory, the operation of the physical block by the words "extract", "swap", "group", "rotate" is a logical concept. That is to say, the actual location of the physical block of the flash memory is not changed, but logically operates on the physical block of the flash memory.

請參照圖3A,記憶體管理單元204會將實體區塊122-(0)~122-(N)與實體區塊124-(0)~124-(N)分組為邏輯地分組為系統區(system area)302、資料區(data area)304、備用區(spare area)306與取代區(replacement area)308。 Referring to FIG. 3A, the memory management unit 204 logically groups the physical blocks 122-(0)-122-(N) and the physical blocks 124-(0)-124-(N) into system regions ( A system area 302, a data area 304, a spare area 306, and a replacement area 308.

邏輯上屬於系統區302的實體區塊122-(0)~122-(S)與實體區塊124-(0)~124-(S)是用以記錄提供給快閃記憶體控制器104的系統資料,此系統資料包括關於快閃記憶體晶片的製造商與型號、每一快閃記憶體模組的區域數、每一區域的實體區塊的數目、每一實體區塊的實體頁面數等。因此,在一般存取狀態下,主機 系統1000是無法存取系統區中的實體區塊。 The physical blocks 122-(0)-122-(S) and the physical blocks 124-(0)-124-(S) logically belonging to the system area 302 are used for recording and providing to the flash memory controller 104. System data, which includes the manufacturer and model of the flash memory chip, the number of regions per flash memory module, the number of physical blocks per region, and the number of physical pages per physical block. Wait. Therefore, in the normal access state, the host System 1000 is unable to access physical blocks in the system area.

邏輯上屬於資料區304的實體區塊122-(S+1)~~122-(D)與實體區塊124-(S+1)~124-(D)是用以儲存主機系統1000所寫入的資料。一般來說,資料區304的實體區塊為主機系統1000存取之邏輯區塊所對映的實體區塊。也就是說,資料區的實體區塊為儲存有效資料的實體區塊。 The physical blocks 122-(S+1)~~122-(D) and the physical blocks 124-(S+1)~124-(D) logically belonging to the data area 304 are used to store the host system 1000 writes. Information entered. In general, the physical block of data area 304 is the physical block mapped by the logical block accessed by host system 1000. That is to say, the physical block of the data area is a physical block storing valid data.

邏輯上屬於備用區306的實體區塊122-(D+1)~~122-(A)與實體區塊124-(D+1)~124-(A)是用以輪替資料區中的實體區塊,因此在備用區306中的實體區塊為空或可使用的單元,即無記錄資料或標記為已沒用的無效資料。也就是說,資料區304與備用區306的實體區塊會以輪替方式來儲存主機系統1000對快閃記憶體儲存裝置100寫入的資料。 The physical block 122-(D+1)~~122-(A) and the physical block 124-(D+1)~124-(A) logically belonging to the spare area 306 are used to rotate the data area. The physical block, and thus the physical block in the spare area 306 is empty or usable units, that is, no recorded data or invalid data marked as useless. That is to say, the physical area of the data area 304 and the spare area 306 stores the data written by the host system 1000 to the flash memory storage device 100 in a rotating manner.

邏輯上屬於取代區306中的實體區塊122-(A+1)~122-(N)與實體區塊124-(A+1)~124-(N)是替代實體區塊。例如,快閃記憶體晶片106於出廠時會預留4%的實體區塊作為更換使用。也就是說,當系統區302、資料區304與備用區306中的實體區塊損毀時,預留於取代區308中的實體區塊可用以取代損壞的實體區塊(即,壞實體區塊(bad block))。因此,倘若取代區308中仍存有可用之實體區塊且發生實體區塊損毀時,記憶體管理模組204會從取代區308中提取可用的實體區塊來更換損毀的實體區塊。倘若取代區308中無可用之實體區塊且發生實體區塊損毀時,則快閃記憶體儲存裝置100將會被宣告為寫入保護(write protect),而無法再 寫入資料。因此,在一般存取狀態下,主機系統1000是無法存取取代區中的實體區塊。 The physical blocks 122-(A+1)~122-(N) and the physical blocks 124-(A+1)~124-(N) logically belonging to the replacement area 306 are substitute physical blocks. For example, the flash memory chip 106 will reserve 4% of the physical block for replacement when it leaves the factory. That is, when the physical block in the system area 302, the data area 304, and the spare area 306 is destroyed, the physical block reserved in the replacement area 308 can be used to replace the damaged physical block (ie, the bad physical block). (bad block)). Therefore, if there is still a physical block available in the replacement area 308 and the physical block is damaged, the memory management module 204 extracts the available physical block from the replacement area 308 to replace the damaged physical block. If there is no physical block available in the replacement area 308 and the physical block is damaged, the flash memory storage device 100 will be declared as write protect, and can no longer be used. Write data. Therefore, in the normal access state, the host system 1000 is unable to access the physical block in the replacement area.

必須瞭解的是,在快閃記憶體儲存裝置100的運作中,實體區塊122-(0)~122-(N)與實體區塊124-(0)~124-(N)被分組為系統區302、資料區304、備用區306與取代區308的分組關係會動態地變動。也就是說,當記憶體管理單元204將資料寫入至原本屬於備用區306的實體區塊(例如,實體區塊122-(D+1))後,此實體區塊會被關聯為資料區304。或者,當資料區304(或備用區306)中的實體區塊損壞時而被取代區308的實體區塊取代時,則此來自於取代區308的實體區塊會被關聯為資料區304(或備用區304)。 It must be understood that in the operation of the flash memory storage device 100, the physical blocks 122-(0)-122-(N) and the physical blocks 124-(0)-124-(N) are grouped into systems. The grouping relationship of the area 302, the data area 304, the spare area 306, and the replacement area 308 dynamically changes. That is, when the memory management unit 204 writes the material to the physical block originally belonging to the spare area 306 (for example, the physical block 122-(D+1)), the physical block is associated as the data area. 304. Alternatively, when the physical block in the data area 304 (or the spare area 306) is damaged and replaced by the physical block of the replaced area 308, then the physical block from the replaced area 308 is associated with the data area 304 ( Or spare area 304).

例如,當快閃記憶體儲存裝置100接受到主機系統1000的主機寫入指令而欲更新(或寫入)資料至資料區中某一實體區塊的某一頁面時,記憶體管理單元204會從備用區中提取一實體區塊並且將欲被更新的實體區塊中的有效舊資料與欲寫入的新資料寫入至從備用區中提取之實體區塊的頁面中,並且將已寫入有效舊資料與新資料的實體區塊邏輯地關聯為資料區,並且將資料區中欲被更新的實體區塊進行抹除並邏輯地關聯為備用區。 For example, when the flash memory storage device 100 receives a host write command from the host system 1000 and wants to update (or write) the data to a certain page of a physical block in the data area, the memory management unit 204 Extracting a physical block from the spare area and writing the valid old data in the physical block to be updated and the new data to be written into the page of the physical block extracted from the spare area, and will write The physical blocks in which the valid old data and the new data are logically associated are logically associated with the data area, and the physical blocks in the data area to be updated are erased and logically associated as spare areas.

為了能夠讓主機系統1000能夠順利地存取以輪替方式儲存資料的實體區塊,快閃記憶體儲存裝置100會提供邏輯區塊給主機系統1000,並且記錄邏輯區塊與實體區塊之間的對映關係。 In order to enable the host system 1000 to smoothly access physical blocks storing data in a rotating manner, the flash memory storage device 100 provides logical blocks to the host system 1000 and records between the logical blocks and the physical blocks. The mapping relationship.

圖3B是根據本發明第一範例實施例所繪示之記錄邏輯區塊與實體區塊之間的對映示意圖。 FIG. 3B is a schematic diagram of mapping between a logical block and a physical block according to the first exemplary embodiment of the present invention.

請參照圖3B,快閃記憶體控制器104會配置邏輯區塊350-(0)~350-(H)給主機系統1000來進行存取,並且提供轉換層250來將邏輯區塊350-(0)~350-(H)對映至快閃記憶體晶片106之資料區304的實體區塊122-(S+1)~122-(D)與實體區塊124-(S+1)~124-(D)。必須瞭解的是,如上所述,實體區塊122-(0)~122-(N)與實體區塊124-(0)~124-(N)被分組為系統區302、資料區304、備用區306與取代區308的分組關係會隨著快閃記憶體裝置100的運作動態地變動,因此,邏輯區塊350-(0)~350-(H)與實體區塊122-(S+1)~122-(D)和實體區塊124-(S+1)~124-(D)之間的對映關係亦會動態地改變。例如,在邏輯區塊350-(0)對映資料區304的實體區塊122-(S+1)的例子中,倘若主機系統1000欲更新實體區塊122-(S+1)中的資料時,記憶體管理單元204從備用區306中提取實體區塊122-(D+1)以將資料寫入至實體區塊122-(D+1),並且將實體區塊122-(D+1)關聯為資料區304及將實體區塊122-(S+1)關聯為備用區306。此時,邏輯區塊350-(0)會變成對映實體區塊122-(D+1)。 Referring to FIG. 3B, the flash memory controller 104 configures logic blocks 350-(0)-350-(H) for access to the host system 1000, and provides a translation layer 250 to logical block 350-( 0)~350-(H) is mapped to the physical block 122-(S+1)~122-(D) of the data area 304 of the flash memory chip 106 and the physical block 124-(S+1)~ 124-(D). It must be understood that, as described above, the physical blocks 122-(0)-122-(N) and the physical blocks 124-(0)-124-(N) are grouped into the system area 302, the data area 304, and the standby. The grouping relationship between the area 306 and the replacement area 308 dynamically changes with the operation of the flash memory device 100. Therefore, the logical blocks 350-(0)-350-(H) and the physical block 122-(S+1) The mapping relationship between ~122-(D) and physical block 124-(S+1)~124-(D) also dynamically changes. For example, in the example of the physical block 122-(S+1) of the logical block 350-(0) mapping data area 304, if the host system 1000 wants to update the data in the physical block 122-(S+1) At this time, the memory management unit 204 extracts the physical block 122-(D+1) from the spare area 306 to write the material to the physical block 122-(D+1), and the physical block 122-(D+ 1) Associated with data area 304 and associated physical block 122-(S+1) as spare area 306. At this time, the logical block 350-(0) becomes the entropy physical block 122-(D+1).

在本範例實施例中,轉換層250具有邏輯區塊-實體區塊對映表(logical block-physical block mapping table)以記錄邏輯區塊所對映的實體區塊。並且,主機系統1000僅需在所提供之邏輯區塊350-(0)~350-(H)上存取資料,而快閃記憶體控制器104會依據邏輯區塊-實體區塊對映表來在實體區塊中實際地寫入與讀取資料。例如,每一邏輯區塊350-(0)~350-(H)會包括多個邏輯頁面, 且每一邏輯頁面是由多個邏輯扇區所組成,其中此些邏輯扇區就是主機系統1000的存取單位,因此當主機系統1000在此些邏輯扇區中存取資料時,快閃記憶體控制器104就可依據所存取之邏輯扇區所屬的邏輯區塊來在實體區塊中實際地存取資料。 In the present exemplary embodiment, the translation layer 250 has a logical block-physical block mapping table to record the physical blocks mapped by the logical blocks. Moreover, the host system 1000 only needs to access data on the provided logical blocks 350-(0)-350-(H), and the flash memory controller 104 will map according to the logical block-physical block mapping table. To actually write and read data in the physical block. For example, each logical block 350-(0)~350-(H) will include multiple logical pages. And each logical page is composed of a plurality of logical sectors, wherein the logical sectors are access units of the host system 1000, so when the host system 1000 accesses data in the logical sectors, the flash memory The body controller 104 can actually access the data in the physical block according to the logical block to which the accessed logical sector belongs.

此外,值得一提的是,邏輯區塊-實體區塊對映表會被儲存於快閃記憶體晶片106中(例如,系統區中),並且在快閃記憶體儲存裝置100運作期間,邏輯區塊-實體區塊對映表會被載入至緩衝記憶體210中以使得記憶體管理單元204能夠讀取與更新邏輯區塊-實體區塊對映表。然而,在緩衝記憶體210的儲存空間有限下,緩衝記憶體210無法暫存記錄所有邏輯區塊之對映關係的邏輯區塊-實體區塊對映表。因此,在本範例實施例中記憶體管理單元204會將邏輯區塊350-(0)~350-(H)分組為邏輯區域(logical zone)360-(0)與360-(1),並且為邏輯區域360-(0)與360-(1)分別地配置邏輯區塊-實體區塊對映表260-(0)~260-(1)。具體來說,在邏輯區塊350-(0)~350-(H)之中邏輯區塊350-(0)~350-(G)會被分組為邏輯區域360-(0)並且邏輯區塊350(G+1)~350-(H)會被分組為邏輯區域360-(1),其中邏輯區塊350-(0)~350-(G)的對映資訊會被記錄在邏輯區塊-實體區塊對映表260-(0)中,而邏輯區塊350(G+1)~350-(H)對映資訊會被記錄在邏輯區塊-實體區塊對映表260-(1)。也就是說,每一邏輯區塊會屬於其中一個邏輯區域,並且記憶體管理單元204將邏輯區塊的對映關係分別地記錄在其所屬之邏輯區域的邏輯區塊-實體區塊對映表中。基此,當主機系 統1000欲存取某一邏輯區塊時,記憶體管理單元204會依據欲存取之邏輯區塊所屬的邏輯區域來從快閃記憶體晶片106中載入對應的邏輯區塊-實體區塊對映表至緩衝記憶體210,並且依據對應的邏輯區塊-實體區塊對映表來進行資料的存取。之後,當需存取另一邏輯區域的邏輯區塊時,記憶體管理單元204會將目前使用之邏輯區塊-實體區塊對映表回存至快閃記憶體晶片106中並載入對應的另一邏輯區塊-實體區塊對映表至緩衝記憶體210。基此,可避免緩衝記憶體210無法儲存所有邏輯區塊之對映關係的問題。必須瞭解的是,在本範例實施例中,雖然是將邏輯區塊區分為兩個邏輯區域來作說明,然而本發明不限於此,上述邏輯區域的數目可為任意數目。 In addition, it is worth mentioning that the logical block-physical block mapping table is stored in the flash memory chip 106 (eg, in the system area), and during operation of the flash memory storage device 100, logic The block-physical block mapping table is loaded into the buffer memory 210 to enable the memory management unit 204 to read and update the logical block-physical block mapping table. However, under the limited storage space of the buffer memory 210, the buffer memory 210 cannot temporarily store the logical block-physical block mapping table that records the mapping relationship of all logical blocks. Therefore, in the present exemplary embodiment, the memory management unit 204 groups the logical blocks 350-(0)-350-(H) into logical zones 360-(0) and 360-(1), and The logical block-physical block mapping table 260-(0)~260-(1) is configured for the logical regions 360-(0) and 360-(1), respectively. Specifically, among the logical blocks 350-(0)-350-(H), the logical blocks 350-(0)-350-(G) are grouped into logical regions 360-(0) and logical blocks. 350(G+1)~350-(H) will be grouped into logical area 360-(1), where the mapping information of logical blocks 350-(0)~350-(G) will be recorded in the logical block. - The physical block mapping table 260-(0), and the logical block 350 (G+1) ~ 350-(H) mapping information will be recorded in the logical block-physical block mapping table 260-( 1). That is to say, each logical block belongs to one of the logical areas, and the memory management unit 204 records the mapping relationship of the logical blocks separately in the logical block-physical block mapping table of the logical area to which it belongs. in. Based on the host system When the system 1000 wants to access a certain logical block, the memory management unit 204 loads the corresponding logical block-physical block from the flash memory chip 106 according to the logical area to which the logical block to be accessed belongs. The mapping table is buffered to the memory 210, and the data is accessed according to the corresponding logical block-physical block mapping table. Then, when the logical block of another logical area needs to be accessed, the memory management unit 204 restores the currently used logical block-physical block mapping table to the flash memory chip 106 and loads the corresponding Another logical block - physical block mapping table to buffer memory 210. Based on this, the problem that the buffer memory 210 cannot store the mapping relationship of all logical blocks can be avoided. It should be understood that, in the present exemplary embodiment, although the logical block is divided into two logical areas for illustration, the present invention is not limited thereto, and the number of the above logical areas may be any number.

為能夠識別每一邏輯區塊所對映的邏輯區域,在本範例實施例中,轉換層250包括邏輯區塊-邏輯區域對映表270以記錄邏輯區塊與邏輯區域之間的對映關係。例如,邏輯區塊-邏輯區域對映表270會被儲存在快閃記憶體晶片106中(例如,系統區中),並且在快閃記憶體儲存裝置100運作時,記憶體管理單元204會將邏輯區塊-邏輯區域對映表270載入至緩衝記憶體210並且依據邏輯區塊-邏輯區域對映表270來載入對應的邏輯區塊-實體區塊對映表。另外,在快閃記憶體儲存裝置100準備停止運作時,記憶體管理單元204會將邏輯區塊-邏輯區域對映表270回存至快閃記憶體晶片106中。值得一提的是,在本範例實施例中,記憶體管理單元204是透過維護邏輯區塊-邏輯區域對映表270來記錄邏 輯區塊與邏輯區域的對映關係,然而在本發明另一範例實施例中,記憶體管理單元204亦可透過一數學運算式來判斷邏輯區塊所屬的邏輯區域,或者使用邏輯區塊-實體區塊對映表來記錄邏輯區塊所屬的邏輯區域。 In order to be able to identify the logical region mapped by each logical block, in the present exemplary embodiment, the translation layer 250 includes a logical block-logical region mapping table 270 to record the mapping relationship between the logical block and the logical region. . For example, the logical block-logical area mapping table 270 will be stored in the flash memory chip 106 (eg, in the system area), and when the flash memory storage device 100 is in operation, the memory management unit 204 will The logical block-logical area mapping table 270 is loaded into the buffer memory 210 and loads the corresponding logical block-physical block mapping table in accordance with the logical block-logical area mapping table 270. In addition, the memory management unit 204 restores the logical block-logical area mapping table 270 to the flash memory chip 106 when the flash memory storage device 100 is ready to stop operating. It is worth mentioning that in the present exemplary embodiment, the memory management unit 204 records the logic through the maintenance logic block-logical area mapping table 270. The mapping relationship between the block and the logical area, however, in another exemplary embodiment of the present invention, the memory management unit 204 can also determine the logical area to which the logical block belongs by using a mathematical operation, or use a logical block - The physical block mapping table records the logical area to which the logical block belongs.

在本範例實施例中,在第0快閃記憶體模組122與快閃記憶體控制器104之間配置有第0資料輸入/輸出匯流排132,且在第1快閃記憶體模組124與快閃記憶體控制器104之間配置有第1資料輸入/輸出匯流排134,也就是說,快閃記憶體控制器104是經由第0資料輸入/輸出匯流排132來存取實體區塊122-(0)~122-(N),並且是經由第1資料輸入/輸出匯流排134來存取實體區塊124-(0)~124-(N)。特別是,第0資料輸入/輸出匯流排132與第1資料輸入/輸出匯流排134是彼此獨立,因此快閃記憶體控制器104能夠同時使用第0資料輸入/輸出匯流排132與第1資料輸入/輸出匯流排134來存取第0快閃記憶體模組122與第1快閃記憶體模組124。 In the present exemplary embodiment, the 0th data input/output bus 132 is disposed between the 0th flash memory module 122 and the flash memory controller 104, and is in the first flash memory module 124. A first data input/output bus 134 is disposed between the flash memory controller 104 and the flash memory controller 104. That is, the flash memory controller 104 accesses the physical block via the 0th data input/output bus 132. 122-(0)~122-(N), and the physical blocks 124-(0)~124-(N) are accessed via the first data input/output bus 134. In particular, the 0th data input/output bus 132 and the first data input/output bus 134 are independent of each other, so the flash memory controller 104 can simultaneously use the 0th data input/output bus 132 and the first data. The input/output bus 134 accesses the 0th flash memory module 122 and the first flash memory module 124.

例如,在主機系統1000欲讀取邏輯區塊350-(0)中的資料且目前邏輯區塊350-(0)是對映實體區塊122-(S+1)的例子中,當記憶體管理單元204從主機系統1000接收到主機讀取指令時,記憶體管理單元204會依據主機讀取指令中的資訊判斷此主機讀取指令是對應邏輯區塊350-(0)並且依據邏輯區塊350-(0)所屬的邏輯區域對應的邏輯區塊-實體區塊對映表(例如,邏輯區塊-實體區塊對映表260-0)而識別邏輯區塊350-(0)是對映實體區塊122-(S+1)。 此外,由於實體區塊122-(S+1)是屬於第0快閃記憶體模組122,因此記憶體管理單元204會判斷此主機讀取指令是對應第0資料輸入/輸出匯流排132,也就是說,記憶體管理單元204會經由第0資料輸入/輸出匯流排132來讀取此主機讀取指令欲讀取的資料。 For example, in the example where the host system 1000 wants to read the data in the logical block 350-(0) and the current logical block 350-(0) is the mapping entity block 122-(S+1), when the memory When the management unit 204 receives the host read command from the host system 1000, the memory management unit 204 determines that the host read command is the corresponding logical block 350-(0) according to the information in the host read command and according to the logical block. The logical block-physical block mapping table corresponding to the logical region to which 350-(0) belongs (for example, logical block-physical block mapping table 260-0) and the logical block 350-(0) is The physical block 122-(S+1) is mapped. In addition, since the physical block 122-(S+1) belongs to the 0th flash memory module 122, the memory management unit 204 determines that the host read command is corresponding to the 0th data input/output bus 132. That is to say, the memory management unit 204 reads the data to be read by the host read command via the 0th data input/output bus 132.

值得一提的是,在本發明範例實施例中,當主機系統1000欲下達多個主機讀取指令時,主機系統1000會先傳送關於此些主機讀取指令的指令排序資訊。藉由此指令排序資訊,記憶體管理單元204會依據所有主機讀取指令所對應的邏輯區塊與所對應的資料輸入/輸出匯流排來重新排列此些主機讀取指令的順序以產生下達指令順序,並且將所產生之下達指令順序回應給主機系統1000。之後,主機系統1000會依照所接收到的下達指令順序來傳送此些主機讀取指令。 It is worth mentioning that in the exemplary embodiment of the present invention, when the host system 1000 wants to issue a plurality of host read commands, the host system 1000 first transmits instruction sorting information about the host read commands. By sorting the information by the instruction, the memory management unit 204 rearranges the order of the host read instructions according to the logical block corresponding to all the host read instructions and the corresponding data input/output bus to generate the release command. The order is followed, and the generated instructions are sequentially returned to the host system 1000. Thereafter, the host system 1000 transmits the host read commands in accordance with the received order of the issued instructions.

例如,主機系統1000會使用原生指令排序(Native Command Queuing,NCQ)來傳送關於多個主機讀取指令的指令排序資訊。在使用NCQ協定來傳送關於多個主機讀取指令的指令排序資訊的例子中,連接器102與主機介面單元206是支援NCQ協定,並且主機系統1000與快閃記憶體控制器104之間是經由連接器102與主機介面單元206以NCQ協定來傳送主機讀取指令。 For example, host system 1000 uses Native Command Queuing (NCQ) to transfer instruction ordering information for multiple host read instructions. In an example in which the NCQ protocol is used to transfer instruction ordering information for a plurality of host read instructions, the connector 102 and the host interface unit 206 support the NCQ protocol, and the host system 1000 and the flash memory controller 104 are via The connector 102 and the host interface unit 206 communicate host read commands in an NCQ protocol.

特別是,在本範例實施例中,記憶體管理單元204會依據下達指令順序經由第0資料輸入/輸出匯流排132與第1資料輸入/輸出匯流排134同時讀取對應兩個主機讀取指令的資料。以下將以一資料讀取範例來詳細說明記憶體管理單元204如何依據所 有主機讀取指令所對應的資料輸入/輸出匯流排來重新排列此些主機讀取指令的順序,並且同時讀取對應兩個主機讀取指令的資料。 In particular, in the present exemplary embodiment, the memory management unit 204 reads the corresponding two host read commands simultaneously with the first data input/output bus 134 via the 0th data input/output bus 132 and the first data input/output bus 134 in the order of the release command. data of. In the following, a data reading example will be used to explain in detail how the memory management unit 204 is based on There is a data input/output bus corresponding to the host read command to rearrange the order of the host read commands, and simultaneously read the data corresponding to the two host read commands.

在此資料讀取範例中,主機系統1000傳送指令排序資訊給快閃記憶體儲存裝置100,其中此指令排序資訊是指示主機系統1000欲下達多個主機讀取指令,其中包括欲讀取邏輯區塊350-(0)中之資料的第1主機讀取指令CM1、欲讀取邏輯區塊350-(1)中之資料的第2主機讀取指令CM2、欲讀取邏輯區塊350-(G+1)中之資料的第3主機讀取指令CM3與欲讀取邏輯區塊350-(G+2)的第4主機讀取指令CM4。在此,假設邏輯區塊350-(0)是對映實體區塊122-(S+1)、邏輯區塊350-(1)是對映實體區塊122-(S+2)、邏輯區塊350-(G+1)是對映實體區塊124-(S+1)且邏輯區塊350-(G+2)是對映實體區塊124-(S+2)(如圖4所示)。 In this data reading example, the host system 1000 transmits instruction sequencing information to the flash memory storage device 100, wherein the instruction sequencing information indicates that the host system 1000 is to issue a plurality of host read commands, including the logical region to be read. The first host read command CM1 of the data in block 350-(0), the second host read command CM2 to read the data in the logical block 350-(1), and the logical block 350-( The third host read command CM3 of the data in G+1) and the fourth host read command CM4 of the logical block 350-(G+2) to be read. Here, it is assumed that the logical block 350-(0) is the mapping entity block 122-(S+1), the logical block 350-(1) is the mapping entity block 122-(S+2), the logical area Block 350-(G+1) is the enclosing entity block 124-(S+1) and logical block 350-(G+2) is the enantiomer block 124-(S+2) (as shown in Figure 4) Show).

圖5A與圖5B是根據本發明第一範例實施例所繪示之記憶體管理單元重新排列主機讀取指令以產生下達指令順序的範例示意圖。 FIG. 5A and FIG. 5B are schematic diagrams showing an example of rearranging a host read command to generate a command sequence according to a first embodiment of the present invention.

當快閃記憶體控制器104經由連接器102接收包含依序以第1主機讀取指令CM1、第2主機讀取指令CM2、第3主機讀取指令CM3與第4主機讀取指令CM4為傳送順序(如圖5A所示)的指令排序資訊時,記憶體管理單元204會依據此指令排序資訊中此些主機讀取指令對應的邏輯區塊和記錄於轉換層250中的資訊(例如,邏輯區塊-實體區塊對映表)來識別第1主機讀取指令CM1是對應第0資料輸入/輸出匯流排132、第2主機讀取指令CM2 是對應第0資料輸入/輸出匯流排132、第3主機讀取指令CM3是對應第1資料輸入/輸出匯流排134且第4主機讀取指令CM4是對應第1資料輸入/輸出匯流排134。也就是說,記憶體管理單元204需經由第0資料輸入/輸出匯流排132來讀取第1主機讀取指令CM1與第2主機讀取指令CM2欲讀取的資料,並且需經由第1資料輸入/輸出匯流排134來讀取第3主機讀取指令CM3與第4主機讀取指令CM4欲讀取的資料。 When the flash memory controller 104 receives via the connector 102, the first host read command CM1, the second host read command CM2, the third host read command CM3, and the fourth host read command CM4 are sequentially transmitted. When the order information (as shown in FIG. 5A) is sorted, the memory management unit 204 sorts the logical blocks corresponding to the host read instructions and the information recorded in the conversion layer 250 according to the instructions (for example, logic). Block-physical block mapping table) to identify the first host read command CM1 is corresponding to the 0th data input/output bus 132 and the second host read command CM2 It corresponds to the 0th data input/output bus 132, the third host read command CM3 corresponds to the first data input/output bus 134, and the fourth host read command CM4 corresponds to the first data input/output bus 134. In other words, the memory management unit 204 needs to read the data to be read by the first host read command CM1 and the second host read command CM2 via the 0th data input/output bus 132, and needs to pass the first data. The input/output bus 134 reads the data to be read by the third host read command CM3 and the fourth host read command CM4.

如上所述,由於快閃記憶體控制器104可同時使用第0資料輸入/輸出匯流排132與第1資料輸入/輸出匯流排134來存取第0快閃記憶體模組122與第1快閃記憶體模組124,因此記憶體管理單元204會將對應不同之資料輸入/輸出匯流排的主機讀取指令接續排列,由此藉由經由多條資料輸入/輸出匯流排同步地讀取資料來縮短執行讀取指令的時間。 As described above, the flash memory controller 104 can simultaneously access the 0th flash memory module 122 and the first fast by using the 0th data input/output bus 132 and the first data input/output bus 134. The flash memory module 124, so that the memory management unit 204 successively arranges the host read commands corresponding to the different data input/output bus bars, thereby synchronously reading data through the plurality of data input/output bus bars. To shorten the time to execute the read command.

例如,如圖5B所示,在此資料讀取範例中,記憶體管理單元204會以第1主機讀取指令CM1、第3主機讀取指令CM3、第2主機讀取指令CM2與第4主機讀取指令CM4的順序來產生下達指令順序,並將所產生的下達指令順序傳送給主機系統1000,其中對應第1主機讀取指令CM1與第3主機讀取指令CM3的資料可被從快閃記憶體晶片106中同步地讀取,而對應第2主機讀取指令CM2與第4主機讀取指令CM4的資料可被從快閃記憶體晶片106中同步地讀取。 For example, as shown in FIG. 5B, in this data reading example, the memory management unit 204 reads the command CM1, the third host read command CM3, the second host read command CM2, and the fourth host by the first host. The order of the instruction CM4 is read to generate the order of the issued instructions, and the generated issued instructions are sequentially transmitted to the host system 1000, wherein the data corresponding to the first host read command CM1 and the third host read command CM3 can be flashed from the flash The memory chip 106 is synchronously read, and the data corresponding to the second host read command CM2 and the fourth host read command CM4 can be read synchronously from the flash memory chip 106.

之後,當主機系統1000接收到此下達指令順序時,主機 系統1000會先下達第1主機讀取指令CM1,並且記憶體管理單元204會開始處理第1主機讀取指令CM1以依據對應的邏輯區塊350-(0)經由第0資料輸入/輸出匯流排132從實體區塊122-(S+1)中來讀取資料。特別是,在處理第1主機讀取指令CM1的同時,記憶體管理單元204會經由第1資料輸入/輸出匯流排134來讀取第3主機讀取指令CM3欲讀取的資料(即,儲存在邏輯區塊350-(G+1)所對應之實體區塊124-(S+1)中的資料)。更詳細來說,雖然主機系統1000僅下達第1主機讀取指令CM1,然依據下達指令順序記憶體管理單元204已得知下一個指令為第3主機讀取指令CM3且第1資料輸入/輸出匯流排134是處於閒置狀態,因此記憶體管理單元204會在處理第1主機讀取指令CM1時同步地讀取對應第3主機讀取指令CM3的資料。 After that, when the host system 1000 receives the order of the release instructions, the host The system 1000 first releases the first host read command CM1, and the memory management unit 204 starts processing the first host read command CM1 to pass the 0th data input/output bus according to the corresponding logical block 350-(0). 132 reads the data from the physical block 122-(S+1). In particular, while the first host read command CM1 is being processed, the memory management unit 204 reads the data to be read by the third host read command CM3 via the first data input/output bus 134 (ie, storage). The data in the physical block 124-(S+1) corresponding to the logical block 350-(G+1). More specifically, although the host system 1000 only issues the first host read command CM1, the memory management unit 204 knows that the next command is the third host read command CM3 and the first data input/output according to the release command sequence. Since the bus bar 134 is in an idle state, the memory management unit 204 synchronously reads the data corresponding to the third host read command CM3 while processing the first host read command CM1.

之後,當記憶體管理單元204將對應第1主機讀取指令CM1的資料傳送給主機系統1000後,主機系統1000會下達下一個指令(即,第3主機讀取指令CM3),此時記憶體管理單元204會直接地將對應第3主機讀取指令CM3的資料傳送給主機系統1000,而無需再從快閃記憶體晶片106中讀取資料。 After that, when the memory management unit 204 transmits the data corresponding to the first host read command CM1 to the host system 1000, the host system 1000 issues the next instruction (ie, the third host read command CM3), at this time, the memory The management unit 204 directly transfers the data corresponding to the third host read command CM3 to the host system 1000 without having to read the data from the flash memory chip 106.

接著,在主機系統1000接收到對應第3主機讀取指令CM3的資料後,主機系統1000會下達下一個指令(即,第2主機讀取指令CM2),並且記憶體管理單元204會開始處理第2主機讀取指令CM2以依據對應的邏輯區塊350-(1)經由第0資料輸入/輸出匯流排132從實體區塊122-(S+2)中來讀取資料。類似地,在處 理第2主機讀取指令CM2的同時,記憶體管理單元204會經由第1資料輸入/輸出匯流排134來讀取對應第4主機讀取指令CM4欲讀取的資料(即,儲存在邏輯區塊350-(G+2)所對應之實體區塊124-(S+2)中的資料)。 Next, after the host system 1000 receives the data corresponding to the third host read command CM3, the host system 1000 issues the next command (ie, the second host read command CM2), and the memory management unit 204 starts processing. The host reads the command CM2 to read the data from the physical block 122-(S+2) via the 0th data input/output bus 132 according to the corresponding logical block 350-(1). Similarly, everywhere While the second host reads the command CM2, the memory management unit 204 reads the data to be read by the fourth host read command CM4 via the first data input/output bus 134 (ie, is stored in the logical area). Block 350 - (G + 2) corresponds to the physical block 124 - (S + 2) data).

之後,當記憶體管理單元204將對應第2主機讀取指令CM2的資料傳送給主機系統1000後,主機系統1000會下達下一個指令(即,第4主機讀取指令CM4),此時記憶體管理單元204會直接地將對應第4主機讀取指令CM4的資料傳送給主機系統1000,而無需再從快閃記憶體晶片106中讀取資料。 After that, when the memory management unit 204 transmits the data corresponding to the second host read command CM2 to the host system 1000, the host system 1000 issues the next instruction (ie, the fourth host read command CM4), at this time, the memory The management unit 204 directly transfers the data corresponding to the fourth host read command CM4 to the host system 1000 without having to read data from the flash memory chip 106.

在此範例中,記憶體管理單元204會重新排列主機讀取指令的傳送順序,並且在執行第1主機讀取指令CM1時同時預先讀取對應第3主機讀取指令CM3的資料以及在執行第2主機讀取指令CM2時同時預先讀取對應第4主機讀取指令CM4的資料。例如,記憶體管理單元204會在處理第一(即,目前)主機讀取指令(例如,第1主機讀取指令CM1與第2主機讀取指令CM2)時預先讀取對應第二(即,後續)主機讀取指令的資料(例如,第3主機讀取指令CM3與第4主機讀取指令CM4)並將預先讀取之資料暫存於緩衝記憶體210中。之後,當接收到第二主機讀取指令時,則直接地從緩衝記憶體210中將對應的資料傳送給主機系統1000,由此可大幅縮短執行主機讀取指令的時間。 In this example, the memory management unit 204 rearranges the transfer order of the host read command, and simultaneously reads the data corresponding to the third host read command CM3 and executes the first time when the first host read command CM1 is executed. When the host reads the command CM2, the data corresponding to the fourth host read command CM4 is read in advance. For example, the memory management unit 204 pre-reads the corresponding second when processing the first (ie, current) host read command (eg, the first host read command CM1 and the second host read command CM2) (ie, Subsequent) the host reads the instruction data (for example, the third host read command CM3 and the fourth host read command CM4) and temporarily stores the pre-read data in the buffer memory 210. Thereafter, when the second host read command is received, the corresponding data is directly transferred from the buffer memory 210 to the host system 1000, whereby the time for executing the host read command can be greatly shortened.

圖6是根據本發明第一範例實施例所繪示快閃記憶體控制器執行資料讀取方法的流程圖。 FIG. 6 is a flow chart showing a method for reading data by a flash memory controller according to a first exemplary embodiment of the present invention.

請參照圖6,首先,在步驟S601中快閃記憶體控制器104會從主機系統1000中接收關於欲傳送之多個主機讀取指令的指令排序資訊。接著,在步驟S603中快閃記憶體控制器104會依據每一主機讀取指令所對應的邏輯區塊判斷每一主機讀取指令所對應的資料輸入/輸出匯流排。具體來說,在步驟S601中快閃記憶體控制器104是使用NCQ協定從主機系統1000中接收指令排序資訊,以獲知主機系統1000欲傳送之多個主機讀取指令的指令排序資料。然而,必須瞭解的是,本發明不限於此,在本發明另一範例實施例中,快閃記憶體控制器104亦可使用其他適當的方式從主機系統1000中接收關於欲傳送之多個主機讀取指令的指令排序資訊。 Referring to FIG. 6, first, in step S601, the flash memory controller 104 receives instruction sequencing information about the plurality of host read commands to be transmitted from the host system 1000. Next, in step S603, the flash memory controller 104 determines the data input/output bus corresponding to each host read command according to the logical block corresponding to each host read command. Specifically, in step S601, the flash memory controller 104 receives the instruction sorting information from the host system 1000 using the NCQ protocol to learn the instruction ordering data of the plurality of host read commands that the host system 1000 wants to transmit. However, it should be understood that the present invention is not limited thereto. In another exemplary embodiment of the present invention, the flash memory controller 104 may also receive, from the host system 1000, a plurality of hosts to be transmitted, using other suitable manners. Read the instruction ordering information of the instruction.

在步驟S605中快閃記憶體控制器104會依據每一主機讀取指令所對應的資料輸入/輸出匯流排來產生下達指令順序,並且在步驟S607中將所產生的下達指令順序傳送給主機系統1000。 In step S605, the flash memory controller 104 generates a release instruction sequence according to the data input/output bus corresponding to each host read instruction, and sequentially transmits the generated release instructions to the host system in step S607. 1000.

之後,在步驟S609中快閃記憶體控制器104會依據下達指令順序從主機系統1000中接收主機讀取指令,並且在步驟S611中判斷所接收到的主機讀取指令對應的資料是否已暫存於緩衝記憶體210中。 Thereafter, in step S609, the flash memory controller 104 receives the host read command from the host system 1000 according to the order of the release command, and determines in step S611 whether the data corresponding to the received host read command has been temporarily stored. In the buffer memory 210.

倘若所接收到的主機讀取指令對應的資料已暫存於緩衝記憶體210中時,則在步驟S613中從緩衝記憶體210中將主機讀取指令對應的資料傳送給主機系統1000,並且在步驟S615判斷是否已執行主機系統1000欲下達的所有主機讀取指令。倘若已執行 所有主機讀取指令時,則結束圖6的流程;反之,則執行步驟S609來繼續接收下一個主機讀取指令。 If the data corresponding to the received host read command has been temporarily stored in the buffer memory 210, the data corresponding to the host read command is transferred from the buffer memory 210 to the host system 1000 in step S613, and Step S615 determines whether all host read commands to be issued by the host system 1000 have been executed. If executed When all the hosts read the instruction, the flow of FIG. 6 is ended; otherwise, step S609 is executed to continue receiving the next host read command.

倘若所接收到的主機讀取指令對應的資料未暫存於緩衝記憶體210中時,則在步驟S617中從快閃記憶體晶片106中讀取對應此主機讀取指令的資料並且依據下達指令順序同時讀取對應其他主機讀取指令的資料。具體來說,在步驟S617中,快閃記憶體控制器104在處理第一主機讀取指令時會依據下達指令順序來預先讀取對應第二主機讀取指令的資料,其中此些第二主機讀取指令所對的資料輸入/輸出匯流排是不同於第一主機讀取指令所對應的資料輸入/輸出匯流排。也就是說,快閃記憶體控制器104會利用處理第一主機讀取指令的期間使用其他閒置的資料輸入/輸出匯流排來預先讀取對應第二主機讀取指令的資料。 If the data corresponding to the received host read command is not temporarily stored in the buffer memory 210, the data corresponding to the host read command is read from the flash memory chip 106 in step S617 and according to the release command. The data corresponding to the read command of other hosts is simultaneously read in sequence. Specifically, in step S617, the flash memory controller 104 pre-reads the data corresponding to the second host read command according to the order of the next command when processing the first host read command, wherein the second host The data input/output busbar to which the read command is directed is different from the data input/output busbar corresponding to the first host read command. That is, the flash memory controller 104 uses the other idle data input/output buss to read the data corresponding to the second host read command in advance while processing the first host read command.

在步驟S619中將對應第一主機讀取指令的資料傳送給主機系統1000並且將預先讀取的資料暫存於緩衝記憶體210中。接著,快閃記憶體控制器104會執行步驟S615。 In step S619, the data corresponding to the first host read command is transmitted to the host system 1000 and the pre-read data is temporarily stored in the buffer memory 210. Next, the flash memory controller 104 performs step S615.

[第二範例實施例] [Second exemplary embodiment]

本發明第二範例實施例的快閃記憶體儲存裝置與主機系統本質上是相同於第一範例實施例的快閃記憶體儲存裝置與主機系統,其中差異在於第二範例實施例的記憶體管理單元會以不同的方式來重新排列主機系統欲傳送之主機讀取指令的傳送順序。以下將配合第一範例實施例的圖1A、圖1D、圖3A、圖3B與圖4來描述第二範例實施例。 The flash memory storage device and the host system of the second exemplary embodiment of the present invention are essentially the same as the flash memory storage device and the host system of the first exemplary embodiment, wherein the difference lies in the memory management of the second exemplary embodiment. The unit will rearrange the order in which the host system wants to transmit the host read instructions in a different manner. The second exemplary embodiment will be described below in conjunction with FIGS. 1A, 1D, 3A, 3B, and 4 of the first exemplary embodiment.

在第一範例實施例中,快閃記憶體控制器104的記憶體管理單元204會從主機系統1000中接收關於主機讀取指令的指令排序資訊並依據主機讀取指令所對應的資料輸入/輸出匯流排來產生下達指令順序,由此藉由同步地透過多條資料輸入/輸出匯流排預先讀取第二主機讀取指令的資料來縮短執行主機讀取指令的時間。除了依據主機讀取指令所對應的資料輸入/輸出匯流排來產生下達指令順序之外,在本發明第二範例實施例中記憶體管理單元204更會依據主機讀取指令所對應的邏輯區塊所屬的邏輯區域來產生下達指令順序,以更縮短執行主機讀取指令的時間。 In the first exemplary embodiment, the memory management unit 204 of the flash memory controller 104 receives the instruction sorting information about the host read command from the host system 1000 and inputs/outputs according to the data corresponding to the host read command. The bus is arranged to generate the order of the instructions, thereby shortening the time for executing the host read command by synchronously reading the data of the second host read command through the plurality of data input/output buss. In addition to the data input/output bus corresponding to the host read command to generate the command sequence, in the second exemplary embodiment of the present invention, the memory management unit 204 further depends on the logical block corresponding to the host read command. The associated logical area is used to generate the order of the instructions to further shorten the time for executing the host read command.

具體來說,如上所述,邏輯區塊350-(0)~350-(H)會被分組為邏輯區域360-(0)與邏輯區域360-(1),並且記憶體管理單元204會為每一邏輯區域配置獨立的邏輯區塊-實體區塊對映表。因此,當主機系統1000存取屬於不同邏輯區域的邏輯區塊時,記憶體管理單元204需從快閃記憶體晶片106中載入對應的邏輯區塊-實體區塊對映表,因此若在執行多筆主機讀取指令時,能夠減少不同邏輯區塊-實體區塊對映表之間的切換,將能夠有效縮短執行主機讀取指令的時間。 Specifically, as described above, the logical blocks 350-(0)-350-(H) are grouped into logical regions 360-(0) and logical regions 360-(1), and the memory management unit 204 Each logical area is configured with a separate logical block-physical block mapping table. Therefore, when the host system 1000 accesses the logical blocks belonging to different logical regions, the memory management unit 204 needs to load the corresponding logical block-physical block mapping table from the flash memory chip 106, so if When executing multiple host read commands, it is possible to reduce the switching between different logical block-physical block mapping tables, which will effectively shorten the time for executing host read instructions.

以下將以一資料讀取範例來詳細說明在第二範例實施例中記憶體管理單元204如何依據所有主機讀取指令所對應的邏輯區塊、所對應的資料輸入/輸出匯流排以及所對應的邏輯區域來重新排列此些主機讀取指令的順序,並且同時讀取對應兩個主機讀取指令的資料。 In the following, a data reading example will be used to explain in detail how the memory management unit 204 according to the second exemplary embodiment, according to the logic blocks corresponding to all the host read instructions, the corresponding data input/output bus and the corresponding The logical area is to rearrange the order of the host read instructions, and simultaneously read the data corresponding to the two host read instructions.

在此資料讀取範例中,主機系統1000傳送指令排序資訊給快閃記憶體儲存裝置100,其中此指令排序資訊是指示主機系統1000欲下達多個主機讀取指令,其中包括欲讀取邏輯區塊350-(0)中之資料的第1主機讀取指令CM1、欲讀取邏輯區塊350-(1)中之資料的第2主機讀取指令CM2、欲讀取邏輯區塊350-(G+1)中之資料的第3主機讀取指令CM3與欲讀取邏輯區塊350-(G+2)的第4主機讀取指令CM4。在此,假設邏輯區塊350-(0)是對映實體區塊122-(S+1)、邏輯區塊350-(1)是對映實體區塊122-(S+2)、邏輯區塊350-(G+1)是對映實體區塊124-(S+1)且邏輯區塊350-(G+2)是對映實體區塊124-(S+2),其中邏輯區塊350-(0)與邏輯區塊350-(1)是屬於邏輯區域360-(0)且邏輯區塊350-(G+1)與邏輯區塊350-(G+2)是屬於邏輯區域360-(1)(如圖4所示)。此外,假設目前載入於緩衝記憶體210中的邏輯區塊-實體區塊對映表是對應邏輯區域360-(1)的邏輯區塊-實體區塊對映表260-(1)。 In this data reading example, the host system 1000 transmits instruction sequencing information to the flash memory storage device 100, wherein the instruction sequencing information indicates that the host system 1000 is to issue a plurality of host read commands, including the logical region to be read. The first host read command CM1 of the data in block 350-(0), the second host read command CM2 to read the data in the logical block 350-(1), and the logical block 350-( The third host read command CM3 of the data in G+1) and the fourth host read command CM4 of the logical block 350-(G+2) to be read. Here, it is assumed that the logical block 350-(0) is the mapping entity block 122-(S+1), the logical block 350-(1) is the mapping entity block 122-(S+2), the logical area Block 350-(G+1) is the entropy entity block 124-(S+1) and logical block 350-(G+2) is the entropy entity block 124-(S+2), where the logical block 350-(0) and logical block 350-(1) belong to logical region 360-(0) and logical block 350-(G+1) and logical block 350-(G+2) belong to logical region 360 - (1) (as shown in Figure 4). Furthermore, it is assumed that the logical block-physical block mapping table currently loaded in the buffer memory 210 is the logical block-physical block mapping table 260-(1) corresponding to the logical area 360-(1).

圖7A、圖7B與圖7C是根據本發明第二範例實施例所繪示之記憶體管理單元重新排列主機讀取指令以產生下達指令順序的範例示意圖。 7A, FIG. 7B and FIG. 7C are schematic diagrams showing an example of rearranging a host read command to generate a command sequence according to a second exemplary embodiment of the present invention.

當快閃記憶體控制器104接收到以第1主機讀取指令CM1、第2主機讀取指令CM2、第3主機讀取指令CM3與第4主機讀取指令CM4為順序(如圖7A所示)的指令排序資訊時,記憶體管理單元204會依據此指令排序資訊中此些主機讀取指令對應的邏輯區塊和記錄於轉換層250中的資訊(例如,邏輯區塊-實體區 塊對映表)來識別第1主機讀取指令CM1是對應第0資料輸入/輸出匯流排132、第2主機讀取指令CM2是對應第0資料輸入/輸出匯流排132、第3主機讀取指令CM3是對應第1資料輸入/輸出匯流排134且第4主機讀取指令CM4是對應第1資料輸入/輸出匯流排134。也就是說,記憶體管理單元204需經由第0資料輸入/輸出匯流排132來讀取第1主機讀取指令CM1與第2主機讀取指令CM2欲讀取的資料,並且需經由第1資料輸入/輸出匯流排134來讀取第3主機讀取指令CM3與第4主機讀取指令CM4欲讀取的資料。 When the flash memory controller 104 receives the first host read command CM1, the second host read command CM2, the third host read command CM3, and the fourth host read command CM4 (as shown in FIG. 7A). When the instruction sorts the information, the memory management unit 204 sorts the logical blocks corresponding to the host read instructions and the information recorded in the conversion layer 250 according to the instructions (for example, the logical block-physical area) Block mapping table) to identify that the first host read command CM1 is corresponding to the 0th data input/output bus bar 132, the second host read command CM2 is corresponding to the 0th data input/output bus bar 132, and the third host reads The command CM3 corresponds to the first data input/output bus 134 and the fourth host read command CM4 corresponds to the first data input/output bus 134. In other words, the memory management unit 204 needs to read the data to be read by the first host read command CM1 and the second host read command CM2 via the 0th data input/output bus 132, and needs to pass the first data. The input/output bus 134 reads the data to be read by the third host read command CM3 and the fourth host read command CM4.

例如,如圖7B所示,記憶體管理單元204會先依據主機讀取指令所對應的資料輸入/輸出匯流排以第1主機讀取指令CM1、第3主機讀取指令CM3、第2主機讀取指令CM2與第4主機讀取指令CM4的順序來排列主機系統1000欲發送之主機讀取指令,其中對應第1主機讀取指令CM1與第3主機讀取指令CM3的資料可被從快閃記憶體晶片106中同步地讀取,而對應第2主機讀取指令CM2與第4主機讀取指令CM4的資料可被從快閃記憶體晶片106中同步地讀取。 For example, as shown in FIG. 7B, the memory management unit 204 first reads the command CM1, the third host read command CM3, and the second host read according to the data input/output bus corresponding to the host read command. The command CM2 and the fourth host read command CM4 are arranged to arrange the host read command to be sent by the host system 1000, wherein the data corresponding to the first host read command CM1 and the third host read command CM3 can be flashed from the flash. The memory chip 106 is synchronously read, and the data corresponding to the second host read command CM2 and the fourth host read command CM4 can be read synchronously from the flash memory chip 106.

接著,記憶體管理單元204會再依據目前暫存於緩衝記憶體中的邏輯區塊-實體區塊對映表來調整預期之下達指令順序。例如,目前暫存於緩衝記憶體中的邏輯區塊-實體區塊對映表是對應邏輯區域360-(1)的邏輯區塊-實體區塊對映表260-(1),因此在第1主機讀取指令CM1與第3主機讀取指令CM3之中記憶 體管理單元204會優先處理對應邏輯區域360-(1)的第3主機讀取指令CM3,再處理第1主機讀取指令CM1。之後,當處理第1主機讀取指令CM1時,載入於緩衝記憶體中的邏輯區塊-實體區塊對映表260-(1)將會被切換為對應邏輯區域360-(0)的邏輯區塊-實體區塊對映表260-(0),因此,在處理第1主機讀取指令CM1之後,相較於第4主機讀取指令CM4,記憶體管理單元204會優先處理對應邏輯區域360-(0)的第2主機讀取指令CM2。基此,如圖7C所示,記憶體管理單元204會以第3主機讀取指令CM3、第1主機讀取指令CM1、第2主機讀取指令CM2與第4主機讀取指令CM4的順序來產生下達指令順序,並且將所產生的下達指令順序傳送給主機系統1000。 Then, the memory management unit 204 adjusts the expected instruction sequence according to the logical block-physical block mapping table currently stored in the buffer memory. For example, the logical block-physical block mapping table currently stored in the buffer memory is a logical block-physical block mapping table 260-(1) corresponding to the logical area 360-(1), and thus 1 host read command CM1 and 3rd host read command CM3 memory The volume management unit 204 preferentially processes the third host read command CM3 corresponding to the logical region 360-(1), and processes the first host read command CM1. Thereafter, when the first host read command CM1 is processed, the logical block-physical block mapping table 260-(1) loaded in the buffer memory is switched to the corresponding logical region 360-(0). The logical block-physical block mapping table 260-(0), therefore, after processing the first host read command CM1, the memory management unit 204 preferentially processes the corresponding logic compared to the fourth host read command CM4 The second host of the area 360-(0) reads the command CM2. Accordingly, as shown in FIG. 7C, the memory management unit 204 sequentially reads the command CM3, the first host read command CM1, the second host read command CM2, and the fourth host read command CM4. The order of the issued instructions is generated, and the generated issued instructions are sequentially transmitted to the host system 1000.

之後,當主機系統1000接收到此下達指令順序時,主機系統1000會先發送第3主機讀取指令CM3,並且記憶體管理單元204會開始處理第3主機讀取指令CM3以依據對應的邏輯區塊350-(G+1)經由第1資料輸入/輸出匯流排134從實體區塊124-(S+1)中來讀取資料。並且,在處理第3主機讀取指令CM3的同時,記憶體管理單元204會經由第0資料輸入/輸出匯流排132來讀取對應第1主機讀取指令CM1欲讀取的資料(即,儲存在邏輯區塊350-(0)所對應之實體區塊122-(S+1)中的資料)。期間,記憶體管理單元204先依據已載入於緩衝記憶體210的邏輯區塊-實體區塊對映表260-(1)來獲取相關的對映資訊,並且之後關閉邏輯區塊-實體區塊對映表260-(1)與載入邏輯區塊-實體區塊對映表260-(0)來獲 取相關的對映資訊。 Thereafter, when the host system 1000 receives the order of the release command, the host system 1000 first sends the third host read command CM3, and the memory management unit 204 starts processing the third host read command CM3 to be based on the corresponding logical region. Block 350-(G+1) reads data from physical block 124-(S+1) via first data input/output bus 134. Further, while the third host read command CM3 is being processed, the memory management unit 204 reads the data to be read by the first host read command CM1 via the 0th data input/output bus 132 (ie, storage). The data in the physical block 122-(S+1) corresponding to the logical block 350-(0). During that, the memory management unit 204 first acquires the relevant mapping information according to the logical block-physical block mapping table 260-(1) that has been loaded into the buffer memory 210, and then closes the logical block-physical area. Block mapping table 260-(1) and loading logical block-physical block mapping table 260-(0) Take the relevant mapping information.

之後,當記憶體管理單元204將對應第3主機讀取指令CM3的資料傳送給主機系統1000後,主機系統1000會下達下一個指令(即,第1主機讀取指令CM1),此時記憶體管理單元204會直接地從緩衝記憶體210中將對應第1主機讀取指令CM1的資料傳送給主機系統1000,而無需再從快閃記憶體晶片106中讀取資料。 After that, when the memory management unit 204 transmits the data corresponding to the third host read command CM3 to the host system 1000, the host system 1000 issues the next instruction (ie, the first host read command CM1), at this time, the memory The management unit 204 directly transfers the data corresponding to the first host read command CM1 from the buffer memory 210 to the host system 1000 without having to read the data from the flash memory chip 106.

在主機系統1000接收到第1主機讀取指令CM1的資料後,主機系統1000會發送下一個指令(即,第2主機讀取指令CM2),並且記憶體管理單元204會開始處理第2主機讀取指令CM2以依據對應的邏輯區塊350-(1)經由第0資料輸入/輸出匯流排132從實體區塊122-(S+2)中來讀取資料。類似地,在處理第2主機讀取指令CM2的同時,記憶體管理單元204會經由第1資料輸入/輸出匯流排134來讀取對應第4主機讀取指令CM4欲讀取的資料(即,儲存在邏輯區塊350-(G+2)所對應之實體區塊124-(S+2)中的資料)。期間,記憶體管理單元204先依據已載入於緩衝記憶體210的邏輯區塊-實體區塊對映表260-(0)來獲取相關的對映資訊,並且之後關閉邏輯區塊-實體區塊對映表260-(0)與載入邏輯區塊-實體區塊對映表260-(1)來獲取相關的對映資訊。 After the host system 1000 receives the data of the first host read command CM1, the host system 1000 transmits the next command (ie, the second host read command CM2), and the memory management unit 204 starts processing the second host read. The instruction CM2 fetches data from the physical block 122-(S+2) via the 0th data input/output bus 132 according to the corresponding logical block 350-(1). Similarly, while the second host read command CM2 is being processed, the memory management unit 204 reads the data to be read by the corresponding fourth host read command CM4 via the first data input/output bus 134 (ie, Stored in the physical block 124-(S+2) corresponding to the logical block 350-(G+2). During this period, the memory management unit 204 first acquires the relevant mapping information according to the logical block-physical block mapping table 260-(0) already loaded in the buffer memory 210, and then closes the logical block-physical area. The block mapping table 260-(0) is loaded with the logical block-physical block mapping table 260-(1) to obtain the relevant mapping information.

之後,當記憶體管理單元204將對應第2主機讀取指令CM2的資料傳送給主機系統1000後,主機系統1000會下達下一個指令(即,第4主機讀取指令CM4),此時記憶體管理單元204 會立即將對應第4主機讀取指令CM4的資料傳送給主機系統1000。 After that, when the memory management unit 204 transmits the data corresponding to the second host read command CM2 to the host system 1000, the host system 1000 issues the next instruction (ie, the fourth host read command CM4), at this time, the memory Management unit 204 The data corresponding to the fourth host read command CM4 is immediately transferred to the host system 1000.

值得一提的是,在上述資料讀取範例中,對應同一資料輸入/輸出匯流排的邏輯區塊是屬於同一邏輯區域,然而本發明不限於此,在本發明另一範例實施例中,對應不同資料輸入/輸出匯流排的邏輯區塊亦可以是屬於同一邏輯區域。例如,在邏輯區塊350-(0)與邏輯區塊350-(G+1)是屬於邏輯區域360-(0)且邏輯區塊350-(1)與邏輯區塊350-(G+2)是屬於邏輯區域360-(1)的另一範例實施例中,假設在上述資料讀取範例中記憶體管理單元204先依據主機讀取指令所對應的資料輸入/輸出匯流排將主機系統1000所傳送之多筆主機讀取指令的順序(如圖8A所示)以第1主機讀取指令CM1、第3主機讀取指令CM3、第2主機讀取指令CM2與第4主機讀取指令CM4的順序(如圖8B所示)來排列之後,由於目前載入於緩衝記憶體中的邏輯區塊-實體區塊對映表是對應邏輯區域360-(1)的邏輯區塊-實體區塊對映表260-(1),因此記憶體管理單元204會預期優先處理對應邏輯區域360-(1)的第2主機讀取指令CM2或第4主機讀取指令CM4。基此,在對應第1主機讀取指令CM1與第3主機讀取指令CM3的資料可被從快閃記憶體晶片106中同步地讀取,而對應第2主機讀取指令CM2與第4主機讀取指令CM4的資料可被從快閃記憶體晶片106中同步地讀取的情況下,例如,記憶體管理單元204會以第2主機讀取指令CM2、第4主機讀取指令CM4、第1主機讀取指令CM1與第3主機讀取 指令CM3的順序(如圖8C所示)來產生下達指令順序。基此,記憶體管理單元204僅需於處理第1主機讀取指令CM1時關閉邏輯區塊-實體區塊對映表260-(1)與載入邏輯區塊-實體區塊對映表260-(0)來獲取相關的對映資訊。 It is to be noted that, in the above data reading example, the logical blocks corresponding to the same data input/output bus bar belong to the same logical area, but the present invention is not limited thereto, and in another exemplary embodiment of the present invention, corresponding The logical blocks of different data input/output busbars may also belong to the same logical area. For example, in logical block 350-(0) and logical block 350-(G+1) belong to logical area 360-(0) and logical block 350-(1) and logical block 350-(G+2 In another exemplary embodiment belonging to the logical area 360-(1), it is assumed that in the above data reading example, the memory management unit 204 firstly connects the host system 1000 according to the data input/output bus corresponding to the host read command. The order of the plurality of host read commands transmitted (as shown in FIG. 8A) is the first host read command CM1, the third host read command CM3, the second host read command CM2, and the fourth host read command CM4. After the order (as shown in FIG. 8B) is arranged, since the logical block-physical block mapping table currently loaded in the buffer memory is a logical block-physical block corresponding to the logical area 360-(1) The mapping table 260-(1), therefore, the memory management unit 204 expects to preferentially process the second host read command CM2 or the fourth host read command CM4 of the corresponding logical region 360-(1). Accordingly, the data corresponding to the first host read command CM1 and the third host read command CM3 can be synchronously read from the flash memory chip 106, and the second host read command CM2 and the fourth host are correspondingly read. When the data of the read command CM4 can be read synchronously from the flash memory chip 106, for example, the memory management unit 204 reads the command CM2, the fourth host read command CM4, and the second host. 1 host read command CM1 and third host read The order of the instructions CM3 (as shown in Figure 8C) is used to generate the order of the instructions. Based on this, the memory management unit 204 only needs to close the logical block-physical block mapping table 260-(1) and the load logical block-physical block mapping table 260 when processing the first host read command CM1. - (0) to get the relevant mapping information.

基於上述,在本發明第二範例實施例中,記憶體管理單元204更依據每一主機讀取指令所對應的邏輯區域來產生下達指令順序,因此可減少切換邏輯區塊-實體區塊對映表的次數,而更縮短執行主機讀取指令的時間。 Based on the above, in the second exemplary embodiment of the present invention, the memory management unit 204 generates the order of the instruction according to the logical region corresponding to each host read instruction, thereby reducing the switching logical block-physical block mapping. The number of times the table is used, and the time to execute the host read command is shortened.

圖9根據本發明第二範例實施例所繪示快閃記憶體控制器執行資料讀取方法的流程圖。 FIG. 9 is a flowchart of a method for reading data by a flash memory controller according to a second exemplary embodiment of the present invention.

請參照圖9,圖9中的步驟S901、S903、S907、S909、S911、S913、S915、S917與S919是相同於圖5中的步驟S601、S603、S607、S609、S611、S613、S615、S617與S619,在此不再重複說明。圖9與圖6的差異在於快閃記憶體控制器104會依據每一主機讀取指令所對應的資料輸入/輸出匯流排以及所對應的邏輯區域來產生下達指令順序(S905)。 Referring to FIG. 9, steps S901, S903, S907, S909, S911, S913, S915, S917, and S919 in FIG. 9 are the same as steps S601, S603, S607, S609, S611, S613, S615, and S617 in FIG. With S619, the description will not be repeated here. The difference between FIG. 9 and FIG. 6 is that the flash memory controller 104 generates a command sequence according to the data input/output bus bar corresponding to each host read command and the corresponding logical region (S905).

值得一提的是,儘管上述範例實施例是以兩個快閃記憶體模組與兩條資料輸入/輸出匯流排來進行說明,然而本發明不限於此,快閃記憶體模組與資料輸入/輸出匯流排的數目可以是任意數目。 It should be noted that although the above exemplary embodiment is described by two flash memory modules and two data input/output bus bars, the present invention is not limited thereto, and the flash memory module and data input are not limited thereto. The number of /output bus bars can be any number.

綜上所述,根據本發明範例實施例的資料讀取方法藉接收關於主機讀取指令的指令排序資訊以及依據主機讀取指令所對 應的資料輸入/輸出匯流來重新排列多個主機讀取指令的傳送順序,並且經由多條資料輸入/輸出匯流排來同步地讀取與預讀取對應不同主機讀取指令的資料,由此可大幅度地縮短執行主機讀取指令的時間。此外,在本發明另一範例實施例中,除了依據主機讀取指令所對應的資料輸入/輸出匯流之外,根據本發明範例實施例的資料讀取方法更依據主機讀取指令所對應的邏輯區域來重新排列多個主機讀取指令的發送順序,由此可減少切換邏輯區塊-實體區塊對映表的次數,進而更縮短執行主機讀取指令的時間。 In summary, the data reading method according to an exemplary embodiment of the present invention receives the instruction sorting information about the host read instruction and the read command according to the host. The data input/output sinks are arranged to rearrange the transfer order of the plurality of host read commands, and the data of the different host read commands corresponding to the pre-read are synchronously read via the plurality of data input/output bus bars, thereby The time to execute the host read command can be greatly shortened. In addition, in another exemplary embodiment of the present invention, in addition to the data input/output sink corresponding to the host read instruction, the data reading method according to an exemplary embodiment of the present invention is further based on the logic corresponding to the host read instruction. The area rearranges the order in which the plurality of host read instructions are transmitted, thereby reducing the number of times the logical block-physical block mapping table is switched, thereby further reducing the time for executing the host read command.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,故本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above 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. The scope of the invention is defined by the scope of the appended claims.

S601、S603、S605、S607、S609、S611、S613、S615、S617、S619‧‧‧資料讀取步驟 S601, S603, S605, S607, S609, S611, S613, S615, S617, S619‧‧‧ data reading steps

Claims (20)

一種資料讀取方法,用於由一快閃記憶體控制器處理來自於一主機系統的多個主機讀取指令以從多個快閃記憶體模組中讀取對應該些主機讀取指令的資料,其中該快閃記憶體控制器分別地經由多條資料輸入/輸出匯流排耦接至該些快閃記憶體模組並且每一該些快閃記憶體模組具有多個實體區塊,該資料讀取方法包括:藉由使用一序列先進附件(serial advanced technology attachment,SATA)原生指令排序(Native Command Queuing,NCQ)協定從該主機系統中接收關於該些主機讀取指令的一指令排序資訊,其中每一該些主機讀取指令對應多個邏輯扇區的其中之一且該些邏輯扇區的其中之一對應該些資料輸入/輸出匯流排的其中之一;依據該些主機讀取指令所對應的該些資料輸入/輸出匯流排以及一非資料輸入/輸出匯流排條件來重新排列該些主機讀取指令的順序並且產生一下達指令順序;根據該下達指令順序處理該些主機讀取指令以從該些快閃記憶體模組中讀取對應該些主機讀取指令的資料;以及在從該主機系統接收到一閒置訊號之後經由該序列先進附件原生指令排序協定傳送對應該些主機讀取指令的其中一個主機讀取指令的資料給該主機系統。 A data reading method for processing a plurality of host read commands from a host system by a flash memory controller to read corresponding host read commands from a plurality of flash memory modules Data, wherein the flash memory controller is coupled to the flash memory modules via a plurality of data input/output busses, and each of the flash memory modules has a plurality of physical blocks. The data reading method includes: receiving an instruction ordering of the host read commands from the host system by using a serial advanced technology attachment (SATA) Native Command Queuing (NCQ) protocol. Information, wherein each of the host read instructions corresponds to one of a plurality of logical sectors and one of the logical sectors corresponds to one of the data input/output bus banks; Retrieving the order of the host read commands and generating the following instructions by fetching the data input/output buss and the non-data input/output bus conditions corresponding to the instructions Processing the host read commands according to the order of the instructions to read data corresponding to the host read commands from the flash memory modules; and after receiving an idle signal from the host system The sequence of advanced attachment native instruction sequencing protocols transmits information to one of the host read instructions of the host read instructions to the host system. 如申請專利範圍第1項所述之資料讀取方法,其中根據該 下達指令順序處理該些主機讀取指令以從該些快閃記憶體模組中讀取對應該些主機讀取指令的資料的步驟包括:經由該些資料輸入/輸出匯流排從該些快閃記憶體模組中同步地讀取對應該些讀取指令之中的一第一主機讀取指令的資料和該些主機讀取指令之中的至少一第二主機讀取指令的資料,其中該第一主機讀取指令和該至少一第二主機讀取指令是對應該些資料輸入/輸出匯流排之中不同的資料輸入/輸出匯流排,並且其中在從該主機系統接收到該閒置訊號之後經由該序列先進附件原生指令排序協定傳送對應該其中一個主機讀取指令的資料給該主機系統的步驟包括:將對應該第一主機讀取指令的資料傳送給該主機系統;將對應該至少一第二主機讀取指令的資料暫存於該快閃記憶體控制器的一緩衝記憶體中;以及在對應該第一主機讀取指令的資料被傳送給該主機系統之後,從該緩衝記憶體中將對應該至少一第二主機讀取指令的資料傳送給該主機系統。 The method for reading data according to item 1 of the patent application, wherein The step of sequentially processing the host read commands to read the data corresponding to the host read commands from the flash memory modules includes: flashing the flashes via the data input/output buses Reading, in the memory module, data corresponding to a first host read command among the read commands and at least one second host read command among the host read commands, wherein the The first host read command and the at least one second host read command are different data input/output bus bars corresponding to the data input/output bus bars, and after receiving the idle signal from the host system The step of transmitting, by the sequence of the advanced accessory native instruction sorting protocol, the information corresponding to one of the host read instructions to the host system includes: transmitting data corresponding to the first host read command to the host system; corresponding to at least one The data of the second host read command is temporarily stored in a buffer memory of the flash memory controller; and the data corresponding to the read command of the first host is transmitted. After the host system, a second host will be read from the buffer memory at least the instruction information transmitted to the host system. 一種資料讀取方法,用於使用一快閃記憶體控制器處理來自於一主機系統的多個主機讀取指令以從多個快閃記憶體模組中讀取對應該些主機讀取指令的資料,其中該快閃記憶體控制器分別地經由多條資料輸入/輸出匯流排耦接至該些快閃記憶體模組並且每一該些快閃記憶體模組具有多個實體區塊,該資料讀取方法包括: 從該主機系統中接收關於該些主機讀取指令的一指令排序資訊,其中每一該些主機讀取指令對應多個邏輯扇區的其中之一且該些邏輯扇區的其中之一對應該些資料輸入/輸出匯流排的其中之一;以及同步地從該些快閃記憶體模組之中的至少兩個快閃記憶體模組中讀取對應不同之資料輸入/輸出匯流排的主機讀取指令的資料,其中該些對應不同之資料輸入/輸出匯流排的主機讀取指令在該指令排序資訊中為原不相鄰排列而在同步地從該至少兩個快閃記憶體模組中讀取資料時為相鄰排列。 A data reading method for processing a plurality of host read commands from a host system using a flash memory controller to read corresponding host read commands from a plurality of flash memory modules Data, wherein the flash memory controller is coupled to the flash memory modules via a plurality of data input/output busses, and each of the flash memory modules has a plurality of physical blocks. The data reading method includes: Receiving, from the host system, an instruction ordering information about the host read instructions, wherein each of the host read instructions corresponds to one of a plurality of logical sectors and one of the logical sectors corresponds to One of the data input/output buss; and synchronously reading the host corresponding to the different data input/output buss from at least two of the flash memory modules Reading the data of the instruction, wherein the host read commands corresponding to the different data input/output buss are synchronously from the at least two flash memory modules in the order sorting information When reading data, it is arranged adjacently. 如申請專利範圍第3項所述之資料讀取方法,其中從該主機系統中接收關於該些主機讀取指令的該指令排序資訊的步驟包括:藉由使用一原生指令排序協定從該主機系統中接收關於該些主機讀取指令的該指令排序資訊。 The data reading method of claim 3, wherein the step of receiving the instruction sorting information about the host read commands from the host system comprises: sorting a protocol from the host system by using a native instruction Receiving the instruction sorting information about the host read commands. 如申請專利範圍第3項所述之資料讀取方法,其中同步地從該些快閃記憶體模組之中的至少兩個快閃記憶體模組中讀取對應不同之資料輸入/輸出匯流排的主機讀取指令的資料的步驟包括:經由該些資料輸入/輸出匯流排從該些快閃記憶體模組中同步地讀取該些對應不同之資料輸入/輸出匯流排的主機讀取指令之中的一第一主機讀取指令的資料和該些對應不同之資料輸入/輸出匯流排的主機讀取指令之中的至少一第二主機讀取指令的資料, 其中該第一主機讀取指令和該至少一第二主機讀取指令是對應該些資料輸入/輸出匯流排之中不同的資料輸入/輸出匯流排;將對應該第一主機讀取指令的資料傳送給該主機系統;將對應該至少一第二主機讀取指令的資料暫存於該快閃記憶體控制器的一緩衝記憶體中;以及在對應該第一主機讀取指令的資料被傳送給該主機系統之後,從該緩衝記憶體中將對應該至少一第二主機讀取指令的資料傳送給該主機系統。 The data reading method of claim 3, wherein the corresponding data input/output sinks are synchronously read from at least two flash memory modules of the flash memory modules. The step of reading the data of the command by the host of the row includes: synchronously reading the host readings corresponding to the different data input/output busbars from the flash memory modules via the data input/output busbars a first host read command data of the instruction and at least one second host read command data of the host read command corresponding to the different data input/output bus, The first host read command and the at least one second host read command are different data input/output bus bars corresponding to the data input/output bus bars; and the data corresponding to the first host read command is Transmitting to the host system; temporarily storing data corresponding to at least one second host read command in a buffer memory of the flash memory controller; and transmitting data corresponding to the first host read command After the host system is sent, data corresponding to at least one second host read command is transmitted from the buffer memory to the host system. 如申請專利範圍第5項所述之資料讀取方法,更包括:將該些邏輯扇區分組為多個邏輯區域,以及為每一該些邏輯區域配置一邏輯-實體對映表,其中每一該些邏輯扇區對應該些邏輯-實體對映表的其中之一;以及載入該些邏輯-實體對映表的其中之一至該緩衝記憶體中。 The method for reading data according to claim 5, further comprising: grouping the logical sectors into a plurality of logical regions, and configuring a logical-entity mapping table for each of the logical regions, wherein each One of the logical sectors corresponds to one of the logical-entity mapping tables; and one of the logical-entity mapping tables is loaded into the buffer memory. 如申請專利範圍第6項所述之資料讀取方法,更包括:依據該些主機讀取指令所對應的該些資料輸入/輸出匯流排與該些邏輯區域來重新排列該些主機讀取指令。 The data reading method of claim 6, further comprising: rearranging the host read commands according to the data input/output buss corresponding to the host read commands and the logic regions. . 如申請專利範圍第7項所述之資料讀取方法,其中依據該些主機讀取指令所對應的該些資料輸入/輸出匯流排與該些邏輯區域來重新排列該些主機讀取指令的順序的步驟包括:在該下達指令順序中優先安排該些主機讀取指令之中的至少一主機讀取指令,其中該至少一主機讀取指令所對應的邏輯扇區是對應被載入於該緩衝記憶體中的邏輯-實體對映表。 The data reading method of claim 7, wherein the order of the host read commands is rearranged according to the data input/output bus bars corresponding to the host read commands and the logic regions. The step of: prioritizing at least one of the host read commands in the order of the release instructions, wherein the logical sector corresponding to the at least one host read command is correspondingly loaded in the buffer A logical-entity mapping table in memory. 一種快閃記憶體控制器,用於處理來自於一主機系統的多個主機讀取指令以從多個快閃記憶體模組中讀取對應該些主機讀取指令的資料,其中每一該些快閃記憶體模組具有多個實體區塊,該快閃記憶體控制器包括:一微處理器單元;一快閃記憶體介面單元,耦接至該微處理器單元,用以經由多條資料輸入/輸出匯流排耦接至該些快閃記憶體模組;一主機介面單元,耦接至該微處理器單元,用以連接該主機系統;以及一記憶體管理單元,耦接至該微處理器單元,其中該記憶體管理單元從該主機系統中接收關於該些主機讀取指令的一指令排序資訊,其中每一該些主機讀取指令對應多個邏輯扇區的其中之一且該些邏輯扇區的其中之一對應該些資料輸入/輸出匯流排的其中之一,其中該記憶體管理單元同步地從該些快閃記憶體模組之中的至少兩個快閃記憶體模組中讀取對應不同之資料輸入/輸出匯流排的主機讀取指令的資料,其中該些對應不同之資料輸入/輸出匯流排的主機讀取指令在該指令排序資訊中為原不相鄰排列而在同步地從該至少兩個快閃記憶體模組中讀取資料時為相鄰排列。 A flash memory controller for processing a plurality of host read commands from a host system to read data corresponding to the host read commands from a plurality of flash memory modules, each of which The flash memory module has a plurality of physical blocks, the flash memory controller includes: a microprocessor unit; a flash memory interface unit coupled to the microprocessor unit for a data input/output bus is coupled to the flash memory modules; a host interface unit coupled to the microprocessor unit for connecting to the host system; and a memory management unit coupled to The microprocessor unit, wherein the memory management unit receives an instruction ordering information about the host read commands from the host system, wherein each of the host read instructions corresponds to one of a plurality of logical sectors And one of the logical sectors corresponds to one of the data input/output buss, wherein the memory management unit synchronously synchronizes at least two of the flash memory modules from the flash memory modules body The group reads the data of the host read command corresponding to different data input/output busbars, wherein the host read commands corresponding to the different data input/output busbars are originally non-contiguous in the order sorting information. When the data is synchronously read from the at least two flash memory modules, they are adjacently arranged. 如申請專利範圍第9項所述之快閃記憶體控制器,其中該主機介面單元支援一原生指令排序協定。 The flash memory controller of claim 9, wherein the host interface unit supports a native instruction ordering protocol. 如申請專利範圍第9項所述之快閃記憶體控制器,更包括耦接至該微處理器單元的一緩衝記憶體,其中該記憶體管理單元經由該些資料輸入/輸出匯流排從該些快閃記憶體模組中同步地讀取該些對應不同之資料輸入/輸出匯流排的主機讀取指令之中的一第一主機讀取指令的資料和該些對應不同之資料輸入/輸出匯流排的主機讀取指令之中的至少一第二主機讀取指令的資料,其中該第一主機讀取指令和該至少一第二主機讀取指令是對應該些資料輸入/輸出匯流排之中不同的資料輸入/輸出匯流排,其中該記憶體管理單元將對應該第一主機讀取指令的資料傳送給該主機系統,其中該記憶體管理單元將對應該至少一第二主機讀取指令的資料暫存於該快閃記憶體控制器的該緩衝記憶體中,其中在對應該第一主機讀取指令的資料被傳送給該主機系統之後,該記憶體管理單元從該緩衝記憶體中將對應該至少一第二主機讀取指令的資料傳送給該主機系統。 The flash memory controller of claim 9, further comprising a buffer memory coupled to the microprocessor unit, wherein the memory management unit passes the data input/output bus from the The flash memory module synchronously reads the data of a first host read command among the host read commands corresponding to the different data input/output bus bars and the corresponding different data input/output At least one second host read command data of the bus read command of the bus, wherein the first host read command and the at least one second host read command are corresponding to the data input/output bus a different data input/output bus, wherein the memory management unit transmits data corresponding to the first host read command to the host system, wherein the memory management unit will correspond to at least one second host read command The data is temporarily stored in the buffer memory of the flash memory controller, wherein the memory tube is transmitted to the host system after the data corresponding to the first host read command is transmitted A second master unit will be read from the buffer memory at least the instruction information transmitted to the host system. 如申請專利範圍第11項所述之快閃記憶體控制器,其中該記憶體管理單元將該些邏輯扇區分組為多個邏輯區域,以及為每一該些邏輯區域配置一邏輯-實體對映表,其中每一該些邏輯扇區對應該些邏輯-實體對映表的其中之一,其中該記憶體管理單元載入該些邏輯-實體對映表的其中之 一至該緩衝記憶體中。 The flash memory controller of claim 11, wherein the memory management unit groups the logical sectors into a plurality of logical regions, and configures a logical-entity pair for each of the logical regions. a mapping table, wherein each of the logical sectors corresponds to one of the logical-entity mapping tables, wherein the memory management unit loads the logical-entity mapping table One to the buffer memory. 如申請專利範圍第12項所述之快閃記憶體控制器,其中該記憶體管理單元依據該些主機讀取指令所對應的該些資料輸入/輸出匯流排與該些邏輯區域來重新排列該些主機讀取指令。 The flash memory controller of claim 12, wherein the memory management unit rearranges the data input/output bus and the logical regions corresponding to the host read commands. These hosts read the instructions. 如申請專利範圍第13項所述之快閃記憶體控制器,其中該記憶體管理單元在該下達指令順序中優先安排該些主機讀取指令之中的至少一主機讀取指令,其中該至少一主機讀取指令所對應的邏輯扇區是對應被載入於該緩衝記憶體中的邏輯-實體對映表。 The flash memory controller of claim 13, wherein the memory management unit preferentially arranges at least one of the host read commands in the order of the command, wherein the at least one The logical sector corresponding to a host read command is a logical-entity mapping table corresponding to the buffer memory. 一種快閃記憶體儲存系統,包括:一快閃記憶體晶片,具有多個快閃記憶體模組,並且每一該些快閃記憶體模組具有多個實體區塊;一快閃記憶體控制器,經由多條資料輸入/輸出匯流排耦接至該些快閃記憶體模組;以及一連接器,耦接至該快閃記憶體控制器並且用以耦接一主機系統,其中該快閃記憶體控制器經由該連接器從該主機系統中接收關於多個主機讀取指令的一指令排序資訊,其中該些主機讀取指令的其中之一對應多個邏輯扇區的其中之一且該些邏輯扇區的其中之一對應該些資料輸入/輸出匯流排的其中之一,其中該快閃記憶體控制器同步地從該些快閃記憶體模組之中的至少兩個快閃記憶體模組中讀取對應不同之資料輸入/輸出匯流排的主機讀取指令的資料,其中該些對應不同之資料輸入/輸出匯流排的主機讀取指令在該指令排序資訊中為原不相鄰排列而在同 步地從該至少兩個快閃記憶體模組中讀取資料時為相鄰排列。 A flash memory storage system includes: a flash memory chip having a plurality of flash memory modules, and each of the flash memory modules has a plurality of physical blocks; a flash memory The controller is coupled to the flash memory modules via a plurality of data input/output busses; and a connector coupled to the flash memory controller and coupled to a host system, wherein the The flash memory controller receives, via the connector, an instruction sequencing information about the plurality of host read instructions from the host system, wherein one of the host read instructions corresponds to one of the plurality of logical sectors And one of the logical sectors corresponds to one of the data input/output buss, wherein the flash memory controller is synchronously synchronized from at least two of the flash memory modules The flash memory module reads data of a host read command corresponding to different data input/output bus bars, wherein the host read commands corresponding to different data input/output bus bars are original in the order sorting information Do not Adjacent and adjacent Steps are arranged adjacent to each other when reading data from the at least two flash memory modules. 如申請專利範圍第15項所述之快閃記憶體儲存系統,其中該連接器支援一原生指令排序協定。 The flash memory storage system of claim 15, wherein the connector supports a native instruction sorting protocol. 如申請專利範圍第15項所述之快閃記憶體儲存系統,更包括一緩衝記憶體,其中該快閃記憶體控制器經由該些資料輸入/輸出匯流排從該些快閃記憶體模組中同步地讀取該些對應不同之資料輸入/輸出匯流排的主機讀取指令之中的一第一主機讀取指令的資料和該些對應不同之資料輸入/輸出匯流排的主機讀取指令之中的至少一第二主機讀取指令的資料,其中該第一主機讀取指令和該至少一第二主機讀取指令是對應該些資料輸入/輸出匯流排之中不同的資料輸入/輸出匯流排,其中該快閃記憶體控制器將對應該第一主機讀取指令的資料傳送給該主機系統,其中該快閃記憶體控制器將對應該至少一第二主機讀取指令的資料暫存於該緩衝記憶體中,其中在對應該第一主機讀取指令的資料被傳送給該主機系統之後,該快閃記憶體控制器從該緩衝記憶體中將對應該至少一第二主機讀取指令的資料傳送給該主機系統。 The flash memory storage system of claim 15 further comprising a buffer memory, wherein the flash memory controller receives the flash memory modules from the flash memory modules via the data input/output bus Reading, in synchronization, a data of a first host read command among the host read commands corresponding to the different data input/output bus rows and a host read command corresponding to the different data input/output bus bars At least one of the second host reads the data of the instruction, wherein the first host read command and the at least one second host read command are different data input/output corresponding to the data input/output bus a bus, wherein the flash memory controller transmits data corresponding to the first host read command to the host system, wherein the flash memory controller temporarily stores data corresponding to at least one second host read command Stored in the buffer memory, wherein after the data corresponding to the first host read command is transmitted to the host system, the flash memory controller will correspond to the buffer memory The data of the second host read command is transmitted to the host system. 如申請專利範圍第17項所述之快閃記憶體儲存系統,其中該快閃記憶體控制器將該些邏輯扇區分組為多個邏輯區域,以及為每一該些邏輯區域配置一邏輯-實體對映表, 其中每一該些邏輯扇區對應該些邏輯-實體對映表的其中之一,其中該快閃記憶體控制器載入該些邏輯-實體對映表的其中之一至該緩衝記憶體中。 The flash memory storage system of claim 17, wherein the flash memory controller groups the logical sectors into a plurality of logical regions, and configures a logic for each of the logical regions - Entity mapping table, Each of the logical sectors corresponds to one of the logical-entity mapping tables, wherein the flash memory controller loads one of the logical-entity mapping tables into the buffer memory. 如申請專利範圍第18項所述之快閃記憶體儲存系統,其中該快閃記憶體控制器依據該些主機讀取指令所對應的該些資料輸入/輸出匯流排與該些邏輯區域來重新排列該些主機讀取指令。 The flash memory storage system of claim 18, wherein the flash memory controller is re-in accordance with the data input/output bus bars corresponding to the host read commands and the logic regions. Arrange the host read instructions. 如申請專利範圍第19項所述之快閃記憶體儲存系統,其中該快閃記憶體控制器在該下達指令順序中優先安排該些主機讀取指令之中的至少一主機讀取指令,其中該至少一主機讀取指令所對應的邏輯扇區是對應被載入於該緩衝記憶體中的邏輯-實體對映表。 The flash memory storage system of claim 19, wherein the flash memory controller preferentially arranges at least one of the host read commands in the order of the command, wherein The logical sector corresponding to the at least one host read command is a logical-entity mapping table corresponding to being loaded in the buffer memory.
TW103129176A 2009-09-24 2009-09-24 Data read method, and flash memory controller and storage system using the same TWI537726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103129176A TWI537726B (en) 2009-09-24 2009-09-24 Data read method, and flash memory controller and storage system using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103129176A TWI537726B (en) 2009-09-24 2009-09-24 Data read method, and flash memory controller and storage system using the same

Publications (2)

Publication Number Publication Date
TW201445312A true TW201445312A (en) 2014-12-01
TWI537726B TWI537726B (en) 2016-06-11

Family

ID=52707047

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103129176A TWI537726B (en) 2009-09-24 2009-09-24 Data read method, and flash memory controller and storage system using the same

Country Status (1)

Country Link
TW (1) TWI537726B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI747660B (en) * 2020-12-14 2021-11-21 慧榮科技股份有限公司 Method and apparatus and computer program product for reading data from multiple flash dies
US11651803B2 (en) 2020-12-14 2023-05-16 Silicon Motion, Inc. Method and apparatus and computer program product for reading data from multiple flash dies

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI747660B (en) * 2020-12-14 2021-11-21 慧榮科技股份有限公司 Method and apparatus and computer program product for reading data from multiple flash dies
US11651803B2 (en) 2020-12-14 2023-05-16 Silicon Motion, Inc. Method and apparatus and computer program product for reading data from multiple flash dies

Also Published As

Publication number Publication date
TWI537726B (en) 2016-06-11

Similar Documents

Publication Publication Date Title
TWI454906B (en) Data read method, and flash memory controller and storage system using the same
TWI425512B (en) Flash memory controller circuit and storage system and data transfer method thereof
TWI506430B (en) Method of recording mapping information method, and memory controller and memory storage apparatus using the same
US8386699B2 (en) Method for giving program commands to flash memory for writing data according to a sequence, and controller and storage system using the same
TWI479491B (en) Memory controlling method, memory controller and memory storage apparatus
US8812784B2 (en) Command executing method, memory controller and memory storage apparatus
US9268687B2 (en) Data writing method, memory control circuit unit and memory storage apparatus
US9122498B2 (en) Firmware code loading method, memory controller and memory storage apparatus
US9176865B2 (en) Data writing method, memory controller, and memory storage device
US8904086B2 (en) Flash memory storage system and controller and data writing method thereof
US20100057979A1 (en) Data transmission method for flash memory and flash memory storage system and controller using the same
US9304900B2 (en) Data reading method, memory controller, and memory storage device
TWI498899B (en) Data writing method, memory controller and memory storage apparatus
CN111796759B (en) Computer readable storage medium and method for fragment data reading on multiple planes
US20150161042A1 (en) Memory management method, memory controlling circuit unit, and memory storage device
US9235501B2 (en) Memory storage device, memory controller thereof, and method for programming data thereof
JP4460967B2 (en) MEMORY CARD, NONVOLATILE SEMICONDUCTOR MEMORY, AND SEMICONDUCTOR MEMORY CONTROL METHOD
US8943289B2 (en) Data moving method for flash memory module, and memory controller and memory storage apparatus using the same
CN101930407B (en) Flash memory control circuit and memory system and data transmission method thereof
US8572350B2 (en) Memory management, memory control system and writing method for managing rewritable semiconductor non-volatile memory of a memory storage system
US9146861B2 (en) Memory address management method, memory controller and memory storage device
US20110029719A1 (en) Data writing method for flash memory and control circuit and storage system using the same
US8738847B2 (en) Data writing method, and memory controller and memory storage apparatus using the same
TWI537726B (en) Data read method, and flash memory controller and storage system using the same
US9009389B2 (en) Memory management table processing method, memory controller, and memory storage apparatus