[go: up one dir, main page]

TWI631565B - Methods for garbage collection in a flash memory and apparatuses using the same - Google Patents

Methods for garbage collection in a flash memory and apparatuses using the same Download PDF

Info

Publication number
TWI631565B
TWI631565B TW106122828A TW106122828A TWI631565B TW I631565 B TWI631565 B TW I631565B TW 106122828 A TW106122828 A TW 106122828A TW 106122828 A TW106122828 A TW 106122828A TW I631565 B TWI631565 B TW I631565B
Authority
TW
Taiwan
Prior art keywords
pages
storage
data
valid data
flash memory
Prior art date
Application number
TW106122828A
Other languages
Chinese (zh)
Other versions
TW201735046A (en
Inventor
邱慎廷
Original Assignee
慧榮科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 慧榮科技股份有限公司 filed Critical 慧榮科技股份有限公司
Priority to TW106122828A priority Critical patent/TWI631565B/en
Publication of TW201735046A publication Critical patent/TW201735046A/en
Application granted granted Critical
Publication of TWI631565B publication Critical patent/TWI631565B/en

Links

Landscapes

  • Memory System (AREA)
  • Read Only Memory (AREA)

Abstract

本發明的實施例提出一種快閃記憶體之廢料收集方法,由處理單元執行,包含下列步驟。從多個儲存子單元讀取n*m個頁面的有效資料,其中,n代表共享一個通道的儲存子單元的數量,m代表每一儲存子單元的最小寫入頁面的數量。反覆執行一個迴圈,用以逐一驅動儲存子單元以寫入m個頁面的有效資料,直到儲存子單元皆處於忙碌狀態為止。 Embodiments of the present invention provide a method of collecting a flash memory, which is executed by a processing unit and includes the following steps. The valid data of n*m pages is read from a plurality of storage subunits, where n represents the number of storage subunits sharing one channel, and m represents the minimum number of write pages per storage subunit. A loop is repeatedly executed to drive the storage sub-units one by one to write valid data of m pages until the storage sub-units are in a busy state.

Description

快閃記憶體之廢料收集方法以及使用該方法的裝置 Scrap memory waste collection method and device using the same

本發明關連於一種快閃記憶體裝置,特別是一種快閃記憶體之廢料收集方法以及使用該方法的裝置。 The present invention relates to a flash memory device, and more particularly to a method of collecting waste material for a flash memory and a device using the same.

快閃記憶體裝置通常分為NOR快閃裝置與NAND快閃裝置。NOR快閃裝置為隨機存取裝置,而可於位址腳位上提供任何的位址,用以存取NOR快閃裝置的主裝置(host),並及時地由NOR快閃裝置的資料腳位上獲得儲存於該位址上的資料。相反地,NAND快閃裝置並非隨機存取,而是序列存取。NAND快閃裝置無法像NOR快閃裝置一樣,可以存取任何隨機位址,主裝置反而需要寫入序列的位元組(bytes)的值到NAND快閃裝置中,用以定義請求命令(command)的類型(如,讀取、寫入、抹除等),以及用在此命令上的位址。位址可指向一個頁面(在快閃記憶體中的一個寫入作業的最小資料塊)或一個區塊(在快閃記憶體中的一個抹除作業的最小資料塊)。實際上,NAND快閃裝置通常從記憶體單元(memory cells)上讀取或寫入完整的數頁資料。當一整頁的資料從陣列讀取到裝置中的緩存器(buffer)後,藉由使用提取訊號(strobe signal)順序地敲出(clock out)內容,讓主單元可逐位元組或字元組(words)存取資料。 Flash memory devices are generally classified into NOR flash devices and NAND flash devices. The NOR flash device is a random access device, and any address can be provided at the address pin to access the host of the NOR flash device and timely by the data foot of the NOR flash device. The data stored on the address is obtained on the bit. Conversely, NAND flash devices are not random access, but sequential access. The NAND flash device cannot access any random address like the NOR flash device. Instead, the master device needs to write the value of the byte of the sequence to the NAND flash device to define the request command (command). Type (eg, read, write, erase, etc.), and the address used on this command. The address can point to a page (the smallest data block of a write job in flash memory) or a block (the smallest data block of an erase job in flash memory). In fact, NAND flash devices typically read or write complete pages of data from memory cells. When a full page of data is read from the array into a buffer in the device, the main unit can be bitwise or word by sequentially clocking out the content using a strobe signal. A group of words access data.

若區塊中的部分頁面的資料已經不需要(亦稱為過期頁面),則讀取這些區塊中儲存有效資料的頁面並重新寫入至另一個先前經過抹除的空區塊。接著,這些釋放的區塊在經過抹除作業後就可被用以寫入新資料。以上處理稱為廢料收集(GC,Garbage Collection)。廢料收集處理牽涉到讀取及重新寫入資料至快閃記憶體,也就是一次新的寫入前需要讀取完整個區塊的資料。然而,廢料收集耗費大量的時間。因此,需要一種快閃記憶體之廢料收集方法以及使用該方法的裝置,用以減少存取時間。 If the data of some pages in the block is not needed (also known as the expired page), the pages in the block where the valid data is stored are read and rewritten to another previously erased empty block. These released blocks can then be used to write new data after the erase operation. The above process is called garbage collection (GC, Garbage Collection). The waste collection process involves reading and rewriting data to the flash memory, which means that the entire block needs to be read before a new write. However, waste collection takes a lot of time. Therefore, there is a need for a flash memory collection method and apparatus using the same to reduce access time.

本發明的實施例提出一種快閃記憶體之廢料收集方法,由處理單元執行,包含下列步驟。從多個儲存子單元讀取n*m個頁面的有效資料。反覆執行一個迴圈,用以逐一驅動儲存子單元以寫入m個頁面的有效資料,直到儲存子單元皆處於忙碌狀態為止。 Embodiments of the present invention provide a method of collecting a flash memory, which is executed by a processing unit and includes the following steps. Read valid data of n*m pages from multiple storage subunits. A loop is repeatedly executed to drive the storage sub-units one by one to write valid data of m pages until the storage sub-units are in a busy state.

本發明的實施例另提出一種快閃記憶體之廢料收集方法,由處理單元執行,包含下列步驟。將n*m個頁面的有效資料的多個讀取命令進行排程。除了接收相應於最後的讀取命令及實體位址的有效資料外,於接收相應於每一已傳送的資料讀取命令及實體位址的有效資料前,傳送下一資料讀取命令及實體位址給儲存子單元中之指定下一者。驅動儲存子單元以寫入n*m個頁面的有效資料。 The embodiment of the present invention further provides a method for collecting waste of a flash memory, which is executed by a processing unit, and includes the following steps. Schedule multiple read commands for valid data for n*m pages. In addition to receiving the valid data corresponding to the last read command and the physical address, the next data read command and the entity bit are transmitted before receiving the valid data corresponding to each transmitted data read command and the physical address. The address is assigned to the next one in the storage subunit. The storage subunit is driven to write valid data for n*m pages.

本發明的實施例提出一種快閃記憶體之廢料收集裝置,至少包含通道以及處理單元。通道耦接於多個儲存子單 元,而處理單元耦接於通道。處理單元從儲存子單元讀取n*m個頁面的有效資料;以及反覆執行一個迴圈,用以逐一驅動上述儲存子單元以寫入m個頁面的有效資料,直到儲存子單元皆處於忙碌狀態為止。 Embodiments of the present invention provide a waste collection device for a flash memory, comprising at least a channel and a processing unit. The channel is coupled to the plurality of storage sub-sheets And the processing unit is coupled to the channel. The processing unit reads the valid data of the n*m pages from the storage subunit; and repeatedly executes a loop for driving the storage subunits one by one to write the valid data of the m pages until the storage subunits are busy until.

本發明的實施例另提出一種快閃記憶體之廢料收集裝置,至少包含通道以及處理單元。通道耦接於多個儲存子單元,而處理單元耦接於通道。處理單元將n*m個頁面的有效資料的多個讀取命令進行排程;除了接收相應於最後一讀取命令及實體位址的有效資料外,於接收相應於每一已傳送的資料讀取命令及實體位址的有效資料前,傳送下一資料讀取命令及實體位址給儲存子單元中之指定下一者;以及驅動儲存子單元以寫入n*m個頁面的有效資料。 Embodiments of the present invention further provide a waste collection device for a flash memory, comprising at least a channel and a processing unit. The channel is coupled to the plurality of storage subunits, and the processing unit is coupled to the channel. The processing unit schedules a plurality of read commands of the valid data of the n*m pages; in addition to receiving the valid data corresponding to the last read command and the physical address, the receiving is corresponding to each transmitted data. Before the valid data of the command and the physical address is taken, the next data read command and the physical address are transmitted to the designated next one in the storage subunit; and the storage subunit is driven to write the valid data of the n*m pages.

其中,n代表共享一個通道的儲存子單元的數量,m代表每一儲存子單元的最小寫入頁面的數量。 Where n represents the number of storage subunits sharing a channel, and m represents the minimum number of written pages per storage subunit.

10‧‧‧系統 10‧‧‧System

110‧‧‧處理單元 110‧‧‧Processing unit

130‧‧‧動態隨機存取記憶體 130‧‧‧Dynamic random access memory

150‧‧‧存取介面 150‧‧‧Access interface

160‧‧‧主裝置 160‧‧‧Main device

170‧‧‧存取介面 170‧‧‧Access interface

170_0~170_j‧‧‧存取子介面 170_0~170_j‧‧‧Access subinterface

180‧‧‧儲存單元 180‧‧‧ storage unit

180_0_0~180_j_i‧‧‧儲存子單元 180_0_0~180_j_i‧‧‧Storage subunit

210‧‧‧記憶體單元陣列 210‧‧‧Memory cell array

220‧‧‧行解碼單元 220‧‧‧ line decoding unit

230‧‧‧列編碼單元 230‧‧‧ column coding unit

240‧‧‧位址單元 240‧‧‧ address unit

250‧‧‧資料緩存器 250‧‧‧ data buffer

410_0‧‧‧資料線 410_0‧‧‧Information line

420_0_0~420_0_i‧‧‧晶片致能控制訊號 420_0_0~420_0_i‧‧‧ Chip enable control signal

CE0~CE4‧‧‧儲存子單元 CE0~CE4‧‧‧ storage subunit

R0‧‧‧從CE0接收資料的時間 R0‧‧‧Time when receiving information from CE0

R1‧‧‧從CE1接收資料的時間 R1‧‧‧Time when receiving information from CE1

R2‧‧‧從CE2接收資料的時間 R2‧‧‧Time to receive information from CE2

R3‧‧‧從CE3接收資料的時間 R3‧‧‧Time to receive information from CE3

S511~S557‧‧‧方法步驟 S511~S557‧‧‧ method steps

S711~S791‧‧‧方法步驟 S711~S791‧‧‧ method steps

S911~S977‧‧‧方法步驟 S911~S977‧‧‧ method steps

T61‧‧‧讀取資料的時間區間 Time interval for reading data from T61‧‧

T63‧‧‧寫入資料的時間區間 T63‧‧‧ Time interval for writing data

T81‧‧‧讀取資料的時間區間 T81‧‧‧ Time interval for reading data

T83‧‧‧寫入資料的時間區間 T83‧‧‧ Time interval for writing data

tR‧‧‧儲存子單元準備資料的時間 tR‧‧‧Storage time of subunit preparation materials

tProg‧‧‧儲存子單元實際寫入資料的時間 tProg‧‧‧Storage time when the subunit is actually written

W0‧‧‧傳送資料至CE0的時間 W0‧‧‧Time to transmit information to CE0

W1‧‧‧傳送資料至CE1的時間 W1‧‧‧Time to transmit information to CE1

W2‧‧‧傳送資料至CE2的時間 W2‧‧‧Time to transmit information to CE2

W3‧‧‧傳送資料至CE3的時間 W3‧‧‧Time to transmit information to CE3

第1圖係依據本發明實施例之快閃記憶體的系統架構示意圖。 1 is a schematic diagram of a system architecture of a flash memory according to an embodiment of the present invention.

第2圖係依據本發明實施例之快閃記憶體中的儲存單元示意圖。 2 is a schematic diagram of a storage unit in a flash memory according to an embodiment of the present invention.

第3圖係依據本發明實施例之存取介面與儲存單元的方塊圖。 Figure 3 is a block diagram of an access interface and a storage unit in accordance with an embodiment of the present invention.

第4圖係依據本發明實施例之一個存取子介面與多個儲存子單元的連接示意圖。 Figure 4 is a schematic diagram showing the connection of an access sub-interface and a plurality of storage sub-units according to an embodiment of the present invention.

第5圖係依據本發明實施例之執行於處理單元中之快閃記憶體之廢料收集方法流程圖。 Figure 5 is a flow chart of a waste collection method of a flash memory implemented in a processing unit in accordance with an embodiment of the present invention.

第6圖係依據本發明實施例之廢料收集處理示意圖。 Figure 6 is a schematic diagram of waste collection processing in accordance with an embodiment of the present invention.

第7圖係依據本發明實施例之執行於處理單元中之快閃記憶體之廢料收集方法流程圖。 Figure 7 is a flow chart of a waste collection method of a flash memory implemented in a processing unit in accordance with an embodiment of the present invention.

第8圖係依據本發明實施例之廢料收集處理示意圖。 Figure 8 is a schematic view of waste collection processing in accordance with an embodiment of the present invention.

第9A及9B圖係依據本發明實施例之執行於處理單元中之快閃記憶體之廢料收集方法流程圖。 9A and 9B are flowcharts of a method of collecting waste materials of a flash memory executed in a processing unit according to an embodiment of the present invention.

以下說明係為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。 The following description is a preferred embodiment of the invention, which is intended to describe the basic spirit of the invention, but is not intended to limit the invention. The actual inventive content must be referenced to the scope of the following claims.

必須了解的是,使用於本說明書中的”包含”、”包括”等詞,係用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。 It must be understood that the terms "comprising", "comprising" and "the" are used in the <RTI ID=0.0> </RTI> <RTIgt; </ RTI> to indicate the existence of specific technical features, numerical values, method steps, work processes, components and/or components, but do not exclude Add more technical features, values, method steps, job processing, components, components, or any combination of the above.

於權利要求中使用如”第一”、"第二"、"第三"等詞係用來修飾權利要求中的元件,並非用來表示之間具有優先權順序,先行關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用來區別具有相同名字的元件。 The words "first", "second", and "third" are used in the claims to modify the elements in the claims, and are not used to indicate a priority order, an advance relationship, or a component. Prior to another component, or the chronological order in which the method steps are performed, it is only used to distinguish components with the same name.

第1圖係依據本發明實施例之快閃記憶體的系統架構示意圖。快閃記憶體的系統架構10中包含處理單元110, 用以寫入資料到儲存單元180中的指定位址,以及從儲存單元180中的指定位址讀取資料。詳細來說,處理單元110透過存取介面170寫入資料到儲存單元180中的指定位址,以及從儲存單元180中的指定位址讀取資料。系統架構10使用數個電子訊號來協調處理單元110與儲存單元180間的資料與命令傳遞,包含資料線(data line)、時脈訊號(clock signal)與控制訊號(control signal)。資料線可用以傳遞命令、位址、讀出及寫入的資料;控制訊號線可用以傳遞晶片致能(chip enable,CE)、位址提取致能(address latch enable,ALE)、命令提取致能(command latch enable,CLE)、寫入致能(write enable,WE)等控制訊號。存取介面170可採用雙倍資料率(double data rate,DDR)通訊協定與儲存單元180溝通,例如,開放NAND快閃(open NAND flash interface,ONFI)、雙倍資料率開關(DDR toggle)或其他介面。處理單元110另可使用存取介面150透過指定通訊協定與主裝置160進行溝通,例如,通用序列匯流排(universal serial bus,USB)、先進技術附著(advanced technology attachment,ATA)、序列先進技術附著(serial advanced technology attachment,SATA)、快速周邊元件互聯(peripheral component interconnect express,PCI-E)或其他介面。 1 is a schematic diagram of a system architecture of a flash memory according to an embodiment of the present invention. The processing unit 110 is included in the system architecture 10 of the flash memory. The data is used to write the specified address to the storage unit 180, and the data is read from the specified address in the storage unit 180. In detail, the processing unit 110 writes the data to the specified address in the storage unit 180 through the access interface 170, and reads the data from the specified address in the storage unit 180. The system architecture 10 uses a plurality of electronic signals to coordinate data and command transfer between the processing unit 110 and the storage unit 180, including a data line, a clock signal, and a control signal. The data line can be used to transfer commands, addresses, read and write data; the control signal line can be used to transmit chip enable (CE), address latch enable (ALE), command extraction Control signals such as command latch enable (CLE) and write enable (WE). The access interface 170 can communicate with the storage unit 180 using a double data rate (DDR) protocol, such as an open NAND flash interface (ONFI), a double data rate switch (DDR toggle), or Other interface. The processing unit 110 can also use the access interface 150 to communicate with the main device 160 through a specified communication protocol, for example, a universal serial bus (USB), an advanced technology attachment (ATA), and an advanced technology. (serial advanced technology attachment, SATA), peripheral component interconnect express (PCI-E) or other interface.

第2圖係依據本發明實施例之快閃記憶體中的儲存單元示意圖。儲存單元180可包含由MxN個記憶體單元(memory cells)組成的陣列(array)210,而每一個記憶體單元儲存至少一個位元(bit)的資訊。快閃記憶體可以是NAND型快閃記憶體,或其他種類的快閃記憶體。為了正確存取資訊,行解 碼單元220用以選擇記憶體單元陣列210中指定的行,而列編碼單元230用以選擇指定行中一定數量的位元組的資料作為輸出。位址單元240提供行資訊給行解碼器220,其中定義了選擇記憶體單元陣列210中的那些行。相似地,列解碼器230則根據位址單元240提供的列資訊,選擇記憶體單元陣列210的指定行中一定數量的列進行讀取或寫入操作。行可稱為為字元線(wordline),列可稱為位元線(bitline)。資料緩存器(data buffer)250可儲存從記憶體單元陣列210讀取出的資料,或欲寫入記憶體單元陣列210中的資料。記憶體單元可為單層式單元(single-level cells,SLCs)、多層式單元(multi-level cells,MLCs)或三層式單元(triple-level cells,TLCs)。 2 is a schematic diagram of a storage unit in a flash memory according to an embodiment of the present invention. The storage unit 180 may include an array 210 composed of MxN memory cells, and each memory unit stores information of at least one bit. The flash memory can be a NAND type flash memory, or other kinds of flash memory. In order to correctly access the information, the row decoding unit 220 is configured to select a row specified in the memory cell array 210, and the column encoding unit 230 is configured to select a data of a certain number of bytes in the specified row as an output. Address unit 240 provides row information to row decoder 220 in which those rows in select memory cell array 210 are defined. Similarly, column decoder 230 selects a certain number of columns in a specified row of memory cell array 210 for read or write operations based on the column information provided by address unit 240. A row can be called a wordline, and a column can be called a bitline. A data buffer 250 can store data read from the memory cell array 210 or data to be written into the memory cell array 210. The memory unit can be single-level cells (SLCs), multi-level cells (MLCs), or triple-level cells (TLCs).

儲存單元180可包含多個儲存子單元,每一個儲存子單元實施於一個晶粒(die)上,各自使用關聯的存取子介面與處理單元110進行溝通。第3圖係依據本發明實施例之存取介面與儲存單元的方塊圖。快閃記憶體10可包含j+1個存取子介面170_0至170_j,存取子介面又可稱為通道(channel),每一個存取子介面連接i+1個儲存子單元。換句話說,i+1個儲存子單元共享一個存取子介面。例如,當快閃記憶體10包含4個通道(j=3)且每一個通道連接4個儲存單元(i=3)時,快閃記憶體10一共擁有16個儲存單元180_0_0至180_j_i。處理單元110可驅動存取子介面170_0至170_j中之一者,從指定的儲存子單元讀取資料。每個儲存子單元擁有獨立的晶片致能(CE,Chip Enable)控制訊號。換句話說,當欲對指定的儲存子單元進行資料讀取或寫入時,需要驅動關聯的存取子介面致能此儲存子單元的晶片致能 控制訊號。第4圖係依據本發明實施例之一個存取子介面與多個儲存子單元的連接示意圖。處理單元110可透過存取子介面170_0使用獨立的晶片致能控制訊號420_0_0至420_0_i來從連接的儲存子單元180_0_0至180_0_i中選擇出其中一者,接著,透過共享的資料線410_0傳送命令或資料給選擇出的儲存子單元,或者從選擇出的儲存子單元接收指定位置上的資料。 The storage unit 180 can include a plurality of storage subunits, each of which is implemented on a die, each communicating with the processing unit 110 using an associated access sub-interface. Figure 3 is a block diagram of an access interface and a storage unit in accordance with an embodiment of the present invention. The flash memory 10 may include j + 1 access sub-interfaces 170_0 to 170_j, the access sub-interfaces may also be referred to as channels, and each access sub-interface is connected to i + 1 storage sub-units. In other words, i + 1 storage subunits share an access subinterface. For example, when the flash memory 10 contains 4 channels ( j = 3 ) and each channel is connected to 4 storage units ( i = 3 ), the flash memory 10 has a total of 16 storage units 180_0_0 to 180_j_i. The processing unit 110 can drive one of the access sub-interfaces 170_0 to 170_j to read data from the designated storage sub-unit. Each storage subunit has a separate chip enable (CE, Chip Enable) control signal. In other words, when data reading or writing is to be performed on a specified storage subunit, it is necessary to drive the associated access sub-interface to enable the wafer enable control signal of the storage subunit. Figure 4 is a schematic diagram showing the connection of an access sub-interface and a plurality of storage sub-units according to an embodiment of the present invention. The processing unit 110 can select one of the connected storage sub-units 180_0_0 to 180_0_i through the access sub-interface 170_0 using the independent chip enable control signals 420_0_0 to 420_0_i, and then transmit the command or data through the shared data line 410_0. The selected storage subunit is given, or the data at the specified location is received from the selected storage subunit.

主裝置160可透過存取介面150提供邏輯區塊位址(LBA,Logical Block Address)給處理單元110,用以指示寫入或讀取特定區域的資料。存取介面170為最佳化資料寫入的效率,可將一段具有連續邏輯區塊位址的資料分散地擺放在不同儲存子單元中的不同區域。因此,需要一個對照表(又稱為H2F表),用以指出每個邏輯區塊位址的資料實際上存放在哪個儲存子單元中的哪個位置。於一種實施方式中,可於動態隨機存取記憶體130中配置足夠大的空間來儲存此對照表。 The main device 160 can provide a logical block address (LBA) to the processing unit 110 through the access interface 150 for instructing to write or read data of a specific area. The access interface 170 optimizes the efficiency of data writing, and a piece of data having consecutive logical block addresses can be distributedly placed in different areas in different storage subunits. Therefore, a look-up table (also known as an H2F table) is needed to indicate in which storage sub-unit the data of each logical block address is actually stored. In one embodiment, a sufficiently large space can be configured in the DRAM 130 to store the lookup table.

假設n個儲存子單元共享一個通道,一個儲存子單元的最小寫入單位為m個頁面。為了讓廢料收集處理的資料寫入更有效率,本發明實施例從數個區塊中讀取n*m個頁面的有效資料,接著,逐一驅動儲存子單元寫入m個頁面的有效資料,直到所有儲存子單元皆處於忙碌狀態(busy state)為止。於此須注意的是,當m個頁面的有效資料傳送至一個儲存子單元完畢後,不需要等待儲存子單元執行完實體寫入作業即可傳送另外m個頁面的有效資料給下一個儲存子單元。透過以上的設計,可讓處理單元110於一個儲存子單元執行實體寫入作業的期間傳送資料給下一個儲存子單元,並且在所有儲存子單元執行實 體寫入作業的期間,轉而執行其他的運算作業。第5圖係依據本發明實施例之執行於處理單元中之快閃記憶體之廢料收集方法流程圖。處理單元110經由存取介面170讀取n*m個頁面的有效資料並儲存於動態隨機存取記憶體130後(步驟S511),初始化變數k(k=k0)(步驟S513)。其中,除了有效資料外,讀取區塊另包含過期資料。k0為一個常數,介於0至n-1之間,用以指示第一個寫入資料的儲存子單元的編號。於此須注意的是,動態隨機存取記憶體130擁有足夠大的空間來儲存n*m個頁面的有效資料。於步驟S511,處理單元可依據動態隨機存取記憶體130中的H2F表取得n*m個頁面的有效資料的實體位址並且驅動儲存單元180從這些實體位址讀取資料。接著,處理單元110反覆執行一個迴圈(步驟S531至S557),直到n*m個頁面的有效資料都寫入儲存單元180為止。 Assuming that n storage subunits share one channel, the minimum write unit of one storage subunit is m pages. In order to make the data of the waste collection processing more efficient, the embodiment of the present invention reads the valid data of n*m pages from several blocks, and then drives the storage sub-units to write the valid data of the m pages one by one. Until all storage subunits are in a busy state. It should be noted that after the valid data of the m pages is transferred to a storage subunit, the valid data of the other m pages can be transmitted to the next storage device without waiting for the storage subunit to perform the physical writing operation. unit. Through the above design, the processing unit 110 can transfer the data to the next storage sub-unit during the execution of the entity write operation by one storage sub-unit, and execute other entities during the execution of the entity write operation by all the storage sub-units. Operational work. Figure 5 is a flow chart of a waste collection method of a flash memory implemented in a processing unit in accordance with an embodiment of the present invention. The processing unit 110 reads the valid data of n*m pages via the access interface 170 and stores it in the dynamic random access memory 130 (step S511), and initializes the variable k(k=k 0 ) (step S513). Among them, in addition to the valid data, the read block also contains expired data. k 0 is a constant between 0 and n-1 to indicate the number of the first storage subunit to which the data is written. It should be noted here that the DRAM 130 has enough space to store valid data for n*m pages. In step S511, the processing unit may obtain the physical addresses of the valid data of the n*m pages according to the H2F table in the dynamic random access memory 130 and drive the storage unit 180 to read the materials from the physical addresses. Next, the processing unit 110 repeatedly executes a loop (steps S531 to S557) until the valid data of n*m pages are written to the storage unit 180.

於每一回合中,處理單元110從動態隨機存取記憶體130讀取m個頁面的有效資料,以及經由存取介面170傳送資料寫入命令及實體位址給第k個儲存子單元(步驟S531)。參考第4圖。舉例來說,於步驟S531,處理單元110可透過存取子介面170_0致能獨立的晶片致能控制訊號420_0_0至420_0_i中之指定一者,用以從儲存子單元180_0_0至180_0_i中選擇出第k個儲存子單元,接著,透過共享的資料線410_0傳送資料寫入命令及實體位址給選擇出的第k個儲存子單元。於此須注意的是,實體位址指示同一個區塊的m個頁面。接著,處理單元110傳送m個頁面的有效資料給第k個儲存子單元(步驟S533),以及傳送開始寫入訊號給第k個儲存子單元,用以指示開始執行實 體寫入作業(步驟S535)。參考第4圖。舉例來說,於步驟S533,處理單元110可透過共享的資料線410_0傳送m個頁面的有效資料給選擇出的第k個儲存子單元。舉例來說,於步驟S535,處理單元110可轉態(toggle)相應於第k個儲存子單元的寫入致能(WE,Write Enable)訊號,用以指示開始執行實體寫入作業。當第k個儲存子單元接收到處理單元110的指示後,進入忙碌狀態並執行實體寫入作業,用以將m個頁面的有效資料寫入指定的實體位址。接著,當尚未完成整個寫入作業時(步驟S551中”否”的路徑),處理單元110將變數k加1(步驟S553),以及判斷變數k是否大於或等於n(步驟S555)。若是,處理單元110將變數k設為0(步驟S557),並接著驅動第0個儲存子單元寫入m個頁面的有效資料(步驟S531至S553)。否則,處理單元110接著驅動第k個儲存子單元寫入m個頁面的有效資料(步驟S531至S553)。當完成整個寫入作業時(步驟S551中”是”的路徑),處理單元110結束n*m個頁面的廢料收集處理。 In each round, the processing unit 110 reads the valid data of the m pages from the dynamic random access memory 130, and transmits the data write command and the physical address to the kth storage subunit via the access interface 170 (step S531). Refer to Figure 4. For example, in step S531, the processing unit 110 can enable the designated one of the independent wafer enable control signals 420_0_0 to 420_0_i through the access sub-interface 170_0 to select the kth from the storage sub-units 180_0_0 to 180_0_i. The storage subunits, then transmit the data write command and the physical address to the selected kth storage subunit through the shared data line 410_0. It should be noted here that the physical address indicates m pages of the same block. Next, the processing unit 110 transmits the valid data of the m pages to the kth storage subunit (step S533), and transmits a start write signal to the kth storage subunit to indicate the start of execution. The body write job (step S535). Refer to Figure 4. For example, in step S533, the processing unit 110 may transmit the valid data of the m pages to the selected kth storage subunit through the shared data line 410_0. For example, in step S535, the processing unit 110 can toggle the write enable (WE, Write Enable) signal corresponding to the kth storage subunit to instruct to start executing the physical write job. When the kth storage subunit receives the instruction from the processing unit 110, it enters a busy state and performs a physical write job for writing valid data of m pages to the specified physical address. Next, when the entire write job has not been completed (NO in step S551), the processing unit 110 increments the variable k (step S553), and determines whether the variable k is greater than or equal to n (step S555). If so, the processing unit 110 sets the variable k to 0 (step S557), and then drives the 0th storage subunit to write the valid data of the m pages (steps S531 to S553). Otherwise, the processing unit 110 then drives the kth storage subunit to write valid data of m pages (steps S531 to S553). When the entire write job is completed (the path of "YES" in step S551), the processing unit 110 ends the garbage collection processing of n*m pages.

第6圖係依據本發明實施例之廢料收集處理示意圖。假設4個儲存子單元共享一個通道,一個儲存子單元的最小寫入單位為2個頁面,每個頁面可包含4K、8K或16K或其他長度的位元組資料。參考第4圖及第5圖。於步驟S511,處理單元110可於時間區間T61透過存取介面170從4個儲存子單元(表示為CE0至CE3)讀取8(4x2)個頁面的有效資料,以及儲存於動態隨機存取記憶體130。詳細來說,處理單元110透過共享的資料線410_0發送資料讀取命令以及實體位址給指定的儲存子單元後,等待一段時間tR(例如,30、40或70微秒(μs)),用以讓 儲存子單元準備實體位址上的資料。接著,處理單元110於一段時間Rx(例如,45或50微秒(μs))透過共享的資料線410_0接收指定頁面的資料,x可為0至3中之任一者。為了縮短廢料收集處理中的資料寫入時間T63,於步驟S531至S535,處理單元110可於一段時間Wx(例如,90或100微秒(μs))透過存取介面170傳送資料寫入命令、實體位址及開始寫入訊號給指定的儲存子單元後,不需等待此儲存子單元執行完實體寫入作業,隨即透過存取介面170傳送資料寫入命令、實體位址及開始寫入訊號給下一個的儲存子單元,x可為0至3中之任一者。儲存子單元於時間區間tProg(例如,1200、1250或1300微秒(μs))執行實體寫入作業,並且可於結束時通知處理單元110實體寫入作業是否成功。當實體寫入作業成功時,處理單元110可更新動態隨機存取記憶體130中的H2F表,用以反應實體寫入作業的結果。 Figure 6 is a schematic diagram of waste collection processing in accordance with an embodiment of the present invention. Assume that 4 storage subunits share one channel, and a storage subunit has a minimum write unit of 2 pages, and each page can contain 4K, 8K or 16K or other lengths of byte data. Refer to Figures 4 and 5. In step S511, the processing unit 110 can read 8 (4x2) pages of valid data from the four storage subunits (represented as CE0 to CE3) through the access interface 170 in the time interval T61, and store the data in the dynamic random access memory. Body 130. In detail, the processing unit 110 waits for a period of time tR (for example, 30, 40 or 70 microseconds (μs)) after transmitting the data read command and the physical address to the designated storage subunit through the shared data line 410_0. Let The storage subunit prepares the data on the physical address. Next, the processing unit 110 receives the data of the specified page through the shared data line 410_0 for a period of time Rx (for example, 45 or 50 microseconds (μs)), and x may be any one of 0 to 3. In order to shorten the data writing time T63 in the garbage collection processing, in steps S531 to S535, the processing unit 110 may transmit a data writing command through the access interface 170 for a period of time Wx (for example, 90 or 100 microseconds (μs)), After the physical address and the start of the write signal to the designated storage subunit, the storage subunit does not need to wait for the physical write operation to be performed, and then the data write command, the physical address, and the start of the write signal are transmitted through the access interface 170. For the next storage subunit, x can be any of 0 to 3. The storage subunit performs an entity write job at a time interval tProg (eg, 1200, 1250, or 1300 microseconds (μs)), and may notify the processing unit 110 at the end whether the entity write job was successful. When the entity write job is successful, the processing unit 110 may update the H2F table in the dynamic random access memory 130 to reflect the result of the entity write job.

為了讓廢料收集處理的資料讀取更有效率,本發明實施例先將n*m個頁面的有效資料的多個讀取命令及實體位址進行排程,並在除了接收相應於最後一個讀取命令及實體位址的有效資料外,於接收相應於一個已傳送的資料讀取命令及實體位址的有效資料前,傳送下一個資料讀取命令及實體位址給下一個指定的儲存子單元。透過以上的設計,使得從儲存子單元讀取有效資料的時間可緊密地安排在一起,縮短如第6圖所示讀取二個頁面間的空閒時間(idle time)。第7圖係依據本發明實施例之執行於處理單元中之快閃記憶體之廢料收集方法流程圖。首先,處理單元110排程讀取n*m個頁面的有效資料的命令,以及初始化變數1(1=0),其中變數1用以指示讀取命令的 編號(步驟S711)。於步驟S711,處理單元可依據動態隨機存取記憶體130中的H2F表取得n*m個頁面的有效資料的實體位址,並據以排程資料讀取命令。接著,處理單元110經由存取介面170傳送第1個(亦即是第0個)資料讀取命令及實體位址給相應的儲存子單元(步驟S713)。接著,處理單元110反覆執行一個迴圈(步驟S731至S751),直到n*m個頁面的有效資料的資料讀取命令都傳送給儲存單元180為止。 In order to make the data collection processing of the waste collection processing more efficient, the embodiment of the present invention first schedules multiple read commands and physical addresses of valid data of n*m pages, and in addition to receiving corresponding to the last read. In addition to the valid data of the command and the physical address, before receiving the valid data corresponding to a transmitted data read command and the physical address, the next data read command and the physical address are transmitted to the next designated storage. unit. Through the above design, the time for reading valid data from the storage subunit can be closely arranged, and the idle time between the two pages is shortened as shown in FIG. Figure 7 is a flow chart of a waste collection method of a flash memory implemented in a processing unit in accordance with an embodiment of the present invention. First, the processing unit 110 schedules a command to read the valid data of n*m pages, and initializes the variable 1 (1=0), wherein the variable 1 is used to indicate the read command. Number (step S711). In step S711, the processing unit may obtain the physical address of the valid data of the n*m pages according to the H2F table in the dynamic random access memory 130, and read the command according to the scheduled data. Next, the processing unit 110 transmits the first (that is, the 0th) data read command and the physical address to the corresponding storage subunit via the access interface 170 (step S713). Next, the processing unit 110 repeatedly executes a loop (steps S731 to S751) until the data read command of the valid material of the n*m pages is transmitted to the storage unit 180.

於每一回合中,處理單元110經由存取介面170傳送第1+1個資料讀取命令及實體位址給相應的儲存子單元後(步驟S731),從相應的儲存子單元接收相應於第1個資料讀取命令及實體位址的有效資料(步驟S733),儲存讀取的有效資料至動態隨機存取記憶體130(步驟S735),以及將變數1加一(步驟S737)。接著,處理單元110判斷變數1是否大於或等於n*m(步驟S751)。若否,則處理單元110繼續經由存取介面170傳送第1+1個資料讀取命令及實體位址給相應的儲存子單元,用以進行下一回合的有效資料讀取(步驟S731)。若是,處理單元從相應的儲存子單元接收相應於第1個資料讀取命令及實體位址的有效資料(步驟S771),以及儲存讀取的有效資料至動態隨機存取記憶體130(步驟S773)。 In each round, the processing unit 110 transmits the 1+1th data read command and the physical address to the corresponding storage subunit via the access interface 170 (step S731), and receives the corresponding corresponding from the corresponding storage subunit. One data read command and valid data of the physical address (step S733), the read valid data is stored in the dynamic random access memory 130 (step S735), and the variable 1 is incremented by one (step S737). Next, the processing unit 110 determines whether the variable 1 is greater than or equal to n*m (step S751). If not, the processing unit 110 continues to transmit the 1+1th data read command and the physical address to the corresponding storage subunit via the access interface 170 for performing the valid data reading for the next round (step S731). If yes, the processing unit receives the valid data corresponding to the first data read command and the physical address from the corresponding storage subunit (step S771), and stores the read valid data to the dynamic random access memory 130 (step S773). ).

