TWI607457B - Solid state device and data writing method thereof - Google Patents
Solid state device and data writing method thereof Download PDFInfo
- Publication number
- TWI607457B TWI607457B TW105120332A TW105120332A TWI607457B TW I607457 B TWI607457 B TW I607457B TW 105120332 A TW105120332 A TW 105120332A TW 105120332 A TW105120332 A TW 105120332A TW I607457 B TWI607457 B TW I607457B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- flash memory
- host
- buffer
- write data
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 80
- 239000007787 solid Substances 0.000 title claims description 44
- 230000015654 memory Effects 0.000 claims description 151
- 239000000872 buffer Substances 0.000 claims description 94
- 239000010410 layer Substances 0.000 description 18
- 238000010586 diagram Methods 0.000 description 17
- 239000000463 material Substances 0.000 description 5
- 238000002347 injection Methods 0.000 description 4
- 239000007924 injection Substances 0.000 description 4
- 239000002356 single layer Substances 0.000 description 4
- 238000009826 distribution Methods 0.000 description 3
- 239000013078 crystal Substances 0.000 description 2
- 239000012536 storage buffer Substances 0.000 description 2
- 239000000969 carrier Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Read Only Memory (AREA)
Description
本發明是有關於一種固態儲存裝置及其控制方法,特別是有關於一種固態儲存裝置及其收到清除指令(flush command)時的資料寫入方法。 The present invention relates to a solid state storage device and a control method thereof, and more particularly to a solid state storage device and a data writing method when a flush command is received.
固態儲存裝置(Solid State Device,SSD)使用反及閘快閃記憶體(NAND flash memory)為主要儲存元件,而快閃記憶體為一種非揮發性(non-volatile)記憶體。也就是說,當資料寫入快閃記憶體後,即使系統電源關閉,資料仍保存在快閃記憶體中。 Solid State Device (SSD) uses NAND flash memory as the main storage component, while flash memory is a non-volatile memory. That is, when data is written to the flash memory, the data is saved in the flash memory even if the system power is turned off.
請參照第1A圖,其所繪示為固態儲存裝置中快閃記憶體的晶胞排列示意圖。快閃記憶體105由複數個晶胞排列成一記憶體陣列(memory array),而每個晶胞內包括一個浮動閘電晶體(floating gate transistor)。在進行編程(program)時,係將熱載子(hot carrier)注入(inject)浮動閘電晶體的浮動閘極,而根據注入熱載子的數量即可改變浮動閘電晶體的臨限電壓(threshold voltage),並進而決定該晶胞的儲存狀態。並且,於抹除(erase)時,是將熱載子退出(eject)浮動閘電晶體的浮動閘極。再者,利用字元線(word line)WL(n-1)、WL(n)、WL(n+1)可控制一列(row)的晶胞。意即,動作一條字元線即可編程該條字元線所對應的一列晶胞。 Please refer to FIG. 1A, which is a schematic diagram of a cell arrangement of a flash memory in a solid state storage device. The flash memory 105 is arranged by a plurality of cells into a memory array, and each cell includes a floating gate transistor. In the programming, the hot carrier is injected into the floating gate of the floating gate transistor, and the threshold voltage of the floating gate transistor can be changed according to the number of injected hot carriers ( Voltage Voltage), and in turn determines the storage state of the unit cell. Moreover, in the erasing, the hot carrier is ejected from the floating gate of the floating gate transistor. Furthermore, a row of cells can be controlled by word lines WL(n-1), WL(n), WL(n+1). That is, the action of one word line can program a column of cells corresponding to the word line.
快閃記憶體依據不同的設計,可分為單層晶胞(single-level cell,SLC)與多層晶胞(multi-level cell)的快閃記憶體。而多層晶胞更可包括二層晶胞(double-level cell)、三層晶胞(triple-level cell),或者更多層晶胞的快閃記憶體。 According to different designs, flash memory can be divided into single-level cell (SLC) and multi-level cell flash memory. The multi-layer cell may further include a double-level cell, a triple-level cell, or a flash memory of more layers of cells.
請參照第1B圖,其所繪示為各種快閃記憶體中的儲存狀態與臨限電壓的關係示意圖。在單層晶胞快閃記憶體中,每個晶胞可儲存一位元的資料(1bit/cell)。因此,根據熱載子的注入量,晶胞中的浮動閘電晶體可產生二種臨限電壓分佈,用以代表二種相異的儲存狀態。舉例來說,具備低臨限電壓之晶胞可視為儲存狀態“0”之晶胞;具備高臨限電壓之晶胞可視為儲存狀態“1”之晶胞。當然,此處的儲存狀態“0”與儲存狀態“1”僅是表示相異的二個儲存狀態,當然也可以用第一儲存狀態與第二儲存狀態來表示。舉例來說,臨限電壓在0V附近的晶胞可視為具有第一儲存狀態之晶胞;臨限電壓在10V附近的晶胞可視為具有第二儲存狀態之晶胞。 Please refer to FIG. 1B, which is a schematic diagram showing the relationship between the storage state and the threshold voltage in various flash memories. In a single-layer cell flash memory, each cell can store one bit of data (1 bit/cell). Therefore, depending on the amount of hot carrier injection, the floating gate transistor in the unit cell can generate two threshold voltage distributions to represent two different storage states. For example, a cell with a low threshold voltage can be considered a cell with a storage state of "0"; a cell with a high threshold voltage can be considered a cell with a storage state of "1". Of course, the storage state “0” and the storage state “1” herein are only two storage states that are different, and may of course be represented by the first storage state and the second storage state. For example, a cell with a threshold voltage near 0V can be considered a cell with a first storage state; a cell with a threshold voltage of around 10V can be considered a cell with a second storage state.
同理,在二層晶胞快閃記憶體中,每個晶胞可儲存二位元的資料(2bits/cell)。因此,根據熱載子的注入量,晶胞中 的浮動閘電晶體可產生四種臨限電壓分佈,用以代表四種相異的儲存狀態。例如,臨限電壓由低至高可用以依序代表儲存狀態“00”、儲存狀態“01”、儲存狀態“10”與儲存狀態“11”。 Similarly, in a two-layer cell flash memory, each cell can store two bits of data (2 bits/cell). Therefore, according to the amount of hot carrier injection, in the unit cell The floating gate transistor produces four threshold voltage distributions that represent four distinct storage states. For example, the threshold voltage is available from low to high to sequentially represent the storage state "00", the storage state "01", the storage state "10", and the storage state "11".
在三層晶胞快閃記憶體中,每個晶胞可儲存三位元的資料(3bits/cell)。因此,根據熱載子的注入量,晶胞中的浮動閘電晶體可產生八種臨限電壓分佈,用以代表八種相異的儲存狀態。例如,臨限電壓由低至高可用以依序代表儲存狀態“000”、儲存狀態“001”、儲存狀態“010”、儲存狀態“011”、儲存狀態“100”、儲存狀態“101”、儲存狀態“110”與儲存狀態“111”。 In a three-layer cell flash memory, each cell can store three bits of data (3 bits/cell). Therefore, depending on the amount of hot carrier injection, the floating gate transistor in the unit cell can produce eight threshold voltage distributions to represent eight different storage states. For example, the threshold voltage is available from low to high to sequentially represent the storage state "000", the storage state "001", the storage state "010", the storage state "011", the storage state "100", the storage state "101", and the storage. State "110" and storage state "111".
由以上說明可知,在編程快閃記憶體時,控制晶胞的熱載子注入量,即可改變晶胞的臨限電壓並更改其儲存狀態。然而,除了單層晶胞快閃記憶體在編程動作時,可僅需對晶胞進行一次編程程序(program procedure)即可以達到想要的臨限電壓,亦即達到想要的儲存狀態之外,其他多層晶胞快閃記憶於編程動作時,大多會對晶胞進行多次編程程序以到達想要的臨限電壓,亦即達到想要的儲存狀態。 It can be seen from the above description that when programming the flash memory, the amount of hot carrier injection of the unit cell can be controlled, and the threshold voltage of the unit cell can be changed and the storage state can be changed. However, in addition to the single-layer cell flash memory during programming, it is only necessary to perform a program procedure on the cell to achieve the desired threshold voltage, that is, to achieve the desired storage state. When other multi-layer cell flash memory is programmed, most of the cells are programmed to reach the desired threshold voltage, that is, to achieve the desired storage state.
請參照第2圖,其所繪示為三層晶胞快閃記憶體(以下簡稱為TLC快閃記憶體)的編程示意圖。舉例來說,如第2圖中的實線所示,當欲將TLC快閃記憶體的晶胞編程為儲存狀態“100”時,會對晶胞進行三次編程程序。於第一次編程程序時,先將TLC快閃記憶體的晶胞的臨限電壓改變為接近儲存狀態“111”的臨限電壓。接著,於第二次編程程序時,再改變為接近儲存狀 態“101”的臨限電壓。最後,於第三次編程程序時,再改變為儲存狀態“100”的臨限電壓,使晶胞編程為儲存狀態“100”。 Please refer to FIG. 2 , which is a schematic diagram of programming of a three-layer cell flash memory (hereinafter referred to as TLC flash memory). For example, as shown by the solid line in FIG. 2, when the cell of the TLC flash memory is to be programmed to the storage state "100", the unit cell is subjected to three programming procedures. In the first programming procedure, the threshold voltage of the cell of the TLC flash memory is first changed to a threshold voltage close to the storage state "111". Then, in the second programming process, change to near storage The threshold voltage of the state "101". Finally, in the third programming procedure, the threshold voltage of the storage state "100" is changed to program the cell to the storage state "100".
由以上的說明可知,於編程TLC快閃記憶體時,會根據欲編程的儲存狀態,來決定對應的編程程序。舉例來說,如第2圖中的虛線所示,假設欲將TLC快閃記憶體的晶胞編程為儲存狀態“011”時,會先將晶胞的臨限電壓改變為接近儲存狀態“000”的臨限電壓,接著改變為接近儲存狀態“010”的臨限電壓,最後改變為儲存狀態“011”的臨限電壓,使晶胞編程為儲存狀態“011”。同理,其他儲存狀態的三次編程程序也可以依此類推,不再贅述。一般而言,於編程多層快閃記憶體時,會通過多次的編程程序,逐步改變晶胞的臨限電壓,使晶胞的臨限電壓最後落在對應儲存狀態的對應臨限電壓範圍內。 As can be seen from the above description, when programming the TLC flash memory, the corresponding programming program is determined according to the storage state to be programmed. For example, as shown by the dotted line in FIG. 2, assuming that the cell of the TLC flash memory is to be programmed to the storage state "011", the threshold voltage of the cell is first changed to the near storage state "000". The threshold voltage is then changed to a threshold voltage close to the storage state "010", and finally changed to a threshold voltage of the storage state "011" to program the cell to the storage state "011". Similarly, the three programming procedures of other storage states can be deduced by analogy, and will not be described again. Generally speaking, when programming a multi-layer flash memory, the threshold voltage of the unit cell is gradually changed through multiple programming procedures, so that the threshold voltage of the unit cell finally falls within the corresponding threshold voltage range corresponding to the storage state. .
根據上述,由於多層晶胞快閃記憶於編程動作時,須對晶胞進行多次編程程序才可使晶胞達到想要的臨限電壓,並使晶胞編程成想要的儲存狀態,因此,若晶胞的編程程序未達到所需的編程次數,則表示欲儲存至晶胞的資料尚未被儲存至晶胞,如此,欲儲存至晶胞的資料將無法從晶胞讀取出來。 According to the above, since the multi-layer cell flash memory is programmed in the programming action, the cell must be programmed a plurality of times to achieve the desired threshold voltage and the cell is programmed to the desired storage state. If the programming procedure of the unit cell does not reach the required number of programming, it means that the data to be stored to the unit cell has not been stored in the unit cell, so that the data to be stored to the unit cell cannot be read from the unit cell.
一般而言,快閃記憶體寫入資料時是以頁(page)為單位來寫入快閃記憶體。頁的大小可由快閃記憶體製造商來定義,舉例來說,每一頁可為2K bytes、4K bytes或者8K bytes。以4K bytes大小的頁為例,寫入資料包括:使用者資料、編碼資料與其他相關資料,總共為4224bytes(亦即,4224×8bits)。 In general, when flash memory writes data, it is written to the flash memory in units of pages. The size of the page can be defined by the flash memory manufacturer, for example, each page can be 2K bytes, 4K bytes or 8K bytes. Taking a page of 4K bytes size as an example, the written data includes: user data, coded data and other related materials, which are 4224 bytes (that is, 4224×8 bits).
換言之,如果利用單層晶胞快閃記憶體來儲存一個4K bytes頁的資料時,則需要利用(4224×8)數目的單層晶胞來儲存。再者,由於二層晶胞快閃記憶體的資料密度較高,其每個晶胞可儲存二位元的資料(2bits/cell),所以(4224×8)數目的二層晶胞可以儲存二個頁的資料(2×4224bytes)。同理,在三層晶胞快閃記憶體中,(4224×8)數目的三層晶胞可以儲存三個頁的資料(3×4224bytes)。 In other words, if a single-layer cell flash memory is used to store a 4K bytes page of data, it is necessary to use a (4224 × 8) number of single-layer cells for storage. Furthermore, since the data density of the two-layer cell flash memory is high, each cell can store two bits of data (2 bits/cell), so the number of (4224×8) two-layer cells can be stored. Two pages of information (2 × 4224 bytes). Similarly, in a three-layer cell flash memory, a (4224 × 8) number of three-layer cells can store three pages of data (3 × 4224 bytes).
再者,快閃記憶體的每一字元線可設定為包含上述(4224×8)數目的晶胞,以便對上述(4224×8)數目的晶胞同時進行編程動作。換句話說,在三層晶胞快閃記憶體中,每一字元線的晶胞可儲存三個頁的資料,且每一字元線的晶胞需經過三次編程程序,才完成該字元線的晶胞的編程動作。此外,在部分多層晶胞快閃記憶體的設計架構中,其於編程多層晶胞快閃記憶體時並非針對同一字元線的晶胞連續進行多次編程程序,以完成該字元線的晶胞的編程動作。以下將以TLC快閃記憶體的編程動作來進行說明。 Furthermore, each word line of the flash memory can be set to contain the above (4224 × 8) number of cells to simultaneously perform programming operations on the above (4224 × 8) number of cells. In other words, in a three-layer cell flash memory, the cell of each word line can store three pages of data, and the cell of each word line has to undergo three programming procedures to complete the word. The programming action of the unit cell of the element line. In addition, in the design structure of the partial multi-layer cell flash memory, when programming the multi-layer cell flash memory, the cell of the same word line is not continuously programmed a plurality of times to complete the word line. The programming action of the unit cell. The following describes the programming operation of the TLC flash memory.
請參照第3圖,其所繪示為固態儲存裝置示意圖。固態儲存裝置300中包括一控制器301、一緩衝器307與一TLC快閃記憶體305。控制器301連接至緩衝器307與TLC快閃記憶體305。再者,控制器301利用一外部匯流排310與主機(host)320之間進行指令與資料的傳遞。 Please refer to FIG. 3, which is a schematic diagram of a solid state storage device. The solid state storage device 300 includes a controller 301, a buffer 307 and a TLC flash memory 305. Controller 301 is coupled to buffer 307 and TLC flash memory 305. Moreover, the controller 301 utilizes an external bus bar 310 and a host 320 to transfer instructions and data.
基本上,當主機320提供主機資料(host data)欲寫入 TLC快閃記憶體305時,控制器301會先將主機資料進行ECC編碼程序,並且將主機資料編碼(encode)為主機寫入資料(host write data)暫存於緩衝器307。之後,控制器301會適時的執行編程動作,將緩衝器307中的主機寫入資料儲存於TLC快閃記憶體305。其中,緩衝器307係為SRAM或者DRAM,其暫存的資料會隨著供應電源消失而不見;外部匯流排310可為USB匯流排、IEEE 1394匯流排、PCIe匯流排或SATA匯流排等等。 Basically, when host 320 provides host data to be written When the TLC flash memory 305, the controller 301 first performs the ECC encoding process on the host data, and encodes the host data as the host write data in the buffer 307. Thereafter, the controller 301 performs a programming operation in a timely manner, and stores the host write data in the buffer 307 in the TLC flash memory 305. The buffer 307 is an SRAM or a DRAM, and the temporarily stored data is invisible as the power supply disappears; the external bus 310 can be a USB bus, an IEEE 1394 bus, a PCIe bus, or a SATA bus.
另外,由於多層晶胞快閃記憶體的特性,其編程次序(program order)具有一定的規範。請參照第4A圖與第4B圖,其所繪示為TLC快閃記憶體的編程次序示意圖。以下的說明係以4K bytes的頁為例來進行說明,其中一頁的主機寫入資料包括:使用者資料、編碼資料與其他相關資料,總共為4224bytes(亦即,4224×8bits)。 In addition, due to the characteristics of the multi-layer cell flash memory, its program order has certain specifications. Please refer to FIG. 4A and FIG. 4B , which are schematic diagrams showing the programming sequence of the TLC flash memory. The following description uses a 4K bytes page as an example. The host write data of one page includes: user data, coded data and other related materials, which are 4224 bytes (that is, 4224×8 bits).
基本上,TLC快閃記憶體305中有多個區塊(block),每一個區塊中有多個頁,且每三個頁的主機寫入資料可對應的儲存至同一字元線。第4A圖與第4B圖僅以TLC快閃記憶體305中的開啟區塊(open block)為例,並以對應的字元線來說明編程次序。當此開啟區塊寫滿之後,會被控制器301設為關閉區塊(closed block)。之後,控制器301會尋找TLC快閃記憶體305中的另一個空白區塊(blank block),並設定為開啟區塊(opened block)。接著,以相同的編程次序來將主機寫入資料儲存於開啟區塊。 Basically, the TLC flash memory 305 has a plurality of blocks, each of which has a plurality of pages, and the host write data of each three pages can be correspondingly stored to the same word line. 4A and 4B are only taken as an example of an open block in the TLC flash memory 305, and the programming order is illustrated by corresponding word lines. When this open block is full, it will be set to a closed block by the controller 301. Thereafter, the controller 301 looks for another blank block in the TLC flash memory 305 and sets it as an open block. Next, the host write data is stored in the open block in the same programming order.
如第4A圖所示,固態儲存裝置300收到12頁的主機資料,經過ECC編碼程序後,依序產生A~L共12頁的主機寫入資料暫存於緩衝器307中。 As shown in FIG. 4A, the solid state storage device 300 receives 12 pages of host data, and after the ECC encoding process, sequentially generates a total of 12 pages of host write data of A to L temporarily stored in the buffer 307.
如前所述,TLC快閃記憶體305中的每一字元線可儲存三頁的資料。舉例來說,如第4A圖所示,第A~C頁的主機寫入資料將會儲存於第一字元線的TLC晶胞中。同理,第D~F頁的主機寫入資料將會儲存於第二字元線的TLC晶胞中;第G~I頁的主機寫入資料將會儲存於第三字元線的TLC晶胞中;第J~L頁的主機寫入資料將會儲存於第四字元線的TLC晶胞中。 As previously mentioned, each word line in the TLC flash memory 305 can store three pages of data. For example, as shown in FIG. 4A, the host write data of pages A to C will be stored in the TLC cell of the first word line. Similarly, the host write data of the D~F page will be stored in the TLC cell of the second word line; the host write data of the G~I page will be stored in the TLC crystal of the third word line. In the cell; the host write data of the Jth to the Lth page will be stored in the TLC unit cell of the fourth character line.
再者,根據規格書的規範,於TLC快閃記憶體305進行編程動作時,其編程次序如第4B圖所示。首先,控制器301動作(activate)第一字元線,進行第一次編程程序(1st);接著,動作第二字元線,進行第二次編程程序(2nd);接著,動作第一字元線,進行第三次編程程序(3rd);接著,動作第三字元線,進行第四次編程程序(4th);接著,動作第二字元線,進行第五次編程程序(5th);接著,動作第一字元線,進行第六次編程程序(6th);接著,動作第四字元線,進行第七次編程程序(7th);接著,動作第三字元線,進行第八次編程程序(8th);接著,動作第二字元線,進行第九次編程程序(9th)。 Furthermore, when the TLC flash memory 305 is programmed in accordance with the specification of the specification, the programming sequence is as shown in FIG. 4B. First, the controller 301 activates the first word line to perform the first programming process (1st); then, the second character line operates to perform the second programming process (2nd); then, the action first word The third line, the third programming program (3rd); then, the third character line is operated, and the fourth programming program (4th) is performed; then, the second character line is operated, and the fifth programming program (5th) is performed. Then, the first character line is operated to perform the sixth programming procedure (6th); then, the fourth character line is operated, and the seventh programming procedure (7th) is performed; then, the third character line is operated, and the third Eight programming procedures (8th); then, the second character line is acted upon for the ninth programming procedure (9th).
由第4B圖所示的編程次序可知,於TLC快閃記憶體305中,須經過三次的編程程序才會使一特定字元線的TLC晶胞成為完成編程狀態。如第4B圖所示,控制器301經過六次編 成程序才完成第一字元線的TLC晶胞的三次編程程序,並使第一字元線的TLC晶胞成為完成編程狀態。進一步而言,控制器301分別於第一次編程程序(1st)、第三次編程程序(3rd)與第六次編程程序(6th)中進行第一字元線的三次編程程序,使第一字元線的TLC晶胞達到對應於第A~C頁的主機寫入資料的臨限電壓,以將第A~C頁的主機寫入資料儲存於第一字元線的TLC晶胞中。 As can be seen from the programming sequence shown in FIG. 4B, in the TLC flash memory 305, the programming process of three times requires the TLC cell of a particular word line to be in a programmed state. As shown in FIG. 4B, the controller 301 is edited six times. The program completes the three-time programming of the TLC cell of the first word line and causes the TLC cell of the first word line to be in a programmed state. Further, the controller 301 performs a three-time programming process of the first word line in the first programming program (1st), the third programming program (3rd), and the sixth programming program (6th), respectively, to make the first The TLC cell of the word line reaches the threshold voltage corresponding to the host write data of pages A~C, so that the host write data of the A~C page is stored in the TLC cell of the first word line.
因此,當控制器301完成第一次編程程序(1st)、第三次編程程序(3rd)與第六次編程程序(6th)之後,才可確認第一字元線的TLC晶胞為完成編程狀態,意即第A~C頁的主機寫入資料已儲存於第一字元線的TLC晶胞中。同理,當控制器301完成第二次編程程序(2nd)、第五次編程程序(5th)與第九次編程程序(9th)之後,才可確認第二字元線的TLC晶胞為完成編程狀態,意即第D~F頁的主機寫入資料已儲存於第二字元線的TLC晶胞中。 Therefore, when the controller 301 completes the first programming process (1st), the third programming process (3rd), and the sixth programming process (6th), it can be confirmed that the TLC cell of the first word line is completed programming. State, meaning that the host write data of pages A~C has been stored in the TLC cell of the first word line. Similarly, when the controller 301 completes the second programming process (2nd), the fifth programming process (5th), and the ninth programming process (9th), it can be confirmed that the TLC cell of the second word line is completed. The programming state, that is, the host write data of the D~F page has been stored in the TLC cell of the second word line.
另外,在控制器301完成第九次編程程序(9th)之後,若主機320仍未提供其他新的主機資料,此時,由於緩衝器307中並沒有主機寫入資料可儲存於TLC快閃記憶體305中的第五字元線的TLC晶胞。因此,受限於TLC快閃記憶體305的編程次序限制,當控制器301無法對第五字元線的TLC晶胞進行編程程序時,控制器301也無法對第四字元線的TLC晶胞以及第三字元線的TLC晶胞進行後續的編程程序。換句話說,TLC快閃記憶體305中,第三字元線的TLC晶胞僅進行二次編程程序,而第四字元線的TLC晶胞僅進行一次編程程序,所以第三字元線與第 四字元線的TLC晶胞為尚未完成編程狀態。 In addition, after the controller 301 completes the ninth programming procedure (9th), if the host 320 still does not provide other new host data, at this time, since there is no host write data in the buffer 307, it can be stored in the TLC flash memory. The TLC unit cell of the fifth word line in body 305. Therefore, limited by the programming order limitation of the TLC flash memory 305, when the controller 301 cannot program the TLC cell of the fifth word line, the controller 301 cannot perform the TLC crystal of the fourth word line. The cell and the TLC cell of the third word line perform subsequent programming procedures. In other words, in the TLC flash memory 305, the TLC cell of the third word line is only subjected to a secondary programming process, and the TLC cell of the fourth word line is only programmed once, so the third word line And the first The TLC cell of the four-character line is not yet programmed.
因此,必須等待主機320提供新的主機資料並轉換為主機寫入資料儲存至緩衝器307之後,控制器301才可再次根據編程次序來運作,並依序使第三字元線的TLC晶胞與第四字元線的TLC晶胞成為完成編程狀態。換句話說,第三字元線的TLC晶胞尚需經過一次編程程序才可成為完成編程狀態,而第四字元線的TLC晶胞尚需經過二次編程程序才可成為完成編程狀態。 Therefore, after waiting for the host 320 to provide new host data and convert it to the host write data storage to the buffer 307, the controller 301 can again operate according to the programming order, and sequentially make the TLC cell of the third word line. The TLC cell with the fourth word line becomes the programmed state. In other words, the TLC cell of the third word line still needs to be programmed once to complete the programming state, and the TLC cell of the fourth word line still needs to undergo a secondary programming process to complete the programming state.
基本上,當一字元線的TLC晶胞為完成編程狀態(經過三次編程程序)時,其儲存的資料可經由控制器301的ECC解碼程序(ECC decoding procedure)而被讀取。反之,當一字元線的TLC晶胞為尚未完成編程狀態(未經過三次編程程序)時,由於TLC晶胞尚未達到對應的臨限電壓,因此其所對應儲存的資料將無法經由控制器301的ECC解碼程序而被正確的讀取。舉例來說,第三字元線的TLC晶胞為尚未完成編程狀態,在此狀態下,其所對應儲存的第G~I頁的主機寫入資料將無法經由控制器301的ECC解碼程序而被正確的讀取。 Basically, when a TLC cell of a word line is in a programmed state (after three programming procedures), its stored data can be read via the ECC decoding procedure of the controller 301. Conversely, when the TLC cell of a word line is not yet programmed (not through three programming procedures), since the TLC cell has not reached the corresponding threshold voltage, the corresponding stored data will not pass through the controller 301. The ECC decoding program is correctly read. For example, the TLC cell of the third word line is not yet programmed, and in this state, the host write data of the Gth to the Gth page corresponding to the storage will not be able to pass the ECC decoding process of the controller 301. Was read correctly.
由以上的說明可知,第4B圖中的第三字元線的TLC晶胞以及第四字元線的TLC晶胞皆為尚未完成編程狀態,而控制器301必須等到主機320提供其他新的主機資料之後,才可以根據TLC快閃記憶體305的編程次序來繼續進行編程程序,如此才可使得第三字元線的TLC晶胞以及第四字元線的TLC晶胞成為完成編程狀態,且其所對應儲存的資料才可被正確的讀取。 As can be seen from the above description, the TLC cell of the third word line and the TLC cell of the fourth word line in FIG. 4B are all not yet programmed, and the controller 301 must wait until the host 320 provides other new hosts. After the data, the programming procedure can be continued according to the programming order of the TLC flash memory 305, so that the TLC cell of the third word line and the TLC cell of the fourth word line can be completed, and The data stored in it can be read correctly.
當主機320傳遞清除指令(flush command)時,控制器301必須確認緩衝器307中暫存的主機寫入資料已全部儲存於TLC快閃記憶體305內,亦即儲存緩衝器307中暫存的主機寫入資料的晶胞皆為完成編程狀態。接著,控制器301才可清除緩衝器307中的暫存資料。 When the host 320 transmits a flush command, the controller 301 must confirm that the host write data temporarily stored in the buffer 307 has been stored in the TLC flash memory 305, that is, temporarily stored in the storage buffer 307. The unit cells written by the host are all in the programmed state. Then, the controller 301 can clear the temporary data in the buffer 307.
以第4B圖為例來進行說明,由於主機並未傳遞新的主機資料,因此,當主機320傳遞清除指令(flush command)時,為了讓緩衝器307中第G~L頁的主機寫入資料儲存至第三字元線的TLC晶胞與第四字元線的TLC晶胞內,控制器301會先自行產生冗餘寫入資料(redundant write data)暫存於緩衝器307後,再執行編程動作將緩衝器307中的寫入資料儲存至TLC快閃記憶體305。 Taking FIG. 4B as an example, since the host does not transfer the new host data, when the host 320 transmits a flush command, in order to write the data of the host of the Gth to the Lth page in the buffer 307. Stored in the TLC cell of the third word line and the TLC cell of the fourth word line, the controller 301 first generates the redundant write data to be temporarily stored in the buffer 307, and then executes The programming action stores the write data in buffer 307 to TLC flash memory 305.
請參照第5A圖,其所繪示為習知固態儲存裝置的資料寫入方法流程圖。此流程圖主要在說明固態儲存裝置300收到清除指令時的動作流程。在正常運作的情況下,於接收到主機的寫入指令時,控制器301可接收主機資料,並轉換為主機寫入資料暫存於緩衝器307。 Please refer to FIG. 5A, which is a flow chart of a data writing method of a conventional solid state storage device. This flowchart is mainly for explaining the action flow when the solid state storage device 300 receives the clear command. In the normal operation, when receiving a write command from the host, the controller 301 can receive the host data and convert it to the host write data for temporary storage in the buffer 307.
當控制器301收到主機320發出的清除指令後(步驟S502),為了將緩衝器307中暫存的主機寫入資料儲存至TLC快閃記憶體305。控制器301產生冗餘寫入資料暫存於緩衝器307中(步驟S504)。之後,控制器301進行編程動作,將緩衝器307中的寫入資料根據編程次序儲存至TLC快閃記憶體305的開啟區 塊(步驟S506)。 When the controller 301 receives the clear command from the host 320 (step S502), in order to store the host write data temporarily stored in the buffer 307 to the TLC flash memory 305. The controller 301 generates redundant write data temporarily stored in the buffer 307 (step S504). Thereafter, the controller 301 performs a programming operation to store the written data in the buffer 307 to the open area of the TLC flash memory 305 according to the programming order. Block (step S506).
請參照第5B圖與第5C圖,其所繪示為習知固態儲存裝置收到清除指令時的寫入資料的編程狀態示意圖。假設於第4B圖的情況下,主機320產生清除指令至固態儲存裝置300。 Please refer to FIG. 5B and FIG. 5C , which are schematic diagrams showing the programming state of the written data when the conventional solid state storage device receives the clear instruction. Assume in the case of FIG. 4B that host 320 generates a clear command to solid state storage device 300.
根據第5A圖的流程步驟可知。為了將緩衝器307中暫存的主機寫入資料儲存至TLC快閃記憶體305,控制器301產生6頁的冗餘寫入資料(Ra~Rf)暫存於緩衝器307中,如第5B圖所示。 It can be seen from the flow steps of Figure 5A. In order to store the host write data temporarily stored in the buffer 307 to the TLC flash memory 305, the controller 301 generates 6 pages of redundant write data (Ra~Rf) temporarily stored in the buffer 307, such as the 5B. The figure shows.
接著,如第5C圖所示,控制器301進行編程動作,將緩衝器307中的寫入資料根據編程次序儲存至TLC快閃記憶體305的開啟區塊。 Next, as shown in FIG. 5C, the controller 301 performs a program operation to store the write data in the buffer 307 to the open block of the TLC flash memory 305 according to the programming order.
意即,控制器301動作第五字元線,進行第十次編程程序(10th);接著,動作第四字元線,進行第十一次編程程序(11th);接著,動作第三字元線,進行第十二次編程程序(12th);接著,動作第六字元線,進行第十三次編程程序(13th);接著,動作第五字元線,進行第十四次編程程序(14th);接著,動作第四字元線,進行第十五次編程程序(15th)。 That is, the controller 301 operates the fifth character line to perform the tenth programming procedure (10th); then, the fourth character line is operated, and the eleventh programming procedure (11th) is performed; then, the third character is operated. Line, perform the twelfth programming procedure (12th); then, operate the sixth character line, perform the thirteenth programming procedure (13th); then, operate the fifth character line, and perform the fourteenth programming procedure ( 14th); Next, the fourth character line is operated, and the fifteenth programming procedure (15th) is performed.
明顯地,由第5C圖可知,進行完第十五次編程程序(15th)之後,第三字元線的TLC晶胞以及第四字元線的TLC晶胞已經成為完成編程狀態。換句話說,當習知固態儲存裝置收到清除指令時,控制器301會先產生冗餘寫入資料暫存於緩衝器307。之後,控制器301進行編程動作,將緩衝器307中的寫入 資料根據編程次序儲存至TLC快閃記憶體305,即可將緩衝器307中暫存的主機寫入資料全部儲存於TLC快閃記憶體305的開啟區塊內。 Obviously, as can be seen from FIG. 5C, after the fifteenth programming procedure (15th), the TLC cell of the third word line and the TLC cell of the fourth word line have become the completed programming state. In other words, when the conventional solid state storage device receives the clear command, the controller 301 first generates redundant write data to be temporarily stored in the buffer 307. Thereafter, the controller 301 performs a programming operation to write in the buffer 307. The data is stored in the TLC flash memory 305 according to the programming order, and the host write data temporarily stored in the buffer 307 can be stored in the open block of the TLC flash memory 305.
由於習知固態儲存裝置300的收到清除指令時,控制器301必須先產生冗餘寫入資料暫存於緩衝器307。假設主機320在傳送主機資料的過程中,不斷地發送清除指令。則控制器301也必須對應地產生冗餘寫入資料暫存於緩衝器307,並將冗餘寫入資料儲存至TLC快閃記憶體305。如第6圖所示,由於主機320在傳送主機資料的過程中,持續的發送清除指令。因此,TLC快閃記憶體305的一個開啟區塊中會交互穿插著主機寫入資料(Ho)以及冗餘寫入資料(R)。 Since the conventional solid state storage device 300 receives the clear command, the controller 301 must first generate redundant write data to be temporarily stored in the buffer 307. It is assumed that the host 320 continuously sends a clear command during the transfer of the host material. Then, the controller 301 must also correspondingly generate redundant write data temporarily stored in the buffer 307, and store the redundant write data to the TLC flash memory 305. As shown in FIG. 6, since the host 320 continuously transmits a clear command during the process of transferring the host data. Therefore, the host write data (Ho) and the redundant write data (R) are interspersed in an open block of the TLC flash memory 305.
眾所週知,冗餘寫入資料(R)是無效的資料(invalid data)。當主機320在傳送主機資料的過程中,持續的發送清除指令,將會造成TLC快閃記憶體305浪費空間來儲存無效的資料,並且降低固態儲存裝置300的使用效率。 As is well known, redundant write data (R) is invalid data. When the host 320 continuously sends a clear command during the transfer of the host data, the TLC flash memory 305 will waste space to store invalid data and reduce the use efficiency of the solid state storage device 300.
本發明係有關於一種固態儲存裝置的資料寫入方法,該固態儲存裝置具有一快閃記憶體,包含多個區塊,該資料寫入方法包括下列步驟:接收一清除指令;將一緩衝器中的一主機寫入資料根據一編程次序儲存至該快閃記憶體的一開啟區塊;執行一垃圾蒐集動作,由該快閃記憶體的一關閉區塊中取得 一蒐集的寫入資料並暫存於該緩衝器中;以及將該緩衝器中的該主機寫入資料及該蒐集的寫入資料根據該編程次序儲存至該快閃記憶體的該開啟區塊。 The invention relates to a data writing method for a solid-state storage device, the solid-state storage device having a flash memory comprising a plurality of blocks, the data writing method comprising the steps of: receiving a clear command; One of the host write data is stored in an open block of the flash memory according to a programming order; performing a garbage collection operation, which is obtained from a closed block of the flash memory a collected write data is temporarily stored in the buffer; and the host write data in the buffer and the collected write data are stored in the programming block to the open block of the flash memory .
本發明係有關於一種固態儲存裝置,連接至一主機,該固態儲存裝置包括:一緩衝器;一控制器,連接至該主機與該緩衝器,其中該控制器接收一主機資料並轉換為一主機寫入資料暫存於該緩衝器中;以及一快閃記憶體,連接至該控制器;其中,當接收該主機發出一清除指令時,該控制器將該主機寫入資料根據一編程次序儲存至該快閃記憶體的一開啟區塊;該控制器執行一垃圾蒐集動作,由該快閃記憶體的一關閉區塊中取得一蒐集的寫入資料並暫存於該緩衝器中;以及該控制器根據該編程次序,將該緩衝器中的一寫入資料儲存至該快閃記憶體的該開啟區塊,其中該寫入資料為該主機寫入資料或該蒐集的寫入資料。 The present invention relates to a solid state storage device connected to a host, the solid state storage device comprising: a buffer; a controller connected to the host and the buffer, wherein the controller receives a host data and converts it into a The host write data is temporarily stored in the buffer; and a flash memory is connected to the controller; wherein, when receiving the host to issue a clear command, the controller writes the host data according to a programming sequence Storing to an open block of the flash memory; the controller performs a garbage collection operation, obtaining a collected write data from a closed block of the flash memory and temporarily storing the data in the buffer; And the controller stores, according to the programming sequence, a write data in the buffer to the open block of the flash memory, wherein the write data is the host write data or the collected write data. .
為了對本發明之上述及其他方面有更佳的瞭解,下文特舉較佳實施例,並配合所附圖式,作詳細說明如下: In order to better understand the above and other aspects of the present invention, the preferred embodiments are described below, and in conjunction with the drawings, the detailed description is as follows:
300、700‧‧‧固態儲存裝置 300, 700‧‧‧ solid storage devices
301、701‧‧‧控制器 301, 701‧‧ ‧ controller
305、705‧‧‧TLC快閃記憶體 305, 705‧‧‧TLC flash memory
307、707‧‧‧緩衝器 307, 707‧‧ ‧ buffer
310、710‧‧‧外部匯流排 310, 710‧‧‧ External busbars
320、720‧‧‧主機 320, 720‧‧‧ host
S502~S506‧‧‧步驟流程 S502~S506‧‧‧Step procedure
S802~S808‧‧‧步驟流程 S802~S808‧‧‧Step process
第1A圖所繪示為固態儲存裝置中快閃記憶體的晶胞排列示意圖。 FIG. 1A is a schematic diagram showing a cell arrangement of a flash memory in a solid state storage device.
第1B圖所繪示為各種快閃記憶體中的儲存狀態與臨限電壓的關係示意圖。 FIG. 1B is a schematic diagram showing the relationship between the storage state and the threshold voltage in various flash memories.
第2圖所繪示為三層晶胞快閃記憶體的編程示意圖。 Figure 2 is a schematic diagram of the programming of a three-layer cell flash memory.
第3圖所繪示為固態儲存裝置示意圖。 Figure 3 is a schematic diagram of a solid state storage device.
第4A圖與第4B圖所繪示為TLC快閃記憶體的編程次序示意圖。 4A and 4B are schematic diagrams showing the programming sequence of the TLC flash memory.
第5A圖所繪示為習知固態儲存裝置的資料寫入方法流程圖。 FIG. 5A is a flow chart showing a method for writing data of a conventional solid state storage device.
第5B圖與第5C圖所繪示為習知固態儲存裝置收到清除指令時的寫入資料的編程狀態示意圖。 FIG. 5B and FIG. 5C are schematic diagrams showing the programmed state of the written data when the conventional solid state storage device receives the clear command.
第6圖為習知固態儲存裝置接收多次清除指令後,TLC快閃記憶體中資料的儲存示意圖。 Figure 6 is a schematic diagram of the storage of data in the TLC flash memory after the conventional solid state storage device receives the multiple clear command.
第7圖所繪示為本發明固態儲存裝置示意圖。 FIG. 7 is a schematic view of the solid state storage device of the present invention.
第8A圖所繪示為本發明固態儲存裝置的資料寫入方法流程圖。 FIG. 8A is a flow chart showing a method for writing data of the solid-state storage device of the present invention.
第8B圖與第8C圖所繪示為本發明固態儲存裝置收到清除指令時的寫入資料的編程狀態示意圖。 FIG. 8B and FIG. 8C are schematic diagrams showing the programming state of the written data when the solid-state storage device receives the clear command according to the present invention.
第9圖為本發明固態儲存裝置接收多次清除指令後,TLC快閃記憶體中資料的儲存示意圖。 FIG. 9 is a schematic diagram showing the storage of data in the TLC flash memory after the solid state storage device receives the multiple clear command.
本發明提出一種固態儲存裝置及其資料寫入方法,其可運用於固態儲存裝置收到清除指令時的資料寫入方法。 The invention provides a solid state storage device and a data writing method thereof, which can be applied to a data writing method when a solid state storage device receives a clearing instruction.
請參照第7圖,其所繪示為固態儲存裝置示意圖。固態儲存裝置700中包括一控制器701、一緩衝器707與一快閃 記憶體705。控制器701連接至緩衝器707與快閃記憶體705。再者,控制器701利用一外部匯流排710與主機720之間進行指令與資料的傳遞。其中,控制器701無法對快閃記憶體705中的晶胞連續進行多次編程程序。在本發明實施例中,快閃記憶體705可為一多層晶胞快閃記憶體,並具有特定的編程次序。 Please refer to FIG. 7 , which is a schematic diagram of a solid state storage device. The solid state storage device 700 includes a controller 701, a buffer 707 and a flash Memory 705. The controller 701 is connected to the buffer 707 and the flash memory 705. Moreover, the controller 701 utilizes an external bus 710 and the host 720 to transfer instructions and data. The controller 701 cannot continuously perform a programming process on the cell in the flash memory 705 a plurality of times. In the embodiment of the present invention, the flash memory 705 can be a multi-layer cell flash memory and has a specific programming order.
當主機720提供主機資料欲寫入快閃記憶體705時,控制器701會先將主機資料進行ECC編碼程序,並且將主機資料編碼為主機寫入資料暫存於緩衝器707。之後,控制器701會適時的進行編程動作,並根據快閃記憶體705的編程次序(program order)將緩衝器307中的主機寫入資料儲存於快閃記憶體305。其中,緩衝器307係為SRAM或者DRAM,其暫存的資料會隨著供應電源消失而不見;外部匯流排310可為USB匯流排、IEEE 1394匯流排、PCIe匯流排或SATA匯流排等等。 When the host 720 provides the host data to be written to the flash memory 705, the controller 701 first performs the ECC encoding process on the host data, and encodes the host data into the host write data temporarily stored in the buffer 707. Thereafter, the controller 701 performs a programming operation in a timely manner, and stores the host write data in the buffer 307 in the flash memory 305 according to the program order of the flash memory 705. The buffer 307 is an SRAM or a DRAM, and the temporarily stored data is invisible as the power supply disappears; the external bus 310 can be a USB bus, an IEEE 1394 bus, a PCIe bus, or a SATA bus.
再者,本發明的固態儲存裝置示意圖700更可以執行垃圾蒐集動作(garbage collection)。以下簡單介紹垃圾蒐集動作。 Furthermore, the solid state storage device schematic 700 of the present invention can further perform a garbage collection. The following is a brief introduction to garbage collection.
快閃記憶體705中包括許多區塊(block),而每個區塊中又包括多個頁(page)。例如,一個區塊中有64頁,而每個頁的容量為4K bytes。再者,由於快閃記憶體的特性,資料寫入時是以頁為寫入單位,而抹除(erase)時則是以區塊為單位進行資料抹除。 The flash memory 705 includes a plurality of blocks, and each block includes a plurality of pages. For example, there are 64 pages in a block, and each page has a capacity of 4K bytes. Furthermore, due to the characteristics of the flash memory, the data is written in units of pages, and when erased, the data is erased in units of blocks.
由於快閃記憶體的特性,當區塊中某一個頁的資料 需要更改(update)時,控制器701無法直接修改該頁中的資料,因此控制器701會將更改的資料寫在開啟區塊(opened block)的空白頁(blank page)中,而儲存原來舊資料的頁將被視為無效頁(invalid page),裡面的資料將被視為無效資料(invalid data)。 Due to the characteristics of the flash memory, when a page in the block is When an update is required, the controller 701 cannot directly modify the data in the page, so the controller 701 writes the changed material in the blank page of the opened block, and stores the original The page of the data will be treated as an invalid page, and the data in it will be treated as invalid data.
當主機720經過多次的存取之後,在快閃記憶體705中儲存資料的關閉區塊(closed block)將會出現許多的無效頁以及無效資料,並且佔據了快閃記憶體705的空間。此外,關閉區塊中會同時具有無效頁及有效頁(valid page),有效頁中儲存著有效資料(valid data)。 After the host 720 has accessed multiple times, a closed block storing data in the flash memory 705 will have many invalid pages and invalid data, and occupy the space of the flash memory 705. In addition, the closed block will have both an invalid page and a valid page, and the valid page stores valid data.
所謂的垃圾蒐集動作即是控制器701蒐集關閉區塊中有效頁的有效資料,並另外儲存在開啟區塊中。再者,在關閉區塊中的有效頁中的有效資料被蒐集完後即成為無效頁。而當關閉區塊中的頁全部變成無效頁時,即關閉區塊中的有效頁中的有效資料被複製至其他區塊後,控制器301即可以對該關閉區塊進行區塊抹除(block erase)動作,並且產生空白區塊,使快閃記憶體705釋放出可寫入的空間。 The so-called garbage collection action means that the controller 701 collects the valid data of the valid pages in the closed block and additionally stores them in the open block. Furthermore, the valid data in the valid page in the closed block is collected as an invalid page. When the pages in the closed block all become invalid pages, that is, after the valid data in the valid page in the closed block is copied to other blocks, the controller 301 can block the closed block ( The block erase action and a blank block is generated, causing the flash memory 705 to release a writable space.
在執行垃圾蒐集動作的過程中,控制器701會先蒐集關閉區塊中有效頁中的有效資料,並成為蒐集的寫入資料(collected write data),暫存於緩衝器707中。接著,控制器701於適當的時機進行編程動作,將緩衝器707內的蒐集的寫入資料儲存於快閃記憶體705中的開啟區塊,並完成一次垃圾蒐集動作。 In the process of performing the garbage collection operation, the controller 701 first collects the valid data in the valid page in the closed block, and becomes the collected write data, which is temporarily stored in the buffer 707. Next, the controller 701 performs a programming operation at an appropriate timing, and stores the collected write data in the buffer 707 in the open block in the flash memory 705, and completes a garbage collection operation.
由以上的說明可知,控制器701執行垃圾蒐集動作 時,暫存於緩衝器707內的蒐集的寫入資料皆為有效資料。 As can be seen from the above description, the controller 701 performs garbage collection operations. At the time, the collected data temporarily stored in the buffer 707 is valid data.
本發明揭露的固態儲存裝置及其資料寫入方法,其係運用於固態儲存裝置收到清除指令時,搭配垃圾蒐集動作的資料寫入方法。 The solid-state storage device and the data writing method thereof disclosed in the present invention are applied to a data writing method of a garbage collection operation when the solid-state storage device receives a clearing instruction.
請參照第8A圖,其所繪示為本發明固態儲存裝置的資料寫入方法流程圖。此流程圖主要在說明固態儲存裝置700收到清除指令時的動作流程。在正常運作的情況下,於接收到主機的寫入指令時,控制器701可接收主機資料,並轉換為主機寫入資料暫存於緩衝器707。 Please refer to FIG. 8A, which is a flow chart of a method for writing data of the solid state storage device of the present invention. This flowchart is mainly for explaining the action flow when the solid state storage device 700 receives the clear command. In the case of normal operation, upon receiving a write command from the host, the controller 701 can receive the host data and convert it to the host write data for temporary storage in the buffer 707.
當控制器701收到主機720發出的清除指令後(步驟S802),為了將緩衝器707中暫存的主機寫入資料儲存至快閃記憶體705。控制器701進行編程動作,將緩衝器707中暫存的主機寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊(步驟S804)。其中,緩衝器707中暫存的主機寫入資料儲存於開啟區塊中對應的字元線的晶胞中。值得注意地,當執行完步驟S804後,還會有部分字元線的晶胞為尚未完成編程狀態。接著,控制器701執行垃圾蒐集動作,由快閃記憶體705的關閉區塊中取得蒐集的寫入資料,並暫存於緩衝器707中(步驟S806)。之後,控制器701進行編程動作,將緩衝器707中的寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊(步驟S808)。 When the controller 701 receives the clear command from the host 720 (step S802), in order to store the host write data temporarily stored in the buffer 707 to the flash memory 705. The controller 701 performs a programming operation to store the host write data temporarily stored in the buffer 707 in the programmed order to the open block of the flash memory 705 (step S804). The host write data temporarily stored in the buffer 707 is stored in the cell of the corresponding word line in the open block. Notably, after step S804 is performed, there is also a cell of a partial word line that is not yet in a programmed state. Next, the controller 701 performs a garbage collection operation, and the collected write data is acquired from the closed block of the flash memory 705, and temporarily stored in the buffer 707 (step S806). Thereafter, the controller 701 performs a programming operation to store the write data in the buffer 707 in the programmed order to the open block of the flash memory 705 (step S808).
由以上的說明可知,於執行S808步驟時,由緩衝器707內儲存至快閃記憶體705的寫入資料可為主機寫入資料或蒐 集的寫入資料。而主機寫入資料與蒐集的寫入資料皆為有效資料。 As can be seen from the above description, when the step S808 is performed, the written data stored in the buffer 707 to the flash memory 705 can be written or searched for the host. Set the write data. The data written by the host and the collected data are all valid data.
請參照第8B圖與第8C圖,其所繪示為本發明固態儲存裝置收到清除指令時的寫入資料的編程狀態示意圖。圖中的快閃記憶體705是以TLC快閃記憶體為例,以接續第4A圖的情況。假設於第4A圖的情況下,主機720產生清除指令至固態儲存裝置700。 Please refer to FIG. 8B and FIG. 8C , which are schematic diagrams showing the programming state of the written data when the solid state storage device receives the clear command according to the present invention. The flash memory 705 in the figure is a TLC flash memory as an example to continue the case of FIG. 4A. Assume that in the case of FIG. 4A, host 720 generates a clear command to solid state storage device 700.
根據本發明第8A圖的流程步驟可知。為了將緩衝器707中暫存的主機寫入資料儲存至快閃記憶體705,控制器701進行編程動作,將緩衝器707中暫存的主機寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊。此時,控制器701先將緩衝器707中暫存的主機寫入資料儲存於開啟區塊中對應的字元線的TLC晶胞中。當控制器701完成此編程動作後,第三字元線的TLC晶胞以及第四字元線的TLC晶胞為尚未完成編程狀態。接著,控制器701執行垃圾蒐集動作,由快閃記憶體705的關閉區塊中取得蒐集的寫入資料,並暫存於緩衝器707中。因此,完成垃圾蒐集動作之後,即如第8B圖所示。舉例來說,控制器701至少取得6頁蒐集的寫入資料(Ga~Gf)並暫存於緩衝器707。其中,第Ga~Gc頁的蒐集的寫入資料用以儲存於第五字元線的TLC晶胞中;第Gd~Gf頁的蒐集的寫入資料用以儲存於第六字元線的TLC晶胞中。 The flow steps according to Fig. 8A of the present invention are known. In order to store the host write data temporarily stored in the buffer 707 to the flash memory 705, the controller 701 performs a programming operation to store the host write data temporarily stored in the buffer 707 to the flash memory 705 according to the programming order. Open block. At this time, the controller 701 first stores the host write data temporarily stored in the buffer 707 in the TLC unit cell of the corresponding word line in the open block. After the controller 701 completes the programming action, the TLC cell of the third word line and the TLC cell of the fourth word line are in a programmed state. Next, the controller 701 performs a garbage collection operation, and the collected write data is obtained from the closed block of the flash memory 705, and temporarily stored in the buffer 707. Therefore, after the garbage collection operation is completed, as shown in FIG. 8B. For example, the controller 701 obtains at least 6 pages of collected data (Ga~Gf) and temporarily stores it in the buffer 707. Wherein, the collected data of the Ga~Gc page is stored in the TLC unit cell of the fifth character line; the collected data of the Gd~Gf page is stored in the TLC of the sixth character line. In the unit cell.
接著,如第8C圖所示,控制器701進行編程動作, 將緩衝器707中的寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊。 Then, as shown in FIG. 8C, the controller 701 performs a programming operation. The write data in the buffer 707 is stored in the programmed order to the open block of the flash memory 705.
意即,控制器701動作第五字元線的TLC晶胞,進行第十次編程程序(10th);接著,動作第四字元線的TLC晶胞,進行第十一次編程程序(11th);接著,動作第三字元線的TLC晶胞,進行第十二次編程程序(12th);接著,動作第六字元線的TLC晶胞,進行第十三次編程程序(13th);接著,動作第五字元線的TLC晶胞,進行第十四次編程程序(14th);接著,動作第四字元線的TLC晶胞,進行第十五次編程程序(15th)。 That is, the controller 701 operates the TLC unit cell of the fifth character line to perform the tenth programming procedure (10th); then, the TLC unit cell of the fourth character line is operated, and the eleventh programming procedure (11th) is performed. Then, the TLC unit cell of the third word line is operated to perform the twelfth programming procedure (12th); then, the TLC unit cell of the sixth character line is operated, and the thirteenth programming procedure (13th) is performed; The TLC unit cell of the fifth character line is operated to perform the fourteenth programming procedure (14th); then, the TLC unit cell of the fourth character line is operated to perform the fifteenth programming procedure (15th).
明顯地,由第8C圖可知,於第十五次編程程序(15th)完成後,第三字元線的TLC晶胞以及第四字元線的TLC晶胞已經為完成編程狀態,並且儲存至快閃記憶體705的開啟區塊的寫入資料皆為有效資料。 Obviously, as shown in FIG. 8C, after the fifteenth programming procedure (15th) is completed, the TLC cell of the third word line and the TLC cell of the fourth word line are already in a programmed state, and are stored to The written data of the open block of the flash memory 705 is valid data.
由以上的說明可知,本發明固態儲存裝置700收到清除指令時,控制器701將緩衝器707中暫存的主機寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊之後,控制器701可通過執行垃圾蒐集動作,以獲得蒐集的寫入資料,並進一步將其連同暫存於緩衝器707中的主機寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊,使用以儲存緩衝器707中的主機寫入資料的對應字元線的晶胞皆為完成編程狀態。由於控制器701取得之蒐集的寫入資料全部都是有效資料,因此可以確保儲存至快閃記憶體705的開啟區塊的寫入資料皆為有效資料。 As can be seen from the above description, when the solid state storage device 700 of the present invention receives the clear command, the controller 701 stores the host write data temporarily stored in the buffer 707 according to the programming order to the open block of the flash memory 705, and controls The 701 may perform the garbage collection operation to obtain the collected write data, and further store it together with the host write data temporarily stored in the buffer 707 according to the programming order to the open block of the flash memory 705, and use The cells of the corresponding word line written by the host in the storage buffer 707 are all in a programmed state. Since the collected data acquired by the controller 701 is all valid data, it can be ensured that the written data stored in the open block of the flash memory 705 is valid data.
再者,假設主機720在傳送主機資料的過程中,持續的發送清除指令。根據本發明的實施例,控制器701可以執行多次的垃圾蒐集動作,以取得蒐集的寫入資料,並將其連同主機寫入資料編程至快閃記憶體705。因此,如第9圖所示,快閃記憶體705的開啟區塊中會交互穿插著主機寫入資料(Ho)以及蒐集的寫入資料(Gx),而主機寫入資料(Ho)以及蒐集的寫入資料(Gx)皆為有效資料。 Furthermore, it is assumed that the host 720 continuously sends a clear command during the transfer of the host material. According to an embodiment of the present invention, the controller 701 may perform a plurality of garbage collection actions to obtain the collected write data and program it along with the host write data to the flash memory 705. Therefore, as shown in FIG. 9, the host write data (Ho) and the collected write data (Gx) are interspersed in the open block of the flash memory 705, and the host writes the data (Ho) and collects the data. The written data (Gx) is valid data.
在本發明實施例中,當固態儲存裝置700收到清除指令時,控制器701可根據一預設資料量來執行垃圾蒐集動作,以獲得蒐集的寫入資料。換句話說,控制器701會執行垃圾蒐集動作,直到蒐集的寫入資料的資料量達到上述預設資料量,並暫存於緩衝器707。 In the embodiment of the present invention, when the solid state storage device 700 receives the clear command, the controller 701 may perform a garbage collection action according to a preset amount of data to obtain the collected write data. In other words, the controller 701 performs a garbage collection operation until the collected data amount of the written data reaches the preset data amount and is temporarily stored in the buffer 707.
基本上,預設資料量為可讓暫存於緩衝器707中的主機寫入資料完全儲存至快閃記憶體705所需的額外資料量。換句話說,預設資料量是可使用以儲存緩衝器707中的主機寫入資料的晶胞皆成為完成編程狀態所需的額外資料量。 Basically, the preset amount of data is an amount of additional data that can be stored by the host temporarily stored in the buffer 707 to be completely stored in the flash memory 705. In other words, the preset amount of data is the amount of additional data that can be used to store the data written by the host in buffer 707 as needed to complete the programmed state.
以TLC快閃記憶體為例,控制器701至少需要提供6頁的額外資料量才可確實地將緩衝器707中的主機寫入資料儲存至快閃記憶體705。如第8B圖的例子,預設資料量為6頁的資料量,而控制器701於取得6頁蒐集的寫入資料(Ga~Gf)並暫存於緩衝器707後,便可連同暫存於緩衝器707中的主機寫入資料一併編程至快閃記憶體705,以確實將主機寫入資料儲存至快閃記 憶體705中第三字元線與第四字元線的TLC晶胞。 Taking the TLC flash memory as an example, the controller 701 needs to provide at least 6 pages of additional data amount to reliably store the host write data in the buffer 707 to the flash memory 705. For example, in the example of FIG. 8B, the preset data amount is 6 pages of data amount, and the controller 701 obtains the 6-page collected data (Ga~Gf) and temporarily stores it in the buffer 707, and can be temporarily stored together with the temporary storage. The host write data in the buffer 707 is also programmed into the flash memory 705 to actually store the host write data to the flash memory. The TLC unit cell of the third word line and the fourth word line in the body 705 is recalled.
此外,為了增加資料儲存於字元線晶胞的穩定性,若一特定字元線的下一條字元線的晶胞為完成編程狀態,則其可增加此特定字元線晶胞的資料穩定性。舉例來說,如第8C圖所示,用以儲存主機寫入資料(J~L)的第四字元線的TLC晶胞已為完成編程狀態。然,為了使第四字元線的TLC晶胞中所儲存的主機寫入資料(J~L)更加穩定,控制器701可進一步將第五字元線的TLC晶胞變更為完成編程狀態,意即額外增加具有完成編程狀態的晶胞的字元線。在第8B圖的例子中,為了額外增加一個具有完成編程狀態的晶胞的字元線,意即使第五字元線的TLC晶胞成為完成編程狀態,控制器701至少需要提供9頁的資料量,意即預設資料量為9頁的資料量,才可使第五字元線的TLC晶胞成為完成編程狀態,以提升第四字元線的TLC晶胞的資料穩定性。 In addition, in order to increase the stability of the data stored in the word line cell, if the cell of the next word line of a particular word line is in a programmed state, it can increase the data stability of the cell of the particular word line. Sex. For example, as shown in FIG. 8C, the TLC cell for storing the fourth word line of the host write data (J~L) has completed the programming state. However, in order to make the host write data (J~L) stored in the TLC cell of the fourth word line more stable, the controller 701 may further change the TLC cell of the fifth word line to complete the programming state. This means that the word line of the unit cell with the programmed state is additionally added. In the example of FIG. 8B, in order to additionally add a word line having a cell in which the program state is completed, it is intended that the controller 701 needs to provide at least 9 pages of data even if the TLC cell of the fifth word line becomes a programmed state. The quantity means that the preset amount of data is 9 pages of data, so that the TLC unit cell of the fifth character line can be completed to complete the programming state, so as to improve the data stability of the TLC unit cell of the fourth character line.
在本發明實施例中,預設資料量以及額外增加具有完成編程狀態的晶胞的字元線的數量並不以此為限,本領域技術人員可根據所需的資料穩定性程度來決定需額外增加具有完成編程狀態的晶胞的字元線的數量,並對應決定所需的預設資料量。 In the embodiment of the present invention, the amount of preset data and the number of additional character lines having a unit cell having a completed programming state are not limited thereto, and those skilled in the art can determine the required degree of data stability according to the required degree of data stability. The number of word lines having the unit cell in the programmed state is additionally increased, and the corresponding preset amount of data is determined accordingly.
再者,根據本發明的實施例,當控制器701接收到清除指令而進行垃圾蒐集動作後,暫存於緩衝器707中的主機寫入資料以及蒐集的寫入資料皆會根據編程次序逐次的寫入快閃記憶體的開啟區塊中。一般來說,當控制器701接收到清除指令, 並將緩衝器707中暫存的主機寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊之後,如果開啟區塊的剩餘空間大於蒐集的寫入資料的資料量時,則依照第8A圖所示之方式,將緩衝器707中暫存的寫入資料寫入快閃記憶體705的開啟區塊。而確認主機寫入資料已經寫入快閃記憶體705之後,意即儲存主機寫入資料的晶胞皆為完成編程狀態之後,即可清除緩衝器707中的資料,並回覆主機720清除指令已執行完成。 Furthermore, in accordance with an embodiment of the present invention, after the controller 701 receives the clear command and performs the garbage collection operation, the host write data temporarily stored in the buffer 707 and the collected write data are successively programmed according to the programming order. Write to the open block of the flash memory. Generally, when the controller 701 receives the clear command, And storing the host write data temporarily stored in the buffer 707 according to the programming order to the open block of the flash memory 705, if the remaining space of the open block is larger than the collected data amount of the written data, In the manner shown in FIG. 8A, the write data temporarily stored in the buffer 707 is written to the open block of the flash memory 705. After confirming that the host write data has been written into the flash memory 705, that is, after storing the unit cells written by the host to complete the programming state, the data in the buffer 707 can be cleared, and the host 720 clear command is returned. The execution is complete.
再者,當控制器701接收到清除指令,並將緩衝器707中暫存的主機寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊之後,如果開啟區塊已經快寫滿的時候,若開啟區塊的剩餘空間小於蒐集的寫入資料的資料量時,控制器701只需要將開啟區塊寫滿並進行區塊關閉動作(block close action)。於確認開啟區塊已經成為關閉區塊後,即可清除緩衝器707中的資料,並回覆主機720清除指令已執行完成。 Moreover, when the controller 701 receives the clear command and stores the host write data temporarily stored in the buffer 707 according to the programming order to the open block of the flash memory 705, if the open block is already full. At the same time, if the remaining space of the open block is smaller than the collected data amount of the data to be written, the controller 701 only needs to fill the open block and perform a block close action. After confirming that the open block has become the closed block, the data in the buffer 707 can be cleared, and the host 720 clear command has been executed.
此外,由於蒐集的寫入資料的資料量可由預設資料量決定,因此,在本發明實施例中,亦可根據預設資料量以及開啟區塊的剩餘空間來判斷清除緩衝器707的資料以及回覆主機720清除指令已執行完成的時機。 In addition, in the embodiment of the present invention, the data of the clear buffer 707 can be determined according to the preset data amount and the remaining space of the open block. The reply host 720 clears the timing at which the instruction has been executed.
在本發明一實施例中,當固態儲存裝置700收到清除指令,並將緩衝器707中暫存的主機寫入資料根據編程次序儲存至快閃記憶體705的開啟區塊之後,控制器701可分次進行執行垃圾蒐集動作,以獲得部分的蒐集的寫入資料,接著根據編程 次序將寫入資料儲存至快閃記憶體705的開啟區塊。之後,控制器701再次進行執行垃圾蒐集動作,以獲得下一部分的蒐集的寫入資料,接著再次根據編程次序將寫入資料儲存至快閃記憶體705的開啟區塊。如此,直到確認主機寫入資料已經確實寫入快閃記憶體705後,即可清除緩衝器707中的資料,並回覆主機720清除指令已執行完成。換句話說,在此實施例中,控制器701並非一次通過垃圾蒐集動作獲得所需的蒐集的寫入資料,而是分次進行垃圾蒐集動作以及根據編程次序將寫入資料儲存至快閃記憶體705。同樣地,在本實施例中,亦可根據預設資料量以及開啟區塊的剩餘空間來判斷清除緩衝器707的資料以及回覆主機720清除指令已執行完成的時機。 In an embodiment of the present invention, when the solid state storage device 700 receives the clear command and stores the temporarily stored host data in the buffer 707 in the programmed order to the open block of the flash memory 705, the controller 701 The garbage collection action can be performed in stages to obtain a part of the collected data, and then according to the programming The order stores the write data to the open block of the flash memory 705. Thereafter, the controller 701 performs the garbage collection operation again to obtain the collected data of the next part, and then stores the written data to the open block of the flash memory 705 again according to the programming order. Thus, until it is confirmed that the host write data has been written into the flash memory 705, the data in the buffer 707 can be cleared, and the host 720 clear command has been executed. In other words, in this embodiment, the controller 701 does not obtain the required collected data by the garbage collection action at one time, but performs the garbage collection operation in stages and stores the written data to the flash memory according to the programming order. Body 705. Similarly, in this embodiment, the data of the clear buffer 707 and the timing at which the reply host 720 clear instruction has been executed may also be determined according to the preset data amount and the remaining space of the open block.
根據以上的說明可知,由於蒐集的寫入資料(Gx)是有效資料,因此運用本發明所提出的資料寫入方法,當收到清除指令時,控制器705通過垃圾蒐集動作來取得蒐集的寫入資料,用以取代習知的冗餘寫入資料,來連同主機寫入資料一起編程至快閃記憶體705,將使得快閃記憶體705的空間被有效地運用來儲存有效資料,並且提高固態儲存裝置700的使用效率。 According to the above description, since the collected write data (Gx) is valid data, by using the data writing method proposed by the present invention, when receiving the clear command, the controller 705 obtains the collected write through the garbage collecting action. The input data, in place of the conventional redundant write data, is programmed into the flash memory 705 along with the host write data, which will enable the space of the flash memory 705 to be effectively used to store valid data and improve The efficiency of use of the solid state storage device 700.
綜上所述,雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。 In conclusion, the present invention has been disclosed in the above preferred embodiments, and is not intended to limit the present invention. A person skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.
S802~S808‧‧‧步驟流程 S802~S808‧‧‧Step process
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW105120332A TWI607457B (en) | 2016-06-28 | 2016-06-28 | Solid state device and data writing method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW105120332A TWI607457B (en) | 2016-06-28 | 2016-06-28 | Solid state device and data writing method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TWI607457B true TWI607457B (en) | 2017-12-01 |
| TW201810262A TW201810262A (en) | 2018-03-16 |
Family
ID=61230650
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW105120332A TWI607457B (en) | 2016-06-28 | 2016-06-28 | Solid state device and data writing method thereof |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI607457B (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110099323A1 (en) * | 2009-10-27 | 2011-04-28 | Western Digital Technologies, Inc. | Non-volatile semiconductor memory segregating sequential, random, and system data to reduce garbage collection for page based mapping |
| TW201239624A (en) * | 2011-03-29 | 2012-10-01 | Phison Electronics Corp | Memory storage device, memory controller thereof, and method for programming data thereof |
| US20130246716A1 (en) * | 2012-02-23 | 2013-09-19 | Kabushiki Kaisha Toshiba | Memory system and data writing method |
| TW201401285A (en) * | 2012-06-21 | 2014-01-01 | Transcend Information Inc | Method for controlling data write operation of a mass storage device |
| US20140059271A1 (en) * | 2012-08-27 | 2014-02-27 | Apple Inc. | Fast execution of flush commands using adaptive compaction ratio |
| US20140293712A1 (en) * | 2013-04-01 | 2014-10-02 | Samsung Electronics Co., Ltd | Memory system and method of operating memory system |
| US20140372833A1 (en) * | 2013-06-18 | 2014-12-18 | Phison Electronics Corp. | Data protecting method, memory controller and memory storage device |
-
2016
- 2016-06-28 TW TW105120332A patent/TWI607457B/en active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110099323A1 (en) * | 2009-10-27 | 2011-04-28 | Western Digital Technologies, Inc. | Non-volatile semiconductor memory segregating sequential, random, and system data to reduce garbage collection for page based mapping |
| TW201239624A (en) * | 2011-03-29 | 2012-10-01 | Phison Electronics Corp | Memory storage device, memory controller thereof, and method for programming data thereof |
| US20130246716A1 (en) * | 2012-02-23 | 2013-09-19 | Kabushiki Kaisha Toshiba | Memory system and data writing method |
| TW201401285A (en) * | 2012-06-21 | 2014-01-01 | Transcend Information Inc | Method for controlling data write operation of a mass storage device |
| US20140059271A1 (en) * | 2012-08-27 | 2014-02-27 | Apple Inc. | Fast execution of flush commands using adaptive compaction ratio |
| US20140293712A1 (en) * | 2013-04-01 | 2014-10-02 | Samsung Electronics Co., Ltd | Memory system and method of operating memory system |
| US20140372833A1 (en) * | 2013-06-18 | 2014-12-18 | Phison Electronics Corp. | Data protecting method, memory controller and memory storage device |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201810262A (en) | 2018-03-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110275673B (en) | Memory device and method of operating the same | |
| CN107544748B (en) | Solid-state storage device and data writing method thereof | |
| CN109542675B (en) | Memory system and method of operating the same | |
| CN103699344B (en) | Nonvolatile memory device and method of operating the same | |
| CN110399092B (en) | Memory device and method of operating the same | |
| CN114138682A (en) | Partition namespace restriction mitigation using subblock mode | |
| US20190121727A1 (en) | Memory system and method for operating the same | |
| CN112542186B (en) | Memory device and method of operating the same | |
| KR20120123180A (en) | Memory system having NAND-based NOR and NAND flashes and SRAM integrated in one chip for hybrid data, code and cache storage | |
| CN105359112B (en) | Operations management in memory device | |
| US9298650B2 (en) | Memory system, semiconductor memory device and operating method thereof | |
| CN110389717A (en) | Storage device and method of operating the same | |
| US11328777B2 (en) | Responding to power loss | |
| CN111352854B (en) | Storage device, controller and method of operating storage device | |
| CN104217759A (en) | Non-volatile memory device and method for operating the same, and system including the same | |
| TWI584189B (en) | Memory controller, memory storage device, and method for writing data | |
| CN111158579A (en) | Solid state disk and data access method thereof | |
| TWI540428B (en) | Data writing method, memory controller and memory storage apparatus | |
| CN106155582B (en) | Non-volatile memory device and controller | |
| CN107507644A (en) | Memory device and operation method thereof | |
| US9141291B2 (en) | Adaptive context disbursement for improved performance in non-volatile memory systems | |
| CN103365790B (en) | Memory controller, storage device and data writing method | |
| TWI607457B (en) | Solid state device and data writing method thereof | |
| KR102716788B1 (en) | Memory system, memory device, memory controller and operating method of thereof | |
| US12315573B2 (en) | Method and apparatus to reduce power consumption of page buffer circuitry in a non-volatile memory device |