TWI664531B - Controller and control method of flash memory - Google Patents

Controller and control method of flash memory Download PDF

Info

Publication number
TWI664531B
TWI664531B TW107102680A TW107102680A TWI664531B TW I664531 B TWI664531 B TW I664531B TW 107102680 A TW107102680 A TW 107102680A TW 107102680 A TW107102680 A TW 107102680A TW I664531 B TWI664531 B TW I664531B
Authority
TW
Taiwan
Prior art keywords
data
flash memory
invalid
storage area
valid
Prior art date
Application number
TW107102680A
Other languages
Chinese (zh)
Other versions
TW201933125A (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 TW107102680A priority Critical patent/TWI664531B/en
Application granted granted Critical
Publication of TWI664531B publication Critical patent/TWI664531B/en
Publication of TW201933125A publication Critical patent/TW201933125A/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

本發明關於一種快閃記憶體之控制器及控制方法,控制器包含一擾亂電路與一控制電路,擾亂電路擾亂至少一輸入資料而產生至少一有效資料,控制電路接收至少一無效資料與擾亂電路產生之至少一有效資料,該至少一無效資料並非為固定常數,控制電路寫入該至少一有效資料至快閃記憶體之至少一有效儲存區,以及寫入該至少一無效資料至快閃記憶體之至少一無效儲存區。藉由寫入並非為固定常數之無效資料至快閃記憶體之無效儲存區,可以降低無效儲存區對有效儲存區之干擾,如此可以提高快閃記憶體的可靠度以及可用的儲存空間。The invention relates to a flash memory controller and control method. The controller includes a scramble circuit and a control circuit. The scramble circuit disturbs at least one input data to generate at least one valid data. The control circuit receives at least one invalid data and a scramble circuit. Generated at least one valid data, the at least one invalid data is not a fixed constant, the control circuit writes the at least one valid data to at least one valid storage area of the flash memory, and writes the at least one invalid data to the flash memory At least one invalid storage area of the body. By writing invalid data that is not a fixed constant to the invalid storage area of the flash memory, the interference of the invalid storage area on the effective storage area can be reduced, so that the reliability of the flash memory and the available storage space can be improved.

Description

快閃記憶體之控制器及控制方法Controller and control method of flash memory

本發明係關於一種快閃記憶體,尤指一種控制快閃記憶體之控制器及控制方法。The invention relates to a flash memory, in particular to a controller and a control method for controlling the flash memory.

按,由於電子產品蓬勃發展,驅使消費者對儲存媒體的需求隨而增加。由於可覆寫式非揮發性記憶體(rewritable non-volatile memory)具有可重複寫入資料、讀寫資料速度快、資料非揮發性、省電與體積小等特性,因此可覆寫式非揮發性記憶體最適合作為電子產品的儲存媒體,尤其是快閃記憶體。According to the booming electronics, consumer demand for storage media is increasing. Because rewritable non-volatile memory (rewritable non-volatile memory) has the characteristics of rewritable data, fast reading and writing data, non-volatile data, power saving and small size, etc., rewritable non-volatile memory Sex memory is most suitable as a storage medium for electronic products, especially flash memory.

一般而言,部分快閃記憶體的一些儲存區在出廠時就已經損壞,雖然資料仍然可以寫入至該些損壞儲存區,但是從該些損壞儲存區讀取出的資料並不同於原先資料,其表示該些損壞儲存區無法正常儲存資料。因此,當寫入資料至快閃記憶體時,當然需寫入資料至快閃記憶體之未損壞儲存區而並不需寫入資料至損壞儲存區。在現有技術,寫入資料至快閃記憶體之未損壞儲存區時,亦會寫入固定的常數至損壞儲存區,其表示寫入相同的值至各損壞儲存區,此數筆固定的常數是無效資料,而寫入至未損壞儲存區的資料為有效資料。Generally speaking, some flash memory storage areas are damaged at the factory. Although data can still be written to the damaged storage areas, the data read from the damaged storage areas is different from the original data. , It means that the damaged storage areas cannot store data normally. Therefore, when writing data to the flash memory, it is of course necessary to write data to the undamaged storage area of the flash memory and not to write data to the damaged storage area. In the prior art, when writing data to the undamaged storage area of the flash memory, a fixed constant is also written to the damaged storage area, which means that the same value is written to each damaged storage area. These fixed constants Is invalid data, and data written to undamaged storage area is valid data.

寫入資料至快閃記憶體是藉由電壓改變快閃記憶體之儲存元件的儲存狀態,此電壓是藉由充電電路進行充電而產生,寫入的資料不同,充電電路所產生的電壓就會不同。在現有技術,以充電電路進行充電而寫入一常數至損壞儲存區時,充電電路之充電過程會因耦合效應而干擾鄰近損壞儲存區之未損壞儲存區的儲存元件,且此干擾可能會影響未損壞儲存區之儲存元件的儲存狀態,其表示未損壞儲存區所儲存的有效資料可能發生錯誤,如此即降低快閃記憶體的可靠度。換句話說,在多次寫入固定的常數至複數損壞儲存區的充電期間,若寫入此固定的常數所對應的充電過程對鄰近之未損壞儲存區的儲存元件有較大耦合干擾,如此多次寫入此固定的常數至複數損壞儲存區時,鄰近之未損壞儲存區的儲存電壓因受多次的較大耦合干擾即容易產生電壓偏移的現象,如此未損壞儲存區所儲存的資料將可能被改變成非原儲存資料。Writing data to the flash memory changes the storage state of the storage elements of the flash memory by voltage. This voltage is generated by charging the charging circuit. Depending on the data written, the voltage generated by the charging circuit will be different. different. In the prior art, when a constant is written to the damaged storage area by charging with a charging circuit, the charging process of the charging circuit will interfere with the storage elements in the undamaged storage area adjacent to the damaged storage area due to the coupling effect, and this interference may affect The storage state of the storage elements in the undamaged storage area indicates that the valid data stored in the undamaged storage area may be incorrect, which reduces the reliability of the flash memory. In other words, during the charging period when the fixed constant is repeatedly written to the multiple damaged storage areas, if the charging process corresponding to writing the fixed constant has a large coupling interference to the storage elements of the adjacent undamaged storage area, so When this fixed constant is written multiple times to the complex damaged storage area, the storage voltage of the adjacent undamaged storage area is prone to voltage offset due to multiple large coupling interferences. Data may be changed to non-original stored data.

此外,若未損壞儲存區位於兩個損壞儲存區之間,由於此兩個損壞儲存區被寫入固定常數(無效資料),所以此兩個損壞儲存區之充電電路的充電過程皆會影響位於兩者之間的未損壞儲存區的儲存元件,而提升此未損壞儲存區所儲存之有效資料的錯誤率,在這樣情況下,即會把此未損壞儲存區列為損壞儲存區,如此即會減少快閃記憶體的可用儲存空間。In addition, if the undamaged storage area is located between two damaged storage areas, since the two damaged storage areas are written with a fixed constant (invalid data), the charging process of the charging circuits of the two damaged storage areas will affect the location of the The storage components in the undamaged storage area between the two, and increase the error rate of the valid data stored in this undamaged storage area. In this case, this undamaged storage area will be listed as a damaged storage area, so that is Will reduce the available storage space in flash memory.

另外,基於某些需求下,例如便於管理快閃記憶體的需求,快閃記憶體具有一些未利用儲存區,此未利用儲存區不儲存有效資料。於現有技術,當寫入有效資料至快閃記憶體時,有效資料即不會寫入至此未利用儲存區,但是系統會內定寫入固定常數之無效資料至此未利用儲存區。一般而言,未利用儲存區鄰近於可利用儲存區。當鄰近於未利用儲存區之可利用儲存區並未損壞時,有效資料即會被寫入至此可利用儲存區。然而,以充電電路進行充電而寫入固定常數(無效資料)至未利用儲存區時,充電電路之充電過程會干擾鄰近之可利用儲存區的儲存元件,且此干擾可能會影響可利用儲存區之儲存元件的儲存狀態,其表示可利用儲存區所儲存的有效資料即可能錯誤,如此即降低快閃記憶體的可靠度。In addition, based on certain requirements, such as the need to facilitate the management of flash memory, the flash memory has some unused storage areas, and this unused storage area does not store valid data. In the prior art, when valid data is written to the flash memory, the valid data is not written to the unused storage area, but the system writes a fixed constant invalid data to the unused storage area. In general, unused storage areas are adjacent to available storage areas. When the available storage area adjacent to the unused storage area is not damaged, valid data is written to this available storage area. However, when charging with a charging circuit and writing a fixed constant (invalid data) to an unused storage area, the charging process of the charging circuit will interfere with the storage elements of the adjacent available storage area, and this interference may affect the available storage area The storage state of the storage element indicates that the valid data stored in the available storage area may be wrong, which reduces the reliability of the flash memory.

基於上述問題,本發明提供一種快閃記憶體之控制器及控制方法,其可降低損壞儲存區對未損壞儲存區之干擾,以及降低未利用儲存區對未損壞儲存區之干擾,如此可提高快閃記憶體的可靠度以及提高快閃記憶體之可用儲存空間。Based on the above problems, the present invention provides a flash memory controller and control method, which can reduce the interference of damaged storage areas to undamaged storage areas, and reduce the interference of unused storage areas to undamaged storage areas, which can improve Reliability of flash memory and increase the available storage space of flash memory.

本發明之目的之一,在於提供一種快閃記憶體之控制器及控制方法,其可寫入並非為固定常數之無效資料至損壞儲存區,以可降低損壞儲存區對未損壞儲存區之干擾,如此可提高快閃記憶體的可靠度以及可用儲存空間。One of the objectives of the present invention is to provide a flash memory controller and control method, which can write invalid data that is not a fixed constant to the damaged storage area, so as to reduce the interference of the damaged storage area to the undamaged storage area. , Which improves the reliability of the flash memory and the available storage space.

本發明之目的之一,在於提供一種快閃記憶體之控制器及控制方法,其可寫入並非為固定常數之無效資料至未利用儲存區,以可降低未利用儲存區對未損壞儲存區之干擾,如此可提高快閃記憶體的可靠度。One of the objectives of the present invention is to provide a flash memory controller and control method, which can write invalid data that is not a fixed constant to the unused storage area, so as to reduce the unused storage area to the undamaged storage area. This can increase the reliability of flash memory.

本發明揭示一種快閃記憶體之控制器,其包含一擾亂電路以及一控制電路。擾亂電路接收至少一輸入資料,並擾亂輸入資料而產生至少一有效資料;控制電路接收至少一無效資料與擾亂電路產生之該至少一有效資料,該至少一無效資料並非為一固定常數,控制電路寫入該至少一有效資料至快閃記憶體之至少一有效儲存區,以及寫入該至少一無效資料至快閃記憶體之至少一無效儲存區。The invention discloses a flash memory controller, which includes a scramble circuit and a control circuit. The disturbance circuit receives at least one input data and disturbs the input data to generate at least one valid data; the control circuit receives at least one invalid data and the at least one valid data generated by the disturbance circuit, the at least one invalid data is not a fixed constant, the control circuit Write the at least one valid data to at least one valid storage area of the flash memory, and write the at least one invalid data to at least one invalid storage area of the flash memory.

本發明揭示一種快閃記憶體之控制方法,其包含接收至少一輸入資料;擾亂該至少一輸入資料而產生至少一有效資料;提供至少一無效資料,該至少一無效資料並非為一固定常數;寫入該至少一有效資料至快閃記憶體之至少一有效儲存區;以及寫入該至少一無效資料至快閃記憶體之至少一無效儲存區。The invention discloses a flash memory control method, which includes receiving at least one input data; disturbing the at least one input data to generate at least one valid data; providing at least one invalid data, the at least one invalid data is not a fixed constant; Write the at least one valid data to at least one valid storage area of the flash memory; and write the at least one invalid data to at least one invalid storage area of the flash memory.

在說明書及後續的申請專利範圍當中使用了某些詞彙指稱特定的元件。所屬本發明技術領域中具有通常知識者應可理解,硬體製造商可能會用不同的名詞稱呼同一個元件。本說明書及後續的申請專利範圍並不以名稱的差異作為區分元件的方式,而是以元件在功能上的差異作為區分的準則。在通篇說明書及後續的申請專利範圍當中所提及的「包含」為一開放式用語,故應解釋成「包含但不限定於」。以外,「耦接」一詞在此包含任何直接及間接的電氣連接手段。因此,若文中描述一第一裝置耦接一第二裝置,則代表該第一裝置可直接電氣連接該第二裝置,或可透過其他裝置或其他連接手段間接地電氣連接至該第二裝置。In the specification and subsequent patent applications, certain terms are used to refer to specific elements. It should be understood by those having ordinary knowledge in the technical field of the present invention that hardware manufacturers may use different terms to refer to the same component. The scope of this specification and subsequent patent applications does not use the difference in names as a way to distinguish components, but rather uses the difference in functions of components as a criterion for distinguishing components. "Inclusion" mentioned throughout the specification and the scope of subsequent patent applications is an open-ended term and should be interpreted as "including but not limited to." In addition, the term "coupling" includes any direct and indirect means of electrical connection. Therefore, if a first device is coupled to a second device is described herein, it means that the first device can be electrically connected directly to the second device, or can be indirectly electrically connected to the second device through other devices or other connection means.

為使 貴審查委員對本發明之特徵及所達成之功效有更進一步之瞭解與認識,謹佐以實施例及配合詳細之說明,說明如後:In order to make the reviewing committee members have a better understanding and understanding of the features of the present invention and the effects achieved, I would like to provide detailed descriptions with examples and cooperation, as follows:

請參閱第一圖,其為本發明之快閃記憶體之控制器之一實施例的方塊圖。如圖所示,本發明揭示一控制器20,其耦接一快閃記憶體10,以控制快閃記憶體10,控制器20更耦接一主機5,控制器20可接收主機5所傳送之資料,並可以寫入資料至快閃記憶體10,以儲存主機5所傳送的資料於快閃記憶體10,控制器20也可以從快閃記憶體10讀取資料並傳送所讀取的資料至主機5。上述之主機5為可與控制器20相配合,以儲存資料至快閃記憶體10的任意電子裝置,例如電腦系統、行動電話、數位相機、音訊播放器或者視訊播放器等。上述主機5傳送至控制器20而欲儲存至快閃記憶體10之資料為輸入資料。Please refer to the first figure, which is a block diagram of an embodiment of a flash memory controller according to the present invention. As shown in the figure, the present invention discloses a controller 20 coupled to a flash memory 10 to control the flash memory 10. The controller 20 is further coupled to a host 5, and the controller 20 can receive the transmission from the host 5. The data can be written into the flash memory 10 to store the data transmitted by the host 5 in the flash memory 10, and the controller 20 can also read the data from the flash memory 10 and transfer the read data. Information to the host 5. The host 5 described above is any electronic device that can cooperate with the controller 20 to store data in the flash memory 10, such as a computer system, a mobile phone, a digital camera, an audio player, or a video player. The data transmitted from the host 5 to the controller 20 and stored in the flash memory 10 is input data.

本發明之控制器20欲儲存至少一輸入資料至快閃記憶體10時,控制器20擾亂該至少一輸入資料而產生至少一有效資料,並寫入該至少一有效資料至快閃記憶體10之可利用的至少一未損壞儲存區,且分別寫入至少一無效資料至快閃記憶體10之至少一損壞儲存區與至少一未利用儲存區,無效資料並非為固定常數,非固定常數表示寫入至各損壞儲存區與各未利用儲存區的無效資料並不相同。由於有效資料儲存至可利用之未損壞儲存區,而不會儲存至損壞儲存區與未利用儲存區,因此可利用之未損壞儲存區為有效儲存區,而損壞儲存區與未利用儲存區為無效儲存區。由於控制器20寫入有效資料至有效儲存區之過程,控制器20亦寫入非固定常數之無效資料至無效儲存區,如此可降低無效儲存區對鄰近之有效儲存區的耦合干擾(電容耦合效應或訊號傳導干擾),因此可提高快閃記憶體10的可靠度以及可利用的儲存空間。以下詳細說明控制器20之架構與運作。When the controller 20 of the present invention wants to store at least one input data to the flash memory 10, the controller 20 disturbs the at least one input data to generate at least one valid data, and writes the at least one valid data to the flash memory 10 Available at least one undamaged storage area, and write at least one invalid data to at least one damaged storage area and at least one unused storage area of the flash memory 10 respectively, the invalid data is not a fixed constant, non-fixed constant indicates The invalid data written to each damaged storage area is different from each unused storage area. Since the valid data is stored in the available undamaged storage area, but not in the damaged storage area and the unused storage area, the available undamaged storage area is a valid storage area, and the damaged storage area and the unused storage area are Invalid storage area. Because the controller 20 writes valid data to the valid storage area, the controller 20 also writes invalid data with non-constant constants to the invalid storage area. This can reduce the coupling interference (capacitive coupling) of the invalid storage area to the adjacent valid storage area. Effect or signal conduction interference), thereby improving the reliability of the flash memory 10 and the available storage space. The structure and operation of the controller 20 are described in detail below.