處理單元110讀取完n*m個頁面的有效資料並儲存至動態隨機存與記憶體130後,經由存取介面170將n*m個頁面的有效資料寫入儲存單元180(步驟S791)。 After the processing unit 110 reads the valid data of the n*m pages and stores the data in the dynamic random access memory 130, the valid data of the n*m pages is written into the storage unit 180 via the access interface 170 (step S791).

第8圖係依據本發明實施例之廢料收集處理示意圖。假設4個儲存子單元共享一個通道,一個儲存子單元的最 小寫入單位為2個頁面,每個頁面可包含4K、8K或16K或其他長度的位元組資料。參考第4圖及第7圖。時間區間T81為讀取n*m個頁面的有效資料的時間。於步驟S713,處理單元110透過共享的資料線410_0發送資料讀取命令以及實體位址給指定的儲存子單元。接著,反覆執行如步驟S731至S751的迴圈,使得處理單元110透過共享的資料線410_0發送下一個資料讀取命令以及實體位址給指定的儲存子單元後,接著接收相應於此資料讀取命令及實體位址的有效資料。例如,處理單元110透過共享的資料線410_0傳送資料讀取命令及實體位址給儲存子單元CE1,從儲存子單元CE0接收有效資料,傳送資料讀取命令及實體位址給儲存子單元CE3,從儲存子單元CE1接收有效資料,依此類推。於執行完迴圈後,處理單元110透過共享的資料線410_0從儲存子單元CE0接收最後的有效資料。比較第6圖,使用第7圖所示的方法,可縮短讀取二個頁面間的空閒時間。 Figure 8 is a schematic view of waste collection processing in accordance with an embodiment of the present invention. Suppose four storage subunits share one channel, the most one of the storage subunits. The small write unit is 2 pages, and each page can contain 4K, 8K or 16K or other lengths of byte data. Refer to Figures 4 and 7. The time interval T81 is the time at which the valid material of n*m pages is read. In step S713, the processing unit 110 sends the data read command and the physical address to the designated storage subunit through the shared data line 410_0. Then, the loops of steps S731 to S751 are repeatedly executed, so that the processing unit 110 transmits the next data read command and the physical address to the designated storage subunit through the shared data line 410_0, and then receives the corresponding data read. Valid data for commands and physical addresses. For example, the processing unit 110 transmits the data read command and the physical address to the storage subunit CE1 through the shared data line 410_0, receives the valid data from the storage subunit CE0, and transmits the data read command and the physical address to the storage subunit CE3. Receive valid data from storage subunit CE1, and so on. After the loop is executed, the processing unit 110 receives the last valid data from the storage subunit CE0 through the shared data line 410_0. Comparing Figure 6, using the method shown in Figure 7, the idle time between reading two pages can be shortened.

