TW202015065A - Error handling method, associated data storage device and controller thereof - Google Patents

Error handling method, associated data storage device and controller thereof Download PDF

Info

Publication number
TW202015065A
TW202015065A TW108116832A TW108116832A TW202015065A TW 202015065 A TW202015065 A TW 202015065A TW 108116832 A TW108116832 A TW 108116832A TW 108116832 A TW108116832 A TW 108116832A TW 202015065 A TW202015065 A TW 202015065A
Authority
TW
Taiwan
Prior art keywords
data
controller
cache
volatile memory
storage device
Prior art date
Application number
TW108116832A
Other languages
Chinese (zh)
Other versions
TWI684988B (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 CN201910756354.1A priority Critical patent/CN110990175B/en
Priority to US16/568,192 priority patent/US10884856B2/en
Priority to JP2019177102A priority patent/JP6811819B2/en
Priority to KR1020190119680A priority patent/KR102175884B1/en
Priority to EP19200957.9A priority patent/EP3647951B1/en
Application granted granted Critical
Publication of TWI684988B publication Critical patent/TWI684988B/en
Publication of TW202015065A publication Critical patent/TW202015065A/en

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Read Only Memory (AREA)

Abstract

An error handling method, an associated data storage device and the controller thereof are provided. The error handling method may include: uploading an error handling program to a buffer memory equipped with Error Correction Code (ECC) protection capability; in response to at least one error, interrupting execution of a current procedure and activating an interrupt service; executing the error handling program on the buffer memory; disabling a transmission interface circuit; resetting at least one hardware engine and at least one NV memory element; performing cache rearrangement regarding a data cache within the data storage device, and programming rearranged cache data into the NV memory element, to perform data recovery; and through activating a watchdog module and the transmission interface circuit and relinking with a host device, completing soft reset to make the data storage device operate normally again.

Description

錯誤處置方法以及資料儲存裝置及其控制器Error handling method, data storage device and its controller

本發明係有關於快閃記憶體(Flash memory)之存取(access),尤指一種錯誤處置(error handling)方法以及相關之資料儲存裝置及其控制器。The present invention relates to the access of flash memory, especially an error handling method and related data storage device and its controller.

快閃記憶體可廣泛地應用於各種可攜式或非可攜式資料儲存裝置(例如:符合SD/MMC、CF、MS、XD或UFS標準之記憶卡;又例如:固態硬碟;又例如:符合UFS或EMMC規格之嵌入式(embedded)儲存裝置)中。以常用的NAND型快閃記憶體而言,最初有單階細胞(single level cell,SLC)、多階細胞(multiple level cell,MLC)等類型的快閃記憶體。由於記憶體的技術不斷地發展,較新的資料儲存裝置產品可採用三階細胞(triple level cell,TLC)快閃記憶體,甚至四階細胞(quadruple level cell,QLC)快閃記憶體。為了確保資料儲存裝置對快閃記憶體之存取控制能符合相關規範,快閃記憶體的控制器通常備有某些管理機制以妥善地管理其內部運作。Flash memory can be widely used in various portable or non-portable data storage devices (for example: memory cards that comply with SD/MMC, CF, MS, XD or UFS standards; for example: solid-state hard drives; for example : Embedded storage devices that meet UFS or EMMC specifications). In terms of commonly used NAND flash memory, there are initially single-level cells (SLC), multiple-level cells (MLC) and other types of flash memory. Due to the continuous development of memory technology, newer data storage device products can use triple level cell (TLC) flash memory, or even quadruple level cell (QLC) flash memory. In order to ensure that the data storage device's access control to the flash memory can meet the relevant specifications, the controller of the flash memory is usually equipped with certain management mechanisms to properly manage its internal operations.

依據相關技術,有了這些管理機制的資料儲存裝置還是有不足之處。舉例來說,隨著半導體製程中的元件密度越來越高,軟錯誤(soft error)之發生率也變得更高。當軟錯誤發生時,常常伴隨著位元翻轉(Bit flip)的錯誤。相關技術中提出了某些建議,以嘗試避免此狀況變得更糟。不論這些建議中之哪一個建議被採用,當錯誤位元的數量超過某錯誤更正機制可更正的範圍時,傳統架構典型地控制資料儲存裝置進入系統停止(system halt)狀態,以防止各種不可預期的錯誤進一步發生。然而,傳統架構之這樣的控制一定造成整個資料儲存裝置無法繼續操作,且大幅地增加使用者資料遺失(data loss)的風險。因此,需要一種新穎的方法及相關架構,以在沒有副作用或較不可能帶來副作用之狀況下實現具有可靠的管理機制之資料儲存裝置。According to related technologies, the data storage devices with these management mechanisms still have deficiencies. For example, as the density of devices in semiconductor manufacturing becomes higher and higher, the incidence of soft errors becomes higher. When a soft error occurs, it is often accompanied by a bit flip error. Some suggestions have been made in the related art to try to avoid this situation from getting worse. Regardless of which of these suggestions is adopted, when the number of error bits exceeds the range that can be corrected by a certain error correction mechanism, the traditional architecture typically controls the data storage device to enter a system halt state to prevent various unpredictable Error occurred further. However, such control of the traditional architecture must make the entire data storage device unable to continue to operate, and greatly increase the risk of user data loss (data loss). Therefore, there is a need for a novel method and related architecture to implement a data storage device with a reliable management mechanism without side effects or less likely to cause side effects.

本發明之一目的在於提供一種錯誤處置(error handling)方法以及相關之資料儲存裝置及其控制器,以解決上述問題。An object of the present invention is to provide an error handling method and related data storage device and its controller to solve the above problems.

本發明之另一目的在於提供一種錯誤處置方法以及相關之資料儲存裝置及其控制器,以在沒有副作用或較不可能帶來副作用之狀況下將可靠的管理機制賦予資料儲存裝置。Another object of the present invention is to provide an error handling method and related data storage device and its controller, so as to give a reliable management mechanism to the data storage device without side effects or less likely to cause side effects.

本發明之至少一實施例提供一種錯誤處置方法,其中該錯誤處置方法係應用於一資料儲存裝置,該資料儲存裝置包含一非揮發性記憶體(non-volatile memory,NV memory)以及用來控制該非揮發性記憶體的存取之一記憶體控制器,該非揮發性記憶體包含至少一非揮發性記憶體元件(NV memory element),以及上述至少一非揮發性記憶體元件包含複數個區塊。該錯誤處置方法可包含:將一錯誤處置程式上傳(upload)至具備錯誤更正碼(Error Correction Code,ECC)保護能力之一緩衝記憶體,其中該緩衝記憶體係位於該記憶體控制器中;因應至少一錯誤,中斷目前程序的執行並啟動中斷服務;執行該緩衝記憶體上的該錯誤處置程式;停用(disable)一傳輸介面電路,其中該傳輸介面電路係位於該記憶體控制器中,且係用來對一主機(host device)進行通訊;重設至少一硬體引擎以及該至少一非揮發性記憶體元件;針對該資料儲存裝置中之一資料快取進行快取重新整理,且將重新整理後的快取資料編程至該至少一非揮發性記憶體元件,以進行資料復原;以及透過啟動該記憶體控制器中之一看門狗(Watchdog)模組、且啟動該傳輸介面電路並與該主機重新連線,來完成軟重設(soft reset),以使該資料儲存裝置再度正常地運作。At least one embodiment of the present invention provides an error handling method, wherein the error handling method is applied to a data storage device including a non-volatile memory (NV memory) and used to control A memory controller for accessing the non-volatile memory, the non-volatile memory includes at least one non-volatile memory element (NV memory element), and the at least one non-volatile memory element includes a plurality of blocks . The error handling method may include: uploading an error handling program (upload) to a buffer memory with error correction code (ECC) protection capability, wherein the buffer memory system is located in the memory controller; At least one error, interrupt the execution of the current program and start the interrupt service; execute the error handling program on the buffer memory; disable a transmission interface circuit, wherein the transmission interface circuit is located in the memory controller, And is used to communicate with a host device; reset at least one hardware engine and the at least one non-volatile memory component; perform a cache refresh on a data cache in the data storage device, and Programming the refreshed cached data to the at least one non-volatile memory component for data recovery; and by activating one of the watchdog modules in the memory controller and activating the transmission interface The circuit is reconnected with the host to complete a soft reset, so that the data storage device operates normally again.

本發明之至少一實施例提供一種資料儲存裝置,其可包含:一非揮發性記憶體,用來儲存資訊,其中該非揮發性記憶體包含至少一非揮發性記憶體元件,以及上述至少一非揮發性記憶體元件包含複數個區塊;以及一控制器,耦接至該非揮發性記憶體,用來控制該資料儲存裝置之運作。該控制器可包含一緩衝記憶體,用來暫時地儲存資訊;符合一特定通訊標準之一傳輸介面電路,用來依據該特定通訊標準進行通訊;以及一處理電路,其中該處理電路可依據來自一主機(host device)的複數個主機命令(host command)控制該控制器,以容許該主機透過該控制器存取該非揮發性記憶體。例如:該控制器將一錯誤處置程式上傳至具備錯誤更正碼(ECC)保護能力之該緩衝記憶體;因應至少一錯誤,該控制器中斷目前程序的執行並啟動中斷服務;該控制器執行該緩衝記憶體上的該錯誤處置程式;該控制器停用該傳輸介面電路,其中該傳輸介面電路係用來對該主機進行通訊;該控制器重設至少一硬體引擎以及該至少一非揮發性記憶體元件;該控制器針對該資料儲存裝置中之一資料快取進行快取重新整理,且將重新整理後的快取資料編程至該至少一非揮發性記憶體元件,以進行資料復原;以及該控制器透過啟動該記憶體控制器中之一看門狗模組、且啟動該傳輸介面電路並與該主機重新連線,來完成軟重設,以使該資料儲存裝置再度正常地運作。At least one embodiment of the present invention provides a data storage device, which may include: a non-volatile memory for storing information, wherein the non-volatile memory includes at least one non-volatile memory element, and the at least one non-volatile memory element The volatile memory element includes a plurality of blocks; and a controller, coupled to the non-volatile memory, is used to control the operation of the data storage device. The controller may include a buffer memory for temporarily storing information; a transmission interface circuit conforming to a specific communication standard for communicating according to the specific communication standard; and a processing circuit, wherein the processing circuit may be based on A plurality of host commands of a host device control the controller to allow the host to access the non-volatile memory through the controller. For example: the controller uploads an error handling program to the buffer memory with error correction code (ECC) protection capability; in response to at least one error, the controller interrupts the execution of the current program and starts the interrupt service; the controller executes the Buffer the error handling program on the memory; the controller disables the transmission interface circuit, wherein the transmission interface circuit is used to communicate with the host; the controller resets at least one hardware engine and the at least one non-volatile A memory component; the controller performs a cache refresh on one of the data caches in the data storage device, and programs the refreshed cache data to the at least one non-volatile memory component for data recovery; And the controller completes the soft reset by activating one of the watchdog modules in the memory controller, and activating the transmission interface circuit and reconnecting with the host, so that the data storage device operates normally again .

本發明之至少一實施例提供一種資料儲存裝置之控制器,其中該資料儲存裝置包含該控制器與一非揮發性記憶體,該非揮發性記憶體包含至少一非揮發性記憶體元件,以及上述至少一非揮發性記憶體元件包含複數個區塊。該控制器可包含一緩衝記憶體,用來暫時地儲存資訊;符合一特定通訊標準之一傳輸介面電路,用來依據該特定通訊標準進行通訊;以及一處理電路,其中該處理電路可依據來自一主機的複數個主機命令控制該控制器,以容許該主機透過該控制器存取該非揮發性記憶體。例如:該控制器將一錯誤處置程式上傳至具備錯誤更正碼(ECC)保護能力之該緩衝記憶體;因應至少一錯誤,該控制器中斷目前程序的執行並啟動中斷服務;該控制器執行該緩衝記憶體上的該錯誤處置程式;該控制器停用該傳輸介面電路,其中該傳輸介面電路係用來對該主機進行通訊;該控制器重設至少一硬體引擎以及該至少一非揮發性記憶體元件;該控制器針對該資料儲存裝置中之一資料快取進行快取重新整理,且將重新整理後的快取資料編程至該至少一非揮發性記憶體元件,以進行資料復原;以及該控制器透過啟動該記憶體控制器中之一看門狗模組、且啟動該傳輸介面電路並與該主機重新連線,來完成軟重設,以使該資料儲存裝置再度正常地運作。At least one embodiment of the present invention provides a controller for a data storage device, wherein the data storage device includes the controller and a non-volatile memory, the non-volatile memory includes at least one non-volatile memory element, and the above At least one non-volatile memory device includes a plurality of blocks. The controller may include a buffer memory for temporarily storing information; a transmission interface circuit conforming to a specific communication standard for communicating according to the specific communication standard; and a processing circuit, wherein the processing circuit may be based on A plurality of host commands of a host control the controller to allow the host to access the non-volatile memory through the controller. For example: the controller uploads an error handling program to the buffer memory with error correction code (ECC) protection capability; in response to at least one error, the controller interrupts the execution of the current program and starts the interrupt service; the controller executes the Buffer the error handling program on the memory; the controller disables the transmission interface circuit, wherein the transmission interface circuit is used to communicate with the host; the controller resets at least one hardware engine and the at least one non-volatile A memory component; the controller performs a cache refresh on one of the data caches in the data storage device, and programs the refreshed cache data to the at least one non-volatile memory component for data recovery; And the controller completes the soft reset by activating one of the watchdog modules in the memory controller, and activating the transmission interface circuit and reconnecting with the host, so that the data storage device operates normally again .

本發明的好處之一是,透過仔細設計之管理機制,本發明能針對該控制器的運作進行妥善的控制,尤其,使資料儲存裝置能於軟錯誤(soft error)發生時進行自我修復,例如在資料儲存裝置遭受干擾(例如:輻射、雜訊等)的情況下。由於資料儲存裝置能於軟錯誤發生時進行自我修復,故本發明能降低軟錯誤率(Soft Error Rate,SER),並且也能夠極度地降低使用者資料遺失的風險。另外,依據本發明之實施例來實施並不會增加許多額外的成本。因此,相關技術的問題可被解決,且整體成本不會增加太多。相較於傳統架構,本發明能在沒有副作用或較不可能帶來副作用之狀況下達到資料儲存裝置之最佳化效能。One of the advantages of the present invention is that, through a carefully designed management mechanism, the present invention can properly control the operation of the controller, in particular, enable the data storage device to repair itself when a soft error occurs, such as When the data storage device is subject to interference (eg, radiation, noise, etc.). Since the data storage device can repair itself when a soft error occurs, the present invention can reduce the soft error rate (SER), and can also extremely reduce the risk of user data loss. In addition, implementation according to the embodiments of the present invention does not increase many additional costs. Therefore, the problems of the related art can be solved without increasing the overall cost much. Compared with the traditional architecture, the present invention can achieve the optimized performance of the data storage device without side effects or less likely to cause side effects.

請參考第1圖,第1圖為依據本發明一第一實施例之一種資料儲存裝置100與一主機(host device)50的示意圖。例如:資料儲存裝置100可為固態硬碟(Solid State Drive,SSD)。另外,主機50的例子可包含(但不限於):多功能行動電話(multifunctional mobile phone)、平板電腦(tablet)、以及個人電腦(personal computer)諸如桌上型電腦與膝上型電腦。依據本實施例,資料儲存裝置100可包含一控制器諸如記憶體控制器110,且可另包含一非揮發性記憶體(non-volatile memory,NV memory)120,其中該控制器係用來存取(access)非揮發性記憶體120,且非揮發性記憶體120係用來儲存資訊。Please refer to FIG. 1, which is a schematic diagram of a data storage device 100 and a host device 50 according to a first embodiment of the present invention. For example, the data storage device 100 may be a solid state drive (SSD). In addition, examples of the host 50 may include (but are not limited to): multifunctional mobile phones, tablet computers, and personal computers such as desktop computers and laptop computers. According to this embodiment, the data storage device 100 may include a controller such as a memory controller 110, and may further include a non-volatile memory (NV memory) 120, wherein the controller is used to store The non-volatile memory 120 is accessed, and the non-volatile memory 120 is used to store information.

非揮發性記憶體120可包含複數個非揮發性記憶體元件(NV memory element)122-1、122-2、…與122-N,其中符號「N」可代表大於一的正整數。例如:非揮發性記憶體120可為一快閃記憶體(Flash memory),而非揮發性記憶體元件122-1、122-2、…與122-N可分別為複數個快閃記憶體晶片(Flash memory chip;可簡稱為快閃晶片)或複數個快閃記憶體裸晶(Flash memory die;可簡稱為快閃裸晶),但本發明並不限於此。此外,資料儲存裝置100可更包括揮發性記憶體元件130以供進行資料緩衝,其中,揮發性記憶體元件130較佳為動態隨機存取記憶體(Dynamic Random Access Memory,簡稱DRAM)。在記憶體控制器110的控制下,資料儲存裝置100可利用揮發性記憶體元件130的儲存空間的至少一部分(例如一部分或全部)作為資料緩衝空間,以供暫時地儲存資料,例如在存取非揮發性記憶體120的期間。另外,揮發性記憶體元件130為非必要元件。The non-volatile memory 120 may include a plurality of non-volatile memory elements (NV memory elements) 122-1, 122-2, ..., and 122-N, where the symbol "N" may represent a positive integer greater than one. For example, the non-volatile memory 120 may be a flash memory, and the non-volatile memory elements 122-1, 122-2, ..., and 122-N may be a plurality of flash memory chips, respectively. (Flash memory chip; may be referred to as flash chip) or a plurality of flash memory die (Flash memory die; may be referred to as flash die), but the invention is not limited thereto. In addition, the data storage device 100 may further include a volatile memory element 130 for data buffering, wherein the volatile memory element 130 is preferably a dynamic random access memory (Dynamic Random Access Memory, DRAM for short). Under the control of the memory controller 110, the data storage device 100 may use at least a portion (eg, part or all) of the storage space of the volatile memory element 130 as a data buffer space for temporarily storing data, for example, during access The period of non-volatile memory 120. In addition, the volatile memory element 130 is an unnecessary element.

記憶體控制器110可包含處理電路諸如微處理器112、儲存器諸如一唯讀記憶體(Read Only Memory,ROM)112M、控制邏輯電路114、緩衝記憶體116、與傳輸介面電路118,其中這些元件可透過一匯流排彼此耦接。緩衝記憶體116較佳為靜態隨機存取記憶體(Static Random Access Memory,SRAM)。舉例來說,記憶體控制器110可利用緩衝記憶體116諸如SRAM作為第一層快取(Cache),並利用揮發性記憶體元件130諸如DRAM作為第二層快取。DRAM的資料儲存量較佳大於緩衝記憶體116的資料儲存量,而緩衝記憶體116所緩衝處理的資料可源自於DRAM或非揮發性記憶體120。The memory controller 110 may include a processing circuit such as a microprocessor 112, a storage such as a read-only memory (Read Only Memory, ROM) 112M, a control logic circuit 114, a buffer memory 116, and a transmission interface circuit 118, of which The components can be coupled to each other through a bus bar. The buffer memory 116 is preferably a static random access memory (SRAM). For example, the memory controller 110 may use the buffer memory 116 such as SRAM as the first layer cache and the volatile memory element 130 such as DRAM as the second layer cache. The data storage capacity of the DRAM is preferably greater than the data storage capacity of the buffer memory 116, and the data buffered by the buffer memory 116 may originate from the DRAM or the non-volatile memory 120.

本實施例之唯讀記憶體112M係用來儲存一程式碼112C,而微處理器112則用來執行程式碼112C以控制對非揮發性記憶體120之存取。請注意,程式碼112C亦得儲存在緩衝記憶體116或任何形式之記憶體內。此外,控制邏輯電路114可包含至少一錯誤更正碼(Error Correction Code,簡稱ECC)電路(未顯示),以保護資料、及/或進行錯誤更正,而傳輸介面電路118可符合一特定通訊標準(諸如串列高級技術附件(Serial Advanced Technology Attachment,SATA)標準、快捷外設互聯(Peripheral Component Interconnect Express,PCIE)標準或非揮發性記憶體快捷(Non-Volatile Memory Express,NVME)標準)且可依據該特定通訊標準進行通訊,尤其,可依據該特定通訊標對主機50進行通訊。The read-only memory 112M of this embodiment is used to store a code 112C, and the microprocessor 112 is used to execute the code 112C to control access to the non-volatile memory 120. Please note that the code 112C must also be stored in the buffer memory 116 or any form of memory. In addition, the control logic circuit 114 may include at least one Error Correction Code (ECC) circuit (not shown) to protect data and/or perform error correction, and the transmission interface circuit 118 may conform to a specific communication standard ( Such as Serial Advanced Technology Attachment (SATA) standard, Peripheral Component Interconnect Express (PCIE) standard or Non-Volatile Memory Express (NVME) standard) and can be based on The specific communication standard communicates, and in particular, the host 50 can be communicated according to the specific communication standard.

於本實施例中,主機50可傳送複數個主機命令(Host Command)至資料儲存裝置100,記憶體控制器110再依據主機命令而對非揮發性記憶體120進行存取(例如讀取或寫入資料),其中上述資料較佳為源自於主機50之使用者資料。主機命令包括邏輯位址,例如:邏輯區塊位址(Logical Block Address)。記憶體控制器110可接收主機命令並將主機命令分別轉譯成記憶體操作命令(簡稱操作命令),再以操作命令控制非揮發性記憶體120讀取、寫入(Write)/編程(Program)非揮發性記憶體120當中特定實體位址之頁面(Page)。記憶體控制器110將資料的邏輯位址與實體位址之間的映射關係記錄於邏輯對實體位址映射表(Logical-to-Physical Address Mapping Table,簡稱「L2P映射表」),其中,實體位址可由通道(Channel)編號、邏輯單元編號(Logical Unit Number,LUN)、平面(Plane)編號、區塊編號、頁面編號以及偏移量(Offset)所組成。於某些實施例中,實體位址的實施可予以變化。例如,實體位址可包含通道編號、邏輯單元編號、平面編號、區塊編號、頁面編號、及/或偏移量。In this embodiment, the host 50 can send a plurality of host commands (Host Command) to the data storage device 100, and the memory controller 110 can access the non-volatile memory 120 according to the host commands (such as reading or writing Data), wherein the above data is preferably user data derived from the host 50. The host command includes a logical address, for example: logical block address (Logical Block Address). The memory controller 110 can receive host commands and translate the host commands into memory operation commands (abbreviated as operation commands), and then use the operation commands to control the non-volatile memory 120 to read, write/program A page with a specific physical address in the non-volatile memory 120. The memory controller 110 records the mapping relationship between the logical address of the data and the physical address in a logical-to-physical address mapping table ("L2P mapping table"), in which The address can be composed of Channel number, Logical Unit Number (LUN), Plane number, Block number, Page number, and Offset. In some embodiments, the implementation of the physical address may be changed. For example, the physical address may include channel number, logical unit number, plane number, block number, page number, and/or offset.

L2P映射表可儲存於非揮發性記憶體120中之一系統區塊中,且可分割成多個群組(Group)映射表,系統區塊較佳為加密區塊且以SLC模式進行資料的編程。記憶體控制器110可依緩衝記憶體116的容量大小而將該多個群組映射表中的一部分或全部群組映射表從非揮發性記憶體120載入緩衝記憶體116,以供快速參考,但本發明不限於此。當使用者資料更新時,記憶體控制器110可依據使用者資料的最新映射關係來更新群組映射表。該多個群組映射表中的任何群組映射表的大小較佳等於非揮發性記憶體元件122-n的一個頁面(Page)的大小,例如16KB(kilobytes;千位元組),其中符號「n」可代表區間[1, N]中之任一正整數,但本發明不限於此。上述任何群組映射表的大小亦可小於頁面的大小,例如4KB或1KB。當然,上述任何群組映射表的大小亦可等於多個非揮發性記憶體元件122的一個頁面的大小,例如在N = 4的情況下,4個非揮發性記憶體元件122的一個頁面的大小,即64KB,其中這4個非揮發性記憶體元件122的頁面亦可稱為超級頁面(Super Page)。The L2P mapping table can be stored in a system block in the non-volatile memory 120, and can be divided into multiple group (Group) mapping tables. The system block is preferably an encrypted block and the data is processed in SLC mode Programming. The memory controller 110 may load part or all of the plurality of group mapping tables from the non-volatile memory 120 into the buffer memory 116 according to the capacity of the buffer memory 116 for quick reference , But the invention is not limited to this. When the user data is updated, the memory controller 110 may update the group mapping table according to the latest mapping relationship of the user data. The size of any group mapping table in the plurality of group mapping tables is preferably equal to the size of one page of the non-volatile memory element 122-n, for example, 16KB (kilobytes; kilobytes), where the symbol "N" can represent any positive integer in the interval [1, N], but the invention is not limited thereto. The size of any of the above group mapping tables may also be smaller than the size of the page, such as 4KB or 1KB. Of course, the size of any of the above group mapping tables can also be equal to the size of one page of multiple non-volatile memory elements 122, for example, in the case of N = 4, one page of 4 non-volatile memory elements 122 The size is 64KB, and the pages of the four non-volatile memory elements 122 may also be called super pages.

此外,記憶體控制器110對非揮發性記憶體120進行編程運作的最小單位可為一個頁面,而記憶體控制器110對非揮發性記憶體120進行抹除(Erase)運作的最小單位可為一個區塊。非揮發性記憶體元件122-n的多個區塊中之每一區塊包含多個頁面。In addition, the smallest unit for the memory controller 110 to program the non-volatile memory 120 may be one page, and the smallest unit for the memory controller 110 to perform the erase operation for the non-volatile memory 120 may be A block. Each block of the plurality of blocks of the non-volatile memory device 122-n includes a plurality of pages.

在寫入快取(Write Cache)模式中,主機50可發出寫入指令以請求記憶體控制器110將一筆使用者資料(簡稱資料)寫入非揮發性記憶體120。記憶體控制器110可從主機50接收或下載該筆資料、利用緩衝記憶體116對該筆資料進行緩衝、且利用揮發性記憶體元件130快取該筆資料,接著,直接回覆寫入指令執行完成的訊息至主機50。之後,當寫入條件滿足時,例如累積的資料長度等於大於頁面長度或超級頁面長度,記憶體控制器110再將快取的資料寫入至非揮發性記憶體120之資料。In the Write Cache mode, the host 50 can issue a write command to request the memory controller 110 to write a piece of user data (referred to as data) to the non-volatile memory 120. The memory controller 110 can receive or download the pen data from the host 50, use the buffer memory 116 to buffer the pen data, and use the volatile memory element 130 to cache the pen data, and then directly reply to the write command to execute The completed message is sent to the host 50. After that, when the writing condition is satisfied, for example, the accumulated data length is equal to or greater than the page length or the super page length, the memory controller 110 then writes the cached data to the data of the non-volatile memory 120.

記憶體控制器110的微處理器112可進行資料快取之快取配置(cache allocation),且因應配置操作、及/或相關操作來更新資料快取之快取頭(cache head)H與快取尾(cache tail)T的位址,如第2圖所示,其中快取頭H與快取尾T可視為資料快取的快取配置參數。第2圖下半部所示之橫軸代表一快取範圍。以揮發性記憶體元件130作為上述資料快取的例子,快取範圍對應於快取位址的範圍。針對快取位址範圍,記憶體控制器110(例如微處理器112)例如以4 KB為單位來配置(allocate)揮發性記憶體元件130的快取空間,例如,依據預定順序,例如,由左至右,來配置揮發性記憶體元件130的快取空間,其中,對於快取位址範圍中的任何兩個位址值,左邊的位址值小於右邊的位址值,但本發明不限於此。The microprocessor 112 of the memory controller 110 can perform cache allocation of the data cache, and update the cache head H and cache of the data cache according to the configuration operation and/or related operations The address of the cache tail T is shown in Figure 2, where the cache head H and the cache tail T can be regarded as the cache configuration parameters of the data cache. The horizontal axis shown in the lower part of Figure 2 represents a cache range. Taking the volatile memory device 130 as an example of the above data cache, the cache area corresponds to the cache address range. For the cache address range, the memory controller 110 (for example, the microprocessor 112) allocates the cache space of the volatile memory element 130 in units of 4 KB, for example, according to a predetermined order, for example, by From left to right, the cache space of the volatile memory device 130 is configured. For any two address values in the cache address range, the left address value is smaller than the right address value, but the present invention does not Limited to this.

微處理器112以循環(cyclic)方式使用揮發性記憶體元件130的快取空間,故快取位址範圍可視為循環位址範圍,且對應於快取位址範圍之快取範圍可視為循環範圍。當微處理器112快取4 KB長度的資料時,微處理器112以基本增量(例如1)來移動(由左至右)快取頭H的位址,使快取頭H在移動前與移動後之間的快取空間可儲存4 KB快取資料。The microprocessor 112 uses the cache space of the volatile memory element 130 in a cyclic manner, so the cache address range can be regarded as a cyclic address range, and the cache range corresponding to the cache address range can be regarded as a cyclic range. When the microprocessor 112 caches 4 KB of data, the microprocessor 112 moves (from left to right) the address of the cache head H in basic increments (for example, 1), so that the cache head H is moved before The cache space between and after the move can store 4 KB cache data.

微處理器112為揮發性記憶體元件130的一筆4 KB資料配置先進先出(First-In First-Out,簡稱FIFO)緩衝器,則該筆4 KB資料將被寫入至非揮發性記憶體120。當先進先出緩衝器配置完成後,微處理器112以基本增量(例如1)來移動(由左至右)快取尾T,以將快取尾T更新成對應於下一筆將被寫入至非揮發性記憶體120的4KB資料。簡言之,快取頭H與快取尾T之間的範圍為已快取的資料(簡稱快取資料),剩餘快取空間則為空白或儲存無效資料,微處理器112可將資料寫入至空白快取空間。The microprocessor 112 configures a First-In First-Out (FIFO) buffer for a piece of 4 KB data of the volatile memory element 130, and the piece of 4 KB data will be written to the non-volatile memory 120. When the configuration of the first-in first-out buffer is completed, the microprocessor 112 moves (from left to right) the cache tail T in basic increments (for example, 1) to update the cache tail T to correspond to the next stroke to be written Load 4KB of data into non-volatile memory 120. In short, the range between the cache head H and the cache tail T is cached data (cache data for short), the remaining cache space is blank or invalid data is stored, and the microprocessor 112 can write the data Enter the blank cache space.

依據某些實施例,上述至少一ECC電路可包含複數個ECC電路諸如複數個ECC引擎。複數個ECC電路可分別因應複數個程序(Procedure)來產生資料的同位元碼(Parity Code)、及/或依據同位元碼來對資料進行錯誤更正。尤其,複數個ECC電路可並行運作,所以記憶體控制器110(例如微處理器112)可指派複數個程序給複數個ECC電路,但本發明不限於此。According to some embodiments, the at least one ECC circuit may include a plurality of ECC circuits such as a plurality of ECC engines. The plurality of ECC circuits can generate parity codes (Parity Code) of the data according to a plurality of procedures (Procedure), respectively, and/or correct errors of the data according to the parity codes. In particular, a plurality of ECC circuits can be operated in parallel, so the memory controller 110 (such as the microprocessor 112) can assign a plurality of programs to the plurality of ECC circuits, but the invention is not limited thereto.

於某些實施例中,緩衝記憶體116可用來儲存重要資訊,重要資訊的例子可包含(但不限於):源自於主機50之使用者資料、特定程式碼之指令(instruction)及資料等。In some embodiments, the buffer memory 116 may be used to store important information. Examples of important information may include (but not limited to): user data originating from the host 50, instructions and data of specific program codes, etc. .

第3圖繪示依據本發明一實施例之一種錯誤處置(Error Handling)方法的流程圖,此錯誤處置方法可應用於資料儲存裝置100,並由資料儲存裝置100的記憶體控制器110所執行,且可針對資料儲存裝置100運作過程中所產生的軟錯誤(Soft Error)進行錯誤處置。本發明錯誤處置方法可使資料儲存裝置100能修復錯誤,並執行軟重置(Soft Reset),使資料儲存裝置100能迅速重新回復到正常模式下工作。FIG. 3 shows a flowchart of an error handling method according to an embodiment of the present invention. This error handling method can be applied to the data storage device 100 and executed by the memory controller 110 of the data storage device 100 In addition, error handling can be performed for soft errors (Soft Error) generated during the operation of the data storage device 100. The error handling method of the present invention enables the data storage device 100 to repair errors and perform a soft reset (Soft Reset), so that the data storage device 100 can quickly return to work in the normal mode.

在下述中,本發明錯誤處置方法可區分成三大步驟,步驟S10~S18又可統稱為本發明錯誤處置方法的初始步驟,步驟S20~S30又可統稱為本發明錯誤處置方法的資料復原(recovery)步驟,步驟S40~S44又可統稱為本發明錯誤處置方法的系統復原步驟,每一步驟的說明如下所述。In the following, the error handling method of the present invention can be divided into three major steps. Steps S10 to S18 can be collectively referred to as the initial steps of the error handling method of the present invention, and steps S20 to S30 can be collectively referred to as data recovery of the error handling method of the present invention ( Recovery) steps, steps S40 ~ S44 can also be collectively referred to as the system recovery step of the error handling method of the present invention, the description of each step is as follows.

於步驟S10中,記憶體控制器110將錯誤處置程式上傳(upload)至緩衝記憶體116,其中,緩衝記憶體116較佳具備ECC保護能力,尤其,依據同位元碼進行錯誤更正的能力。例如,緩衝記憶體116可以自行產生同位元碼以保護錯誤處置程式;或是,ECC電路對錯誤處置程式產生同位元碼,且記憶體控制器110將錯誤處置程式以及同位元碼一起上傳(upload)至緩衝記憶體116。由於緩衝記憶體116具備ECC保護能力,因此,可以有效地保護錯誤處置程式。In step S10, the memory controller 110 uploads the error handling program to the buffer memory 116. The buffer memory 116 preferably has ECC protection capabilities, in particular, the ability to correct errors based on parity codes. For example, the buffer memory 116 can generate the parity code by itself to protect the error handling program; or, the ECC circuit generates the parity code for the error handling program, and the memory controller 110 uploads the error handling program and the parity code together (upload ) To the buffer memory 116. Since the buffer memory 116 has ECC protection capability, the error handling program can be effectively protected.

於步驟S11中,記憶體控制器110判斷是否產生軟錯誤,如果是則執行步驟S12,如果否則重複執行步驟S11。其中,軟錯誤包括硬體元件或韌體(Firmware)執行所產生的錯誤,之後,將以錯誤處置程式進行錯誤的處置,而非以傳統的系統重開(Reboot)方式來進行錯誤的處置。記憶體控制器110較佳以內建的錯誤偵測電路來判斷是否產生軟錯誤;如果記憶體控制器110具有多個核心(Cores),則該多個核心中的一個核心可用以判斷是否產生軟錯誤。In step S11, the memory controller 110 determines whether a soft error has occurred, and if so, step S12 is executed, and if not, step S11 is repeatedly executed. Among them, soft errors include errors generated by the execution of hardware components or firmware (Firmware), after which, the error handling program will be used for error handling instead of the traditional system reboot (Reboot) method for error handling. The memory controller 110 preferably uses a built-in error detection circuit to determine whether a soft error is generated; if the memory controller 110 has multiple cores, one of the multiple cores can be used to determine whether to generate a soft error Soft errors.

第4圖繪示依據本發明一實施例之關於記憶體控制器110如何判斷是否產生軟錯誤的實施細節,其中,舉例來說,微處理器112之硬體架構可採用精簡指令集計算(Reduced Instruction Set Computing,簡稱RISC)架構諸如阿爾戈精簡指令集計算核心(Argonaut RISC Core,簡稱ARC)架構來實施,且可內建指令近端耦接記憶體(Instruction Close Coupled Memory,簡稱ICCM)以及資料近端耦接記憶體(Data Close Coupled Memory,簡稱DCCM),但本發明不限於此。微處理器112可透過SATA控制器(例如SATA控制器引擎)控制SATA PHY電路之運作,且可透過控制邏輯電路114中之閃存控制器(例如閃存控制器引擎)控制邏輯電路114中之相關電路(例如:用來介接(Interfacing)非揮發性記憶體120之輸入輸出介面電路、上述至少一ECC電路等)。造成軟錯誤的原因例如包含:FIG. 4 shows implementation details about how the memory controller 110 determines whether a soft error is generated according to an embodiment of the present invention. For example, the hardware architecture of the microprocessor 112 can use reduced instruction set calculation (Reduced Instruction Set Computing (RISC) architecture, such as Argonaut RISC Core (ARC) architecture, can be implemented with built-in instruction Close Coupled Memory (ICCM) and data The near-end is coupled to a memory (Data Close Coupled Memory, DCCM for short), but the invention is not limited thereto. The microprocessor 112 can control the operation of the SATA PHY circuit through a SATA controller (such as a SATA controller engine), and can control related circuits in the logic circuit 114 through a flash memory controller (such as a flash memory controller engine) in the control logic circuit 114. (For example: an input-output interface circuit for interfacing the non-volatile memory 120, the at least one ECC circuit, etc.). Examples of causes of soft errors include:

(A) 主機命令1秒超時(Host command 1 second timeout),其可包含: (1) 超時條件#1:DRAM或ARC DCCM變量(Variable)錯誤導致韌體停止(Firmware Halt); (2) 超時條件#2:發生硬體系統、SATA控制器引擎、或閃存控制器引擎之異常停止(abnormal halt);以及 (3) 超時條件#3:ICCM碼位址映射(Address Mapping)錯誤,其中 ICCM碼位址映射錯誤以及ICCM碼指令(例外)錯誤亦屬於ICCM碼錯誤;(A) Host command 1 second timeout (Host command 1 second timeout), which may include: (1) Time-out condition #1: DRAM or ARC DCCM variable (Variable) error causes the firmware to stop (Firmware Halt); (2) Time-out condition #2: An abnormal halt of the hardware system, SATA controller engine, or flash controller engine occurs; and (3) Time-out condition #3: ICCM code address mapping (Address Mapping) error, where ICCM code address mapping error and ICCM code command (exception) error also belong to ICCM code error;

(B) ICCM碼指令(例外)錯誤(ICCM code instruction (exception) error),諸如ICCM碼指令錯誤、ICCM碼指令例外錯誤、及/或ICCM碼例外錯誤;以及(B) ICCM code instruction (exception) error, such as ICCM code instruction error, ICCM code instruction exception error, and/or ICCM code exception error; and

(C) 無法更正的ECC錯誤(Uncorrectable ECC error,UECC錯誤),諸如SRAM的UECC錯誤或DRAM的UECC錯誤,這表示SRAM或DRAM所儲存的資料無法依據對應的同位元碼進行錯誤更正,進而產生UECC錯誤。(C) Uncorrectable ECC error (UECC error), such as UECC error of SRAM or UECC error of DRAM, which means that the data stored in SRAM or DRAM cannot be corrected according to the corresponding parity code, and then generated UECC error.

於步驟S12中,記憶體控制器110中斷目前程序的執行並啟動中斷服務。當偵測到上述多種類的軟錯誤中之任一軟錯誤發生時,微處理器112記錄目前程序的執行位址,中斷目前運行中的程序,並從執行位址跳至對應的中斷服務常式(Interrupt Service Routine,ISR),以啟動中斷服務,其中,一種或多種的軟錯誤可對應至一種中斷服務常式。舉例來說,ISR,諸如中斷處置器,可被來自硬體架構的中斷請求所調用(Invoke),以將中斷請求轉送給微處理器112,來中斷目前運行中的程序。In step S12, the memory controller 110 interrupts the execution of the current program and starts the interrupt service. When any of the above types of soft errors is detected, the microprocessor 112 records the current program execution address, interrupts the currently running program, and jumps from the execution address to the corresponding interrupt service routine (Interrupt Service Routine, ISR) to start the interrupt service, where one or more soft errors can correspond to an interrupt service routine. For example, an ISR, such as an interrupt handler, can be invoked by an interrupt request from the hardware architecture (Invoke) to forward the interrupt request to the microprocessor 112 to interrupt the currently running program.

於步驟S14中,記憶體控制器110執行緩衝記憶體116上的錯誤處置程式。記憶體控制器110從上述目前程序的執行位址跳躍(Jump)至錯誤處置程式的起始處以執行錯誤處置程式。In step S14, the memory controller 110 executes an error handling program on the buffer memory 116. The memory controller 110 jumps from the execution address of the current program to the beginning of the error processing program to execute the error processing program.

於步驟S16中,記憶體控制器110停用(Disable)傳輸介面電路118,尤其,SATA PHY電路,其中SATA控制器與SATA PHY電路位於傳輸介面電路118中。依據本實施例,記憶體控制器110停用傳輸介面電路118來停止對主機50的資料接收及傳送,包括資料、指令以及確認(Acknowledgement,ACK)訊息的接收及傳送,避免增加錯誤之數量。In step S16, the memory controller 110 disables the transmission interface circuit 118, in particular, the SATA PHY circuit, in which the SATA controller and the SATA PHY circuit are located in the transmission interface circuit 118. According to this embodiment, the memory controller 110 disables the transmission interface circuit 118 to stop the reception and transmission of data to the host 50, including the reception and transmission of data, commands, and acknowledgment (Acknowledgement, ACK) messages, to avoid increasing the number of errors.

於步驟S18中,記憶體控制器110重設至少一硬體引擎(例如一或多個硬體引擎)以及非揮發性記憶體元件122諸如快閃記憶體元件(例如快閃晶片或快閃裸晶)。記憶體控制器110可透過重設ECC引擎、SATA控制器引擎、及/或閃存控制器引擎來重設上述至少一硬體引擎,並且可重設非揮發性記憶體元件122,如此一來,硬體引擎以及非揮發性記憶體元件122可以恢復正常狀態,亦可避免硬體引擎持續的錯誤運作而造成資料無法復原。另外,上述至少一硬體引擎可包含發生軟錯誤的硬體引擎。如果記憶體控制器110可以判斷軟錯誤的來源,例如,軟錯誤的來源為SATA控制器引擎的異常停止,則可僅重設SATA控制器引擎。In step S18, the memory controller 110 resets at least one hardware engine (eg, one or more hardware engines) and the non-volatile memory element 122 such as a flash memory element (eg, flash chip or flash bare) crystal). The memory controller 110 can reset the at least one hardware engine by resetting the ECC engine, the SATA controller engine, and/or the flash controller engine, and the non-volatile memory element 122 can be reset. The hardware engine and the non-volatile memory element 122 can be restored to a normal state, and can also prevent the erroneous operation of the hardware engine from causing data to be unrecoverable. In addition, the at least one hardware engine may include a hardware engine in which a soft error occurs. If the memory controller 110 can determine the source of the soft error, for example, the source of the soft error is the abnormal stop of the SATA controller engine, then only the SATA controller engine can be reset.

接下來,記憶體控制器110可針對資料儲存裝置100中之資料快取(例如揮發性記憶體元件130諸如DRAM)進行如第5圖所示的快取重新整理,且將重新整理後的快取資料編程至非揮發性記憶體元件122,以進行資料復原,但本發明不限於此。Next, the memory controller 110 may perform a cache refresh as shown in FIG. 5 for the data cache in the data storage device 100 (for example, the volatile memory element 130 such as DRAM), and the refreshed cache The data is retrieved and programmed into the non-volatile memory element 122 for data recovery, but the invention is not limited thereto.

於步驟S20中,記憶體控制器110重新配置(reallocate)揮發性記憶體元件130的快取資料。為了避免快取資料的遺失,記憶體控制器110將揮發性記憶體元件130的快取資料重新配置至FIFO緩衝器,並準備將快取資料寫入至非揮發性記憶體元件122諸如快閃記憶體元件。為了增加步驟S20的效率,記憶體控制器110以快取尾T的位址為基準,可僅重新配置揮發性記憶體元件130中一個頁面的快取資料,例如,快取尾T左側的4KB快取資料,即基本增量等於1;或者,可僅重新配置揮發性記憶體元件130中一個超級頁面(Super Page)的快取資料,即基本增量等於4,例如,快取尾T左側的16KB快取資料;或者,可僅重新配置揮發性記憶體元件130中一個超級字串(Super String)的快取資料,即基本增量等於12,例如,快取尾T左側的48KB快取資料,至FIFO緩衝器。於是,不論步驟S20中的重新配置的範圍(於第5圖中標示「重新配置範圍」,在快取尾T的旁邊)的大小有多大,記憶體控制器110可使重新配置的快取資料,諸如4KB、16KB或48KB快取資料,於FIFO緩衝器中備妥,以準備將4KB、16KB或48KB快取資料寫入至非揮發性記憶體元件122諸如快閃記憶體元件。In step S20, the memory controller 110 reallocates the cache data of the volatile memory element 130. To avoid the loss of cache data, the memory controller 110 reconfigures the cache data of the volatile memory element 130 to the FIFO buffer and prepares to write the cache data to the non-volatile memory element 122 such as flash Memory components. In order to increase the efficiency of step S20, the memory controller 110 may relocate the cache data of only one page in the volatile memory element 130 based on the address of the cache tail T, for example, 4KB to the left of the cache tail T Cache data, that is, the basic increment is equal to 1; or, you can reconfigure the cache data of only one Super Page in the volatile memory element 130, that is, the basic increment is equal to 4, for example, the left side of the cache tail T 16KB cache data; or, you can only reconfigure the cache data of a Super String in the volatile memory element 130, that is, the basic increment is equal to 12, for example, the 48KB cache to the left of the cache tail T Data to the FIFO buffer. Therefore, regardless of the size of the reconfiguration range in step S20 (marked "reconfiguration range" in Figure 5, next to the cache tail T), the memory controller 110 can enable the reconfigured cache data Cache data, such as 4KB, 16KB, or 48KB, is prepared in the FIFO buffer to prepare 4KB, 16KB, or 48KB cache data to be written to the non-volatile memory element 122 such as a flash memory element.

於步驟S22中,記憶體控制器110判斷是否存在已觸發寫入命令(Triggered Write Command),如果是則執行步驟S24,如果否則執行步驟S26。當主機命令中的寫入命令被觸發後,揮發性記憶體元件130應配置適當的快取空間以緩衝來自主機50的資料。例如,上述已觸發寫入命令可代表接收自主機50的至少一寫入命令。當上述至少一寫入命令被觸發後,揮發性記憶體元件130被預期去配置適當的快取空間以緩衝來自主機50的資料,但可能因為前面的某些步驟而沒有進行此預期的配置操作。此情況下,進入步驟S24以確保此預期的配置操作被進行。In step S22, the memory controller 110 determines whether there is a triggered write command (Triggered Write Command), if it is, step S24 is executed, and if not, step S26 is executed. After the write command in the host command is triggered, the volatile memory element 130 should configure an appropriate cache space to buffer the data from the host 50. For example, the above-mentioned triggered write command may represent at least one write command received from the host 50. When the at least one write command is triggered, the volatile memory device 130 is expected to configure an appropriate cache space to buffer the data from the host 50, but this expected configuration operation may not be performed due to some previous steps . In this case, proceed to step S24 to ensure that this expected configuration operation is performed.

於步驟S24中,記憶體控制器110依據已觸發寫入命令來配置(allocate)揮發性記憶體元件130的快取空間,例如,從快取頭H的原始位置起。當有寫入命令被觸發,記憶體控制器110則右移快取頭H,並使快取頭H的右移量與已觸發寫入命令的數量或資料量相符合。例如,對應於三個已觸發寫入命令之三筆資料可為總共預計寫入12 KB的資料。此情況下,微處理器112可在揮發性記憶體元件130上配置12 KB大小之局部快取空間,快取頭H則右移基本增量(例如1)3次((12 KB / 4 KB) = 3),以更新快取頭H的位址。又例如,對應於二個已觸發寫入命令之二筆資料可為總共預計寫入32 KB的資料。此情況下,微處理器112可在揮發性記憶體元件130上配置32 KB大小之局部快取空間,快取頭H則右移基本增量(例如4)2次((32 KB / 16 KB) = 2),以更新快取頭H的位址。In step S24, the memory controller 110 allocates the cache space of the volatile memory element 130 according to the triggered write command, for example, from the original position of the cache head H. When a write command is triggered, the memory controller 110 moves the cache head H to the right, and makes the right shift amount of the cache head H correspond to the number of write commands triggered or the amount of data. For example, the three pieces of data corresponding to the three triggered write commands may be a total of 12 KB of data to be written. In this case, the microprocessor 112 can configure a local cache space of 12 KB on the volatile memory element 130, and the cache head H is shifted to the right by the basic increment (for example, 1) 3 times ((12 KB / 4 KB ) = 3) to update the address of cache header H. For another example, the two pieces of data corresponding to the two triggered write commands may be a total of 32 KB of data to be written. In this case, the microprocessor 112 can configure a local cache space of 32 KB on the volatile memory element 130, and the cache head H moves to the right by the basic increment (for example, 4) 2 times ((32 KB / 16 KB ) = 2) to update the address of cache header H.

於步驟S26中,記憶體控制器110判斷資料是否未進到揮發性記憶體元件130諸如DRAM,如果是則執行步驟S28,如果否則執行步驟S30。由於步驟S16中SATA PHY電路已被停用,因此已終止了SATA PHY電路的資料傳輸,因此,有可能寫入命令已被觸發,但是,寫入命令之部分資料卻還沒有被緩衝至揮發性記憶體元件130中,因此,快取頭H需作適當的修正,使快取頭H指向有效的快取資料。In step S26, the memory controller 110 determines whether the data has not been transferred to the volatile memory device 130 such as DRAM. If yes, step S28 is executed; if not, step S30 is executed. Since the SATA PHY circuit has been disabled in step S16, the data transmission of the SATA PHY circuit has been terminated. Therefore, it is possible that the write command has been triggered, but part of the data of the write command has not been buffered to volatile In the memory device 130, therefore, the cache head H needs to be appropriately corrected so that the cache head H points to valid cache data.

於步驟S28中,記憶體控制器110重新同步(re-synchronize)揮發性記憶體元件130的快取空間,例如,將快取頭H拉回且指向上述有效的快取資料,諸如最後一筆已被緩衝的資料。記憶體控制器110依據SATA PHY電路的回傳而得知已觸發寫入命令所對應的資料傳輸量,此資料傳輸量即為快取資料的資料量,記憶體控制器110再依據此資料量修正快取頭H的移動量,尤其,依據此資料量決定快取頭H於重新同步操作的修正量(左移量)。例如,快取頭H原本右移基本增量3次,但是快取資料的資料量僅為2,差異值為1,因此,記憶體控制器110左移快取頭H一個基本增量。In step S28, the memory controller 110 re-synchronizes the cache space of the volatile memory element 130, for example, pulls the cache head H back and points to the valid cache data, such as the last Buffered data. The memory controller 110 knows the data transfer amount corresponding to the triggered write command according to the return of the SATA PHY circuit. This data transfer amount is the data amount of the cache data, and the memory controller 110 corrects the data amount according to the data amount. The amount of movement of the cache head H. In particular, the correction amount (left shift amount) of the cache head H in the resynchronization operation is determined based on this data amount. For example, the cache head H was originally moved right by a basic increment of 3 times, but the amount of cache data is only 2, and the difference value is 1. Therefore, the memory controller 110 moves the cache head H to the left by a basic increment.

於步驟S30中,記憶體控制器110將快取資料(尤其,上述重新整理後的快取資料)編程至非揮發性記憶體元件122,其中,快取資料較佳以SLC模式編程至非揮發性記憶體元件122中的快刷區塊(Flushing Block)。快刷區塊選自非揮發性記憶體元件122中的閒置區塊,主要用以在緊急情況下的資料寫入。記憶體控制器110選取快刷區塊(類似主動區塊),並以頁面、超級頁面或超級字串為單位,將快取資料編程至快刷區塊。記憶體控制器110能以大於一個頁面的一預定編程單位,將快取資料編程至快刷區塊。在以該預定編程單位諸如超級頁面或超級字串為單位來編程快刷區塊的情況下,當編程後的剩餘的快取資料無法寫入超級頁面或超級字串時(例如剩餘的快取資料的資料長度小於該預定編程單位),記憶體控制器110可將剩餘的快取資料與虛擬資料(Dummy Data)結合,使結合後的資料長度等於該預定編程單位諸如一個超級頁面或超級字串,再將剩餘的快取資料與虛擬資料編程至快刷區塊的超級頁面或超級字串。當快取資料依序編程至快刷區塊時,快取頭H的位址不變,快取尾T的位址逐漸往右移,當所有快取資料皆編程至快刷區塊後,快取頭H的位址等於快取尾T的位址。當步驟S30執行完成時,則快取資料皆儲存至非揮發性記憶體元件122。In step S30, the memory controller 110 programs the cache data (in particular, the refreshed cache data described above) to the non-volatile memory element 122, wherein the cache data is preferably programmed to non-volatile in the SLC mode Flushing block in the sexual memory element 122. The fast flash block is selected from idle blocks in the non-volatile memory element 122, and is mainly used for writing data in an emergency. The memory controller 110 selects a flash block (similar to an active block), and programs the cache data to the flash block in units of pages, super pages, or super strings. The memory controller 110 can program the cache data to the flash block in a predetermined programming unit larger than one page. In the case of programming a flash block in units of the predetermined programming unit such as a super page or super string, when the remaining cache data after programming cannot be written to the super page or super string (for example, the remaining cache The data length of the data is less than the predetermined programming unit), the memory controller 110 can combine the remaining cache data with the dummy data (Dummy Data) so that the combined data length is equal to the predetermined programming unit such as a super page or super word String, and then program the remaining cached data and virtual data to the superpage or superstring of the flash block. When the cache data is sequentially programmed to the flash block, the address of the cache head H does not change, and the address of the cache tail T gradually moves to the right. When all the cache data is programmed into the flash block, The address of the cache header H is equal to the address of the cache tail T. When the execution of step S30 is completed, the cache data are all stored in the non-volatile memory element 122.

於步驟S40中,記憶體控制器110儲存一錯誤日誌(Error Log),尤其,將軟錯誤發生起的一系列事件的相關資訊記錄於該錯誤日誌,其中錯誤日誌可儲存於非揮發性記憶體120之系統區塊中。In step S40, the memory controller 110 stores an error log, in particular, records information about a series of events from the occurrence of soft errors in the error log, wherein the error log can be stored in a non-volatile memory 120 in the system block.

於步驟S42中,記憶體控制器110啟動記憶體控制器110中之看門狗(Watchdog)模組。舉例來說,看門狗模組可為位於記憶體控制器110中之看門狗電路,且看門狗電路可包含看門狗計時器,其中微處理器112可啟動看門狗計時器以進行軟重設(Soft Reset),軟重設乃以軟體方式進行系統重設,例如,重新執行系統執行檔(或在線編程檔,In-System Programming File)、或清除系統暫存器(Register)的值,以達到系統重設的目的,但本發明不限於此。In step S42, the memory controller 110 activates the watchdog module in the memory controller 110. For example, the watchdog module may be a watchdog circuit located in the memory controller 110, and the watchdog circuit may include a watchdog timer, in which the microprocessor 112 may start the watchdog timer to Perform a soft reset (Soft Reset). Soft reset is a system reset by software, for example, re-execute the system execution file (or online programming file, In-System Programming File), or clear the system register (Register) To achieve the purpose of system reset, but the invention is not limited to this.

於步驟S44中,記憶體控制器110啟動傳輸介面電路118並與主機50重新連線(Re-Link)。由於傳輸介面電路118已重新啟動,因此,微處理器112可透過傳輸介面電路118和主機50重新連線並互動。透過步驟S42與S44之運作,記憶體控制器110(例如微處理器112)可完成軟重設以使資料儲存裝置100再度正常地運作。In step S44, the memory controller 110 activates the transmission interface circuit 118 and reconnects with the host 50 (Re-Link). Since the transmission interface circuit 118 has been restarted, the microprocessor 112 can reconnect and interact with the host 50 through the transmission interface circuit 118. Through the operations of steps S42 and S44, the memory controller 110 (for example, the microprocessor 112) can complete the soft reset to make the data storage device 100 operate normally again.

綜上所述,當資料儲存裝置100的運作發生錯誤時,藉由執行本發明錯誤處置方法,資料儲存裝置100不但可避免系統停止的情況,且迅速地將快取資料儲存至非揮發性記憶體120,以避免快取資料的遺失,並且更藉由軟重設的方式,使資料儲存裝置100再度正常地運作,達到本發明的目的。另外,本發明錯誤處置方法亦儲存錯誤日誌,其可作為系統偵錯的依據。 以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。In summary, when an error occurs in the operation of the data storage device 100, by performing the error handling method of the present invention, the data storage device 100 not only avoids the system stop, but also quickly stores the cached data to non-volatile memory The body 120 avoids the loss of cached data, and the data storage device 100 operates normally again through a soft reset method to achieve the purpose of the present invention. In addition, the error handling method of the present invention also stores an error log, which can be used as a basis for system error detection. The above are only the preferred embodiments of the present invention, and all changes and modifications made in accordance with the scope of the patent application of the present invention shall fall within the scope of the present invention.

50:主機 100:資料儲存裝置 110:記憶體控制器 112:微處理器 112C:程式碼 112M:唯讀記憶體 114:控制邏輯電路 116:緩衝記憶體 118:傳輸介面電路 120:非揮發性記憶體 122、122-1、122-2、…、122-N:非揮發性記憶體元件 130:揮發性記憶體元件 H:快取頭 T:快取尾 S10、S11、S12、S14、S16、S18、S20、S22、S24、S26、S28、S30、S40、S42、S44:步驟50: host 100: data storage device 110: memory controller 112: Microprocessor 112C: Code 112M: read-only memory 114: control logic circuit 116: Buffer memory 118: Transmission interface circuit 120: Non-volatile memory 122, 122-1, 122-2, ..., 122-N: non-volatile memory device 130: volatile memory device H: cache head T: Cache tail S10, S11, S12, S14, S16, S18, S20, S22, S24, S26, S28, S30, S40, S42, S44: Steps

第1圖為依據本發明一實施例之一種資料儲存裝置與一主機(host device)的示意圖。 第2圖繪示依據本發明一實施例之一快取配置(cache allocation)方案。 第3圖繪示依據本發明一實施例之一種錯誤處置方法的流程圖。 第4圖繪示依據本發明一實施例之關於第1圖所示之記憶體控制器如何判斷是否產生軟錯誤的實施細節。 第5圖繪示依據本發明一實施例之於第3圖所示錯誤處置方法中的快取重新整理。FIG. 1 is a schematic diagram of a data storage device and a host device according to an embodiment of the invention. FIG. 2 illustrates a cache allocation scheme according to an embodiment of the invention. FIG. 3 is a flowchart of an error handling method according to an embodiment of the invention. FIG. 4 illustrates implementation details of how the memory controller shown in FIG. 1 determines whether a soft error is generated according to an embodiment of the invention. FIG. 5 illustrates the cache refresh in the error handling method shown in FIG. 3 according to an embodiment of the present invention.

S10、S11、S12、S14、S16、S18、S20、S22、S24、S26、S28、S30、S40、S42、S44:步驟 S10, S11, S12, S14, S16, S18, S20, S22, S24, S26, S28, S30, S40, S42, S44: Steps

Claims (20)

一種錯誤處置方法,該錯誤處置方法係應用於一資料儲存裝置,該資料儲存裝置包含一非揮發性記憶體(non-volatile memory,NV memory)以及用來控制該非揮發性記憶體的存取之一記憶體控制器,該非揮發性記憶體包含至少一非揮發性記憶體元件(NV memory element),該至少一非揮發性記憶體元件包含複數個區塊,該錯誤處置方法包含有: 將一錯誤處置程式上傳(upload)至具備錯誤更正碼(Error Correction Code,ECC)保護能力之一緩衝記憶體,其中該緩衝記憶體係位於該記憶體控制器中; 因應至少一錯誤,中斷目前程序的執行並啟動中斷服務; 執行該緩衝記憶體上的該錯誤處置程式; 停用(disable)一傳輸介面電路,其中該傳輸介面電路係位於該記憶體控制器中,且係用來對一主機(host device)進行通訊; 重設至少一硬體引擎以及該至少一非揮發性記憶體元件; 針對該資料儲存裝置中之一資料快取進行快取重新整理,且將重新整理後的快取資料編程至該至少一非揮發性記憶體元件,以進行資料復原;以及 透過啟動該記憶體控制器中之一看門狗(Watchdog)模組、且啟動該傳輸介面電路並與該主機重新連線,來完成軟重設(soft reset),以使該資料儲存裝置再度正常地運作。An error handling method, the error handling method is applied to a data storage device, the data storage device includes a non-volatile memory (non-volatile memory (NV memory) and used to control the access of the non-volatile memory A memory controller, the non-volatile memory includes at least one non-volatile memory element (NV memory element), the at least one non-volatile memory element includes a plurality of blocks, and the error handling method includes: Uploading an error handling program to a buffer memory with error correction code (ECC) protection capability, wherein the buffer memory system is located in the memory controller; In response to at least one error, interrupt the execution of the current program and start the interrupt service; Execute the error handling program on the buffer memory; Disable a transmission interface circuit, wherein the transmission interface circuit is located in the memory controller and is used to communicate with a host device; Resetting at least one hardware engine and the at least one non-volatile memory component; Cache refreshing is performed on one of the data caches in the data storage device, and the refreshed cached data is programmed into the at least one non-volatile memory element for data recovery; and By activating one of the watchdog modules in the memory controller, and activating the transmission interface circuit and reconnecting with the host, a soft reset is performed to make the data storage device again Works normally. 如申請專利範圍第1項所述之錯誤處置方法,其中因應所述至少一錯誤中斷所述目前程序的執行並啟動該中斷服務另包含: 因應多種類的軟錯誤(soft error)中之任一軟錯誤之發生,中斷所述目前程序的執行並啟動該中斷服務,其中所述至少一錯誤包含所述任一軟錯誤。The error handling method as described in item 1 of the patent application scope, wherein interrupting the execution of the current program in response to the at least one error and starting the interrupt service also includes: In response to the occurrence of any of a variety of soft errors (soft errors), the execution of the current program is interrupted and the interrupt service is started, wherein the at least one error includes any of the soft errors. 如申請專利範圍第1項所述之錯誤處置方法,其中執行該緩衝記憶體上的該錯誤處置程式另包含: 從所述目前程序的執行位址跳躍(jump)至該錯誤處置程式的起始處以執行該錯誤處置程式。The error handling method as described in item 1 of the patent application scope, wherein the execution of the error handling program on the buffer memory further includes: Jump from the execution address of the current program to the beginning of the error handling program to execute the error handling program. 如申請專利範圍第1項所述之錯誤處置方法,其中停用該傳輸介面電路另包含: 停用該傳輸介面電路來停止對該主機的資料接收及傳送。The error handling method as described in item 1 of the patent application scope, wherein disabling the transmission interface circuit additionally includes: Disable the transmission interface circuit to stop data reception and transmission to the host. 如申請專利範圍第1項所述之錯誤處置方法,其中該資料儲存裝置另包含一動態隨機存取記憶體(Dynamic Random Access Memory,DRAM),且該資料快取係位於該動態隨機存取記憶體。The error handling method described in item 1 of the patent application scope, wherein the data storage device further includes a dynamic random access memory (Dynamic Random Access Memory, DRAM), and the data cache is located in the dynamic random access memory body. 如申請專利範圍第1項所述之錯誤處置方法,其中針對該資料儲存裝置中之該資料快取進行該快取重新整理另包含: 於一重新配置範圍中,重新配置(reallocate)該快取的快取資料,其中該重新配置範圍是在該資料快取的一快取尾的旁邊。The error handling method as described in item 1 of the patent application scope, wherein the cache refreshing for the data cache in the data storage device further includes: In a reconfiguration range, reallocate the cached data of the cache, where the reconfiguration range is beside a cache end of the data cache. 如申請專利範圍第6項所述之錯誤處置方法,其中針對該資料儲存裝置中之該資料快取進行該快取重新整理另包含: 判斷是否存在至少一已觸發寫入命令(triggered write command);以及 因應存在所述至少一已觸發寫入命令,依據已觸發寫入命令來配置(allocate)該資料快取的快取空間。The error handling method as described in item 6 of the patent application scope, wherein the cache refresh for the data cache in the data storage device further includes: Determine whether there is at least one triggered write command (triggered write command); and In response to the existence of the at least one triggered write command, the cache space of the data cache is allocated according to the triggered write command. 如申請專利範圍第6項所述之錯誤處置方法,其中針對該資料儲存裝置中之該資料快取進行該快取重新整理另包含: 判斷是否有任何已觸發寫入命令(triggered write command)之資料還沒有被緩衝至該資料快取中;以及 因應有所述任何已觸發寫入命令之該資料還沒有被緩衝至該資料快取中,重新同步(re-synchronize)該資料快取的快取空間。The error handling method as described in item 6 of the patent application scope, wherein the cache refresh for the data cache in the data storage device further includes: Determine whether any triggered write command data has not been buffered in the data cache; and Since the data that has any of the triggered write commands has not been buffered into the data cache, re-synchronize the cache space of the data cache. 如申請專利範圍第1項所述之錯誤處置方法,其中將所述重新整理後的快取資料編程至該至少一非揮發性記憶體元件另包含: 將所述重新整理後的快取資料編程至該至少一非揮發性記憶體元件中的一或多個快刷區塊(Flushing Block),其中該一或多個快刷區塊是選自該至少一非揮發性記憶體元件中的閒置區塊。The error handling method as described in item 1 of the patent application scope, wherein programming the refreshed cache data to the at least one non-volatile memory element further includes: Programming the refreshed cached data to one or more flushing blocks (Flushing Block) in the at least one non-volatile memory element, wherein the one or more flashing blocks are selected from the At least one free block in the non-volatile memory device. 如申請專利範圍第9項所述之錯誤處置方法,其中將所述重新整理後的快取資料編程至該至少一非揮發性記憶體元件中的該一或多個快刷區塊另包含: 以大於一個頁面的一預定編程單位,將所述重新整理後的快取資料編程至該一或多個快刷區塊;以及 因應編程後的剩餘的快取資料的資料長度小於該預定編程單位,將該剩餘的快取資料與虛擬資料(Dummy Data)結合,使結合後的資料長度等於該預定編程單位,再將該剩餘的快取資料與該虛擬資料編程至該一或多個快刷區塊。The error handling method as described in item 9 of the patent application scope, wherein the one or more flash blocks in the at least one non-volatile memory element programmed by the refreshed cache data further include: Programming the refreshed cached data to the one or more flash blocks in a predetermined programming unit larger than one page; and Since the data length of the remaining cached data after programming is less than the predetermined programming unit, combine the remaining cached data with the dummy data (Dummy Data) so that the combined data length is equal to the predetermined programming unit, and then the remaining The cache data and the virtual data are programmed into the one or more flash blocks. 一種資料儲存裝置,包含有: 一非揮發性記憶體(non-volatile memory,NV memory),用來儲存資訊,其中該非揮發性記憶體包含至少一非揮發性記憶體元件(NV memory element),以及該至少一非揮發性記憶體元件包含複數個區塊;以及 一控制器,耦接至該非揮發性記憶體,用來控制該資料儲存裝置之運作,其中該控制器包含: 一緩衝記憶體,用來暫時地儲存資訊; 符合一特定通訊標準之一傳輸介面電路,用來依據該特定通訊標準進行通訊;以及 一處理電路,用來依據來自一主機(host device)的複數個主機命令(host command)控制該控制器,以容許該主機透過該控制器存取(access)該非揮發性記憶體,其中: 該控制器將一錯誤處置程式上傳(upload)至具備錯誤更正碼(Error Correction Code,ECC)保護能力之該緩衝記憶體; 因應至少一錯誤,該控制器中斷目前程序的執行並啟動中斷服務; 該控制器執行該緩衝記憶體上的該錯誤處置程式; 該控制器停用(disable)該傳輸介面電路,其中該傳輸介面電路係用來對該主機進行通訊; 該控制器重設至少一硬體引擎以及該至少一非揮發性記憶體元件; 該控制器針對該資料儲存裝置中之一資料快取進行快取重新整理,且將重新整理後的快取資料編程至該至少一非揮發性記憶體元件,以進行資料復原;以及 該控制器透過啟動該記憶體控制器中之一看門狗(Watchdog)模組、且啟動該傳輸介面電路並與該主機重新連線,來完成軟重設(soft reset),以使該資料儲存裝置再度正常地運作。A data storage device, including: A non-volatile memory (NV memory) for storing information, wherein the non-volatile memory includes at least one non-volatile memory element (NV memory element), and the at least one non-volatile memory The body element contains multiple blocks; and A controller, coupled to the non-volatile memory, is used to control the operation of the data storage device. The controller includes: A buffer memory for temporarily storing information; A transmission interface circuit conforming to a specific communication standard for communication according to the specific communication standard; and A processing circuit for controlling the controller according to a plurality of host commands from a host device to allow the host to access the non-volatile memory through the controller, wherein: The controller uploads an error handling program to the buffer memory with error correction code (ECC) protection capability; In response to at least one error, the controller interrupts the current program execution and starts the interrupt service; The controller executes the error handling program on the buffer memory; The controller disables the transmission interface circuit, wherein the transmission interface circuit is used to communicate with the host; The controller resets at least one hardware engine and the at least one non-volatile memory element; The controller performs a cache refresh on one of the data caches in the data storage device, and programs the refreshed cache data to the at least one non-volatile memory element for data recovery; and The controller completes a soft reset by activating one of the watchdog modules in the memory controller, and activating the transmission interface circuit and reconnecting with the host, so that the data The storage device is operating normally again. 如申請專利範圍第11項所述之資料儲存裝置,其中因應多種類的軟錯誤(soft error)中之任一軟錯誤之發生,該控制器中斷所述目前程序的執行並啟動該中斷服務,其中所述至少一錯誤包含所述任一軟錯誤。According to the data storage device described in item 11 of the patent application scope, in response to the occurrence of any of a variety of soft errors (soft errors), the controller interrupts the execution of the current program and starts the interrupt service, The at least one error includes any one of the soft errors. 如申請專利範圍第11項所述之資料儲存裝置,其中該控制器從所述目前程序的執行位址跳躍(jump)至該錯誤處置程式的起始處以執行該錯誤處置程式。The data storage device as described in item 11 of the patent application scope, wherein the controller jumps from the execution address of the current program to the beginning of the error handling program to execute the error handling program. 如申請專利範圍第11項所述之資料儲存裝置,其中該控制器停用該傳輸介面電路來停止對該主機的資料接收及傳送。The data storage device as described in item 11 of the patent application scope, wherein the controller disables the transmission interface circuit to stop data reception and transmission to the host. 如申請專利範圍第11項所述之資料儲存裝置,其中該資料儲存裝置另包含一動態隨機存取記憶體(Dynamic Random Access Memory,DRAM),且該資料快取係位於該動態隨機存取記憶體。The data storage device as described in item 11 of the patent application scope, wherein the data storage device further includes a dynamic random access memory (Dynamic Random Access Memory, DRAM), and the data cache is located in the dynamic random access memory body. 一種資料儲存裝置之控制器,該資料儲存裝置包含該控制器與一非揮發性記憶體(non-volatile memory,NV memory),該非揮發性記憶體包含至少一非揮發性記憶體元件(NV memory element),該至少一非揮發性記憶體元件包含複數個區塊,該控制器包含有: 一緩衝記憶體,用來暫時地儲存資訊; 符合一特定通訊標準之一傳輸介面電路,用來依據該特定通訊標準進行通訊;以及 一處理電路,用來依據來自一主機(host device)的複數個主機命令(host command)控制該控制器,以容許該主機透過該控制器存取(access)該非揮發性記憶體,其中: 該控制器將一錯誤處置程式上傳(upload)至具備錯誤更正碼(Error Correction Code,ECC)保護能力之該緩衝記憶體; 因應至少一錯誤,該控制器中斷目前程序的執行並啟動中斷服務; 該控制器執行該緩衝記憶體上的該錯誤處置程式; 該控制器停用(disable)該傳輸介面電路,其中該傳輸介面電路係用來對該主機進行通訊; 該控制器重設至少一硬體引擎以及該至少一非揮發性記憶體元件; 該控制器針對該資料儲存裝置中之一資料快取進行快取重新整理,且將重新整理後的快取資料編程至該至少一非揮發性記憶體元件,以進行資料復原;以及 該控制器透過啟動該記憶體控制器中之一看門狗(Watchdog)模組、且啟動該傳輸介面電路並與該主機重新連線,來完成軟重設(soft reset),以使該資料儲存裝置再度正常地運作。A controller for a data storage device includes the controller and a non-volatile memory (NV memory), the non-volatile memory includes at least one non-volatile memory element (NV memory element), the at least one non-volatile memory element includes a plurality of blocks, and the controller includes: A buffer memory for temporarily storing information; A transmission interface circuit conforming to a specific communication standard for communication according to the specific communication standard; and A processing circuit for controlling the controller according to a plurality of host commands from a host device to allow the host to access the non-volatile memory through the controller, wherein: The controller uploads an error handling program to the buffer memory with error correction code (ECC) protection capability; In response to at least one error, the controller interrupts the current program execution and starts the interrupt service; The controller executes the error handling program on the buffer memory; The controller disables the transmission interface circuit, wherein the transmission interface circuit is used to communicate with the host; The controller resets at least one hardware engine and the at least one non-volatile memory element; The controller performs a cache refresh on one of the data caches in the data storage device, and programs the refreshed cache data to the at least one non-volatile memory element for data recovery; and The controller completes a soft reset by activating one of the watchdog modules in the memory controller, and activating the transmission interface circuit and reconnecting with the host, so that the data The storage device is operating normally again. 如申請專利範圍第16項所述之控制器,其中因應多種類的軟錯誤(soft error)中之任一軟錯誤之發生,該控制器中斷所述目前程序的執行並啟動該中斷服務,其中所述至少一錯誤包含所述任一軟錯誤。The controller as described in item 16 of the patent application scope, in response to the occurrence of any of a variety of soft errors (soft errors), the controller interrupts the execution of the current program and starts the interrupt service, of which The at least one error includes the any soft error. 如申請專利範圍第16項所述之控制器,其中該控制器從所述目前程序的執行位址跳躍(jump)至該錯誤處置程式的起始處以執行該錯誤處置程式。The controller according to item 16 of the patent application scope, wherein the controller jumps from the execution address of the current program to the beginning of the error handling program to execute the error handling program. 如申請專利範圍第16項所述之控制器,其中該控制器停用該傳輸介面電路來停止對該主機的資料接收及傳送。The controller as described in item 16 of the patent application scope, wherein the controller disables the transmission interface circuit to stop data reception and transmission to the host. 如申請專利範圍第16項所述之控制器,其中該資料儲存裝置另包含一動態隨機存取記憶體(Dynamic Random Access Memory,DRAM),且該資料快取係位於該動態隨機存取記憶體。The controller as described in item 16 of the patent application scope, wherein the data storage device further includes a dynamic random access memory (Dynamic Random Access Memory, DRAM), and the data cache is located in the dynamic random access memory .
TW108116832A 2018-10-03 2019-05-16 Error handling method, associated data storage device and controller thereof TWI684988B (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201910756354.1A CN110990175B (en) 2018-10-03 2019-08-16 Error handling method, data storage device and controller thereof
US16/568,192 US10884856B2 (en) 2018-10-03 2019-09-11 Error-handling method, associated data storage device and controller thereof
JP2019177102A JP6811819B2 (en) 2018-10-03 2019-09-27 Error handling method, data storage device and its control device
KR1020190119680A KR102175884B1 (en) 2018-10-03 2019-09-27 Error handling method, associated data storage device and controller thereof
EP19200957.9A EP3647951B1 (en) 2018-10-03 2019-10-02 Error-handling method, associated data storage device and controller thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201862740439P 2018-10-03 2018-10-03
US62/740,439 2018-10-03

Publications (2)

Publication Number Publication Date
TWI684988B TWI684988B (en) 2020-02-11
TW202015065A true TW202015065A (en) 2020-04-16

Family

ID=70413304

Family Applications (3)

Application Number Title Priority Date Filing Date
TW108116832A TWI684988B (en) 2018-10-03 2019-05-16 Error handling method, associated data storage device and controller thereof
TW108124909A TWI697009B (en) 2018-10-03 2019-07-15 Write control method, associated data storage device and controller thereof
TW109116137A TWI709975B (en) 2018-10-03 2019-07-15 Write control method, associated data storage device and controller thereof

Family Applications After (2)

Application Number Title Priority Date Filing Date
TW108124909A TWI697009B (en) 2018-10-03 2019-07-15 Write control method, associated data storage device and controller thereof
TW109116137A TWI709975B (en) 2018-10-03 2019-07-15 Write control method, associated data storage device and controller thereof

Country Status (1)

Country Link
TW (3) TWI684988B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11366618B2 (en) * 2020-03-02 2022-06-21 Silicon Motion, Inc. All flash array server and control method thereof
TWI748507B (en) * 2020-06-08 2021-12-01 瑞昱半導體股份有限公司 Data access system, and method for operating a data access system
JP2022147448A (en) * 2021-03-23 2022-10-06 キオクシア株式会社 Memory system and data management method

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69027491T2 (en) * 1989-08-01 1997-02-06 Digital Equipment Corp Software error handling procedures
JPH0799512B2 (en) * 1992-11-18 1995-10-25 インターナショナル・ビジネス・マシーンズ・コーポレイション Programmable external storage controller
US6762733B2 (en) * 1993-06-24 2004-07-13 Nintendo Co. Ltd. Electronic entertainment and communication system
US6804794B1 (en) * 2001-02-28 2004-10-12 Emc Corporation Error condition handling
US7096407B2 (en) * 2003-02-18 2006-08-22 Hewlett-Packard Development Company, L.P. Technique for implementing chipkill in a memory system
US9063836B2 (en) * 2010-07-26 2015-06-23 Intel Corporation Methods and apparatus to protect segments of memory
US9262270B2 (en) * 2012-12-28 2016-02-16 Intel Corporation Live error recovery
US10042750B2 (en) * 2013-03-15 2018-08-07 Micron Technology, Inc. Apparatuses and methods for adaptive control of memory using an adaptive memory controller with a memory management hypervisor
US10592122B2 (en) * 2015-03-31 2020-03-17 Sandisk Technologies Llc Inherent adaptive trimming
US20170177276A1 (en) * 2015-12-21 2017-06-22 Ocz Storage Solutions, Inc. Dual buffer solid state drive
KR102527992B1 (en) * 2016-03-14 2023-05-03 삼성전자주식회사 Data storage device and data processing system having the same
US10534709B2 (en) * 2016-08-31 2020-01-14 Sandisk Technologies Llc Flush command consolidation

Also Published As

Publication number Publication date
TWI697009B (en) 2020-06-21
TWI684988B (en) 2020-02-11
TW202032547A (en) 2020-09-01
TW202015045A (en) 2020-04-16
TWI709975B (en) 2020-11-11

Similar Documents

Publication Publication Date Title
KR102175884B1 (en) Error handling method, associated data storage device and controller thereof
US10732849B2 (en) Method for read latency bound in SSD storage systems
EP2438521B1 (en) Object oriented memory in solid state devices
US10599345B2 (en) Memory device that writes data into a block based on time passage since erasure of data from the block
US8230161B2 (en) Data backup method for a flash memory and controller and storage system using the same
US11036421B2 (en) Apparatus and method for retaining firmware in memory system
KR101856506B1 (en) Data storage device and data write method thereof
TWI684988B (en) Error handling method, associated data storage device and controller thereof
US8601347B1 (en) Flash memory device and storage control method
KR101581859B1 (en) Memory system and data managing method of flash translation layer therof
KR102641107B1 (en) Storage device, system including the same and method of operating the same
TWI698749B (en) A data storage device and a data processing method
KR20100091379A (en) Solid state disk device and program fail processing method thereof
KR20190051530A (en) Data processing system and operating method of data processing system
TWI657339B (en) Method for managing flash memory module and associated flash memory controller
US11281381B2 (en) Storage node of distributed storage system and method of operating the same
TWI721365B (en) High efficiency garbage collection method, and associated data storage device and controller thereof
TWI697780B (en) Method and computer program product and apparatuse for handling sudden power off recovery
KR20240053298A (en) Apparatus and method for managing map data between a host and a memory system
TWI582594B (en) Method for preventing losing data, memory storage device and memory control circuit unit
CN114420192A (en) Optimization method, device and medium for DRAMLess SSD NAND programming error
TW202105181A (en) Method and computer program product and apparatuse for handling sudden power off recovery