如第一圖所示,本發明之控制器20包含一主機介面21、一緩衝器22、一控制電路23、一選擇電路24、一擾亂電路25與一快閃記憶體介面26。主機介面21耦接主機5,主機5傳送輸入資料與命令至主機介面21。上述主機5透過主機介面21傳送輸入資料至控制器20,其目的是透過控制器20儲存此輸入資料於快閃記憶體10。主機介面21更耦接緩衝器22與控制電路23,主機介面21傳送命令至控制電路23。於本實施例中,命令可為寫入命令或者為讀取命令。控制電路23依據命令即可得知主機5欲要寫入輸入資料至快閃記憶體10或者從快閃記憶體10讀取資料。此外,主機介面21傳送輸入資料至緩衝器22,緩衝器22用於緩衝輸入資料。緩衝器22更耦接選擇電路24,並傳送輸入資料至選擇電路24。由上述可知,主機介面21傳送主機5之命令至控制電路23,且提供主機5所傳送之輸入資料至選擇電路24。此外,選擇電路24更接收一參考資料,選擇電路24更耦接控制電路23,控制電路23控制選擇電路24選擇參考資料或者主機5之輸入資料,而輸出參考資料或者此輸入資料。於本發明之一實施例中,選擇電路24可為一多工器,及參考資料可為固定的常數資料,例如一筆參考資料可以為FF或AA(以16進制而言),如此即表示參考資料的每一個位元組(Byte)為固定F或A的常數資料。換句話說,實施例中的固定常數可以表示每一筆資料內的每一個位元組的數值皆相同。As shown in the first figure, the controller 20 of the present invention includes a host interface 21, a buffer 22, a control circuit 23, a selection circuit 24, a scramble circuit 25, and a flash memory interface 26. The host interface 21 is coupled to the host 5, and the host 5 sends input data and commands to the host interface 21. The host 5 transmits input data to the controller 20 through the host interface 21. The purpose is to store the input data in the flash memory 10 through the controller 20. The host interface 21 is further coupled to the buffer 22 and the control circuit 23. The host interface 21 transmits commands to the control circuit 23. In this embodiment, the command may be a write command or a read command. The control circuit 23 can know that the host 5 wants to write input data to the flash memory 10 or read data from the flash memory 10 according to the command. In addition, the host interface 21 sends input data to the buffer 22, and the buffer 22 is used to buffer the input data. The buffer 22 is further coupled to the selection circuit 24 and transmits input data to the selection circuit 24. It can be known from the above that the host interface 21 transmits a command from the host 5 to the control circuit 23 and provides input data transmitted by the host 5 to the selection circuit 24. In addition, the selection circuit 24 further receives a reference material, the selection circuit 24 is further coupled to the control circuit 23, and the control circuit 23 controls the selection circuit 24 to select the reference material or the input material of the host 5 and output the reference material or the input material. In one embodiment of the present invention, the selection circuit 24 may be a multiplexer, and the reference data may be fixed constant data. For example, a reference data may be FF or AA (in hexadecimal terms), which means that Each byte (Byte) of the reference data is a constant data with a fixed F or A. In other words, the fixed constant in the embodiment may indicate that the value of each byte in each piece of data is the same.