第9A及9B圖係依據本發明實施例之執行於處理單元中之快閃記憶體之廢料收集方法流程圖。此方法兼備了第7圖所示的資料讀取效率及第5圖所示的資料寫入效率。步驟S911至S943的詳細實施細節可參考第7圖中步驟S711至S773的說明。步驟S951至步驟S971的詳細實施細節可參考第5圖中步驟S513至S557的說明。 9A and 9B are flowcharts of a method of collecting waste materials of a flash memory executed in a processing unit according to an embodiment of the present invention. This method combines the data reading efficiency shown in Fig. 7 with the data writing efficiency shown in Fig. 5. For detailed implementation details of steps S911 to S943, reference may be made to the description of steps S711 to S773 in FIG. For detailed implementation details of steps S951 to S971, reference may be made to the description of steps S513 to S557 in FIG.

雖然第1至4圖中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然第5、7、9A及9B圖的流程圖採 用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不因此而侷限。 Although the above-described elements are included in FIGS. 1 to 4, it is not excluded that more other additional elements are used without departing from the spirit of the invention, and a better technical effect has been achieved. In addition, although the flowcharts of Figures 5, 7, 9A and 9B are taken Executed in the specified order, but without departing from the spirit of the invention, those skilled in the art can modify the order among the steps to achieve the same effect, and therefore, the present invention is not limited to only using the above. order of. In addition, those skilled in the art may also integrate several steps into one step, or in addition to these steps, performing more steps sequentially or in parallel, and the present invention is not limited thereby.

雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。 Although the present invention has been described using the above embodiments, it should be noted that these descriptions are not intended to limit the invention. On the contrary, this invention covers modifications and similar arrangements that are apparent to those skilled in the art. Therefore, the scope of the claims should be interpreted in the broadest form to include all obvious modifications and similar arrangements.

Claims (18)

一種快閃記憶體之廢料收集方法,由一處理單元執行,包含:讀取n*m個頁面的有效資料,其中,n代表共享一通道的多個儲存子單元的數量,m代表每一上述儲存子單元的最小寫入頁面的數量;以及反覆執行一迴圈,用以逐一寫入m個頁面的有效資料至上述儲存子單元中之一者,直到上述n個儲存子單元皆處於忙碌狀態為止;以及其中於上述讀取n*m個頁面的有效資料的步驟中,更包含:將上述n*m個頁面的有效資料的多個讀取命令進行排程;以及除了接收相應於最後一讀取命令及實體位址的有效資料外,於接收相應於每一已傳送的資料讀取命令及實體位址的有效資料前,傳送下一資料讀取命令及實體位址給上述儲存子單元中之指定下一者。 A method for collecting waste material of a flash memory, which is executed by a processing unit, comprising: reading valid data of n*m pages, wherein n represents the number of multiple storage subunits sharing a channel, and m represents each of the above The number of minimum written pages of the storage subunit; and repeatedly executing a loop for writing the valid data of the m pages one by one to one of the storage subunits until the n storage subunits are busy And the step of reading the valid data of the n*m pages in the above, further comprising: scheduling a plurality of read commands of the valid data of the n*m pages; and receiving the corresponding one And reading the valid data of the command and the physical address, and transmitting the next data read command and the physical address to the storage subunit before receiving the valid data corresponding to each transmitted data read command and the physical address Specify the next one. 如申請專利範圍第1項所述的快閃記憶體之廢料收集方法,其中,於上述迴圈中,當m個頁面的有效資料傳送至上述儲存子單元中之一者後,不需要等待上述儲存子單元執行完一實體寫入作業即可傳送另外m個頁面的有效資料給上述儲存子單元中之下一者。 The method for collecting waste materials of a flash memory according to the first aspect of the invention, wherein, in the loop, when the valid data of the m pages is transmitted to one of the storage subunits, there is no need to wait for the above The storage subunit executes a physical write job to transfer the valid data of the other m pages to the lower one of the storage subunits. 如申請專利範圍第1項所述的快閃記憶體之廢料收集方法,其中,於讀取n*m個頁面的有效資料的步驟中,更包含: 將上述n*m個頁面的有效資料儲存於一動態隨機存取記憶體;以及其中,於上述迴圈中的每一回合,從上述動態隨機存取記憶體讀取m個頁面的有效資料,並且驅動上述儲存子單元中之指定一者以寫入上述m個頁面的有效資料。 The method for collecting waste materials of a flash memory according to claim 1, wherein in the step of reading valid data of n*m pages, the method further comprises: And storing the valid data of the n*m pages in a dynamic random access memory; and wherein, in each of the loops, reading the valid data of the m pages from the dynamic random access memory, And driving the designated one of the storage subunits to write the valid data of the m pages. 如申請專利範圍第1項所述的快閃記憶體之廢料收集方法,其中於反覆執行一迴圈的步驟中,更包含:於每一回合中,傳送一資料寫入命令及一實體位址給上述儲存子單元中之指定一者;傳送m個頁面的有效資料給上述指定的儲存子單元;以及傳送一開始寫入訊號給上述指定的儲存子單元。 The method for collecting a flash memory according to the first aspect of the invention, wherein the step of repeatedly performing a loop further comprises: transmitting a data write command and a physical address in each round Assigning one of the storage subunits; transmitting valid information of m pages to the designated storage subunit; and transmitting a start write signal to the designated storage subunit. 如申請專利範圍第4項所述的快閃記憶體之廢料收集方法,其中,於上述傳送一資料寫入命令及一實體位址給上述儲存子單元中之指定一者的步驟中,更包含:致能多個晶片致能控制訊號中之指定一者,用以從上述儲存子單元選擇出上述指定一者;以及透過上述儲存子單元共享的一資料線傳送上述資料寫入命令及上述實體位址給上述儲存子單元中之指定一者。 The method for collecting a flash memory according to claim 4, wherein the step of transmitting a data write command and a physical address to a designated one of the storage subunits further includes Enabling a designated one of the plurality of chip enable control signals to select the specified one from the storage subunit; and transmitting the data write command and the entity by using a data line shared by the storage subunit The address is given to one of the above-mentioned storage sub-units. 如申請專利範圍第5項所述的快閃記憶體之廢料收集方法,其中,於上述傳送m個頁面的有效資料給上述指定的儲存子單元的步驟中,更包含:透過上述資料線傳送m個頁面的有效資料給上述指定的儲存子單元。 The method for collecting a flash memory according to the fifth aspect of the invention, wherein the step of transmitting the valid data of the m pages to the designated storage subunit further comprises: transmitting the m through the data line The valid information of the pages is given to the storage subunit specified above. 一種快閃記憶體之廢料收集方法,由一處理單元執行,包含:將n*m個頁面的有效資料的多個讀取命令進行排程,其中n代表共享一通道的多個儲存子單元的數量,m代表每一上述儲存子單元的最小寫入頁面的數量;除了接收相應於最後一讀取命令及實體位址的有效資料外,於接收相應於每一已傳送的資料讀取命令及實體位址的有效資料前,傳送下一資料讀取命令及實體位址給上述儲存子單元中之指定下一者;以及從上述儲存子單元接收完上述n*m個頁面的有效資料後,寫入上述n*m個頁面的有效資料。 A method for collecting waste material of a flash memory, which is executed by a processing unit, comprising: scheduling a plurality of read commands of valid data of n*m pages, wherein n represents a plurality of storage subunits sharing a channel The quantity, m represents the number of minimum written pages of each of the above storage subunits; in addition to receiving valid data corresponding to the last read command and the physical address, the receiving corresponding to each transmitted data read command and Before the valid data of the physical address, the next data read command and the physical address are transmitted to the designated next one of the storage subunits; and after the valid data of the n*m pages are received from the storage subunit, Write valid data for the above n*m pages. 如申請專利範圍第7項所述的快閃記憶體之廢料收集方法,更包含:將上述n*m個頁面的有效資料儲存於一動態隨機存取記憶體。 The method for collecting waste materials of the flash memory according to claim 7, further comprising: storing the valid data of the n*m pages in a dynamic random access memory. 如申請專利範圍第7項所述的快閃記憶體之廢料收集方法,其中,上述資料讀取命令及上述實體位址透過上述儲存子單元共享之一資料線傳送,以及上述每一頁面的有效資料透過上述資料線接收。 The method for collecting a flash memory according to claim 7, wherein the data reading command and the physical address are transmitted through a data line shared by the storage subunit, and each of the pages is valid. The information is received through the above data line. 一種快閃記憶體之廢料收集裝置,包含:一通道,耦接於多個儲存子單元;一處理單元,耦接於上述通道,用以從上述儲存子單元讀取n*m個頁面的有效資料,其中n代表共享上述通道的上述 儲存子單元的數量,m代表每一上述儲存子單元的最小寫入頁面的數量;以及反覆執行一迴圈,用以逐一寫入m個頁面的有效資料至上述儲存子單元中之一者,直到上述n個儲存子單元皆處於忙碌狀態為止以及其中,上述處理單元將上述n*m個頁面的有效資料的多個讀取命令進行排程;以及除了接收相應於最後一讀取命令及實體位址的有效資料外,於接收相應於每一已傳送的資料讀取命令及實體位址的有效資料前,傳送下一資料讀取命令及實體位址給上述儲存子單元中之指定下一者。 A flash memory collection device includes: a channel coupled to a plurality of storage subunits; and a processing unit coupled to the channel for reading n*m pages from the storage subunit Data, where n represents the above sharing of the above channels The number of storage subunits, m represents the number of minimum written pages of each of the above storage subunits; and repeatedly executes a loop for writing the valid data of m pages one by one to one of the storage subunits, Until the n storage subunits are in a busy state and wherein the processing unit schedules the plurality of read commands of the valid data of the n*m pages; and receives the corresponding read command and the entity In addition to the valid data of the address, before receiving the valid data corresponding to each transmitted data read command and the physical address, the next data read command and the physical address are transmitted to the designated next in the storage subunit. By. 如申請專利範圍第10項所述的快閃記憶體之廢料收集裝置,其中,於上述迴圈中,當m個頁面的有效資料傳送至上述儲存子單元中之一者後,上述處理單元不需要等待上述儲存子單元執行完一實體寫入作業即可傳送另外m個頁面的有效資料給上述儲存子單元中之下一者。 The waste collection device of the flash memory according to claim 10, wherein, in the loop, when the valid data of the m pages is transmitted to one of the storage subunits, the processing unit does not It is necessary to wait for the storage subunit to perform a physical write job to transfer the valid data of the other m pages to the next one of the storage subunits. 如申請專利範圍第10項所述的快閃記憶體之廢料收集裝置,其中,上述處理單元更將上述n*m個頁面的有效資料儲存於一動態隨機存取記憶體,以及,於上述迴圈中的每一回合,上述處理單元從上述動態隨機存取記憶體讀取m個頁面的有效資料,並且驅動上述儲存子單元中之指定一者以寫入上述m個頁面的有效資料。 The flash memory collection device of claim 10, wherein the processing unit further stores the valid data of the n*m pages in a dynamic random access memory, and Each round of the circle, the processing unit reads the valid data of the m pages from the dynamic random access memory, and drives a specified one of the storage subunits to write the valid data of the m pages. 如申請專利範圍第10項所述的快閃記憶體之廢料收集裝置,其中,於上述迴圈的每一回合中,上述處理單元傳送一資料寫入命令及一實體位址給上述儲存子單元中之指定 一者;傳送m個頁面的有效資料給上述指定的儲存子單元;以及傳送一開始寫入訊號給上述指定的儲存子單元。 The flash memory collection device of claim 10, wherein, in each round of the loop, the processing unit transmits a data write command and a physical address to the storage subunit. Designation One; transmitting valid data of m pages to the specified storage subunit; and transmitting a start write signal to the designated storage subunit. 如申請專利範圍第13項所述的快閃記憶體之廢料收集裝置,其中,上述處理單元更致能上述通道中的多個晶片致能控制訊號中之指定一者,用以從上述儲存子單元選擇出上述指定一者;以及透過上述儲存子單元共享的上述通道中的一資料線傳送上述資料寫入命令及上述實體位址給上述儲存子單元中之指定一者。 The flash memory collection device of claim 13, wherein the processing unit further enables a designated one of the plurality of wafer enable control signals in the channel for using the storage device And the unit selects one of the specified ones; and transmits the data writing command and the physical address to the designated one of the storage subunits through a data line in the channel shared by the storage subunit. 如申請專利範圍第14項所述的快閃記憶體之廢料收集裝置,其中,上述處理單元透過上述資料線傳送m個頁面的有效資料給上述指定的儲存子單元。 The flash memory collection device of claim 14, wherein the processing unit transmits the valid data of the m pages to the designated storage subunit through the data line. 一種快閃記憶體之廢料收集裝置,包含:一通道,耦接於多個儲存子單元;一處理單元,耦接於上述通道,將n*m個頁面的有效資料的多個讀取命令進行排程,其中n代表共享一通道的上述儲存子單元的數量,m代表每一上述儲存子單元的最小寫入頁面的數量;除了接收相應於最後一讀取命令及實體位址的有效資料外,於接收相應於每一已傳送的資料讀取命令及實體位址的有效資料前,傳送下一資料讀取命令及實體位址給上述儲存子單元中之指定下一者;以及從上述儲存子單元接收完上述n*m個頁面的有效資料後,寫入上述n*m個頁面的有效資料。 A flash memory collection device includes: a channel coupled to a plurality of storage subunits; a processing unit coupled to the channel to perform a plurality of read commands of valid data of n*m pages Scheduling, where n represents the number of said storage subunits sharing a channel, and m represents the number of minimum written pages of each of said storage subunits; in addition to receiving valid data corresponding to the last read command and physical address And transmitting the next data read command and the physical address to the designated one of the storage subunits before receiving the valid data corresponding to each transmitted data read command and the physical address; and storing from the foregoing After receiving the valid data of the above n*m pages, the subunit writes the valid data of the above n*m pages. 如申請專利範圍第16項所述的快閃記憶體之廢料收集裝 置,其中,上述處理單元將上述n*m個頁面的有效資料儲存於一動態隨機存取記憶體。 The waste storage device of the flash memory as described in claim 16 of the patent application scope The processing unit stores the valid data of the n*m pages in a dynamic random access memory. 如申請專利範圍第16項所述的快閃記憶體之廢料收集裝置,其中,上述資料讀取命令及上述實體位址透過上述通道中由上述儲存子單元共享的一資料線傳送,以及上述每一頁面的有效資料透過上述資料線接收。 The flash memory collection device of claim 16, wherein the data read command and the physical address are transmitted through a data line shared by the storage subunit in the channel, and each of the foregoing The valid data of a page is received through the above data line.
TW106122828A 2015-12-09 2015-12-09 Methods for garbage collection in a flash memory and apparatuses using the same TWI631565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106122828A TWI631565B (en) 2015-12-09 2015-12-09 Methods for garbage collection in a flash memory and apparatuses using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106122828A TWI631565B (en) 2015-12-09 2015-12-09 Methods for garbage collection in a flash memory and apparatuses using the same

