TWI494756B - Method for giving read commands, flash memory controller and flash memory storage system using the same - Google Patents

Method for giving read commands, flash memory controller and flash memory storage system using the same Download PDF

Info

Publication number
TWI494756B
TWI494756B TW103104754A TW103104754A TWI494756B TW I494756 B TWI494756 B TW I494756B TW 103104754 A TW103104754 A TW 103104754A TW 103104754 A TW103104754 A TW 103104754A TW I494756 B TWI494756 B TW I494756B
Authority
TW
Taiwan
Prior art keywords
host
flash memory
data
command
buffer
Prior art date
Application number
TW103104754A
Other languages
Chinese (zh)
Other versions
TW201421238A (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 TW103104754A priority Critical patent/TWI494756B/en
Publication of TW201421238A publication Critical patent/TW201421238A/en
Application granted granted Critical
Publication of TWI494756B publication Critical patent/TWI494756B/en

Links

Description

下達讀取指令的方法、快閃記憶體控制器與快閃記憶體儲存系統Method for issuing read commands, flash memory controller and flash memory storage system

本發明是有關於一種對快閃記憶體下達讀取指令的方法以及使用此方法的快閃記憶體控制器與快閃記憶體儲存系統。The present invention relates to a method of issuing a read command to a flash memory and a flash memory controller and a flash memory storage system using the same.

由於快閃記憶體(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.

圖1是繪示一般快閃記憶體儲存裝置的概要方塊圖。一般來說,當主機系統110透過連接器122與快閃記憶體儲存裝置120耦接並且欲讀取儲存在快閃記憶體儲存裝置120中的資料時,主機系統110從快閃記憶體儲存裝置120之快閃記憶體晶片126中讀取資料的程序可區分為資料上載(load)、內部資料傳輸(transfer)與外部資料傳輸等部分。具體來說,當主機系統110欲 從快閃記憶體儲存裝置120中讀取資料時,快閃記憶體控制器124會對快閃記憶體晶片126下達一般讀取指令,此時快閃記憶體晶片126會依據一般讀取指令將資料從記憶胞(即,儲存區)134中搬移至快閃記憶體晶片126內的緩衝區132中,此過程稱之為資料上載。例如,當快閃記憶體控制器124從主機系統110接收到主機讀取指令時,快閃記憶體控制器124會對快閃記憶體晶片126下達由“指令C1”、“實體位址”與“指令C2”等字串所組成的一般讀取指令,其中“指令C1”用以指示快閃記憶體晶片準備執行讀取程序,“實體位址”用以指示快閃記憶體晶片欲讀取的位址,“指令C2”用以指示快閃記憶體晶片將資料從記憶胞134中搬移至緩衝區132。此時,快閃記憶體晶片126就會依據一般讀取指令中的“實體位址”將資料從記憶胞134中搬移至緩衝區132中。1 is a schematic block diagram showing a general flash memory storage device. Generally, when the host system 110 is coupled to the flash memory storage device 120 through the connector 122 and wants to read the data stored in the flash memory storage device 120, the host system 110 is from the flash memory storage device. The program for reading data in the flash memory chip 126 of 120 can be divided into data upload (load), internal data transfer (transfer) and external data transmission. Specifically, when the host system 110 wants When the data is read from the flash memory storage device 120, the flash memory controller 124 issues a general read command to the flash memory chip 126, at which time the flash memory chip 126 will be in accordance with the normal read command. The data is transferred from the memory cell (i.e., storage area) 134 to the buffer 132 within the flash memory chip 126. This process is referred to as data upload. For example, when the flash memory controller 124 receives a host read command from the host system 110, the flash memory controller 124 issues a command to the flash memory chip 126 by "command C1", "physical address" and A general read command consisting of a string such as "instruction C2", wherein "instruction C1" is used to indicate that the flash memory chip is ready to execute a read program, and "physical address" is used to indicate that the flash memory chip is to be read. The address "Command C2" is used to instruct the flash memory chip to move data from the memory cell 134 to the buffer 132. At this time, the flash memory chip 126 moves the data from the memory cell 134 to the buffer 132 in accordance with the "physical address" in the general read command.

在完成資料上載之後,暫存於緩衝區132中的資料會被傳輸至快閃記憶體控制器124(例如,配置於快閃記憶體控制器124中的緩衝記憶體),此過程稱之為內部資料傳輸。After the data upload is completed, the data temporarily stored in the buffer 132 is transferred to the flash memory controller 124 (for example, the buffer memory disposed in the flash memory controller 124). This process is called Internal data transfer.

最後,快閃記憶體控制器124再將所接收的資料透過連接器122傳送至主機系統110,此過程稱之為外部資料傳輸。特別是,在進行資料上載與內部資料傳輸的過程中,快閃記憶體控制器124在下達一般讀取指令後,快閃記憶體晶片126會處於一忙碌(busy)狀態,且當快閃記憶體晶片126處於忙碌狀態下快閃記憶體控制器124無法對其下達任何指令。也就是說,快閃記憶體控制器124必須於快閃記憶體晶片126完成將資料從記 傳輸至快閃記憶體控制器124的內部資料傳輸後,快閃記憶體控制器124才能再對快閃記憶體晶片126下達下一個指令。例如,在依據主機系統110的一個主機讀取指令而需讀取連續之2邏輯位址(即,2個頁面)中的資料時,快閃記憶體控制器124必須先對快閃記憶體晶片126下達第一個由“指令C1”、“實體位址”與“指令C2”等字串所組成的一般讀取指令以進行第1個頁面的資料上載,之後再進行內部資料傳輸以將所讀取的第1個頁面的資料傳送至快閃記憶體控制器124,然後再對快閃記憶體晶片126下達第二個由“指令C1”、“實體位址”與“指令C2”等字串所組成的一般讀取指令以進行第2個頁面的資料上載,最後再進行內部資料傳輸以將所讀取的第2個頁面的資料傳送至快閃記憶體控制器124。換言之,既使欲讀取的資料是儲存於連續的邏輯位址中,快閃記憶體控制器124也必須反覆地下達由“指令C1”、“實體位址”與“指令C2”等字串所組成的一般讀取指令才能從快閃記憶體晶片中讀取資料。Finally, the flash memory controller 124 transmits the received data to the host system 110 through the connector 122. This process is referred to as external data transmission. In particular, during data uploading and internal data transfer, the flash memory controller 124 is in a busy state after the general read command is issued, and when the flash memory is flashed. The flash memory controller 124 is unable to issue any instructions to the flash memory controller 124 while it is busy. That is, the flash memory controller 124 must complete the data from the flash memory chip 126. After the internal data transfer to the flash memory controller 124 is transmitted, the flash memory controller 124 can again issue the next instruction to the flash memory chip 126. For example, the flash memory controller 124 must first access the flash memory chip when reading data from two consecutive logical addresses (ie, two pages) in response to a host read command from the host system 110. 126 releases the first general read command consisting of a string of "command C1", "physical address" and "command C2" to upload the data of the first page, and then performs internal data transfer to The read data of the first page is transferred to the flash memory controller 124, and then the second word "instruction C1", "physical address" and "command C2" are issued to the flash memory chip 126. The general read command consisting of the strings is used to upload the data of the second page, and finally the internal data transfer is performed to transfer the data of the read second page to the flash memory controller 124. In other words, even if the data to be read is stored in consecutive logical addresses, the flash memory controller 124 must also repeat the strings of "instruction C1", "physical address" and "command C2". The general read command is composed to read data from the flash memory chip.

隨著傳輸技術的發展,使得連接器的傳輸速度已大幅提昇,例如,序列先進附件(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, in the above data uploading and internal data transmission speed is lower than the speed of the connector, the overall storage performance can not be effectively improved, so how to shorten the execution time of the host read command is a goal of the technicians in this field.

本發明提供一種下達讀取指令的方法,其能夠有效地縮短執行主機讀取指令的時間。The present invention provides a method of issuing a read command that can effectively shorten the time for executing a host read command.

本發明提供一種快閃記憶體控制器,其能夠有效地縮短執行主機讀取指令的時間。The present invention provides a flash memory controller capable of effectively shortening the time for executing a host read command.

本發明提供一種快閃記憶體儲存系統,其能夠有效地縮短執行主機讀取指令的時間。The present invention provides a flash memory storage system capable of effectively shortening the time for executing a host read command.

本發明提供一種資料讀取方法,其能夠有效地縮短執行主機讀取指令的時間。The present invention provides a data reading method capable of effectively shortening the time for executing a host read command.

本發明範例實施例提出一種下達讀取指令的方法用於從快閃記憶體晶片中讀取主機系統欲存取的資料。本下達讀取指令的方法包括提供快閃記憶體控制器,以及從主機系統中接收主機指令,其中此主機指令為主機讀取指令並且此主機指令包括第一起始邏輯位址。本下達讀取指令的方法也包括由快閃記憶體控制器依據主機指令向快閃記憶體晶片下達一個一般讀取指令與至少一個快取讀取指令以在快閃記憶體晶片中從對映第一起始邏輯位址的實體位址開始依序地讀取對應主機指令的第一資料,以及由快閃記憶體控制器向快閃記憶體晶片下達至少一個快取讀取指令以在第一資料的至少一部分被傳送至快閃記憶體控制器期間從快閃記憶體晶片中讀取非上述主機指令請求之第二資料,其中在記憶體晶片中儲存第二資料的實體位址是接續於儲存第一資料的實體位址。本下達讀取指令的方法亦包括從主機系統中接收下一個 主機指令,其中下一個主機指令包括第二起始邏輯位址。本下達讀取指令的方法更包括判斷此下一個主機指令是否為主機讀取指令且此下一個主機指令是否為接續於上述主機指令,以及當下一個主機指令為主機讀取指令且下一個主機指令為接續於上述主機指令時,則由快閃記憶體控制器依據下一個主機指令向快閃記憶體晶片直接下達至少一個快取讀取指令。An exemplary embodiment of the present invention provides a method for issuing a read command for reading data to be accessed by a host system from a flash memory chip. The method of presenting the read command includes providing a flash memory controller and receiving a host command from the host system, wherein the host command is a host read command and the host command includes a first start logical address. The method for issuing the read command further includes: the flash memory controller issues a general read command and at least one cache read command to the flash memory chip according to the host command to perform the mapping from the flash memory chip. The physical address of the first starting logical address begins to sequentially read the first data of the corresponding host instruction, and the flash memory controller issues at least one cache read command to the flash memory chip to be at the first The second data that is not requested by the host command is read from the flash memory chip during at least a portion of the data is transferred to the flash memory controller, wherein the physical address of the second data stored in the memory chip is continued The physical address where the first data is stored. The method of releasing the read command also includes receiving the next one from the host system. A host instruction, wherein the next host instruction includes a second starting logical address. The method for issuing the read command further includes determining whether the next host command is a host read command and whether the next host command is connected to the host command, and when the next host command is a host read command and the next host command In order to continue the above host command, the flash memory controller directly issues at least one cache read command to the flash memory chip according to the next host command.

在本發明之一實施例中,當上述下一個主機指令為主機讀取指令且下一個主機指令不為接續於上述主機指令時,則由快閃記憶體控制器向快閃記憶體晶片下達一重置指令,並且再向快閃記憶體晶片下達一個一般讀取指令與至少一個快取讀取指令以在快閃記憶體晶片中從對映第二起始邏輯位址的實體位址開始依序地讀取對應上述下一個主機指令的第三資料。In an embodiment of the present invention, when the next host command is a host read command and the next host command is not connected to the host command, the flash memory controller issues a flash memory chip to the flash memory chip. Resetting the instruction, and then issuing a general read command and at least one cache read command to the flash memory chip to start from the physical address of the second start logical address in the flash memory chip The third data corresponding to the next host command is read sequentially.

在本發明之一實施例中,當上述下一個主機指令不為主機讀取指令時,則由快閃記憶體控制器向快閃記憶體晶片下達一重置指令。In an embodiment of the invention, when the next host command is not a host read command, a flash command is issued by the flash memory controller to the flash memory chip.

在本發明之一實施例中,所述之判斷上述下一個主機指令是否為接續於上述主機指令的步驟包括:判斷第二起始邏輯位址是否接續於儲存第一資料的實體位址所對映的邏輯位址,並且當第二起始邏輯位址接續於儲存第一資料的實體位址所對映的邏輯位址時,則判斷上述下一個主機指令為接續於上述主機指令。In an embodiment of the present invention, the step of determining whether the next host command is connected to the host command comprises: determining whether the second start logical address is connected to a physical address storing the first data The logical address is mapped, and when the second starting logical address is connected to the logical address mapped by the physical address storing the first data, it is determined that the next host command is connected to the host command.

在本發明之一實施例中,所述之判斷上述下一個主機指令是否為接續於上述主機指令的步驟包括:判斷第二起始邏輯位 址是否相同於儲存第二資料的實體位址所對映的邏輯位址,並且當第二起始邏輯位址相同於儲存第二資料的實體位址所對映的邏輯位址時,則判斷上述下一個主機指令為接續於上述主機指令。In an embodiment of the present invention, the step of determining whether the next host command is connected to the host command comprises: determining a second start logic bit Whether the address is the same as the logical address mapped by the physical address storing the second data, and when the second starting logical address is the same as the logical address mapped by the physical address storing the second data, The next host command is connected to the host command.

在本發明之一實施例中,所述之下達讀取指令的方法更包括在從快閃記憶體晶片中讀取非主機指令請求之第二資料之前判斷第一起始邏輯位址對應的一邏輯區塊是否處於一開啟母子區塊狀態,其中僅當第一起始邏輯位址對應的邏輯區塊非處於此開啟母子區塊狀態時,從快閃記憶體晶片中讀取非主機指令請求之第二資料。In an embodiment of the invention, the method for subscribing to the read command further includes determining a logic corresponding to the first start logical address before reading the second data of the non-host instruction request from the flash memory chip. Whether the block is in a state of opening the mother and child block, wherein the non-host command request is read from the flash memory chip only when the logical block corresponding to the first start logical address is not in the state of the open parent block Two materials.

本發明範例實施例提出一種快閃記憶體控制器,用於從快閃記憶體晶片中讀取主機系統欲存取的資料。本快閃記憶體控制器包括微處理器單元、快閃記憶體介面單元、主機介面單元、緩衝記憶體與記憶體管理單元。快閃記憶體介面單元耦接至微處理器單元,並且用以連接快閃記憶體晶片。主機介面單元耦接至微處理器單元,並且用以連接上述主機系統。緩衝記憶體耦接至微處理器單元並且用以暫存資料。記憶體管理單元耦接至微處理器單元,並且用以透過主機介面單元從該主機系統中接收主機指令,其中此主機指令為一主機讀取指令並且此主機指令包括第一起始邏輯位址。此外,記憶體管理單元透過快閃記憶體介面單元依據上述主機指令向快閃記憶體晶片下達一個一般讀取指令與至少一個快取讀取指令以在快閃記憶體晶片中從對映第一起始邏輯位址的實體位址開始依序地讀取對應上述主機指令的一第一資 料,並且記憶體管理單元向該快閃記憶體晶片下達至少一個快取讀取指令以在第一資料的至少一部分被傳送至緩衝記憶體期間從快閃記憶體晶片中讀取非上述主機指令請求之第二資料,其中在記憶體晶片中儲存第二資料的實體位址是接續於儲存第一資料的實體位址。另外,記憶體管理單元透過主機介面單元從主機系統中接收下一個主機指令,其中此下一個主機指令包括第二起始邏輯位址。再者,記憶體管理單元判斷上述第下一個主機指令是否為主機讀取指令且此下一個主機指令是否為接續於上述主機指令,並且當上述下一個主機指令為主機讀取指令且上述下一個主機指令為接續於上述主機指令時,則記憶體管理單元透過快閃記憶體介面單元依據上述下一個主機指令向快閃記憶體晶片直接下達至少一個快取讀取指令。An exemplary embodiment of the present invention provides a flash memory controller for reading data to be accessed by a host system from a flash memory chip. The flash memory controller includes a microprocessor unit, a flash memory interface unit, a host interface unit, a buffer memory and a memory management unit. The flash memory interface unit is coupled to the microprocessor unit and is configured to connect to the flash memory chip. The host interface unit is coupled to the microprocessor unit and is configured to connect to the host system. The buffer memory is coupled to the microprocessor unit and is used to temporarily store data. The memory management unit is coupled to the microprocessor unit and configured to receive a host command from the host system through the host interface unit, wherein the host command is a host read command and the host command includes a first start logical address. In addition, the memory management unit issues a general read command and at least one cache read command to the flash memory chip through the flash memory interface unit according to the host command to start from the first in the flash memory chip. The physical address of the starting logical address begins to sequentially read a first resource corresponding to the above host instruction And the memory management unit issues at least one cache read command to the flash memory chip to read non-above host instructions from the flash memory chip during at least a portion of the first data being transferred to the buffer memory The requested second data, wherein the physical address of the second data stored in the memory chip is a physical address subsequent to storing the first data. In addition, the memory management unit receives the next host command from the host system through the host interface unit, wherein the next host command includes a second start logical address. Furthermore, the memory management unit determines whether the next host command is a host read command and whether the next host command is connected to the host command, and when the next host command is a host read command and the next one When the host command is connected to the host command, the memory management unit directly sends at least one cache read command to the flash memory chip according to the next host command through the flash memory interface unit.

在本發明之一實施例中,當上述下一個主機指令為主機讀取指令且上述下一個主機指令不為接續於上述主機指令時,則記憶體管理單元向快閃記憶體晶片下達一重置指令,並且再向快閃記憶體晶片下達一個一般讀取指令與至少一個快取讀取指令以在快閃記憶體晶片中從對映第二起始邏輯位址的實體位址開始依序地讀取對應上述下一個主機指令的第三資料。In an embodiment of the present invention, when the next host command is a host read command and the next host command is not connected to the host command, the memory management unit issues a reset to the flash memory chip. Directing, and again, issuing a general read command and at least one cache read command to the flash memory chip to sequentially sequence from the physical address of the second start logical address in the flash memory chip The third data corresponding to the next host command is read.

在本發明之一實施例中,當上述下一個主機指令不為主機讀取指令時,則記憶體管理單元向快閃記憶體晶片下達一重置指令。In an embodiment of the invention, when the next host command is not a host read command, the memory management unit issues a reset command to the flash memory chip.

在本發明之一實施例中,上述之記憶體管理單元判斷第 二起始邏輯位址是否接續於儲存第一資料的實體位址所對映的邏輯位址,其中當第二起始邏輯位址接續於儲存第一資料的實體位址所對映的邏輯位址時,則記憶體管理單元判斷上述下一個主機指令為接續於上述主機指令。In an embodiment of the present invention, the foregoing memory management unit determines that Whether the second starting logical address is connected to the logical address mapped by the physical address storing the first data, wherein the second starting logical address is connected to the logical bit mapped by the physical address storing the first data At the address, the memory management unit determines that the next host command is connected to the host command.

在本發明之一實施例中,上述之記憶體管理單元判斷該第二起始邏輯位址是否相同於儲存第二資料的實體位址所對映的邏輯位址,其中當第二起始邏輯位址相同於儲存第二資料的實體位址所對映的邏輯位址時,則記憶體管理單元判斷上述下一個主機指令為接續於上述主機指令。In an embodiment of the present invention, the memory management unit determines whether the second start logical address is the same as the logical address mapped by the physical address storing the second data, where the second start logic When the address is the same as the logical address mapped by the physical address storing the second data, the memory management unit determines that the next host command is connected to the host command.

在本發明之一實施例中,在從快閃記憶體晶片中讀取非上述主機指令請求之第二資料之前上述記憶體管理單元更判斷第一起始邏輯位址對應的一邏輯區塊是否處於一開啟母子區塊狀態,其中僅當第一起始邏輯位址對應的邏輯區塊非處於此開啟母子區塊狀態時,記憶體管理單元從該快閃記憶體晶片中讀取非上述主機指令請求之第二資料。In an embodiment of the present invention, before the second data that is not the host instruction request is read from the flash memory chip, the memory management unit further determines whether a logical block corresponding to the first start logical address is in the When the parent and child block states are turned on, the memory management unit reads the non-the above host command request from the flash memory chip only when the logical block corresponding to the first start logical address is not in the open parent and child block state. The second information.

本發明範例實施例提出一種快閃記憶體儲存系統。本快閃記憶體儲存系統包括的連接器、快閃記憶體晶片以及快閃記憶體控制器。連接器用以耦接主機系統。快閃記憶體控制器耦接至連接器與快閃記憶體晶片,並且用以透過連接器從主機系統中接收一主機指令,其中此主機指令為一主機讀取指令並且此主機指令包括一第一起始邏輯位址。此外,快閃記憶體控制器依據上述主機指令向快閃記憶體晶片下達一個一般讀取指令與至少一個快 取讀取指令以在快閃記憶體晶片中從對映第一起始邏輯位址的實體位址開始依序地讀取對應上述主機指令的第一資料,並且快閃記憶體控制器向快閃記憶體晶片下達至少一個快取讀取指令以在第一資料的至少一部分被傳送至快閃記憶體控制器期間從快閃記憶體晶片中讀取非上述主機指令請求之第二資料,其中在快閃記憶體晶片中儲存第二資料的實體位址是接續於儲存第一資料的實體位址。另外,快閃記憶體控制器透過連接器從該主機系統中接收下一個主機指令,其中此下一個主機指令包括第二起始邏輯位址。再者,快閃記憶體控制器判斷上述下一個主機指令是否為主機讀取指令且上述下一個主機指令是否為接續於上述主機指令,並且當上述下一個主機指令為主機讀取指令且上述下一個主機指令為接續於上述主機指令時,則快閃記憶體控制器透過快閃記憶體介面單元依據上述下一個主機指令向快閃記憶體晶片直接下達至少一個快取讀取指令。An exemplary embodiment of the present invention provides a flash memory storage system. The flash memory storage system includes a connector, a flash memory chip, and a flash memory controller. The connector is used to couple the host system. The flash memory controller is coupled to the connector and the flash memory chip, and configured to receive a host command from the host system through the connector, wherein the host command is a host read command and the host command includes a A starting logical address. In addition, the flash memory controller issues a general read command and at least one fast to the flash memory chip according to the host command. Taking a read command to sequentially read the first data corresponding to the host instruction from the physical address of the first starting logical address in the flash memory chip, and the flash memory controller flashes to the flash The memory chip issues at least one cache read command to read a second data other than the host command request from the flash memory chip during at least a portion of the first data being transferred to the flash memory controller, wherein The physical address of the second data stored in the flash memory chip is the physical address of the first data stored. Additionally, the flash memory controller receives a next host command from the host system via the connector, wherein the next host command includes a second start logical address. Furthermore, the flash memory controller determines whether the next host command is a host read command and whether the next host command is connected to the host command, and when the next host command is a host read command and the When a host command is connected to the host command, the flash memory controller directly sends at least one cache read command to the flash memory chip according to the next host command through the flash memory interface unit.

在本發明之一實施例中,當上述下一個主機指令為主機讀取指令且上述下一個主機指令不為接續於上述主機指令時,則快閃記憶體控制器向快閃記憶體晶片下達一重置指令,並且再向快閃記憶體晶片下達一個一般讀取指令與至少一個快取讀取指令以在快閃記憶體晶片中從對映第二起始邏輯位址的實體位址開始依序地讀取對應下一個主機指令的第三資料。In an embodiment of the present invention, when the next host command is a host read command and the next host command is not connected to the host command, the flash memory controller issues a flash memory chip to the flash memory chip. Resetting the instruction, and then issuing a general read command and at least one cache read command to the flash memory chip to start from the physical address of the second start logical address in the flash memory chip The third data corresponding to the next host instruction is read sequentially.

在本發明之一實施例中,當上述下一個主機指令不為主機讀取指令時,則快閃記憶體控制器向快閃記憶體晶片下達一重 置指令。In an embodiment of the present invention, when the next host command is not a host read command, the flash memory controller issues a weight to the flash memory chip. Set the instruction.

在本發明之一實施例中,上述之快閃記憶體控制器判斷第二起始邏輯位址是否接續於儲存第一資料的實體位址所對映的邏輯位址,其中當第二起始邏輯位址接續於儲存第一資料的實體位址所對映的邏輯位址時,則快閃記憶體控制器判斷上述下一個主機指令為接續於上述主機指令。In an embodiment of the present invention, the flash memory controller determines whether the second start logical address is connected to a logical address mapped by the physical address storing the first data, wherein the second start When the logical address is connected to the logical address mapped by the physical address storing the first data, the flash memory controller determines that the next host command is connected to the host command.

在本發明之一實施例中,上述之快閃記憶體控制器判斷第二起始邏輯位址是否相同於儲存第二資料的實體位址所對映的邏輯位址,其中當第二起始邏輯位址相同於儲存第二資料的實體位址所對映的邏輯位址時,則快閃記憶體控制器判斷上述下一個主機指令為接續於上述主機指令。In an embodiment of the present invention, the flash memory controller determines whether the second start logical address is the same as the logical address mapped by the physical address storing the second data, where the second start When the logical address is the same as the logical address mapped by the physical address storing the second data, the flash memory controller determines that the next host command is connected to the host command.

在本發明之一實施例中,在從快閃記憶體晶片中讀取非上述主機指令請求之第二資料之前快閃記憶體控制器更判斷第一起始邏輯位址對應的一邏輯區塊是否處於一開啟母子區塊狀態,其中僅當第一起始邏輯位址對應的邏輯區塊非處於此開啟母子區塊狀態時,快閃記憶體控制器從快閃記憶體晶片中讀取非上述主機指令請求之第二資料。In an embodiment of the present invention, the flash memory controller further determines whether a logical block corresponding to the first start logical address is before reading the second data that is not the host instruction request from the flash memory chip. In a state in which the parent and child blocks are turned on, the flash memory controller reads the non-the above host from the flash memory chip only when the logical block corresponding to the first start logical address is not in the state of the open parent block. The second information of the instruction request.

本發明範例實施例提出資料讀取方法,用於從一快閃記憶體晶片中讀取一主機系統欲存取的資料。此資料讀取方法包括提供一快閃記憶體控制器,以及從主機系統中接收一主機指令,其中此主機指令為主機讀取指令並且此該主機指令包括第一起始邏輯位址。本資料讀取方法也包括由快閃記憶體控制器依據上述 主機指令在快閃記憶體晶片中從對映第一起始邏輯位址的實體位址開始依序地讀取對應上述主機指令的第一資料,以及由快閃記憶體控制器在第一資料的至少一部分被傳送至快閃記憶體控制器期間從快閃記憶體晶片中讀取非上述主機指令請求之第二資料,其中在快閃記憶體晶片中儲存第二資料的實體位址是接續於儲存第一資料的實體位址。本資料讀取方法還包括從主機系統中接收一下一個主機指令,其中此下一個主機指令包括第二起始邏輯位址。本資料讀取方法更包括判斷此下一個主機指令是否為主機讀取指令且此下一個主機指令是否為接續於上述主機指令,以及當此下一個主機指令為主機讀取指令且此下一個主機指令為接續於上述主機指令時,則由快閃記憶體控制器將第二資料傳送給主機系統。An exemplary embodiment of the present invention provides a data reading method for reading data to be accessed by a host system from a flash memory chip. The data reading method includes providing a flash memory controller and receiving a host command from the host system, wherein the host command is a host read command and the host command includes a first start logical address. The data reading method is also included by the flash memory controller according to the above The host instruction sequentially reads the first data corresponding to the host instruction from the physical address of the first starting logical address in the flash memory chip, and the first data of the flash memory controller Reading at least a portion of the second data that is not requested by the host command from the flash memory chip during transmission to the flash memory controller, wherein the physical address of the second data stored in the flash memory chip is continued The physical address where the first data is stored. The data reading method further includes receiving a host instruction from the host system, wherein the next host instruction includes a second starting logical address. The data reading method further comprises determining whether the next host command is a host read command and whether the next host command is connected to the host command, and when the next host command is a host read command and the next host When the command is connected to the host command, the second data is transmitted to the host system by the flash memory controller.

本發明範例實施例提出一種快閃記憶體控制器,用於從快閃記憶體晶片中讀取主機系統欲存取的資料。本快閃記憶體控制器包括微處理器單元、快閃記憶體介面單元、主機介面單元、緩衝記憶體與記憶體管理單元。快閃記憶體介面單元耦接至微處理器單元,並且用以連接快閃記憶體晶片。主機介面單元耦接至微處理器單元,並且用以連接上述主機系統。緩衝記憶體耦接至微處理器單元並且用以暫存資料。記憶體管理單元耦接至微處理器單元,並且用以透過主機介面單元從主機系統中接收一主機指令,其中此主機指令為主機讀取指令並且此主機指令包括第一起始邏輯位址。此外,記憶體管理單元透過快閃記憶體介面單元依 據上述主機指令在快閃記憶體晶片中從對映第一起始邏輯位址的實體位址開始依序地讀取對應上述主機指令的第一資料,並且記憶體管理單元在第一資料的至少一部分被傳送至緩衝記憶體期間從快閃記憶體晶片中讀取非上述主機指令請求之第二資料,其中在快閃記憶體晶片中儲存第二資料的實體位址是接續於儲存第一資料的實體位址。另外,記憶體管理單元透過主機介面單元從主機系統中接收一下一個主機指令,其中此下一個主機指令包括第二起始邏輯位址。再者,記憶體管理單元判斷上述下一個主機指令是否為主機讀取指令且上述下一個主機指令是否為接續於上述主機指令,並且當上述下一個主機指令為主機讀取指令且上述下一個主機指令為接續於上述主機指令時,則記憶體管理單元透過快閃記憶體介面單元將第二資料傳送給主機系統。An exemplary embodiment of the present invention provides a flash memory controller for reading data to be accessed by a host system from a flash memory chip. The flash memory controller includes a microprocessor unit, a flash memory interface unit, a host interface unit, a buffer memory and a memory management unit. The flash memory interface unit is coupled to the microprocessor unit and is configured to connect to the flash memory chip. The host interface unit is coupled to the microprocessor unit and is configured to connect to the host system. The buffer memory is coupled to the microprocessor unit and is used to temporarily store data. The memory management unit is coupled to the microprocessor unit and configured to receive a host command from the host system through the host interface unit, wherein the host command is a host read command and the host command includes a first start logical address. In addition, the memory management unit is responsive to the flash memory interface unit. According to the host command, the first data corresponding to the host instruction is sequentially read from the physical address of the first starting logical address in the flash memory chip, and the memory management unit is at least the first data. Reading a second data that is not requested by the host command from the flash memory chip during a portion of being transferred to the buffer memory, wherein the physical address of the second data stored in the flash memory chip is connected to the first data stored The physical address. In addition, the memory management unit receives a host command from the host system through the host interface unit, wherein the next host command includes a second start logical address. Furthermore, the memory management unit determines whether the next host command is a host read command and whether the next host command is connected to the host command, and when the next host command is a host read command and the next host When the command is continued from the host command, the memory management unit transmits the second data to the host system through the flash memory interface unit.

本發明範例實施例提出一種快閃記憶體儲存系統。本快閃記憶體儲存系統包括的連接器、快閃記憶體晶片以及快閃記憶體控制器。連接器用以耦接主機系統。快閃記憶體控制器耦接至連接器與快閃記憶體晶片,並且用以透過連接器從主機系統中接收一主機指令,其中此主機指令為主機讀取指令並且此主機指令包括第一起始邏輯位址。此外,快閃記憶體控制器依據上述主機指令在快閃記憶體晶片中從對映第一起始邏輯位址的實體位址開始依序地讀取對應上述主機指令的第一資料,並且快閃記憶體控制器在第一資料的至少一部分被傳送至快閃記憶體控制器期間從快閃記憶體晶片中讀取非上述主機指令請求之第二資料,其中在 快閃記憶體晶片中儲存第二資料的實體位址是接續於儲存第一資料的實體位址。另外,快閃記憶體控制器透過連接器從該主機系統中接收一下一個主機指令,其中此下一個主機指令包括第二起始邏輯位址。再者,快閃記憶體控制器判斷上述下一個主機指令是否為主機讀取指令且上述下一個主機指令是否為接續於上述主機指令,並且當上述下一個主機指令為主機讀取指令且上述下一個主機指令為接續於上述主機指令時,則快閃記憶體控制器透過快閃記憶體介面單元將第二資料傳送給主機系統。An exemplary embodiment of the present invention provides a flash memory storage system. The flash memory storage system includes a connector, a flash memory chip, and a flash memory controller. The connector is used to couple the host system. The flash memory controller is coupled to the connector and the flash memory chip, and configured to receive a host command from the host system through the connector, wherein the host command is a host read command and the host command includes a first start Logical address. In addition, the flash memory controller sequentially reads the first data corresponding to the host instruction from the physical address of the first starting logical address in the flash memory chip according to the host command, and flashes The memory controller reads the second data that is not requested by the host instruction from the flash memory chip during at least a portion of the first data being transferred to the flash memory controller, wherein The physical address of the second data stored in the flash memory chip is the physical address of the first data stored. Additionally, the flash memory controller receives a host command from the host system via the connector, wherein the next host command includes a second start logical address. Furthermore, the flash memory controller determines whether the next host command is a host read command and whether the next host command is connected to the host command, and when the next host command is a host read command and the When a host command is connected to the host command, the flash memory controller transmits the second data to the host system through the flash memory interface unit.

基於上述,本發明範例實施例的下達讀取指令的方法、快閃記憶體控制器與快閃記憶體儲存系統能夠有效地縮短執行主機讀取指令所需的時間,由此提升快閃記憶體儲存系統的效能。Based on the above, the method for releasing the read command, the flash memory controller and the flash memory storage system according to the exemplary embodiments of the present invention can effectively shorten the time required to execute the host read command, thereby improving the flash memory. The performance of the storage system.

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

110‧‧‧主機系統110‧‧‧Host system

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

122‧‧‧連接器122‧‧‧Connector

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

126‧‧‧快閃記憶體模組126‧‧‧Flash Memory Module

132‧‧‧緩衝區132‧‧‧ buffer zone

134‧‧‧記憶胞134‧‧‧ memory cells

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

202‧‧‧連接器202‧‧‧Connector

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

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

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

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

212‧‧‧快閃記憶體介面單元212‧‧‧Flash Memory Interface Unit

214‧‧‧緩衝記憶體214‧‧‧ buffer memory

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

290‧‧‧主機系統290‧‧‧Host system

295‧‧‧匯流排295‧‧ ‧ busbar

402‧‧‧儲存區402‧‧‧ Storage area

404‧‧‧第一緩衝區404‧‧‧First buffer zone

406‧‧‧第二緩衝區406‧‧‧second buffer zone

602‧‧‧隨身碟602‧‧‧USB flash drive

604‧‧‧數位相機604‧‧‧Digital camera

604a‧‧‧SD卡604a‧‧‧SD card

604b‧‧‧MMC卡604b‧‧MMC card

604c‧‧‧CF卡604c‧‧‧CF card

604d‧‧‧記憶棒604d‧‧‧Memory Stick

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

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

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

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

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

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

C1、C2、C3‧‧‧指令C1, C2, C3‧‧‧ directives

D1、D2、D3、D4‧‧‧資料D1, D2, D3, D4‧‧‧ data

ADD‧‧‧實體位址ADD‧‧‧ physical address

CM1、CM2、CM3、CM4、CM5、CM6、CM7‧‧‧指令CM1, CM2, CM3, CM4, CM5, CM6, CM7‧‧‧ instructions

T1、T2、T3、T4‧‧‧內部資料傳輸T1, T2, T3, T4‧‧‧ internal data transmission

B1、B2、B3、B4、B5‧‧‧忙碌時間B1, B2, B3, B4, B5‧‧‧ busy time

S501、S503、S505、S507、S509、S511、S513、S515、S517‧‧‧下達讀取指令的步驟S501, S503, S505, S507, S509, S511, S513, S515, S517‧‧‧ steps to read the command

圖1是繪示一般快閃記憶體儲存裝置的概要方塊圖。1 is a schematic block diagram showing a general flash memory storage device.

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

圖2B是根據本發明範例實施例所繪示的快閃記憶體儲存裝置的概要方塊圖。FIG. 2B is a schematic block diagram of a flash memory storage device according to an exemplary embodiment of the invention.

圖3是根據本發明範例實施例所繪示的快閃記憶體控制器下 達讀取指令的範例示意圖。FIG. 3 is a diagram of a flash memory controller according to an exemplary embodiment of the invention. A schematic diagram of a sample read command.

圖4是根據圖3的指令所繪示之快閃記憶體晶片的運作時序圖。4 is a timing chart showing the operation of the flash memory chip according to the instructions of FIG.

圖5是根據本發明範例實施例所繪示的下達讀取指令的流程圖。FIG. 5 is a flow chart of a read command issued according to an exemplary embodiment of the present invention.

圖6是繪示本發明範例實施例之下達讀取指令的方法及其資料讀取方法可應用之裝置的示意圖。FIG. 6 is a schematic diagram showing a method for obtaining a read command and an apparatus for applying the data reading method according to an exemplary embodiment of the present invention.

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

圖2A根據本發明實施例繪示使用快閃記憶體儲存裝置的主機系統。2A illustrates a host system using a flash memory storage device in accordance with an embodiment of the present invention.

請參照圖2A,主機系統290一般包括微處理器1102、隨機存取記憶體(random access memory,RAM)1104、輸入/輸出(input/output,I/O)裝置1106、系統匯流排1108以及資料傳輸介面1110。必須瞭解的是,主機290可更包括其他組件,例如顯示器裝置或網路裝置等。Referring to FIG. 2A, the host system 290 generally includes a microprocessor 1102, a random access memory (RAM) 1104, an input/output (I/O) device 1106, a system bus 1108, and data. Transmission interface 1110. It must be understood that the host 290 may further include other components, such as a display device or a network device.

主機系統290可以是電腦、數位相機、攝影機、通信裝置、音訊播放器或視訊播放器等系統。一般而言,主機290可實質地為可儲存資料的任意系統。Host system 290 can be a computer, digital camera, camera, communication device, audio player, or video player. In general, host 290 can be substantially any system that can store data.

在本發明實施例中快閃記憶體儲存裝置200是透過資料傳輸介面1110與主機系統290的其他元件耦接。藉由微處理器1102、隨機存取記憶體1104與輸入/輸出裝置1106的處理可將資料寫入至快閃記憶體儲存裝置200或從快閃記憶體儲存裝置200中讀取資料。In the embodiment of the present invention, the flash memory storage device 200 is coupled to other components of the host system 290 through the data transmission interface 1110. The data can be written to or read from the flash memory storage device 200 by the processing of the microprocessor 1102, the random access memory 1104, and the input/output device 1106.

圖2A揭露了圖2B所示快閃記憶體儲存裝置200的詳細方塊圖。2A discloses a detailed block diagram of the flash memory storage device 200 of FIG. 2B.

請參照圖2B,快閃記憶體儲存裝置200包括連接器202、快閃記憶體控制器204與快閃記憶體晶片220。Referring to FIG. 2B, the flash memory storage device 200 includes a connector 202, a flash memory controller 204, and a flash memory chip 220.

連接器202是耦接至快閃記憶體控制器204並且用以透過匯流排295連接主機系統290。在本範例實施例中,連接器202為序列先進附件(Serial Advanced Technology Attachment,SATA)連接器。然而,必須瞭解的是本發明不限於此,連接器110亦可以是通用序列匯流排(Universal Serial Bus,USB)連接器、電氣和電子工程師協會(Institute of Electrical and Electronic Engineers,IEEE)1394連接器、高速周邊零件連接介面(Peripheral Component Interconnect Express,PCI Express)連接器、安全數位(secure digital,SD)介面連接器、記憶棒(Memory Stick,MS)介面連接器、多媒體儲存卡(Multi Media Card,MMC)介面連接器、小型快閃(Compact Flash,CF)介面連接器、整合式驅動電子介面(Integrated Device Electronics,IDE)連接器或其他適合的連接器。The connector 202 is coupled to the flash memory controller 204 and is configured to connect to the host system 290 via the bus bar 295. In the present exemplary embodiment, the connector 202 is a Serial Advanced Technology Attachment (SATA) connector. However, it must be understood that the present invention is not limited thereto, and the connector 110 may also be a Universal Serial Bus (USB) connector, Institute of Electrical and Electronic Engineers (IEEE) 1394 connector. , Peripheral Component Interconnect Express (PCI Express) connector, secure digital (SD) interface connector, Memory Stick (MS) interface connector, multimedia memory card (Multi Media Card, MMC) interface connector, compact flash (Compact Flash, CF) interface connector, Integrated Device Electronics (IDE) connector or other suitable connector.

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

微處理器單元206為快閃記憶體控制器204的主控單元,用以與記憶體管理單元208、主機介面單元210與快閃記憶體介面單元212等協同合作以進行快閃記憶體儲存裝置200的各種運作。The microprocessor unit 206 is a main control unit of the flash memory controller 204 for cooperating with the memory management unit 208, the host interface unit 210, and the flash memory interface unit 212 to perform a flash memory storage device. 200 various operations.

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

在本範例實施例中,記憶體管理單元208是以一韌體型式實作在快閃記憶體控制器204中。例如,將包括多個控制指令的記憶體管理單元208燒錄至一程式記憶體(例如,唯讀記憶體(Read Only Memory,ROM))中並且將此程式記憶體嵌入在快閃記憶體控制器204中,當快閃記憶體儲存裝置200運作時,記憶體管理單元208的多個控制指令會由微處理器單元206來執行以完成根據本發明實施例的下達讀取指令與區塊管理機制。In the present exemplary embodiment, the memory management unit 208 is implemented in the flash memory controller 204 in a firmware version. For example, the memory management unit 208 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 204, when the flash memory storage device 200 operates, a plurality of control commands of the memory management unit 208 are executed by the microprocessor unit 206 to complete the read command and block management according to the embodiment of the present invention. mechanism.

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

主機介面單元210是耦接至微處理器單元206,並且用以接收與識別主機系統290所傳送的指令與資料,以及將資料傳送給主機系統290。也就是說,主機系統290所傳送的指令與資料會透過主機介面單元210傳送至緩衝記憶體214,且記憶體管理單元208會透過主機介面單元210將資料傳送給至主機系統290。在本範例實施例中,主機介面單元210是對應連接器204為SATA介面。然而,必須瞭解的是本發明不限於此,主機介面單元210亦可以USB介面、IEEE 1394介面、PCI Express介面、SD介面、MS介面、MMC介面、CF介面、IDE介面或其他適合的資料傳輸介面。The host interface unit 210 is coupled to the microprocessor unit 206 and configured to receive and identify the instructions and data transmitted by the host system 290 and to communicate the data to the host system 290. That is to say, the instructions and data transmitted by the host system 290 are transmitted to the buffer memory 214 through the host interface unit 210, and the memory management unit 208 transmits the data to the host system 290 through the host interface unit 210. In the present exemplary embodiment, the host interface unit 210 is a corresponding connector 204 that is a SATA interface. However, it should be understood that the present invention is not limited thereto, and the host interface unit 210 can also be a USB interface, an IEEE 1394 interface, a PCI Express interface, an SD interface, an MS interface, an MMC interface, a CF interface, an IDE interface, or other suitable data transmission interface. .

快閃記憶體介面單元212是耦接至微處理器單元206並且用以耦接至快閃記憶體晶片220。The flash memory interface unit 212 is coupled to the microprocessor unit 206 and is coupled to the flash memory chip 220.

緩衝記憶體214是耦接至微處理器單元206並且用以暫存從來自於主機系統200的資料或來自於快閃記憶體晶片220的資料。The buffer memory 214 is coupled to the microprocessor unit 206 and is used to temporarily store data from the host system 200 or from the flash memory chip 220.

此外,雖未繪示於本範例實施例中,但快閃記憶體控制 器204亦更包括錯誤校正單元與電源管理單元等。In addition, although not shown in the present exemplary embodiment, the flash memory control The device 204 also further includes an error correction unit, a power management unit, and the like.

快閃記憶體晶片220是耦接至快閃記憶體控制器204並且用以依據快閃記憶體控制器204的指令來寫入資料與讀取資料。在本範例實施例中,快閃記憶體晶片220為多層記憶胞(Multi Level Cell,MLC)NAND快閃記憶體晶片。然而,本發明不限於此,快閃記憶體晶片220亦可是單層記憶胞(Single Level Cell,SLC)NAND快閃記憶體晶片。The flash memory chip 220 is coupled to the flash memory controller 204 and is used to write data and read data according to the instructions of the flash memory controller 204. In the present exemplary embodiment, the flash memory chip 220 is a multi-level cell (MLC) NAND flash memory chip. However, the present invention is not limited thereto, and the flash memory chip 220 may also be a single level cell (SLC) NAND flash memory chip.

快閃記憶體晶片220包括儲存區402、第一緩衝區404與第二緩衝區406。The flash memory chip 220 includes a storage area 402, a first buffer 404, and a second buffer 406.

儲存區402包括多個實體區塊並且用以儲存資料。實體區塊為抹除之最小單位。亦即,每一實體區塊含有最小數目之一併被抹除之記憶胞。每一實體區塊具有複數個頁面(page)。在本範例實施例中,頁面為程式化與讀取的最小單元,但在另一範例實施例中,將資料程式化至快閃記憶體晶片220的最小單位亦可是小於頁面(page)的扇區(sector)。在本發明之一範例實施例中之頁面可為寫入資料或讀取資料的最小單元。每一頁面通常包括使用者資料區與冗餘區。使用者資料區用以儲存使用者的資料,而冗餘區用以儲存系統的資料(例如,錯誤檢查與校正碼(Error Checking and Correcting Code,ECC Code)。The storage area 402 includes a plurality of physical blocks and is used to store data. 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 a plurality of pages. In this exemplary embodiment, the page is the smallest unit of stylization and reading, but in another exemplary embodiment, the minimum unit for programming the data to the flash memory chip 220 may be a fan smaller than the page. District. The page in an exemplary embodiment of the present invention may be the smallest unit for writing data or reading data. Each page typically includes a user data area and a redundant area. The user data area is used to store user data, and the redundant area is used to store system data (for example, Error Checking and Correcting Code (ECC Code).

值得一提的是,由於快閃記憶體的記憶胞僅能從“1”程式化為“0”,因此要更新實體區塊內的資料時必須先抹除實體區塊內的資料。然而,快閃記憶體的寫入是以頁面為單位,而抹除是 以實體區塊為單位,所以儲存區402中的實體區塊會以輪替方式來儲存資料。具體來說,記憶體管理單元208會將儲存區204中的實體區塊邏輯地分組為系統區(system area)、資料區(data area)、備用區(spare area)與取代區(replacement area),其中分組為系統區的實體區塊是用以儲存快閃記憶體儲存裝置的相關重要資訊,而分組為取代區的實體區塊是用以取代資料區或備用區中已損壞的實體區塊,因此在一般存取狀態下,主機系統290是無法存取系統區與取代區中的實體區塊。至於分組為資料區的實體區塊中會儲存由主機寫入指令所寫入的資料,而備用區中的實體區塊是用以在執行主機寫入指令時替換資料區中的實體區塊。例如,當快閃記憶體儲存裝置200接受到主機系統290的主機寫入指令而欲更新(或寫入)資料至資料區中某一實體區塊的某一頁面時,記憶體管理單元208會從備用區中提取一實體區塊並且將欲被更新的實體區塊中的有效舊資料與欲寫入的新資料寫入至從備用區中提取的實體區塊中,並且將已寫入有效舊資料與新資料的實體區塊邏輯地關聯為資料區,並且將資料區中欲被更新的實體區塊進行抹除並邏輯地關聯為備用區。為了能夠讓主機系統290能夠順利地存取以輪替方式儲存資料的實體區塊,快閃記憶體儲存裝置200會提供邏輯位址給主機系統290。也就是說,快閃記憶體儲存裝置200會透過在邏輯位址-實體位址對映表(logical address-physical address mapping table)中記錄與更新邏輯位址與資料區的實體區塊之間的對映關係來反映實體區塊的輪替,所以主機系統290僅 需要針對所提供邏輯位址進行寫入而快閃記憶體儲存裝置200會依據邏輯位址-實體位址對映表對所對映的實體區塊的實體位址進行讀取或寫入資料。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 flash memory is written in pages, and the erase is The physical block is used as a unit, so the physical block in the storage area 402 stores the data in a rotating manner. Specifically, the memory management unit 208 logically groups the physical blocks in the storage area 204 into a system area, a data area, a spare area, and a replacement area. The physical block grouped into the system area is used to store important information related to the flash memory storage device, and the physical block grouped as the replacement area is used to replace the damaged physical block in the data area or the spare area. Therefore, in the general access state, the host system 290 cannot access the physical blocks in the system area and the replacement area. As for the physical block grouped into the data area, the data written by the host write command is stored, and the physical block in the spare area is used to replace the physical block in the data area when the host write command is executed. For example, when the flash memory storage device 200 receives a host write command from the host system 290 and wants to update (or write) the data to a certain page of a physical block in the data area, the memory management unit 208 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 physical block extracted from the spare area, and the write is valid The old data is logically associated with the physical block of the new data as a data area, and the physical blocks in the data area to be updated are erased and logically associated as a spare area. In order to enable the host system 290 to smoothly access physical blocks that store data in a rotating manner, the flash memory storage device 200 provides a logical address to the host system 290. That is, the flash memory storage device 200 records and updates between the logical address and the physical block of the data area in the logical address-physical address mapping table. The mapping relationship reflects the rotation of the physical block, so the host system 290 only The write to the provided logical address is required, and the flash memory storage device 200 reads or writes the physical address of the mapped physical block according to the logical address-physical address mapping table.

第一緩衝區404與第二緩衝區406是用以暫存於快閃記憶體控制器204與儲存區402之間所傳輸的資料。如上所述,快閃記憶體控制器204從快閃記憶體晶片220中讀取資料的過程包括資料上載與內部資料傳輸兩個部分,其中在資料上載的部分中欲讀取的資料會先從儲存區402中被搬移至第二緩衝區406中,之後欲讀取的會再從第二緩衝區406中被搬移至第一緩衝區404。而在內部資料傳輸的部分,欲讀取的資料會再從第一緩衝區404中被傳輸至緩衝記憶體214。在此,用以將資料傳輸至緩衝記憶體214的第一緩衝區404亦稱為資料快取(data cache)區,而用以從儲存區402中接收資料的第二緩衝區406亦稱為快取緩衝(cache buffer)區,其中第一緩衝區404與第二緩衝區406可分別暫存一個頁面的資料以對應讀取單位(即,頁面)。The first buffer 404 and the second buffer 406 are used for temporarily storing data transmitted between the flash memory controller 204 and the storage area 402. As described above, the process of the flash memory controller 204 reading data from the flash memory chip 220 includes data uploading and internal data transfer, wherein the data to be read in the data uploading portion is first The storage area 402 is moved to the second buffer 406, and the later to be read is moved from the second buffer 406 to the first buffer 404. In the portion of the internal data transfer, the data to be read is transferred from the first buffer 404 to the buffer memory 214. Here, the first buffer 404 for transferring data to the buffer memory 214 is also referred to as a data cache area, and the second buffer 406 for receiving data from the storage area 402 is also referred to as A cache buffer area, wherein the first buffer 404 and the second buffer 406 can temporarily store data of one page to correspond to a read unit (ie, a page).

在本範例實施例中,記憶體管理單元208會依據來自於主機系統290的主機讀取指令中的邏輯位址透過快閃記憶體介面單元212向快閃記憶體晶片220下達一般讀取指令與快取讀取指令來讀取資料。例如,記憶體管理單元208會使用由“指令C1”、“實體位址”與“指令C2”等字串所組成的一般讀取指令以及由“指令C3”字串所組成的快取讀取指令來讀取資料,其中記憶體管理單元208藉由“指令C1”指示快閃記憶體晶片220準備執行讀取程序, 藉由“實體位址”指示快閃記憶體晶片220欲讀取的位址,藉由“指令C2”指示快閃記憶體晶片220將資料從儲存區402中搬移至第二緩衝區206,以及藉由“指令C3”指示快閃記憶體晶片220將資料從第二緩衝區406中搬移至第一緩衝區404。特別是,當主機系統290欲讀取儲存於多個邏輯位址中的資料時,使用快取讀取指令可有效地提升讀取的速度。In the present exemplary embodiment, the memory management unit 208 issues a general read command to the flash memory chip 220 through the flash memory interface unit 212 according to the logical address in the host read command from the host system 290. The cache read command is used to read the data. For example, the memory management unit 208 uses a general read instruction consisting of a string of "instruction C1", "physical address" and "instruction C2", and a cache read consisting of a "command C3" string. The instruction reads the data, wherein the memory management unit 208 instructs the flash memory chip 220 to execute the reading process by "instruction C1", The address to be read by the flash memory chip 220 is indicated by the "physical address", and the flash memory chip 220 is instructed to move the data from the storage area 402 to the second buffer 206 by "command C2", and The flash memory chip 220 is instructed by the "command C3" to move the material from the second buffer 406 to the first buffer 404. In particular, when the host system 290 wants to read data stored in a plurality of logical addresses, the use of the cache read command can effectively increase the speed of reading.

例如,當記憶體管理單元208根據主機讀取指令而需於快閃記憶體晶片220的多個連續頁面中讀取資料時,由於快閃記憶體晶片220具有2個緩衝區(即,第一緩衝區404與第二緩衝區406),因此,當快閃記憶體晶片220從儲存區402中搬移第1個頁面的資料至第二緩衝區406之後,藉由使用快取讀取指令(即,“指令C3”指令)會使快閃記憶體晶片220將第1個頁面的資料從第二緩衝區406搬移至第一緩衝區404,並且之後在第1個頁面的資料從第一緩衝區404被傳輸至緩衝記憶體214的期間,第二緩衝區406就可從儲存區402中接收第2個頁面的資料。也就是說,藉由使用快取讀取指令可使得在資料從快閃記憶體晶片220傳輸至快閃記憶體控制器204的期間快閃記憶體晶片220仍繼續搬移下一個頁面的資料,由此提升讀取的速度。For example, when the memory management unit 208 needs to read data in a plurality of consecutive pages of the flash memory chip 220 according to the host read command, since the flash memory chip 220 has 2 buffers (ie, the first The buffer 404 and the second buffer 406), therefore, after the flash memory chip 220 moves the data of the first page from the storage area 402 to the second buffer 406, by using the cache read command (ie, The "instruction C3" instruction causes the flash memory chip 220 to move the data of the first page from the second buffer 406 to the first buffer 404, and then the data on the first page is from the first buffer. While the 404 is being transferred to the buffer memory 214, the second buffer 406 can receive the data of the second page from the storage area 402. That is, by using the cache read command, the flash memory chip 220 continues to move the data of the next page while the data is being transferred from the flash memory chip 220 to the flash memory controller 204. This speeds up the reading.

特別是,在主機系統290對快閃記憶體儲存系統200連續下達多個主機讀取指令且此些主機讀取指令所指示欲讀取之邏輯位址所對映的實體位址為連續的例子中,記憶體管理單元208連續地使用快取讀取指令(即,“指令C3”指令)來串聯(或組合)依序 來自於主機系統290的主機讀取指令,而無需再下達由“指令C1”、“實體位址”與“指令C2”字串所組成的一般讀取指令,由此更提升讀取的速度。其中值得說明的是,本範例實施例中所提及的指令“C1”、“C2”、“C3”等,僅只為一種實施態樣,各廠家可自行訂定不同的指令來實施類似的功能,例如以一單一指令來實施本範例實例中所描述之”C1”及”C2”之功能,故不該以此為限。In particular, the host system 290 continuously issues a plurality of host read commands to the flash memory storage system 200 and the physical addresses mapped by the logical addresses indicated by the host read commands are consecutive examples. The memory management unit 208 continuously uses a cache read instruction (ie, an "instruction C3" instruction) to serially (or combine) the sequential The host from the host system 290 reads the instructions without having to issue a general read command consisting of the "instruction C1", "physical address" and "instruction C2" strings, thereby increasing the speed of reading. It should be noted that the instructions “C1”, “C2”, “C3”, etc. mentioned in the exemplary embodiment are only one implementation manner, and each manufacturer can customize different instructions to implement similar functions. For example, the functions of "C1" and "C2" described in the examples of this example are implemented by a single instruction, and thus should not be limited thereto.

圖3是根據本發明範例實施例所繪示的快閃記憶體控制器下達讀取指令的範例示意圖,並且圖4是根據圖3所示的指令所繪示快閃記憶體晶片的運作時序圖。在圖3與圖4的範例中,記憶體管理單元208會依序地從主機系統290接收到2個主機讀取指令而依據此主機指令中的邏輯位址而讀取儲存於連續的4個實體位址(即,4個頁面)中的資料D1、資料D2、資料D3與資料D4。具體來說,第1個主機讀取指令包括欲讀取之邏輯位址及欲讀取2個頁面(即,資料D1與資料D2)的資訊,其中欲讀取之邏輯位址表示在第1個主機讀取指令中欲讀取資料的起始邏輯位址(即,第1起始邏輯位址)。而第2個主機讀取指令也包括欲讀取之邏輯位址及欲讀取2個頁面(即,資料D3與資料D4)的資訊,其中欲讀取之邏輯位址表示在第2個主機讀取指令中開始讀取資料的起始邏輯位址(即,第2起始邏輯位址)。3 is a schematic diagram showing an example of a flash memory controller issuing a read command according to an exemplary embodiment of the present invention, and FIG. 4 is a timing chart showing the operation of the flash memory chip according to the instruction shown in FIG. . In the example of FIG. 3 and FIG. 4, the memory management unit 208 sequentially receives two host read commands from the host system 290 and reads and stores them in four consecutive frames according to the logical address in the host command. Data D1, data D2, data D3, and data D4 in the physical address (ie, 4 pages). Specifically, the first host read command includes a logical address to be read and information for reading two pages (ie, data D1 and data D2), wherein the logical address to be read is indicated in the first The host initiates the instruction to read the starting logical address of the data (ie, the first starting logical address). The second host read command also includes the logical address to be read and the information to read two pages (ie, data D3 and data D4), wherein the logical address to be read is indicated on the second host. The starting logical address (ie, the second starting logical address) at which the reading of the data begins in the read command.

請參照圖3與圖4,當快閃記憶體控制器204接收到來自於主機系統290的第1個主機讀取指令後,快閃記憶體控制器204的記憶體管理單元208會依據主機讀取指令中的邏輯位址向快閃 記憶體晶片220下達由“指令C1”、“ADD”與“指令C2”等字串所組成的一般讀取指令(如圖3所示的指令CM1、CM2與CM3)與由“指令C3”字串所組成的快取讀取指令(如圖3所示的指令CM4),其中“ADD”表示讀取資料的起始實體位址。也是就說,記憶體管理單元208會依據邏輯位址-實體位址對映表將第1起始邏輯位址所對映的實體位址傳送給快閃記憶體晶片200以開始讀取資料。此時,快閃記憶體晶片220會依據指令CM3從儲存區402中搬移第1個頁面的資料D1至第二緩衝區406中,期間快閃記憶體晶片220會處於一忙碌狀態(如圖4所示的忙碌時間B1)。快閃記憶體晶片220在完成指令CM3之後,會執行快取讀取指令(如圖3所示的指令CM4),以將暫存於第二緩衝區406中的資料D1搬移至第一緩衝區404中,並且在將資料D1從第二緩衝區406中搬移至第一緩衝區404之後從下一個實體位址中搬移第2個頁面的資料D2至第二緩衝區406中。Referring to FIG. 3 and FIG. 4, after the flash memory controller 204 receives the first host read command from the host system 290, the memory management unit 208 of the flash memory controller 204 reads the host according to the host. The logical address in the instruction fetches to flash The memory chip 220 issues a general read command consisting of a string of "instructions C1", "ADD" and "command C2" (such as the commands CM1, CM2 and CM3 shown in FIG. 3) and the word "command C3". A cache read instruction consisting of a string (such as the instruction CM4 shown in FIG. 3), where "ADD" indicates the starting entity address of the read data. That is to say, the memory management unit 208 transfers the physical address mapped by the first starting logical address to the flash memory chip 200 according to the logical address-physical address mapping table to start reading data. At this time, the flash memory chip 220 moves the data D1 of the first page to the second buffer 406 from the storage area 402 according to the command CM3, during which the flash memory chip 220 is in a busy state (see FIG. 4). Busy time shown B1). After completing the command CM3, the flash memory chip 220 executes a cache read command (such as the command CM4 shown in FIG. 3) to move the data D1 temporarily stored in the second buffer 406 to the first buffer. In 404, and after moving the material D1 from the second buffer 406 to the first buffer 404, the data D2 of the second page is moved from the next physical address to the second buffer 406.

特別是,快閃記憶體晶片220在將暫存於第二緩衝區406中的資料D1搬移至第一緩衝區404(如圖4所示的忙碌時間B2)之後就會回復為待命(ready)狀態,並且將暫存於第一緩衝區404中的資料D1傳輸至緩衝記憶體214中(如圖3所示的內部資料傳輸T1)。此時,資料D1的內部資料傳輸與資料D2的資料上載會同時進行。In particular, the flash memory chip 220 returns to the ready state after the data D1 temporarily stored in the second buffer 406 is moved to the first buffer 404 (the busy time B2 as shown in FIG. 4). The status, and the data D1 temporarily stored in the first buffer 404 is transferred to the buffer memory 214 (internal data transmission T1 as shown in FIG. 3). At this time, the internal data transmission of the data D1 and the data upload of the data D2 are simultaneously performed.

也就是說,由於快閃記憶體晶片220中存有2個緩衝區(即,第一緩衝區404與第二緩衝區406),因此透過快取讀取指令 來將欲讀取的資料從第二緩衝區406搬移至第一緩衝區404後,第一緩衝區404用於將來自於儲存區402中的資料傳輸至緩衝記憶體214,而第二緩衝區406用於從儲存區402中接收資料。基此,資料D1的內部資料傳輸與資料D2的資料上載可同時進行。That is, since there are two buffers (ie, the first buffer 404 and the second buffer 406) in the flash memory chip 220, the read command is read through the cache. After the data to be read is moved from the second buffer 406 to the first buffer 404, the first buffer 404 is used to transfer the data from the storage area 402 to the buffer memory 214, and the second buffer. 406 is for receiving data from storage area 402. Based on this, the internal data transmission of the data D1 and the data upload of the data D2 can be simultaneously performed.

一般來說,快閃記憶體晶片220執行快取讀取指令所需的時間(例如,忙碌時間B2)是遠短於執行一般讀取指令所需的時間(例如,忙碌時間B1)。例如,快閃記憶體晶片220執行快取讀取指令所需的時間為1毫秒(millisecond),而執行一般讀取指令所需的時間為50毫秒。In general, the time required for flash memory chip 220 to execute a cache read command (eg, busy time B2) is much shorter than the time required to execute a normal read command (eg, busy time B1). For example, the time required for the flash memory chip 220 to execute the cache read command is 1 millisecond, and the time required to execute the general read command is 50 milliseconds.

之後,當資料D1的內部資料傳輸完成後,記憶體管理單元208會再向快閃記憶體晶片220下達快取讀取指令(如圖3所示的指令CM5),以將暫存於第二緩衝區406中的資料D2搬移至第一緩衝區404中(如圖4所示的忙碌時間B3),並且在將資料D2從第二緩衝區406中搬移至第一緩衝區404之後從下一個實體位址中搬移下一個頁面的資料至第二緩衝區406中。類似地,快閃記憶體晶片220在將暫存於第二緩衝區406中的資料D2搬移至第一緩衝區404之後就會回復為待命狀態,並將暫存於第一緩衝區404中的資料D2傳輸至緩衝記憶體214中(如圖3所示的內部資料傳輸T2)。此時,資料D2的內部資料傳輸與下一個頁面之資料的資料上載會同時進行。After that, after the internal data transmission of the data D1 is completed, the memory management unit 208 will again issue a cache read command (the command CM5 shown in FIG. 3) to the flash memory chip 220 to temporarily store the second data. The data D2 in the buffer 406 is moved into the first buffer 404 (busy time B3 as shown in FIG. 4), and after the data D2 is moved from the second buffer 406 to the first buffer 404 from the next The data of the next page is moved to the second buffer 406 in the physical address. Similarly, the flash memory chip 220 returns to the standby state after the data D2 temporarily stored in the second buffer 406 is moved to the first buffer 404, and is temporarily stored in the first buffer 404. The data D2 is transferred to the buffer memory 214 (internal data transmission T2 as shown in FIG. 3). At this time, the internal data transmission of the data D2 and the data upload of the data of the next page are simultaneously performed.

在傳輸T2完成之後,對應第1個主機讀取指令的資料(即,資料D1與資料D2)會從緩衝記憶體214中傳輸至主機系統 290,即外部資料傳輸。之後,快閃記憶體控制器204會接收到來自於主機系統290的第2個主機讀取指令,並且記憶體管理單元208會判斷第2個主機讀取指令欲存取的邏輯位址是否接續於第1個主機讀取指令所存取的邏輯位址。After the transmission T2 is completed, the data corresponding to the first host read command (ie, the data D1 and the data D2) is transferred from the buffer memory 214 to the host system. 290, that is, external data transmission. Thereafter, the flash memory controller 204 receives the second host read command from the host system 290, and the memory management unit 208 determines whether the logical address to be accessed by the second host read command is connected. The logical address accessed by the first host read instruction.

如上所述,在圖3與圖4的範例中,第2個主機讀取指令欲存取的邏輯位址所對映的實體位址是接續於第1個主機讀取指令所存取之邏輯位址所對映的實體位址。因此,快閃記憶體晶片220依據指令CM5從儲存區402中所搬移的下一個頁面的資料正是資料D3。基此,記憶體管理單元208會向快閃記憶體晶片220下達快取讀取指令(如圖3所示的指令CM6)以將暫存於第二緩衝區406中的資料D3搬移至第一緩衝區404中,並且在將資料D3從第二緩衝區406中搬移至第一緩衝區404(如圖4所示的忙碌時間B4)之後從下一個實體位址中搬移第4個頁面的資料D4至第二緩衝區406中。類似地,快閃記憶體晶片220在將暫存於第二緩衝區406中的資料D3搬移至第一緩衝區404之後就會回復為待命狀態,並將暫存於第一緩衝區404中的資料D3傳輸至緩衝記憶體214中(如圖3所示的內部資料傳輸T3)。此時,資料D3的內部資料傳輸與資料D4的資料上載會同時進行。As described above, in the examples of FIG. 3 and FIG. 4, the physical address mapped by the logical address to be accessed by the second host read instruction is the logic accessed by the first host read instruction. The physical address to which the address is mapped. Therefore, the data of the next page moved by the flash memory chip 220 from the storage area 402 in accordance with the command CM5 is the data D3. Accordingly, the memory management unit 208 issues a cache read command (the command CM6 as shown in FIG. 3) to the flash memory chip 220 to move the data D3 temporarily stored in the second buffer 406 to the first In the buffer 404, and after moving the data D3 from the second buffer 406 to the first buffer 404 (such as the busy time B4 shown in FIG. 4), the data of the fourth page is moved from the next physical address. D4 to the second buffer 406. Similarly, the flash memory chip 220 returns to the standby state after the data D3 temporarily stored in the second buffer 406 is moved to the first buffer 404, and is temporarily stored in the first buffer 404. The data D3 is transferred to the buffer memory 214 (internal data transmission T3 as shown in FIG. 3). At this time, the internal data transmission of the data D3 and the data upload of the data D4 are simultaneously performed.

之後,當資料D3的內部資料傳輸完成後,記憶體管理單元208會再向快閃記憶體晶片220下達快取讀取指令(如圖3所示的指令CM7),以將暫存於第二緩衝區406中的資料D4搬移至第一緩衝區404中,並且在將資料D4從第二緩衝區406中搬移至第 一緩衝區404(如圖4所示的忙碌時間B5)之後從下一個實體位址中搬移下一個頁面的資料至第二緩衝區406中。類似地,快閃記憶體晶片220在將暫存於第二緩衝區406中的資料D4搬移至第一緩衝區404之後就會回復為待命狀態,並將暫存於第一緩衝區404中的資料D4傳輸至緩衝記憶體214中(如圖3所示的內部資料傳輸T4)。此時,資料D4的內部資料傳輸與下一個頁面之資料的資料上載會同時進行。After that, after the internal data transmission of the data D3 is completed, the memory management unit 208 will again issue a cache read command (the command CM7 shown in FIG. 3) to the flash memory chip 220 to temporarily store the second data. The data D4 in the buffer 406 is moved into the first buffer 404, and the data D4 is moved from the second buffer 406 to the first A buffer 404 (such as the busy time B5 shown in FIG. 4) then moves the data of the next page from the next physical address to the second buffer 406. Similarly, the flash memory chip 220 returns to the standby state after the data D4 temporarily stored in the second buffer 406 is moved to the first buffer 404, and is temporarily stored in the first buffer 404. The data D4 is transferred to the buffer memory 214 (internal data transmission T4 as shown in FIG. 3). At this time, the internal data transmission of the data D4 and the data upload of the data of the next page are simultaneously performed.

在傳輸T4完成之後,對應第2個主機讀取指令的資料(即,資料D3與資料D4)會從緩衝記憶體214中傳輸至主機系統290。After the transfer T4 is completed, the data corresponding to the second host read command (ie, the data D3 and the data D4) is transferred from the buffer memory 214 to the host system 290.

值得一提的是,當記憶體管理單元208下達指令CM5與指令CM7時,記憶體管理單元208僅是指示快閃記憶體晶片220預先讀取下一個頁面的資料,而記憶體管理單元208是於執行下一個主機指令時才能確認主機系統290是否存取所預先讀取的資料。在此,快閃記憶體晶片220依據快取讀取指令而繼續讀取下一個頁面的程序稱之為預讀取(pre-read)程序。然而,來自於主機系統290的下一個主機讀取指令可能剛好要讀取此資料(例如,圖3所示的資料D3),因此當預讀取的資料正好為主機系統290預讀取的資料時,可將所預讀的資料傳送給主機系統290,由此可有效地提升讀取速度。It is worth mentioning that when the memory management unit 208 issues the command CM5 and the command CM7, the memory management unit 208 only instructs the flash memory chip 220 to read the data of the next page in advance, and the memory management unit 208 is Whether the host system 290 accesses the pre-read data can be confirmed when the next host command is executed. Here, the program in which the flash memory chip 220 continues to read the next page in accordance with the cache read command is referred to as a pre-read program. However, the next host read command from host system 290 may just have to read this data (eg, data D3 shown in FIG. 3), so when the pre-read data is exactly the data pre-read by host system 290. At this time, the pre-read data can be transmitted to the host system 290, thereby effectively increasing the reading speed.

此外,值得一提的是,如上所述,記憶體管理單元208是先預讀下一個實體位址的資料,以提升讀取速度。然而,當目 前所存取的邏輯位址所對映的邏輯區塊處於開啟母子區塊的狀態時,即一個邏輯區塊是對映多個實體區塊的狀況,此時連續實體位址內的資料可能非對應連續的邏輯位址。在此情況下,預讀取下一個實體位址內的資料將有較高的機率成為無意義(即,所預讀取的資料非下一個主機讀取指令所欲讀取的資料)。因此,在本發明另一範例實施例中,記憶體管理單元208在執行預讀取程序前會先判斷目前所存取的邏輯位址所對映的邏輯區塊是否處於上述開啟母子區塊的狀態,並且僅於目前所存取的邏輯位址所對映的邏輯區塊非處於上述開啟母子區塊的狀態才執行預讀取程序。In addition, it is worth mentioning that, as described above, the memory management unit 208 is to pre-read the data of the next physical address to improve the reading speed. However, when When the logical block mapped by the previously accessed logical address is in the state of opening the parent and child blocks, that is, one logical block is the state of mapping multiple physical blocks, and the data in the continuous physical address may be Non-corresponding to consecutive logical addresses. In this case, prefetching the data in the next physical address will have a higher probability of becoming meaningless (ie, the pre-read data is not the data to be read by the next host read command). Therefore, in another exemplary embodiment of the present invention, the memory management unit 208 first determines whether the logical block mapped by the currently accessed logical address is in the above-mentioned open parent block before performing the pre-reading process. The pre-reading process is performed only if the logical block mapped by the currently accessed logical address is not in the state in which the parent-child block is turned on.

在本範例實施例中,當快閃記憶體控制器204執行主機讀取指令時,在快閃記憶體晶片220完成目前主機讀取指令欲存取之資料的資料上載後,記憶體管理單元208會繼續使用快取讀取指令以使快閃記憶體晶片220讀取下一個頁面的資料。之後,倘若快閃記憶體控制器204從主機系統290中所接收到的下一個主機指令非為主機讀取指令時,記憶體管理單元208會向快閃記憶體晶片220下達一重置(reset)指令(例如,由“0×FF”字串所組成的指令)以停止快閃記憶體晶片220的運作。In the present exemplary embodiment, when the flash memory controller 204 executes the host read command, after the flash memory chip 220 completes the data upload of the data to be accessed by the current host read command, the memory management unit 208 The cache read command will continue to be used to cause the flash memory chip 220 to read the data of the next page. Thereafter, if the next host command received by the flash memory controller 204 from the host system 290 is not a host read command, the memory management unit 208 issues a reset to the flash memory chip 220 (reset). An instruction (e.g., an instruction consisting of a "0xFF" string) stops the operation of the flash memory chip 220.

圖5是根據本發明範例實施例所繪示的下達讀取指令的流程圖。FIG. 5 is a flow chart of a read command issued according to an exemplary embodiment of the present invention.

請參照圖5,首先,在步驟S501中快閃記憶體儲存裝置200從主機系統290中接收主機指令並且在步驟S503中記憶體管理單元208會判斷所接收的主機指令是否為主機讀取指令。Referring to FIG. 5, first, in step S501, the flash memory storage device 200 receives a host command from the host system 290 and in step S503, the memory management unit 208 determines whether the received host command is a host read command.

倘若在步驟S503中判斷所接收的主機指令不為主機讀取指令時,則在步驟S505中記憶體管理單元208會向快閃記憶體晶片220下達重置(reset)指令。之後,在步驟S507中記憶體管理單元208會依據所接收的主機指令執行對應的步驟,並結束圖5的流程。在本範例實施例中,圖5僅用於描述記憶體管理單元208執行主機讀取指令的步驟,至於執行其他主機指令的步驟,此領域技術人員可依據相關的技術得知,在此不詳細說明步驟S507。If it is determined in step S503 that the received host command is not a host read command, the memory management unit 208 issues a reset command to the flash memory chip 220 in step S505. Thereafter, in step S507, the memory management unit 208 executes the corresponding steps in accordance with the received host command, and ends the flow of FIG. In the present exemplary embodiment, FIG. 5 is only used to describe the steps of the memory management unit 208 executing the host read instruction. As for the steps of executing other host instructions, those skilled in the art may learn from the related art, and the details are not detailed here. Step S507 is explained.

倘若在步驟S503中判斷所接收的主機指令為主機讀取指令時,則在步驟S509中記憶體管理單元208會判斷前一個所執行的主機指令是否為主機讀取指令。If it is determined in step S503 that the received host command is a host read command, then in step S509, the memory management unit 208 determines whether the previously executed host command is a host read command.

倘若在步驟S509中判斷前一個所執行的主機指令不為主機讀取指令時,則在步驟S511中記憶體管理單元208會向快閃記憶體晶片220下達一般讀取指令(即,由“指令C1”、“實體位址”與“指令C2”字串所組成的指令)與快取讀取指令(即,由“指令C3”字串所組成的指令)來讀取資料,並結束圖5的流程。具體來說,在步驟S511中記憶體管理單元208會在快閃記憶體晶片200中從所接收之主機讀取指令所指示的起始邏輯位址所映的實體位址開始依序地讀取對應此主機讀取指令的資料。特別是,如上所述,所下達的最後一個快取讀取指令會預讀取下一個實體位址中的資料。If it is determined in step S509 that the previous host command executed is not the host read command, then the memory management unit 208 issues a general read command to the flash memory chip 220 in step S511 (ie, by "instruction" The data consists of C1", "physical address" and "instruction C2" string) and the cache read instruction (ie, the instruction consisting of the "command C3" string), and the data is terminated. Process. Specifically, in step S511, the memory management unit 208 sequentially reads in the flash memory chip 200 from the physical address mapped by the starting logical address indicated by the received host read command. Corresponds to the data read by this host. In particular, as described above, the last cached read command issued will pre-read the data in the next physical address.

倘若在步驟S509中判斷前一個所執行的主機指令為主機讀取指令時,則在步驟S513中記憶體管理單元208會判斷目前主 機讀取指令是否接續於前一個主機讀取指令。例如,在步驟S513中記憶體管理單元208會判斷目前主機讀取指令所存取之邏輯位址所對映的實體位址是否接續前一個主機讀取指令所存取之邏輯位址所對映的實體位址,並且當目前主機讀取指令所存取之邏輯位址所對映的實體位址是否接續前一個主機讀取指令所存取之邏輯位址所對映的實體位址時,則記憶體管理單元208會判斷目前主機讀取指令是否接續於前一個主機讀取指令。If it is determined in step S509 that the host command executed by the previous one is the host read command, the memory management unit 208 determines the current master in step S513. Whether the machine read instruction is connected to the previous host read command. For example, in step S513, the memory management unit 208 determines whether the physical address mapped by the logical address accessed by the current host read instruction is mapped by the logical address accessed by the previous host read instruction. Physical address, and when the physical address mapped by the logical address accessed by the current host read instruction is connected to the physical address mapped by the logical address accessed by the previous host read instruction, Then, the memory management unit 208 determines whether the current host read command is connected to the previous host read command.

倘若在步驟S513中判斷目前主機讀取指令是接續於前一個主機讀取指令時,則在步驟S515中記憶體管理單元208向快閃記憶體晶片220下達快取讀取指令以接續讀取下一個頁面的資料,並結束圖5的流程。具體來說,在步驟S513中記憶體管理單元208會在快閃記憶體晶片200中從預讀取的實體位址的下一個實體位址開始依序地讀取對應此主機讀取指令的資料。也就是說,由於目前主機讀取指令是接續於前一個主機讀取指令,因此之前所預讀取的資料可用於傳送給主機系統290,而僅於從下一個實體位址開始讀取。類似地,在步驟S515中所下達的最後一個快取讀取指令亦會預讀取下一個實體位址中的資料。If it is determined in step S513 that the current host read command is subsequent to the previous host read command, then in step S515, the memory management unit 208 issues a cache read command to the flash memory chip 220 to continue reading. A page of information and end the process of Figure 5. Specifically, in step S513, the memory management unit 208 sequentially reads the data corresponding to the host read command from the next physical address of the pre-read physical address in the flash memory chip 200. . That is, since the current host read command is subsequent to the previous host read command, the previously pre-read data can be used to transfer to the host system 290, but only from the next physical address. Similarly, the last cache read instruction issued in step S515 also pre-reads the data in the next physical address.

倘若在步驟S513中判斷目前主機讀取指令不是接續於前一個主機讀取指令時,則在步驟S517中記憶體管理單元208向快閃記憶體晶片220下達重置(reset)指令,並且之後執行步驟S511以向快閃記憶體晶片220下達一般讀取指令與快取讀取指令來讀取資料。If it is determined in step S513 that the current host read command is not connected to the previous host read command, the memory management unit 208 issues a reset command to the flash memory chip 220 in step S517, and then executes. Step S511 is to read the data by issuing a general read command and a cache read command to the flash memory chip 220.

值得一提的是,在步驟S511與步驟S515中所下達的最後一個快取讀取指令會預讀取下一個實體位址中的資料,因此在本發明另一範例實施例中,在步驟S513中亦可透過比對目前主機讀取指令所存取之邏輯位址所對映的實體位址是否相同於所預讀取的實體位址來判斷目前主機讀取指令是否接續於前一個主機讀取指令,其中當目前主機讀取指令所存取之邏輯位址所對映的實體位址相同於所預讀取的實體位址時,則記憶體管理單元會判斷目前主機讀取指令是接續於前一個主機讀取指令。It is worth mentioning that the last cache read instruction issued in step S511 and step S515 pre-reads the data in the next entity address, so in another exemplary embodiment of the present invention, in step S513 Whether the current host read command is connected to the previous host read or not by comparing the physical address mapped to the logical address accessed by the current host read command to the pre-read physical address. The fetching instruction, wherein when the physical address mapped by the logical address accessed by the current host read command is the same as the pre-read physical address, the memory management unit determines that the current host read command is continuous The previous host reads the instruction.

根據本發明範例實施例所提出之下達讀取指令的方法及其資料讀取方法是適用於快閃記憶體,因此根據本發明範例實施例所提出之下達讀取指令的方法及其資料讀取方法可應用各種以快閃記憶體作為儲存媒體的裝置。也就是說,快閃記憶體儲存裝置200可以是如圖6所示的隨身碟602、數位相機(攝影機)604所使用的SD卡604a、MMC卡604b、CF卡604c與記憶棒(memory stick)604d或固態硬碟(Solid State Drive,SSD)606等。The method for obtaining a read instruction and the data reading method thereof according to an exemplary embodiment of the present invention are applicable to a flash memory, and therefore, the method for reading a read instruction and the data reading thereof according to an exemplary embodiment of the present invention are provided. The method can apply various devices that use flash memory as a storage medium. That is, the flash memory storage device 200 may be a flash disk 604a, an MMC card 604b, a CF card 604c, and a memory stick used by the flash drive 602, the digital camera (camera) 604 as shown in FIG. 604d or Solid State Drive (SSD) 606 and so on.

綜上所述,本發明範例實施例的下達讀取指令方法會將欲讀取連續邏輯位址的多個主機讀取指令以快取讀取指令來組合,由此可縮短執行主機讀取指令的時間。此外,透過預讀取程序預先讀取下一個頁面的資料,更可有效地縮短執行主機讀取指令的時間。In summary, the method for issuing a read command according to an exemplary embodiment of the present invention combines a plurality of host read commands for reading consecutive logical addresses with cache read commands, thereby shortening execution host read commands. time. In addition, pre-reading the data of the next page through the pre-reading program can effectively shorten 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 without departing from the invention In the spirit and scope, the scope of protection of the present invention is subject to the definition of the scope of the appended patent application.

S501、S503、S505、S507、S509、S511、S513、S515、S517‧‧‧下達讀取指令的步驟S501, S503, S505, S507, S509, S511, S513, S515, S517‧‧‧ steps to read the command

Claims (15)

一種下達讀取指令至一快閃記憶體晶片的方法,該快閃記憶體晶片具有一第一緩衝區、一第二緩衝區以及一儲存區,該下達讀取指令的方法包括:由具有一緩衝記憶體的一快閃記憶體控制器從該主機系統中接收一主機指令,其中該主機指令為一主機讀取指令並且該主機指令包括一第一邏輯位址,其中該第一邏輯位址對映至該儲存區的一第一實體位址;由該快閃記憶體控制器依據該主機指令向該快閃記憶體晶片下達一個一般讀取指令與一個第一快取讀取指令以從該第一實體位址依序地讀取一第一資料,其中該第一資料從該儲存區被搬移至該第二緩衝區,從該第二緩衝區被搬移至該第一緩衝區,並從該第一緩衝區被傳輸至該緩衝記憶體,於該第一資料從該第一緩衝區被傳輸至該緩衝記憶體之期間,一第二資料從該儲存區被搬移至該第二緩衝區,以及於該第一資料從該第一緩衝區被傳輸至該緩衝記憶體之後,該第二資料從該第二緩衝區被搬移至該第一緩衝區,其中該第二資料非為該主機指令所請求,且對應於該第二資料的一邏輯位址接續於該第一邏輯位址;由該快閃記憶體控制器向該快閃記憶體晶片下達一個第二快取讀取指令以讀取一第三資料,其中於該第二資料從該第一緩衝區被傳輸至該緩衝記憶體之期間,該第三資料從該儲存區被搬移至該第二緩衝區,以及於該第二資料從該第一緩衝區被傳輸至該 緩衝記憶體之後,該第三資料從該第二緩衝區被搬移至該第一緩衝區;從該主機系統中接收一下一個主機指令,其中該下一個主機指令包括一第二邏輯位址;判斷該下一個主機指令是否為該主機讀取指令且該下一個主機指令是否為接續於該主機指令;若該下一個主機指令為該主機讀取指令且該下一個主機指令為接續於該主機指令,將該第二資料從該緩衝記憶體傳輸至該主機系統;以及若該下一個主機指令為該主機讀取指令且該下一個主機指令不為接續於該主機指令,由該快閃記憶體控制器向該快閃記憶體晶片下達一重置指令,並且向該快閃記憶體晶片下達該一般讀取指令與一個第三快取讀取指令以在該快閃記憶體晶片中從對映一第三邏輯位址的一實體位址開始依序地讀取對應該下一個主機指令的一第四資料。 A method for issuing a read command to a flash memory chip, the flash memory chip having a first buffer, a second buffer, and a storage area, wherein the method for issuing the read command comprises: having one A flash memory controller of the buffer memory receives a host command from the host system, wherein the host command is a host read command and the host command includes a first logical address, wherein the first logical address Mapping to a first physical address of the storage area; the flash memory controller issues a general read command and a first cache read command to the flash memory chip according to the host command The first physical address sequentially reads a first data, wherein the first data is moved from the storage area to the second buffer, and the second buffer is moved to the first buffer, and Transmitting from the first buffer to the buffer memory, a second data is moved from the storage area to the second buffer during the transfer of the first data from the first buffer to the buffer memory. District, and After the first data is transferred from the first buffer to the buffer memory, the second data is moved from the second buffer to the first buffer, wherein the second data is not requested by the host instruction. And a logical address corresponding to the second data is connected to the first logical address; a second cache read command is issued by the flash memory controller to the flash memory chip to read a first a third data, wherein the third data is moved from the storage area to the second buffer during the period from which the second data is transferred to the buffer memory, and the second data is from the The first buffer is transferred to the After buffering the memory, the third data is moved from the second buffer to the first buffer; receiving a host instruction from the host system, wherein the next host instruction includes a second logical address; Whether the next host instruction reads the instruction for the host and whether the next host instruction is connected to the host instruction; if the next host instruction is the host read instruction and the next host instruction is connected to the host instruction Transmitting the second data from the buffer memory to the host system; and if the next host command is the host read command and the next host command is not connected to the host command, by the flash memory The controller issues a reset command to the flash memory chip, and issues the general read command and a third cache read command to the flash memory chip for mapping from the flash memory chip. A physical address of a third logical address begins to sequentially read a fourth data corresponding to the next host instruction. 如申請專利範圍第1項所述之下達讀取指令至該快閃記憶體晶片的方法,更包括:若該下一個主機指令不為該主機讀取指令,則由該快閃記憶體控制器向該快閃記憶體晶片下達該重置指令。 The method for reading a read command to the flash memory chip as described in claim 1 further includes: if the next host command does not read the command from the host, the flash memory controller The reset command is issued to the flash memory chip. 如申請專利範圍第1項所述之下達讀取指令至該快閃記憶體晶片的方法,其中判斷該下一個主機指令是否為接續於該主機指令的步驟包括: 判斷該第二邏輯位址是否接續於該第一邏輯位址;以及若該第二邏輯位址為接續於該第一邏輯位址,則判斷該下一個主機指令為接續於該主機指令。 The method for determining a read command to the flash memory chip, as described in claim 1, wherein the step of determining whether the next host command is subsequent to the host command comprises: Determining whether the second logical address is connected to the first logical address; and if the second logical address is subsequent to the first logical address, determining that the next host instruction is subsequent to the host instruction. 如申請專利範圍第1項所述之下達讀取指令至該快閃記憶體晶片的方法,其中判斷該下一個主機指令是否為接續於該主機指令的步驟包括:判斷該第二邏輯位址是否相同於該緩衝記憶體中對應於該第二資料的邏輯位址;以及若該第二邏輯位址相同於該緩衝記憶體中對應於該第二資料的該邏輯位址,則判斷該下一個主機指令為接續於該主機指令。 The method for determining a read command to the flash memory chip, as described in claim 1, wherein determining whether the next host command is connected to the host command comprises: determining whether the second logical address is Same as the logical address corresponding to the second data in the buffer memory; and if the second logical address is the same as the logical address corresponding to the second data in the buffer memory, determining the next one The host command is connected to the host command. 如申請專利範圍第1項所述之下達讀取指令至該快閃記憶體晶片的方法,更包括在從該快閃記憶體晶片中讀取非該主機指令請求之該第二資料之前,判斷該第一邏輯位址對映的一邏輯區塊是否處於一開啟母子區塊狀態,其中僅當該第一邏輯位址對應的邏輯區塊非處於該開啟母子區塊狀態時,從該快閃記憶體晶片中讀取非該主機指令請求之該第二資料。 The method for reading a read command to the flash memory chip as described in claim 1 of the patent application, further comprising: determining, before reading the second data that is not the host command request from the flash memory chip, Whether a logical block mapped by the first logical address is in an open parent and child block state, wherein the flash block is flashed only when the logical block corresponding to the first logical address is not in the open parent and child block state The second data that is not requested by the host instruction is read in the memory chip. 一種快閃記憶體控制器,用於從具有一第一緩衝區、一第二緩衝區以及一儲存區的一快閃記憶體晶片中讀取一主機系統欲存取的資料,該快閃記憶體控制器包括:一微處理器單元;一快閃記憶體介面單元,耦接至該微處理器單元,用以連接 該快閃記憶體晶片;一主機介面單元,耦接至該微處理器單元,用以連接該主機系統;一緩衝記憶體,耦接至該微處理器單元;以及一記憶體管理單元,耦接至該微處理器單元,用以透過該主機介面單元從該主機系統中接收一主機指令,其中該主機指令為一主機讀取指令並且該主機指令包括一第一邏輯位址,其中該第一邏輯位址對映至該儲存區的一第一實體位址;其中該記憶體管理單元更用以依據該主機指令向該快閃記憶體晶片下達一個一般讀取指令與一個第一快取讀取指令以從該第一實體位址依序地讀取一第一資料,其中該第一資料從該儲存區被搬移至該第二緩衝區,從該第二緩衝區被搬移至該第一緩衝區,並從該第一緩衝區被傳輸至該緩衝記憶體,於該第一資料從該第一緩衝區被傳輸至該緩衝記憶體之期間,一第二資料從該儲存區被搬移至該第二緩衝區,以及於該第一資料從該第一緩衝區被傳輸至該緩衝記憶體之後,該第二資料從該第二緩衝區被搬移至該第一緩衝區,其中該第二資料非為該主機指令所請求,且對應於該第二資料的一邏輯位址接續於該第一邏輯位址;其中該記憶體管理單元更用以向該快閃記憶體晶片下達一個第二快取讀取指令以讀取一第三資料,其中於該第二資料從該第一緩衝區被傳輸至該緩衝記憶體之期間,該第三資料從該儲存區被搬移至該第二緩衝區,以及於該第二資料從該第一緩衝區被傳 輸至該緩衝記憶體之後,該第三資料從該第二緩衝區被搬移至該第一緩衝區;其中該記憶體管理單元更用以從該主機系統中接收一下一個主機指令,其中該下一個主機指令包括一第二邏輯位址;其中該記憶體管理單元更用以判斷該下一個主機指令是否為該主機讀取指令且該下一個主機指令是否為接續於該主機指令,以及若該下一個主機指令為該主機讀取指令且該下一個主機指令為接續於該主機指令,該記憶體管理單元將該第二資料從該緩衝記憶體傳輸至該主機系統,其中若該下一個主機指令為該主機讀取指令且該下一個主機指令不為接續於該主機指令,該記憶體管理單元向該快閃記憶體晶片下達一重置指令,並且向該快閃記憶體晶片下達該一般讀取指令與一個第三快取讀取指令以在該快閃記憶體晶片中從對映一第三邏輯位址的一實體位址開始依序地讀取對應該下一個主機指令的一第四資料。 A flash memory controller for reading data to be accessed by a host system from a flash memory chip having a first buffer, a second buffer, and a storage area, the flash memory The body controller includes: a microprocessor unit; a flash memory interface unit coupled to the microprocessor unit for connecting a flash memory chip; a host interface unit coupled to the microprocessor unit for connecting to the host system; a buffer memory coupled to the microprocessor unit; and a memory management unit coupled Connected to the microprocessor unit for receiving a host command from the host system through the host interface unit, wherein the host command is a host read command and the host command includes a first logical address, wherein the A logical address is mapped to a first physical address of the storage area; wherein the memory management unit is further configured to issue a general read command and a first cache to the flash memory chip according to the host command Reading a command to sequentially read a first data from the first physical address, wherein the first data is moved from the storage area to the second buffer, and the second buffer is moved to the first a buffer buffer is transferred from the first buffer to the buffer memory, and a second data is moved from the storage area while the first data is transferred from the first buffer to the buffer memory To this a second buffer, and after the first data is transferred from the first buffer to the buffer memory, the second data is moved from the second buffer to the first buffer, wherein the second data is not For the host command, a logical address corresponding to the second data is connected to the first logical address; wherein the memory management unit is further configured to send a second cache to the flash memory chip. Reading a command to read a third data, wherein the third data is moved from the storage area to the second buffer during the second data being transferred from the first buffer to the buffer memory. And the second data is transmitted from the first buffer After being input to the buffer memory, the third data is moved from the second buffer to the first buffer; wherein the memory management unit is further configured to receive a host command from the host system, where the next The host command includes a second logical address; wherein the memory management unit is further configured to determine whether the next host command is a read command of the host and whether the next host command is connected to the host command, and if The next host command reads the command for the host and the next host command is the host command, and the memory management unit transmits the second data from the buffer memory to the host system, wherein the next host The instruction is that the host reads the instruction and the next host instruction is not connected to the host instruction, and the memory management unit issues a reset instruction to the flash memory chip, and issues the general to the flash memory chip. Reading instructions and a third cache read instruction to sequentially sequence from a physical address of the third logical address in the flash memory chip A fourth reading of data should be the next host instruction. 如申請專利範圍第6項所述之快閃記憶體控制器,其中若該下一個主機指令不為該主機讀取指令,該記憶體管理單元向該快閃記憶體晶片下達該重置指令。 The flash memory controller of claim 6, wherein the memory management unit issues the reset command to the flash memory chip if the next host command does not read the command from the host. 如申請專利範圍第6項所述之快閃記憶體控制器,其中該記憶體管理單元判斷該下一個主機指令是否為接續於該主機指令的操作包括:判斷該第二邏輯位址是否接續於該第一邏輯位址;以及 若該第二邏輯位址為接續於該第一邏輯位址,則判斷該下一個主機指令為接續於該主機指令。 The flash memory controller of claim 6, wherein the memory management unit determines whether the next host instruction is an operation subsequent to the host instruction, including: determining whether the second logical address is connected to The first logical address; If the second logical address is connected to the first logical address, it is determined that the next host instruction is connected to the host instruction. 如申請專利範圍第6項所述之快閃記憶體控制器,其中該記憶體管理單元判斷該下一個主機指令是否為接續於該主機指令的操作包括:判斷該第二邏輯位址是否相同於該緩衝記憶體中對應於該第二資料的邏輯位址;以及若該第二邏輯位址相同於該緩衝記憶體中對應於該第二資料的該邏輯位址,則判斷該下一個主機指令為接續於該主機指令。 The flash memory controller of claim 6, wherein the memory management unit determines whether the next host instruction is an operation subsequent to the host instruction, comprising: determining whether the second logical address is the same a logical address corresponding to the second data in the buffer memory; and determining the next host instruction if the second logical address is the same as the logical address corresponding to the second data in the buffer memory To continue with the host command. 如申請專利範圍第6項所述之快閃記憶體控制器,其中在從該快閃記憶體晶片中讀取非該主機指令請求之該第二資料之前,該記憶體管理單元更用以判斷該第一邏輯位址對映的一邏輯區塊是否處於一開啟母子區塊狀態,其中僅當該第一邏輯位址對應的邏輯區塊非處於該開啟母子區塊狀態時,該記憶體管理單元從該快閃記憶體晶片中讀取非該主機指令請求之該第二資料。 The flash memory controller of claim 6, wherein the memory management unit is further configured to determine the second data that is not requested by the host command from the flash memory chip. Whether a logical block mapped by the first logical address is in an open parent and child block state, wherein the memory management is only when the logical block corresponding to the first logical address is not in the open parent and child block state The unit reads the second data that is not requested by the host instruction from the flash memory chip. 一種快閃記憶體儲存系統,包括:一連接器,用以耦接一主機系統;一快閃記憶體晶片,具有一第一緩衝區、一第二緩衝區以及一儲存區;以及一快閃記憶體控制器,耦接至該連接器與該快閃記憶體晶片,並且具有一緩衝記憶體, 其中該快閃記憶體控制器用以從該主機系統中接收一主機指令,其中該主機指令為一主機讀取指令並且該主機指令包括一第一邏輯位址,其中該第一邏輯位址對映至該儲存區的一第一實體位址;其中該快閃記憶體控制器更用以依據該主機指令向該快閃記憶體晶片下達一個一般讀取指令與一個第一快取讀取指令以從該第一實體位址依序地讀取一第一資料,其中該第一資料從該儲存區被搬移至該第二緩衝區,從該第二緩衝區被搬移至該第一緩衝區,並從該第一緩衝區被傳輸至該緩衝記憶體,於該第一資料從該第一緩衝區被傳輸至該緩衝記憶體之期間,一第二資料從該儲存區被搬移至該第二緩衝區,以及於該第一資料從該第一緩衝區被傳輸至該緩衝記憶體之後,該第二資料從該第二緩衝區被搬移至該第一緩衝區,其中該第二資料非為該主機指令所請求,且對應於該第二資料的一邏輯位址接續於該第一邏輯位址;其中該快閃記憶體控制器更用以向該快閃記憶體晶片下達一個第二快取讀取指令以讀取一第三資料,其中於該第二資料從該第一緩衝區被傳輸至該緩衝記憶體之期間,該第三資料從該儲存區被搬移至該第二緩衝區,以及於該第二資料從該第一緩衝區被傳輸至該緩衝記憶體之後,該第三資料從該第二緩衝區被搬移至該第一緩衝區;其中該快閃記憶體控制器更用以從該主機系統中接收一下一個主機指令,其中該下一個主機指令包括一第二邏輯位址; 其中該快閃記憶體控制器更用以判斷該下一個主機指令是否為該主機讀取指令且該下一個主機指令是否為接續於該主機指令,以及若該下一個主機指令為該主機讀取指令且該下一個主機指令為接續於該主機指令,該記憶體管理單元將該第二資料從該緩衝記憶體傳輸至該主機系統,其中若該下一個主機指令為該主機讀取指令且該下一個主機指令不為接續於該主機指令,該快閃記憶體控制器向該快閃記憶體晶片下達一重置指令,並且向該快閃記憶體晶片下達該一般讀取指令與一個第三快取讀取指令以在該快閃記憶體晶片中從對映一第三邏輯位址的一實體位址開始依序地讀取對應該下一個主機指令的一第四資料。 A flash memory storage system includes: a connector for coupling to a host system; a flash memory chip having a first buffer, a second buffer, and a storage area; and a flash a memory controller coupled to the connector and the flash memory chip and having a buffer memory The flash memory controller is configured to receive a host command from the host system, wherein the host command is a host read command and the host command includes a first logical address, wherein the first logical address is mapped a first physical address to the storage area; wherein the flash memory controller is further configured to issue a general read command and a first cache read command to the flash memory chip according to the host command And sequentially reading a first data from the first physical address, wherein the first data is moved from the storage area to the second buffer, and the second buffer is moved to the first buffer. And being transferred from the first buffer to the buffer memory, and a second data is moved from the storage area to the second during the transfer of the first data from the first buffer to the buffer memory. a buffer, and after the first data is transferred from the first buffer to the buffer memory, the second data is moved from the second buffer to the first buffer, wherein the second data is not Requested by the host command, A logical address corresponding to the second data is connected to the first logical address; wherein the flash memory controller is further configured to issue a second cache read command to the flash memory chip to read a third data, wherein the third data is moved from the storage area to the second buffer during the second data transfer from the first buffer to the buffer memory, and the second data is After the first buffer is transferred to the buffer memory, the third data is moved from the second buffer to the first buffer; wherein the flash memory controller is further used from the host system Receiving a host instruction, wherein the next host instruction includes a second logical address; The flash memory controller is further configured to determine whether the next host command is a read command of the host and whether the next host command is connected to the host command, and if the next host command is read by the host And the memory management unit transmits the second data from the buffer memory to the host system, wherein the next host instruction reads the instruction for the host and the The next host command is not connected to the host command, the flash memory controller issues a reset command to the flash memory chip, and issues the general read command and a third to the flash memory chip. The cache read command sequentially reads a fourth data corresponding to the next host command from a physical address of the mapped third logical address in the flash memory chip. 如申請專利範圍第11項所述之快閃記憶體儲存系統,其中若該下一個主機指令不為該主機讀取指令,該快閃記憶體控制器向該快閃記憶體晶片下達一重置指令。 The flash memory storage system of claim 11, wherein the flash memory controller issues a reset to the flash memory chip if the next host command does not read the command from the host instruction. 如申請專利範圍第11項所述之快閃記憶體儲存系統,其中該快閃記憶體控制器判斷該下一個主機指令是否為接續於該主機指令的操作包括:判斷該第二邏輯位址是否接續於該第一邏輯位址;以及若該第二邏輯位址為接續於該第一邏輯位址,則判斷該下一個主機指令為接續於該主機指令。 The flash memory storage system of claim 11, wherein the flash memory controller determines whether the next host instruction is an operation subsequent to the host instruction, including: determining whether the second logical address is And continuing to the first logical address; and if the second logical address is subsequent to the first logical address, determining that the next host instruction is subsequent to the host instruction. 如申請專利範圍第11項所述之快閃記憶體儲存系統,其中該快閃記憶體控制器判斷該下一個主機指令是否為接續於該主 機指令的操作包括:判斷該第二邏輯位址是否相同於該緩衝記憶體中對應於該第二資料的邏輯位址;以及若該第二邏輯位址相同於該緩衝記憶體中對應於該第二資料的該邏輯位址,則判斷該下一個主機指令為接續於該主機指令。 The flash memory storage system of claim 11, wherein the flash memory controller determines whether the next host command is connected to the main The operation of the machine instruction includes: determining whether the second logical address is the same as a logical address corresponding to the second data in the buffer memory; and if the second logical address is the same as the buffer memory corresponding to the The logical address of the second data determines that the next host command is connected to the host command. 如申請專利範圍第11項所述之快閃記憶體儲存系統,其中在從該快閃記憶體晶片中讀取非該主機指令請求之該第二資料之前,該快閃記憶體控制器更用以判斷該第一邏輯位址對映的一邏輯區塊是否處於一開啟母子區塊狀態,其中僅當該第一邏輯位址對應的邏輯區塊非處於該開啟母子區塊狀態時,該快閃記憶體控制器從該快閃記憶體晶片中讀取非該主機指令請求之該第二資料。 The flash memory storage system of claim 11, wherein the flash memory controller is further used before reading the second data that is not requested by the host instruction from the flash memory chip. Determining whether a logical block mapped by the first logical address is in an open parent and child block state, wherein only when the logical block corresponding to the first logical address is not in the open parent and child block state, the fast The flash memory controller reads the second data that is not requested by the host instruction from the flash memory chip.
TW103104754A 2009-08-26 2009-08-26 Method for giving read commands, flash memory controller and flash memory storage system using the same TWI494756B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103104754A TWI494756B (en) 2009-08-26 2009-08-26 Method for giving read commands, flash memory controller and flash memory storage system using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103104754A TWI494756B (en) 2009-08-26 2009-08-26 Method for giving read commands, flash memory controller and flash memory storage system using the same

Publications (2)

Publication Number Publication Date
TW201421238A TW201421238A (en) 2014-06-01
TWI494756B true TWI494756B (en) 2015-08-01

Family

ID=51393415

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103104754A TWI494756B (en) 2009-08-26 2009-08-26 Method for giving read commands, flash memory controller and flash memory storage system using the same

Country Status (1)

Country Link
TW (1) TWI494756B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI562154B (en) 2015-02-17 2016-12-11 Silicon Motion Inc Methods for reading data from a storage unit of a flash memory and apparatuses using the same
US10977121B2 (en) 2018-10-17 2021-04-13 Macronix International Co., Ltd. Fast page continuous read
US11048649B2 (en) 2018-10-17 2021-06-29 Macronix International Co., Ltd. Non-sequential page continuous read
US10957384B1 (en) 2019-09-24 2021-03-23 Macronix International Co., Ltd. Page buffer structure and fast continuous read
US11302366B2 (en) 2020-03-06 2022-04-12 Macronix International Co., Ltd. Method and system for enhanced read performance in low pin count interface
US11249913B2 (en) 2020-03-06 2022-02-15 Macronix International Co., Ltd. Continuous read with multiple read commands

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050223175A1 (en) * 2004-04-06 2005-10-06 International Business Machines Corporation Memory prefetch method and system
TW200801964A (en) * 2005-12-20 2008-01-01 Silicon Image Inc Convert channel for conveying supplemental messages in a protocol-defined link for a system of storage devices
US20080002469A1 (en) * 2006-06-12 2008-01-03 Sony Corporation Non-volatile memory
TW200928736A (en) * 2007-12-27 2009-07-01 Sandisk Il Ltd A controller for one type of NAND flash memory for emulating another type of NAND flash memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050223175A1 (en) * 2004-04-06 2005-10-06 International Business Machines Corporation Memory prefetch method and system
TW200801964A (en) * 2005-12-20 2008-01-01 Silicon Image Inc Convert channel for conveying supplemental messages in a protocol-defined link for a system of storage devices
US20080002469A1 (en) * 2006-06-12 2008-01-03 Sony Corporation Non-volatile memory
TW200928736A (en) * 2007-12-27 2009-07-01 Sandisk Il Ltd A controller for one type of NAND flash memory for emulating another type of NAND flash memory

Also Published As

Publication number Publication date
TW201421238A (en) 2014-06-01

Similar Documents

Publication Publication Date Title
TWI435215B (en) Method for giving read commands and reading data, and controller and storage system using the same
TWI424435B (en) Method for giving program commands to flash memory chips, and controller and storage system using the same
US8812784B2 (en) Command executing method, memory controller and memory storage apparatus
TWI409633B (en) Flash memory storage device, controller thereof, and method for programming data
US8341311B1 (en) System and method for reduced latency data transfers from flash memory to host by utilizing concurrent transfers into RAM buffer memory and FIFO host interface
TWI494849B (en) Firmware code loading method, memory controller and memory storage apparatus
TWI454911B (en) Data writing method, memory controller and memory storage apparatus
TWI399643B (en) Flash memory storage system and controller and data writing method thereof
US9519436B1 (en) Memory erasing method, memory controller, and memory storage apparatus
TWI592799B (en) Mapping table updating method, memory control circuit unit and memory storage device
TWI494756B (en) Method for giving read commands, flash memory controller and flash memory storage system using the same
TWI446349B (en) Non-volatile memory access method and system, and non-volatile memory controller
TWI421870B (en) Data writing method for a flash memory, and controller and storage system using the same
TWI656531B (en) Average wear method, memory control circuit unit and memory storage device
TWI438630B (en) Data merging method for non-volatile memory and controller and stoarge apparatus using the same
TWI540428B (en) Data writing method, memory controller and memory storage apparatus
TWI607309B (en) Memory management method, memory control circuit unit and memory storage device
US8943289B2 (en) Data moving method for flash memory module, and memory controller and memory storage apparatus using the same
TWI533309B (en) Data writing method, memory storage device and memory control circuit unit
TWI415128B (en) Data writing method for a flash memory and control circuit and storage system using the same
US8589620B2 (en) Data writing method, memory controller, and memory storage apparatus
TWI584292B (en) Memory erase method, memory control circuit unit and memory storage apparatus
TWI813362B (en) Partial erasing management method, memory storage device and memory control circuit unit
TWI829103B (en) Memory control circuit, memory storage device and memory control circuit unit
TWI686698B (en) Logical-to-physical table updating method and storage controller