復參閱第一圖,擾亂電路25耦接選擇電路24,而接收選擇電路24所輸出之輸入資料與參考資料,並擾亂輸入資料而產生有效資料,且更可擾亂參考資料而產生無效資料。參考資料經擾亂後為非固定常數的無效資料,例如,非固定常數可以為F1或A2;同理,每一筆輸入資料經由擾亂電路25擾亂後而為不同數值的有效資料(非固定常數),以可降低每筆有效資料於寫入快閃記憶體10的充電期間相互耦合干擾。於本發明之一實施例中,擾亂電路25具有預設之至少一擾亂參數,擾亂電路25運用擾亂參數對輸入資料進行邏輯運算,以擾亂輸入資料而產生有效資料。此外,擾亂電路25可以具有複數擾亂參數,而使非固定常數之無效資料的數值與有效資料的數值有所差異,或完全不同於有效資料的數值。由上述說明可知,緩衝器22緩衝輸入資料,以可透過選擇電路24提供輸入資料至擾亂電路25。Referring again to the first figure, the scramble circuit 25 is coupled to the selection circuit 24, and receives the input data and reference data output by the selection circuit 24, and disturbs the input data to generate valid data, and can further disturb the reference data to generate invalid data. The reference data is invalid data with non-fixed constants after being scrambled. For example, the non-fixed constants can be F1 or A2; similarly, each input data is scrambled by the scramble circuit 25 to become valid data with different values (non-fixed constants) In this way, the mutual coupling interference of each valid data during the charging period written in the flash memory 10 can be reduced. In one embodiment of the present invention, the scramble circuit 25 has at least one preset scramble parameter. The scramble circuit 25 uses the scramble parameter to perform logical operations on the input data to scramble the input data to generate valid data. In addition, the scramble circuit 25 may have a complex scramble parameter, so that the value of the invalid data other than the fixed constant is different from the value of the valid data, or is completely different from the value of the valid data. It can be known from the above description that the buffer 22 buffers the input data so that the input data can be provided to the disturbance circuit 25 through the selection circuit 24.

於本發明之一實施例中,上述之邏輯運算可以是互斥(XOR)運算或是其他演算法,但並非限制擾亂電路25僅能進行互斥運算擾亂輸入資料而產生有效資料。於本發明之另一實施例中,擾亂電路25可為一亂數產生電路。此外,擾亂電路25運用上述之方式擾亂參考資料而產生無效資料。於本發明之一實施例中,擾亂電路25可具有複數擾亂參數,且該些擾亂參數並非相同,因此擾亂電路25可運用不同擾亂參數而擾亂參考資料,以產生並非固定常數的無效資料。擾亂電路25更耦接控制電路23,而傳送有效資料與無效資料至控制電路23。In one embodiment of the present invention, the above-mentioned logical operation may be a mutually exclusive (XOR) operation or other algorithms, but it is not limited that the scramble circuit 25 can only perform mutually exclusive operations to disturb the input data to generate valid data. In another embodiment of the present invention, the scramble circuit 25 may be a random number generating circuit. In addition, the scramble circuit 25 scrambles the reference data in the manner described above to generate invalid data. In one embodiment of the present invention, the scrambling circuit 25 may have a plurality of scrambling parameters, and the scrambling parameters are not the same. Therefore, the scrambling circuit 25 may use different scrambling parameters to scramble the reference data to generate invalid data that is not a fixed constant. The disturbance circuit 25 is further coupled to the control circuit 23 and transmits valid data and invalid data to the control circuit 23.