Publications (2)

Publication Number Publication Date
TW201735046A TW201735046A (en) 2017-10-01
TWI631565B true TWI631565B (en) 2018-08-01

Family

ID=61021641

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106122828A TWI631565B (en) 2015-12-09 2015-12-09 Methods for garbage collection in a flash memory and apparatuses using the same

Country Status (1)

Country Link
TW (1) TWI631565B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI688956B (en) * 2019-08-28 2020-03-21 群聯電子股份有限公司 Memory control method, memory storage device and memory control circuit unit
CN112445418A (en) * 2019-09-05 2021-03-05 群联电子股份有限公司 Memory control method, memory storage device and memory control circuit unit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8266501B2 (en) * 2009-09-29 2012-09-11 Micron Technology, Inc. Stripe based memory operation
US20130080685A1 (en) * 2011-09-28 2013-03-28 Samsung Electronics Co. Ltd. Storage devices and methods of driving storage devices
WO2013048023A2 (en) * 2011-09-29 2013-04-04 한양대학교 산학협력단 Method and apparatus for power loss recovery in a flash memory-based ssd
US20150026389A1 (en) * 2013-07-17 2015-01-22 Lite-On It Corporation Block grouping method for solid state drive

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8266501B2 (en) * 2009-09-29 2012-09-11 Micron Technology, Inc. Stripe based memory operation
US20130080685A1 (en) * 2011-09-28 2013-03-28 Samsung Electronics Co. Ltd. Storage devices and methods of driving storage devices
US8898414B2 (en) * 2011-09-28 2014-11-25 Samsung Electronics Co., Ltd. Storage devices and methods of driving storage devices
WO2013048023A2 (en) * 2011-09-29 2013-04-04 한양대학교 산학협력단 Method and apparatus for power loss recovery in a flash memory-based ssd
US20150026389A1 (en) * 2013-07-17 2015-01-22 Lite-On It Corporation Block grouping method for solid state drive

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI688956B (en) * 2019-08-28 2020-03-21 群聯電子股份有限公司 Memory control method, memory storage device and memory control circuit unit
CN112445418A (en) * 2019-09-05 2021-03-05 群联电子股份有限公司 Memory control method, memory storage device and memory control circuit unit
CN112445418B (en) * 2019-09-05 2023-02-24 群联电子股份有限公司 Memory control method, memory storage device and memory control circuit unit

Also Published As

Publication number Publication date
TW201735046A (en) 2017-10-01

Similar Documents

Publication Publication Date Title
US11199996B2 (en) Method of scheduling requests to banks in a flash controller
KR101663437B1 (en) Host-assisted compaction of memory blocks
TWI512467B (en) Methods for maintaining a storage mapping table and apparatuses using the same
TWI512609B (en) Methods for scheduling read commands and apparatuses using the same
US20080195833A1 (en) Systems, methods and computer program products for operating a data processing system in which a file system&#39;s unit of memory allocation is coordinated with a storage system&#39;s read/write operation unit
US8996794B2 (en) Flash memory controller
TWI467574B (en) Memory storage device, memory controller thereof, and data transmission method thereof
TWI612473B (en) Methods for garbage collection and apparatuses using the same
CN101441597B (en) Control method of adjustable mixed-density memory storage device and popular data control module
US20200104074A1 (en) Just in time data placement in nand flash
US20170060427A1 (en) Methods for scheduling read and write commands and apparatuses using the same
TW201631592A (en) Methods for reading data from a storage unit of a flash memory and apparatuses using the same
US20170147235A1 (en) Memory system controlling interleaving write to memory chips
TWI545433B (en) Methods for maintaining a storage mapping table and apparatuses using the same
TWI631565B (en) Methods for garbage collection in a flash memory and apparatuses using the same
TWI602186B (en) Methods for garbage collection in a flash memory and apparatuses using the same
CN108536475B (en) Complete programming command processing method and device
US10387076B2 (en) Methods for scheduling data-programming tasks and apparatuses using the same
CN109508205B (en) NVM chip supporting in-situ operation, operation method thereof and solid-state storage device
TW201721439A (en) Methods for scheduling read and write commands and apparatuses using the same