復參閱第一圖,快閃記憶體介面26耦接於控制電路23與快閃記憶體10之間。控制電路23接收擾亂電路25所產生之有效資料與無效資料,並傳輸有效資料與無效資料至快閃記憶體介面26,以寫入有效資料至有效儲存區,且寫入無效資料至無效儲存區。控制器20儲存輸入資料至快閃記憶體10時,控制電路23會從快閃記憶體10之一位址開始寫入資料至儲存區,此位址可預先設定於控制器20。控制電路23寫入有效資料至有效儲存區,若有效儲存區鄰近之儲存區為無效儲存區(損壞儲存區或者未利用儲存區),控制電路23則會寫入非固定常數的無效資料至無效儲存區,如此可降低無效儲存區對鄰近之有效儲存區之耦合干擾,因此可提高快閃記憶體的可靠度以及可利用的儲存空間。Referring again to the first figure, the flash memory interface 26 is coupled between the control circuit 23 and the flash memory 10. The control circuit 23 receives valid data and invalid data generated by the disturbance circuit 25, and transmits the valid data and invalid data to the flash memory interface 26 to write valid data to the valid storage area and write invalid data to the invalid storage area. . When the controller 20 stores the input data in the flash memory 10, the control circuit 23 writes data into the storage area from an address of the flash memory 10, and this address can be set in the controller 20 in advance. The control circuit 23 writes valid data to the valid storage area. If the storage area adjacent to the valid storage area is an invalid storage area (damaged storage area or unused storage area), the control circuit 23 writes non-fixed constant invalid data to invalid. The storage area can reduce the coupling interference of the invalid storage area to the adjacent effective storage area, thereby improving the reliability of the flash memory and the available storage space.

於本發明之一實施例中,可預先檢測快閃記憶體10,以得知快閃記憶體10之各儲存區的狀態,而得知哪些儲存區為損壞儲存區,控制器20可預先紀錄損壞儲存區之位置資訊與未利用儲存區之位置資訊,因此控制電路23可預先得知無效儲存區之位置資訊,即可預先得知有效儲存區是否相鄰無效儲存區。控制電路23即可依據無效儲存區之位置資訊控制選擇電路24選擇參考資料,而輸出參考資料至擾亂電路25,以產生無效資料並提供至控制電路23,以寫入無效資料(非固定常數)至無效儲存區。同理,控制器20可預先紀錄有效儲存區之位置資訊,控制電路23即可依據有效儲存區之位置資訊控制選擇電路24選擇輸入資料,而輸出該輸入資料至擾亂電路25,以產生有效資料並提供至控制電路23,以寫入有效資料至有效儲存區。In one embodiment of the present invention, the flash memory 10 may be detected in advance to know the status of each storage area of the flash memory 10, and to know which storage areas are damaged storage areas, the controller 20 may record in advance The location information of the damaged storage area and the location information of the unused storage area, so the control circuit 23 can know the location information of the invalid storage area in advance, and can know in advance whether the valid storage area is adjacent to the invalid storage area. The control circuit 23 can control the selection circuit 24 to select reference data according to the position information of the invalid storage area, and output the reference data to the disturbance circuit 25 to generate invalid data and provide it to the control circuit 23 to write invalid data (non-constant constant) To invalid storage. Similarly, the controller 20 can record the position information of the effective storage area in advance, and the control circuit 23 can select the input data according to the position information of the effective storage area, and output the input data to the disturbance circuit 25 to generate effective data. It is provided to the control circuit 23 to write valid data to the valid storage area.

於此實施例,控制器20更可包含一儲存單元27,其可儲存無效儲存區之位置資訊、有效儲存區之位置資訊與參考資料。儲存單元27耦接選擇電路24,以提供參考資料至選擇電路24。此外,儲存單元27耦接控制電路23,以提供無效儲存區之位置資訊或者有效儲存區之位置資訊至控制電路23。In this embodiment, the controller 20 may further include a storage unit 27 that can store the position information of the invalid storage area, the position information of the valid storage area, and reference data. The storage unit 27 is coupled to the selection circuit 24 to provide reference data to the selection circuit 24. In addition, the storage unit 27 is coupled to the control circuit 23 to provide the position information of the invalid storage area or the position information of the effective storage area to the control circuit 23.

復參閱第一圖,控制器20更可包含一資料篩選單元28與一解擾亂電路29。資料篩選單元28耦接控制電路23與解擾亂電路29。解擾亂電路29更耦接緩衝器22。當控制電路23接收主機5之讀取命令時,控制電路23即會經由快閃記憶體介面26從快閃記憶體10讀取一資料序列。由於快閃記憶體10包含有效儲存區與無效儲存區,因此資料序列包含有效資料與無效資料,其中有效資料為使用者欲儲存的資料,而無效資料非為使用者欲儲存的資料。控制電路23傳輸此資料序列至資料篩選單元28。資料篩選單元28接收資料序列,並從資料序列篩選出有效資料,以傳輸有效資料至解擾亂電路29。於本發明之一實施例中,資料篩選單元28依據無效儲存區之位置資訊從資料序列中篩選掉無效資料,而篩選出有效資料。資料篩選單元28更可耦接儲存單元27,以得知無效儲存區之位置資訊。此外,資料篩選單元28可依據有效儲存區之位置資訊從資料序列中篩選出有效資料。資料篩選單元28可從儲存單元27得知有效儲存區之位置資訊。解擾亂電路29接收資料篩選單元28輸出之有效資料,並解擾亂有效資料,而產生一輸出資料。於本發明之一實施例中,解擾亂電路29具有解擾亂參數,此解擾亂參數相同於擾亂電路25之擾亂參數,以對有效資料進行運算,以解擾亂有效資料而產生輸出資料,如此輸出資料即可相同於輸入資料。解擾亂電路29傳送輸出資料至緩衝器22,緩衝器22緩衝輸出資料並提供輸出資料至主機介面21,以傳送輸出資料至主機5。Referring again to the first figure, the controller 20 may further include a data screening unit 28 and a descrambling circuit 29. The data screening unit 28 is coupled to the control circuit 23 and the descrambling circuit 29. The descrambling circuit 29 is further coupled to the buffer 22. When the control circuit 23 receives the read command from the host 5, the control circuit 23 reads a data sequence from the flash memory 10 through the flash memory interface 26. Since the flash memory 10 includes a valid storage area and an invalid storage area, the data sequence contains valid data and invalid data. The valid data is data that the user wants to store, and the invalid data is not data that the user wants to store. The control circuit 23 transmits the data sequence to the data screening unit 28. The data screening unit 28 receives the data sequence and filters out valid data from the data sequence to transmit the valid data to the descrambling circuit 29. In one embodiment of the present invention, the data screening unit 28 filters out invalid data from the data sequence according to the location information of the invalid storage area, and then screens out valid data. The data screening unit 28 can be further coupled to the storage unit 27 to obtain the location information of the invalid storage area. In addition, the data filtering unit 28 may filter valid data from the data sequence according to the location information of the valid storage area. The data screening unit 28 can learn the location information of the effective storage area from the storage unit 27. The descrambling circuit 29 receives valid data output by the data screening unit 28 and descrambles the valid data to generate an output data. In an embodiment of the present invention, the descrambling circuit 29 has a descrambling parameter. The descrambling parameter is the same as the descrambling parameter of the scramble circuit 25 to perform operations on valid data and generate output data by descrambling valid data. The data can be the same as the input data. The descrambling circuit 29 transmits output data to the buffer 22, and the buffer 22 buffers the output data and provides the output data to the host interface 21 to transmit the output data to the host 5.

請參閱第二圖,其為本發明之快閃記憶體之一實施例的示意圖。如圖所示,快閃記憶體10具有至少一儲存區塊(Block)101,而儲存區塊101具有複數儲存頁(Page)P 1~ P N。每一儲存頁P 1~P N分別具有複數儲存欄(Column),如第三圖所示,第一儲存頁P 1具有複數儲存欄C 11~ C 1M。於本發明之一實施例中,控制電路23寫入資料至快閃記憶體10之最小單位為一個儲存欄,但並非僅限於此。此外,一個儲存欄之儲存空間至少有一個位元組(Byte)。控制電路23寫入資料至快閃記憶體10時,基本上,控制電路23從一位址開始依序寫入資料至快閃記憶體10,例如控制電路23從第一儲存頁P 1之第一儲存欄C 11開始依序寫入資料至快閃記憶體10。於本發明之一實施例中,每一個儲存欄即為一個儲存區。若儲存欄之狀態為損壞或者未利用,其表示此儲存欄為無效儲存區;若儲存欄之狀態為未損壞且可利用,其表示此儲存欄為有效儲存區。 Please refer to the second figure, which is a schematic diagram of a flash memory according to an embodiment of the present invention. As shown, the flash memory 10 having at least one storage block (Block) 101, the storage block 101 having a plurality of stored pages (Page) P 1 ~ P N . Each of the storage pages P 1 to P N has a plurality of storage columns, as shown in the third figure. The first storage page P 1 has a plurality of storage columns C 11 to C 1M . In one embodiment of the present invention, the minimum unit for writing data to the flash memory 10 by the control circuit 23 is a storage column, but it is not limited thereto. In addition, the storage space of a storage column has at least one byte. The control circuit 23 writes data to the flash memory 10, substantially, the control circuit 23 a write data sequentially from the start address to the flash memory 10, for example of the control page from the first storage circuit 23 of P A storage column C 11 starts writing data to the flash memory 10 sequentially. In one embodiment of the present invention, each storage column is a storage area. If the status of the storage bar is damaged or unused, it means that the storage bar is an invalid storage area; if the status of the storage bar is not damaged and available, it means that the storage bar is a valid storage area.

以下舉例說明控制器20寫入資料至快閃記憶體10之規則。請參閱第四A圖,其為本發明之快閃記憶體10之儲存頁尚未被寫入資料之一實施例的示意圖。如圖所示,第一儲存頁P 1具有五個儲存欄C 11~ C 15,其中第三儲存欄C 13與第五儲存欄C 15已損壞而為損壞儲存區(無效儲存區),其餘儲存欄C 11、C 12、C 14並未損壞而為未損壞儲存區(有效儲存區)。當控制器20從第一儲存頁P 1之第一儲存欄C 11開始寫入有效資料至第一儲存頁P 1時,由於第一儲存欄C 11並非為無效儲存區,所以控制電路23控制選擇電路24選擇主機5之輸入資料,選擇電路24並輸出此輸入資料至擾亂電路25,以產生有效資料。如第四B圖所示,控制電路23寫入有效資料至第一儲存欄C 11。接續,由於第二儲存欄C 12也是有效儲存區,如第四B圖所示,控制電路23接續寫入下一筆有效資料至第二儲存欄C 12。接著,由於第三儲存欄C 13為損壞儲存區(無效儲存區),所以控制電路23控制選擇電路24選擇參考資料,並輸出此參考資料至擾亂電路25,以產生無效資料(非固定常數),如第四B圖所示,控制電路23寫入無效資料至第三儲存欄C 13。接續,因為第四儲存欄C 14為有效儲存區,所以控制電路23控制選擇電路24輸出主機5之輸入資料至擾亂電路25,以產生有效資料,如第四B圖所示,控制電路23寫入有效資料至第四儲存欄C 14。由於第五儲存欄C 15是損壞儲存區(無效儲存區),所以控制電路23控制選擇電路24輸出參考資料至擾亂電路25,以產生無效資料,如第四B圖所示,控制電路23寫入無效資料至第五儲存欄C 15The following example illustrates the rules for the controller 20 to write data to the flash memory 10. Please refer to FIG. 4A, which is a schematic diagram of an embodiment in which the storage page of the flash memory 10 of the present invention has not been written with data. As shown in the figure, the first storage page P 1 has five storage columns C 11 to C 15 , of which the third storage column C 13 and the fifth storage column C 15 are damaged and become damaged storage areas (invalid storage areas), and the rest The storage columns C 11 , C 12 and C 14 are not damaged but are undamaged storage areas (effective storage areas). When the first storage controller 20 page P C of the first storage column 111 beginning to write valid data to the first storage page P. 1, since the C 11 column is not the first storage storage area to be invalid, the control circuit 23 controls the The selection circuit 24 selects the input data of the host 5, and the selection circuit 24 outputs the input data to the scramble circuit 25 to generate valid data. As shown in the fourth diagram B, the control circuit 23 writes valid data into the first storage column C 11 . Subsequently, since the second storage column C 12 is also a valid storage area, as shown in the fourth diagram B, the control circuit 23 continues to write the next valid data to the second storage column C 12 . Then, since the third storage column C 13 is a damaged storage area (invalid storage area), the control circuit 23 controls the selection circuit 24 to select reference data, and outputs the reference data to the disturbance circuit 25 to generate invalid data (non-constant constants). As shown in FIG. 4B, the control circuit 23 writes invalid data to the third storage column C 13 . Then, because the fourth storage column C 14 is an effective storage area, the control circuit 23 controls the selection circuit 24 to output the input data of the host 5 to the disturbance circuit 25 to generate valid data. As shown in the fourth diagram B, the control circuit 23 writes Enter valid data into the fourth storage column C 14 . Since the fifth storage column C 15 is a damaged storage area (invalid storage area), the control circuit 23 controls the selection circuit 24 to output reference data to the disturbance circuit 25 to generate invalid data. As shown in the fourth diagram B, the control circuit 23 writes Enter invalid data into the fifth storage column C 15 .

由上述說明可知,控制電路23依據儲存區之狀態控制選擇電路24選擇輸入資料或者參考資料,其表示選擇電路24依據儲存區之狀態輸出該輸入資料或者參考資料至擾亂電路25,以產生有效資料或者無效資料,如此控制電路23即可依據儲存區之狀態儲存有效資料至有效儲存區,並儲存無效資料至鄰近於有效儲存區的無效儲存區。由於擾亂電路25產生之無效資料並非為固定常數,所以寫入至第三儲存欄C 13之無效資料並不同於寫入至第五儲存欄C 15的無效資料。如此,即可降低對應於第三儲存欄C 13與第五儲存欄C 15之充電電路的充電對鄰近之第一儲存欄C 11、第二儲存欄C 12與第四儲存欄C 14的耦合干擾,而提高第一儲存欄C 11、第二儲存欄C 12與第四儲存欄C 14於儲存狀態上的可靠度。 It can be known from the above description that the control circuit 23 controls the selection circuit 24 to select input data or reference data according to the state of the storage area, which indicates that the selection circuit 24 outputs the input data or reference data to the disturbance circuit 25 according to the state of the storage area to generate valid data Or the invalid data, so that the control circuit 23 can store the valid data in the valid storage area according to the state of the storage area, and store the invalid data in the invalid storage area adjacent to the valid storage area. Since the invalid data generated by the disturbance circuit 25 is not a fixed constant, the invalid data written in the third storage column C 13 is different from the invalid data written in the fifth storage column C 15 . In this way, the coupling of the charging circuits corresponding to the third storage column C 13 and the fifth storage column C 15 to the adjacent first storage column C 11 , the second storage column C 12 and the fourth storage column C 14 can be reduced. Interference, thereby improving the reliability of the first storage column C 11 , the second storage column C 12 and the fourth storage column C 14 in the storage state.

舉例來說,寫入16進制的FF、00資料至快閃記憶體10所對應的電壓準位分別為最低電壓準位與最高電壓準位,而有效儲存區(例如第一儲存欄C 11)原儲存有效資料為AA。在現有技術中多次寫入固定數值的無效資料至複數無效儲存區(例如第三儲存欄C 13及第五儲存欄C 15)的充電過程中,假若無效資料為FF,則固定數值的無效資料FF所對應的電壓會持續拉低鄰近有效儲存區的電壓;假若無效資料為00,則固定數值的無效資料00所對應的電壓會持續拉高鄰近有效儲存區的電壓。由於,本發明之控制器20寫入不同數值的無效資料至每一無效儲存區,所以可以降低寫入無效資料至無效儲存區所對應之充電對鄰近有效儲存區之儲存元件耦合干擾的程度。同理,當每一有效儲存區寫入不同的有效資料時,亦可以降低有效儲存區之間的耦合干擾,以此類推,每一儲存頁P 1- P N之間的耦合干擾也可獲得改善。 For example, the voltage levels corresponding to writing FF and 00 data in hexadecimal to flash memory 10 are the lowest voltage level and the highest voltage level, respectively, and the effective storage area (such as the first storage column C 11 ) The original valid data is AA. In the prior art, during the charging process of writing invalid data with a fixed value multiple times into a plurality of invalid storage areas (such as the third storage column C 13 and the fifth storage column C 15 ), if the invalid data is FF, the fixed value is invalid. The voltage corresponding to the data FF will continuously lower the voltage of the adjacent effective storage area; if the invalid data is 00, the voltage corresponding to the fixed value 00 of the invalid data will continue to increase the voltage of the adjacent effective storage area. Since the controller 20 of the present invention writes invalid data with different values to each invalid storage area, the degree of coupling interference of the charging corresponding to writing invalid data to the invalid storage area on the storage elements adjacent to the valid storage area can be reduced. Similarly, when different valid data is written in each valid storage area, the coupling interference between the valid storage areas can also be reduced, and so on, the coupling interference between each storage page P 1 -P N can also be obtained. improve.

此外,由於降低第三儲存欄C 13與第五儲存欄C 15分別對第四儲存欄C 14的干擾,所以可以降低儲存於第四儲存欄C 14之資料的錯誤率,因此第四儲存欄C 14即可用於儲存有效資料。其表示運用本發明之控制器20與控制方法控制快閃記憶體10,位於兩損壞儲存區(C 13、C 15)之間的未損壞儲存區(C 14)可以作為有效儲存區,以儲存有效資料,而不同於習用技術將位於兩損壞儲存區之間的未損壞區作為無效儲存區,而不儲存有效資料,因此本發明之控制器20與控制方法相較於習用技術下,本發明之控制器20與控制方法可以提高快閃記憶體10之可用儲存空間。 In addition, since the interference of the third storage column C 13 and the fifth storage column C 15 on the fourth storage column C 14 is reduced, the error rate of the data stored in the fourth storage column C 14 can be reduced, so the fourth storage column C 14 can be used to store valid data. It means that the flash memory 10 is controlled by using the controller 20 and the control method of the present invention. The undamaged storage area (C 14 ) located between the two damaged storage areas (C 13 , C 15 ) can be used as an effective storage area for storage. The effective data is different from the conventional technology. The undamaged area located between two damaged storage areas is regarded as an invalid storage area without valid data. Therefore, the controller 20 and the control method of the present invention are compared with the conventional technology. The controller 20 and the control method can increase the available storage space of the flash memory 10.

請參閱第五A圖,其為本發明之快閃記憶體10之儲存頁尚未被寫入資料之另一實施例的示意圖。如圖所示,第二儲存頁P 2具有五個儲存欄C 21~ C 25,第三儲存頁P 3同樣具有五個儲存欄C 31~ C 35,其中儲存欄C 22、C 24、C 32、C 33、C 34已損壞而為損壞儲存區(無效儲存區),儲存欄C 21、C 23、C 31、C 35並未損壞而為未損壞儲存區(有效儲存區)。此實施例中,第三儲存頁P 3僅有儲存欄C 31、C 35為未損壞儲存區,其表示第三儲存頁P 3僅有兩個有效儲存區可以儲存有效資料。為了便於管理快閃記憶體10的儲存空間,管理者會設定相鄰之兩儲存頁的有效儲存容量相同。於此實施例中,預設第二儲存頁P 2之第五個儲存欄C 25為未利用儲存區(無效儲存區)而不儲存有效資料,以使得相鄰之第二儲存頁P 2與第三儲存頁P 3具有相同數量的有效儲存區(2個有效儲存區),即讓第二儲存頁P 2的有效儲存容量相同於第三儲存頁P 3的有效儲存容量。如第五B圖所示,由於儲存欄C 22、C 24、C 25、C 32、C 33、C 34為無效儲存區而不儲存有效資料,所以控制電路23寫入無效資料至該些儲存欄C 22、C 24、C 25、C 32、C 33、C 34,而寫入有效資料至儲存欄C 21、C 23、C 31、C 35Please refer to FIG. 5A, which is a schematic diagram of another embodiment in which the storage page of the flash memory 10 of the present invention has not been written with data. As shown in the figure, the second storage page P 2 has five storage columns C 21 to C 25 , and the third storage page P 3 also has five storage columns C 31 to C 35 , where the storage columns C 22 , C 24 , C 32 , C 33 , and C 34 are damaged and are damaged storage areas (invalid storage areas), and storage columns C 21 , C 23 , C 31 , and C 35 are not damaged but are undamaged storage areas (effective storage areas). In this embodiment, the third storage field to store only the page P 3 C 31, C 35 is not damaged storage areas which store the page P 3 represents a third active only two data storage areas can be stored efficiently. In order to facilitate the management of the storage space of the flash memory 10, the administrator will set the effective storage capacity of two adjacent storage pages to be the same. In this embodiment, the fifth storage column C 25 of the second storage page P 2 is preset as an unused storage area (invalid storage area) without storing valid data, so that the adjacent second storage page P 2 and The third storage page P 3 has the same number of effective storage areas (2 effective storage areas), that is, the effective storage capacity of the second storage page P 2 is the same as the effective storage capacity of the third storage page P 3 . As shown in the fifth figure B, since the storage columns C 22 , C 24 , C 25 , C 32 , C 33 , and C 34 are invalid storage areas without storing valid data, the control circuit 23 writes invalid data to the storages. Columns C22 , C24 , C25 , C32 , C33 , C34 , and write valid data to the storage columns C21 , C23 , C31 , C35 .

復參閱第一圖,於本發明之一實施例中,控制器20可以預先儲存至少一無效資料,且該至少一無效資料並非為固定常數,以提供給控制電路23,例如該些無效資料儲存於儲存單元27,如此控制器20可不需要選擇電路24選擇參考資料,控制電路23可寫入儲存單元27所提供的無效資料至無效儲存區,而緩衝器22可直接提供該至少一輸入資料至擾亂電路25。Referring again to the first figure, in an embodiment of the present invention, the controller 20 may store at least one invalid data in advance, and the at least one invalid data is not a fixed constant, and is provided to the control circuit 23, for example, the invalid data is stored. In the storage unit 27, the controller 20 may not need the selection circuit 24 to select the reference data, the control circuit 23 may write the invalid data provided by the storage unit 27 to the invalid storage area, and the buffer 22 may directly provide the at least one input data to Disruption circuit 25.

綜上所述,本發明之快閃記憶體之控制器及控制方法提供至少一無效資料,該至少一無效資料並非為固定常數,當執行寫入主機傳送的至少一輸入資料至快閃記體的作業時,擾亂該至少一輸入資料而產生至少一有效資料,並寫入該至少一有效資料至快閃記憶體之至少一有效儲存區,且寫入該至少一無效資料至有效儲存區所鄰近之至少一無效儲存區。如此可以降低無效儲存區對有效儲存區之干擾,而可以提高快閃記憶體的可靠度以及可用的儲存空間。In summary, the flash memory controller and control method of the present invention provide at least one invalid data. The at least one invalid data is not a fixed constant. When writing at least one input data transmitted from the host to the flash memory, During operation, the at least one input data is disturbed to generate at least one valid data, and the at least one valid data is written to at least one valid storage area of the flash memory, and the at least one invalid data is written to a vicinity of the valid storage area. At least one invalid storage area. This can reduce the interference of the invalid storage area to the effective storage area, and can improve the reliability of the flash memory and the available storage space.

由上述可知,本發明確實已經達於突破性之架構,而具有改良之發明內容,同時又能夠達到產業上利用性與進步性,當符合專利法之規定,爰依法提出發明專利申請,懇請 鈞局審查委員授予合法專利權,至為感禱。As can be seen from the above, the present invention has indeed reached a groundbreaking structure, with improved content of the invention, and at the same time, it can achieve industrial applicability and progress. When it complies with the provisions of the Patent Law, it will file an application for an invention patent in accordance with the law. The examiner of the Office granted the legal patent right.

5‧‧‧主機5‧‧‧host

10‧‧‧快閃記憶體 10‧‧‧Flash memory

101‧‧‧儲存區塊 101‧‧‧Storage block

20‧‧‧控制器 20‧‧‧ Controller

21‧‧‧主機介面 21‧‧‧Host Interface

22‧‧‧緩衝器 22‧‧‧Buffer

23‧‧‧控制電路 23‧‧‧Control circuit

24‧‧‧選擇電路 24‧‧‧Selection circuit

25‧‧‧擾亂電路 25‧‧‧ Disturb Circuit

26‧‧‧快閃記憶體介面 26‧‧‧Flash Memory Interface

27‧‧‧儲存單元 27‧‧‧Storage unit

28‧‧‧資料篩選單元 28‧‧‧ Data Screening Unit

29‧‧‧解擾亂電路 29‧‧‧Descramble Circuit

P1~PN‧‧‧儲存頁P 1 ~ P N ‧‧‧Save page

C11~C1M‧‧‧儲存欄C 11 ~ C 1M ‧‧‧Storage column

C21~C25‧‧‧儲存欄C 21 ~ C 25 ‧‧‧Storage column

C31~C35‧‧‧儲存欄C 31 ~ C 35 ‧‧‧Storage column

第一圖為本發明之快閃記憶體之控制器之一實施例的方塊圖; 第二圖為本發明之快閃記憶體之一實施例的示意圖; 第三圖為本發明之快閃記憶體之一儲存頁之一實施例的示意圖; 第四A圖為本發明之快閃記憶體之儲存頁尚未被寫入資料之一實施例的示意圖; 第四B圖為第四A圖之儲存頁被寫入資料的示意圖; 第五A圖為本發明之快閃記憶體之儲存頁尚未被寫入資料之另一實施例的示意圖;以及 第五B圖為第五A圖之儲存頁被寫入資料的示意圖。The first diagram is a block diagram of an embodiment of a flash memory controller of the present invention; the second diagram is a schematic diagram of an embodiment of a flash memory of the present invention; the third diagram is a flash memory of the present invention A schematic diagram of an embodiment of a storage page of a bank; FIG. 4A is a schematic diagram of an embodiment of a storage page of the flash memory of the present invention that has not yet been written with data; FIG. 4B is a storage of a fourth A diagram Schematic diagram of data being written into a page; FIG. 5A is a schematic diagram of another embodiment of a flash memory storage page that has not yet been written with data; and FIG. 5B is a storing page of a fifth A Schematic diagram of writing data.

Claims (12)

一種快閃記憶體之控制器,供控制一快閃記憶體,該控制器包含: 一擾亂電路,接收至少一輸入資料,並擾亂該至少一輸入資料而產生至少一有效資料;以及 一控制電路,耦接於該擾亂電路,該控制電路接收至少一無效資料與該擾亂電路產生之該至少一有效資料,該至少一無效資料並非為一固定常數,且寫入該至少一有效資料至該快閃記憶體之至少一有效儲存區,以及寫入該至少一無效資料至該快閃記憶體之至少一無效儲存區。A flash memory controller for controlling a flash memory. The controller includes: a scramble circuit that receives at least one input data and disturbs the at least one input data to generate at least one valid data; and a control circuit Is coupled to the disturbance circuit, the control circuit receives at least one invalid data and the at least one valid data generated by the disturbance circuit, the at least one invalid data is not a fixed constant, and writes the at least one valid data to the fast At least one valid storage area of the flash memory, and writing the at least one invalid data to the at least one invalid storage area of the flash memory. 如申請專利範圍第1項所述之快閃記憶體之控制器,更包含: 一資料篩選單元,耦接於該控制電路,以接收該控制電路從該快閃記憶體所讀取的至少一資料序列,該至少一資料序列包含該至少一有效資料與該至少一無效資料,該資料篩選單元依據該至少一無效儲存區之位置資訊從該至少一資料序列篩選掉該至少一無效資料,而篩選出該至少一有效資料;以及 一解擾亂電路,耦接於該資料篩選單元,以接收該資料篩選單元輸出之該至少一有效資料,並解擾亂該至少一有效資料,而產生至少一輸出資料。The flash memory controller described in item 1 of the patent application scope further includes: a data screening unit coupled to the control circuit to receive at least one read by the control circuit from the flash memory Data sequence, the at least one data sequence includes the at least one valid data and the at least one invalid data, the data filtering unit filters out the at least one invalid data from the at least one data sequence according to the location information of the at least one invalid storage area, and Screen out the at least one valid data; and a descrambling circuit coupled to the data screening unit to receive the at least one valid data output by the data screening unit and descramble the at least one valid data to generate at least one output data. 如申請專利範圍第2項所述之快閃記憶體之控制器,更包含一儲存單元,其耦接該資料篩選單元及該控制電路,該儲存單元儲存該至少一無效儲存區之位置資訊。According to the flash memory controller described in item 2 of the scope of the patent application, the controller further includes a storage unit coupled to the data screening unit and the control circuit, and the storage unit stores position information of the at least one invalid storage area. 如申請專利範圍第1項所述之快閃記憶體之控制器,更包含一選擇電路,其接收該至少一輸入資料及至少一參考資料,該選擇電路分別耦接該控制電路與該擾亂電路,該控制電路依據該至少一有效儲存區或該至少一無效儲存區之位置資訊控制該選擇電路選擇該至少一輸入資料或者該至少一參考資料,而輸出該至少一輸入資料或者該至少一參考資料,該擾亂電路接收該選擇電路輸出之該至少一參考資料,並擾亂該至少一參考資料而產生該至少一無效資料。According to the flash memory controller described in item 1 of the patent application scope, it further includes a selection circuit that receives the at least one input data and at least one reference data, the selection circuit is respectively coupled to the control circuit and the scramble circuit. , The control circuit controls the selection circuit to select the at least one input data or the at least one reference data according to the position information of the at least one valid storage area or the at least one invalid storage area, and outputs the at least one input data or the at least one reference Data, the scramble circuit receives the at least one reference data output by the selection circuit, and disturbs the at least one reference data to generate the at least one invalid data. 如申請專利範圍第4項所述之快閃記憶體之控制器,更包含一儲存單元,其耦接該選擇電路及該控制電路,該儲存單元儲存該至少一無效儲存區之位置資訊、該至少一有效儲存區之位置資訊與該至少一參考資料。According to the flash memory controller described in item 4 of the scope of the patent application, the controller further includes a storage unit coupled to the selection circuit and the control circuit. The storage unit stores position information of the at least one invalid storage area, the storage unit, The location information of the at least one valid storage area and the at least one reference data. 如申請專利範圍第1項所述之快閃記憶體之控制器,更包含一儲存單元,其耦接該控制電路,該儲存單元儲存該至少一無效資料。According to the flash memory controller described in item 1 of the patent application scope, the controller further includes a storage unit coupled to the control circuit, and the storage unit stores the at least one invalid data. 如申請專利範圍第1項所述之快閃記憶體之控制器,其中該至少一無效儲存區包含該快閃記憶體之至少一損壞儲存區或/及至少一未利用儲存區。The flash memory controller according to item 1 of the scope of the patent application, wherein the at least one invalid storage area includes at least one damaged storage area or / and at least one unused storage area of the flash memory. 如申請專利範圍第1項所述之快閃記憶體之控制器,更包含: 一主機介面,耦接一主機,該主機傳送該至少一輸入資料至該主機介面; 一緩衝器,耦接於該主機介面,該主機介面傳送該至少一輸入資料至該緩衝器,該緩衝器提供該至少一輸入資料至該擾亂電路;以及 一快閃記憶體介面,耦接於該控制電路與該快閃記憶體之間。The flash memory controller according to item 1 of the scope of patent application, further comprising: a host interface coupled to a host, the host transmitting the at least one input data to the host interface; a buffer, coupled to The host interface, the host interface transmitting the at least one input data to the buffer, the buffer providing the at least one input data to the scramble circuit; and a flash memory interface coupled to the control circuit and the flash Between memories. 一種快閃記憶體之控制方法,供控制一快閃記憶體,該方法包含: 接收至少一輸入資料; 擾亂該至少一輸入資料而產生至少一有效資料; 提供至少一無效資料,該至少一無效資料並非為一固定常數; 寫入該至少一有效資料至該快閃記憶體之至少一有效儲存區;以及 寫入該至少一無效資料至該快閃記憶體之至少一無效儲存區。A flash memory control method for controlling a flash memory. The method includes: receiving at least one input data; disturbing the at least one input data to generate at least one valid data; providing at least one invalid data, the at least one invalid The data is not a fixed constant; writing the at least one valid data into at least one valid storage area of the flash memory; and writing the at least one invalid data into at least one invalid storage area of the flash memory. 如申請專利範圍第9項所述之快閃記憶體之控制方法,更包含: 提供至少一參考資料;以及 擾亂該至少一參考資料而產生該至少一無效資料。According to the flash memory control method described in item 9 of the scope of patent application, the method further includes: providing at least one reference material; and disturbing the at least one reference material to generate the at least one invalid material. 如申請專利範圍第9項所述之快閃記憶體之控制方法,更包含: 從該快閃記憶體讀取至少一資料序列,該至少一資料序列包含該至少一有效資料與該至少一無效資料; 依據該至少一無效儲存區之位置資訊從該至少一資料序列篩選掉該至少一無效資料,而篩選出該至少一有效資料;以及 解擾亂該至少一有效資料,而產生至少一輸出資料。The flash memory control method according to item 9 of the scope of patent application, further comprising: reading at least one data sequence from the flash memory, the at least one data sequence including the at least one valid data and the at least one invalid Data; filtering out the at least one invalid data from the at least one data sequence according to the location information of the at least one invalid storage area, and filtering out the at least one valid data; and descrambling the at least one valid data to generate at least one output data . 如申請專利範圍第9項所述之快閃記憶體之控制方法,其中該至少一無效儲存區包含該快閃記憶體之至少一損壞儲存區或/及至少一未利用儲存區。The flash memory control method according to item 9 of the scope of the patent application, wherein the at least one invalid storage area includes at least one damaged storage area or / and at least one unused storage area of the flash memory.
TW107102680A 2018-01-25 2018-01-25 Controller and control method of flash memory TWI664531B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107102680A TWI664531B (en) 2018-01-25 2018-01-25 Controller and control method of flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107102680A TWI664531B (en) 2018-01-25 2018-01-25 Controller and control method of flash memory

Publications (2)

Publication Number Publication Date
TWI664531B true TWI664531B (en) 2019-07-01
TW201933125A TW201933125A (en) 2019-08-16

Family

ID=68049734

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107102680A TWI664531B (en) 2018-01-25 2018-01-25 Controller and control method of flash memory

Country Status (1)

Country Link
TW (1) TWI664531B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085623A1 (en) * 2004-10-18 2006-04-20 Samsung Electronics Co., Ltd. Data processing apparatus and method for flash memory
CN101673581A (en) * 2008-06-13 2010-03-17 三星电子株式会社 Memory system and method of accessing a semiconductor memory device
CN101859278A (en) * 2009-04-07 2010-10-13 群联电子股份有限公司 Data storage method and storage system for flash memory
CN102646448A (en) * 2011-02-18 2012-08-22 群联电子股份有限公司 Data writing in method for nonvolatile memory, controller and storage device
TW201317779A (en) * 2011-10-27 2013-05-01 Silicon Motion Inc A flash memory device within Three-Bit memory cell structure and its controlling method
TW201346550A (en) * 2012-03-15 2013-11-16 Micron Technology Inc Physical page, logical page, and codeword correspondence
TW201510723A (en) * 2009-09-03 2015-03-16 Pioneer Chip Technology Ltd Page based management of flash storage
TW201523616A (en) * 2013-12-09 2015-06-16 Phison Electronics Corp Memory management method, memory controlling circuit unit, and memory storage device
TW201633314A (en) * 2015-03-09 2016-09-16 群聯電子股份有限公司 Memory control circuit unit, memory storage apparatus and data accessing method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085623A1 (en) * 2004-10-18 2006-04-20 Samsung Electronics Co., Ltd. Data processing apparatus and method for flash memory
CN101673581A (en) * 2008-06-13 2010-03-17 三星电子株式会社 Memory system and method of accessing a semiconductor memory device
CN101859278A (en) * 2009-04-07 2010-10-13 群联电子股份有限公司 Data storage method and storage system for flash memory
TW201510723A (en) * 2009-09-03 2015-03-16 Pioneer Chip Technology Ltd Page based management of flash storage
CN102646448A (en) * 2011-02-18 2012-08-22 群联电子股份有限公司 Data writing in method for nonvolatile memory, controller and storage device
TW201317779A (en) * 2011-10-27 2013-05-01 Silicon Motion Inc A flash memory device within Three-Bit memory cell structure and its controlling method
TW201346550A (en) * 2012-03-15 2013-11-16 Micron Technology Inc Physical page, logical page, and codeword correspondence
TW201523616A (en) * 2013-12-09 2015-06-16 Phison Electronics Corp Memory management method, memory controlling circuit unit, and memory storage device
TW201633314A (en) * 2015-03-09 2016-09-16 群聯電子股份有限公司 Memory control circuit unit, memory storage apparatus and data accessing method

Also Published As

Publication number Publication date
TW201933125A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
US9047273B2 (en) Data transfer management
US20130138871A1 (en) Flash Memory Device and Data Access Method for Same
US20110035539A1 (en) Storage device, and memory controller
TWI591533B (en) Data storage method and data recovery method for data storage device, and data storage device using the same methods
US8230234B2 (en) Semiconductor memory devices that are resistant to power attacks and methods of operating semiconductor memory devices that are resistant to power attacks
US9881679B2 (en) Method of shaping a strobe signal, a data storage system and strobe signal shaping device
TWI664531B (en) Controller and control method of flash memory
US10747660B2 (en) Method and system for forming and using memory superblocks based on performance grades
US11656772B2 (en) Memory controller and storage device including the same
TWI601141B (en) Access method of flash memory and associated memory controller and electronic device
JP6277797B2 (en) Storage medium control apparatus, storage medium control method, and program
TWI712038B (en) Operating methods of nonvolatile memory device and data storage device including the same
US10282106B2 (en) Data storage device and operating method of memory controller
JP2001290791A (en) Microcomputer with built-in nonvolatile semiconductor memory and its control method
US20190286365A1 (en) Flash memory controller and method for controlling flash memory
US9977624B2 (en) Storage control apparatus and storage control method
KR102462829B1 (en) Method of programing secure copy-back of nand flash memery
US11640253B2 (en) Method to use flat relink table in HMB
US11386019B1 (en) Data protection method and storage device
US11853607B2 (en) Optimizing flash memory utilization for NVMe KV pair storage
JP7458755B2 (en) Recording device and method of controlling the recording device
US11550929B2 (en) Memory system
WO2023218967A1 (en) Storage, video recording system, and storage control method
CN109933281B (en) Memory system and operating method thereof
US20160196084A1 (en) Hard disk device with reduced power consumption and power consumption reducing method thereof

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees