[go: up one dir, main page]

CN102456404A - Non-volatile memory storage device, memory controller and data storage method - Google Patents

Non-volatile memory storage device, memory controller and data storage method Download PDF

Info

Publication number
CN102456404A
CN102456404A CN2010105279215A CN201010527921A CN102456404A CN 102456404 A CN102456404 A CN 102456404A CN 2010105279215 A CN2010105279215 A CN 2010105279215A CN 201010527921 A CN201010527921 A CN 201010527921A CN 102456404 A CN102456404 A CN 102456404A
Authority
CN
China
Prior art keywords
memory
data
order
electrically connected
volatile memory
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN2010105279215A
Other languages
Chinese (zh)
Inventor
游祥雄
魏大泉
陈耘颉
沈育仲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Phison Electronics Corp
Original Assignee
Phison Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to CN2010105279215A priority Critical patent/CN102456404A/en
Publication of CN102456404A publication Critical patent/CN102456404A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

A nonvolatile memory storage device, a memory controller and a data storage method are provided. The nonvolatile memory storage device comprises a connector, an energy storage circuit, a power supply conversion and supply circuit, a nonvolatile memory module, a memory controller and a buffer memory. The power conversion and supply circuit is used for converting the output voltage from the energy storage circuit into a first voltage for the nonvolatile memory module and a second voltage for the memory controller and the buffer memory. The memory controller is used for writing the data temporarily stored in the buffer memory into the nonvolatile memory module in a special writing mode when receiving a detection signal indicating that the input voltage is continuously less than the preset voltage within a preset time period or a detection signal indicating the non-activated state of the connector or a pause mode signal, a warm reset signal or a warm reset signal received from the host system.

Description

非易失性存储器存储装置、存储器控制器与数据存储方法Non-volatile memory storage device, memory controller and data storage method

技术领域 technical field

本发明涉及一种非易失性存储器存储装置、存储器控制器与数据存储方法,且特别涉及一种能够在非易失性存储器存储装置断电时将缓冲存储器中的数据写入至非易失性存储器模块的非易失性存储器存储装置、存储器控制器与数据存储方法。The present invention relates to a nonvolatile memory storage device, a memory controller and a data storage method, and in particular to a method capable of writing data in a buffer memory to a nonvolatile memory when the nonvolatile memory storage device is powered off. A non-volatile memory storage device, a memory controller and a data storage method of a non-volatile memory module.

背景技术 Background technique

数字相机、手机与MP3在这几年来的成长十分迅速,使得消费者对存储介质的需求也急速增加。由于非易失性存储器具有数据非挥发性、省电、体积小与无机械结构等的特性,适合便携式应用,最适合使用于这类便携式由电池供电的产品上。随身碟就是一种以NAND快闪存储器(FlashMemory)作为存储介质的存储装置。例如,通过通用串行总线(UniversalSerial Bus,USB),使用者轻易地将随身碟插拔于主机,以进行数字数据的传递。The rapid growth of digital cameras, mobile phones, and MP3 players has led to a rapid increase in consumer demand for storage media. Since non-volatile memory has the characteristics of non-volatile data, power saving, small size and no mechanical structure, it is suitable for portable applications and is most suitable for such portable battery-powered products. A flash drive is a storage device that uses NAND flash memory (FlashMemory) as a storage medium. For example, through the Universal Serial Bus (USB), the user can easily plug and unplug the flash drive to the host to transmit digital data.

由于写入数据至快闪存储器的速度远低于与主机连接的USB的传输速度,因此,一般来说,缓冲存储器会被配置在非易失性存储器存储装置中,以暂存来自于主机的数据。特别是,当主机下达写入指令与欲写入的数据给非易失性存储器存储装置时,存储器控制电路(亦称为存储器控制器)会在将数据暂存于缓冲存储器后即将指示已完成写入指令的讯息回复给主机,以使主机能够继续执行下一个运作,由此提升运作效率。Because the speed of writing data to the flash memory is much lower than the transmission speed of the USB connected to the host, generally speaking, the buffer memory will be configured in a non-volatile memory storage device to temporarily store data from the host. data. In particular, when the host sends the write command and the data to be written to the non-volatile memory storage device, the memory control circuit (also known as the memory controller) will indicate that it has been completed after temporarily storing the data in the buffer memory. The message of the write command is returned to the host, so that the host can continue to execute the next operation, thereby improving the operating efficiency.

然而,由于随身碟是通过USB操作于主机所提供的电源,因此,倘若在缓冲存储器中仍存有数据的情况下使用者将随身碟从主机中拔除时,暂存于缓冲存储器中的数据将会遗失。基此,如何在非易失性存储器存储装置断电时将暂存于缓冲存储器中的数据写入至快闪存储器中,是此领域技术人员所致力的课题。However, since the flash drive operates on the power provided by the host through the USB, if the user pulls the flash drive from the host while data still exists in the buffer memory, the data temporarily stored in the buffer memory will be lost. will be lost. Based on this, how to write the data temporarily stored in the buffer memory into the flash memory when the non-volatile memory storage device is powered off is a subject that those skilled in the art are working on.

发明内容Contents of the invention

本发明提供一种存储器存储系统、存储器控制器与数据存储方法,其能够在断电时将暂存于缓冲存储器中的数据写入至非易失性存储器模块中。The invention provides a memory storage system, a memory controller and a data storage method, which can write the data temporarily stored in the buffer memory into the non-volatile memory module when the power is cut off.

本发明范例实施例提出一种非易失性存储器存储装置,其包括连接器、储能电路、电源转换与供应电路、非易失性存储器模块、存储器控制器与缓冲存储器。连接器用以电性连接至主机系统。储能电路用以接收输入电压并且提供输出电压。电源转换与供应电路电性连接储能电路并且用以将输出电压转换成第一电压与第二电压。非易失性存储器模块电性连接电源转换与供应电路并且操作于第一电压。存储器控制器电性连接连接器、储能电路与电源转换与供应电路并且操作于第二电压。缓冲存储器用以暂存数据。存储器控制器用以在接收到信号时将暂存在缓冲存储器中的数据写入至非易失性存储器模块,其中此信号为用以指示上述输入电压在一段预设时间内持续小于预设电压的检测信号或为用以指示连接器的非激活(inactive)状态的检测信号或为从主机系统中所接收的暂停模式信号、暖重置信号或热重置信号。An exemplary embodiment of the present invention provides a nonvolatile memory storage device, which includes a connector, an energy storage circuit, a power conversion and supply circuit, a nonvolatile memory module, a memory controller, and a buffer memory. The connector is used to electrically connect to the host system. The energy storage circuit is used for receiving an input voltage and providing an output voltage. The power conversion and supply circuit is electrically connected to the energy storage circuit and used for converting the output voltage into a first voltage and a second voltage. The non-volatile memory module is electrically connected to the power conversion and supply circuit and operates at the first voltage. The memory controller is electrically connected to the connector, the energy storage circuit and the power conversion and supply circuit and operates at the second voltage. Buffer memory is used to temporarily store data. The memory controller is used to write the data temporarily stored in the buffer memory to the non-volatile memory module when receiving a signal, wherein the signal is a detection indicating that the input voltage is continuously lower than a preset voltage for a preset period of time The signal is either a detection signal indicating an inactive state of the connector or a suspend mode signal, a warm reset signal or a warm reset signal received from the host system.

本发明范例实施例提出一种存储器控制器,其包括主机接口、存储器接口、存储器管理电路与缓冲存储器。主机接口用以电性连接至主机系统。存储器接口用以电性连接至非易失性存储器模块。存储器管理电路电性连接主机接口与存储器接口。缓冲存储器电性连接存储器管理电路并且用以暂存来自于主机系统的数据。存储器管理电路用以在接收到信号时将暂存在缓冲存储器中的数据写入至非易失性存储器模块。此外,其中存储器管理电路还用以开启包括在储能电路中的开关。An exemplary embodiment of the present invention provides a memory controller, which includes a host interface, a memory interface, a memory management circuit, and a buffer memory. The host interface is used to electrically connect to the host system. The memory interface is used to electrically connect to the non-volatile memory module. The memory management circuit is electrically connected to the host interface and the memory interface. The buffer memory is electrically connected to the memory management circuit and used for temporarily storing data from the host system. The memory management circuit is used for writing the data temporarily stored in the buffer memory into the non-volatile memory module when receiving the signal. In addition, the memory management circuit is also used to turn on a switch included in the energy storage circuit.

本发明范例实施例提出一种数据存储方法,用于一非易失性存储器模块中。此数据存储方法包括判断来自于主机系统的输入电压是否在预设时间内持续小于预设电压;以及当来自于主机系统的输入电压在预设时间内持续小于预设电压时,将暂存在缓冲存储器中的数据写入至非易失性存储器模块。An exemplary embodiment of the present invention provides a data storage method used in a non-volatile memory module. This data storage method includes judging whether the input voltage from the host system is continuously lower than the preset voltage within the preset time; and when the input voltage from the host system is continuously lower than the preset voltage within the preset time, temporarily storing The data in the memory is written to the non-volatile memory module.

本发明范例实施例提出一种数据存储方法,用于一非易失性存储器模块中。此数据存储方法包括:判断是否检测到连接器的非激活状态;以及当检测到连接器的非激活状态时,将暂存在缓冲存储器中的数据写入至非易失性存储器模块。An exemplary embodiment of the present invention provides a data storage method used in a non-volatile memory module. The data storage method includes: judging whether the inactive state of the connector is detected; and writing the data temporarily stored in the buffer memory to the non-volatile memory module when the inactive state of the connector is detected.

本发明范例实施例提出一种数据存储方法,用于一非易失性存储器模块中。此数据存储方法包括:判断是否从主机系统中接收到暂停模式信号、暖重置信号或热重置信号;以及当从主机系统中接收到暂停模式信号、暖重置信号或热重置信号时,将暂存在缓冲存储器中的数据写入至非易失性存储器模块。An exemplary embodiment of the present invention provides a data storage method used in a non-volatile memory module. The data storage method includes: determining whether a suspend mode signal, a warm reset signal or a warm reset signal is received from the host system; and when a suspend mode signal, a warm reset signal or a warm reset signal is received from the host system , write the data temporarily stored in the buffer memory to the non-volatile memory module.

基于上述,本发明范例实施例的存储器存储系统、存储器控制器与数据存储方法能够在非易失性存储器存储装置断电时将暂存于缓冲存储器中的数据写入至快闪存储器中。Based on the above, the memory storage system, memory controller and data storage method of the exemplary embodiments of the present invention can write the data temporarily stored in the buffer memory into the flash memory when the non-volatile memory storage device is powered off.

为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.

附图说明 Description of drawings

图1A是根据本发明范例实施例绘示的主机系统与非易失性存储器存储装置。FIG. 1A illustrates a host system and a non-volatile memory storage device according to an exemplary embodiment of the present invention.

图1B是根据本发明范例实施例所绘示的计算机、输入/输出装置与非易失性存储器存储装置的示意图。FIG. 1B is a schematic diagram of a computer, an input/output device and a non-volatile memory storage device according to an exemplary embodiment of the present invention.

图1C是根据本发明另一范例实施例所绘示的主机系统与非易失性存储器存储装置的示意图。FIG. 1C is a schematic diagram of a host system and a non-volatile memory storage device according to another exemplary embodiment of the present invention.

图2是绘示图1A所示的非易失性存储器存储装置的概要方块图。FIG. 2 is a schematic block diagram illustrating the nonvolatile memory storage device shown in FIG. 1A .

图3是根据本发明范例实施例所绘示的存储器控制器的概要方块图。FIG. 3 is a schematic block diagram of a memory controller according to an exemplary embodiment of the invention.

图4与图5是根据本发明范例实施例所绘示的管理存储器模块的范例示意图。FIG. 4 and FIG. 5 are exemplary schematic diagrams of a management memory module according to an exemplary embodiment of the present invention.

图6~图8是根据本发明范例实施例所绘示的写入数据至非易失性存储器模块的范例。6-8 are examples of writing data to a non-volatile memory module according to an exemplary embodiment of the present invention.

图9是根据本发明范例实施例所绘示的储能电路的示意图。FIG. 9 is a schematic diagram of an energy storage circuit according to an exemplary embodiment of the present invention.

图10是根据本发明范例实施例所绘示的数据存储方法的流程图。FIG. 10 is a flowchart of a data storage method according to an exemplary embodiment of the present invention.

图11是根据本发明另一范例实施例所绘示的数据存储方法的流程图。FIG. 11 is a flowchart of a data storage method according to another exemplary embodiment of the present invention.

图12是根据本发明另一范例实施例所绘示的数据存储方法的流程图。FIG. 12 is a flowchart of a data storage method according to another exemplary embodiment of the present invention.

【主要元件符号说明】[Description of main component symbols]

1000:主机系统1000: host system

1100:计算机1100: computer

1102:微处理器1102: Microprocessor

1104:随机存取存储器1104: random access memory

1106:输入/输出装置1106: Input/Output Device

1108:系统总线1108: System bus

1110:数据传输接口1110: data transmission interface

1202:鼠标1202: Mouse

1204:键盘1204: keyboard

1206:显示器1206: display

1208:打印机1208: Printer

1212:随身碟1212: Pen drive

1214:存储卡1214: memory card

1216:固态硬盘1216: SSD

1310:数字相机1310: Digital camera

1312:SD卡1312: SD card

1314:MMC卡1314: MMC card

1316:记忆棒1316: memory stick

1318:CF卡1318: CF card

1320:嵌入式存储装置1320: Embedded storage device

100:非易失性存储器存储装置100: Non-volatile memory storage device

102:连接器102: Connector

104:存储器控制器104: memory controller

106:非易失性存储器模块106: Non-volatile memory module

108:储能电路108: Energy storage circuit

110:电源转换与供应电路110: Power conversion and supply circuit

202:存储器管理电路202: memory management circuit

204:主机接口204: host interface

206:存储器接口206: memory interface

208:缓冲存储器208: buffer memory

210:错误检查与校正电路210: Error checking and correction circuit

304(0)~304(R):物理区块304(0)~304(R): physical block

402:数据区402: data area

404:备用区404: Spare area

406:系统区406: System area

408:取代区408: Substitution Area

510(0)~510(H):逻辑区块510(0)~510(H): logic block

Vin:输入电压Vin: input voltage

Vout:输出电压Vout: output voltage

D:二极管D: diode

R1:第一电阻R1: first resistor

R2:第二电阻R2: second resistor

S:开关S: switch

C:电容组C: capacitor bank

GND:接地端GND: ground terminal

具体实施方式 Detailed ways

一般而言,非易失性存储器存储装置(亦称,非易失性存储器存储系统)包括非易失性存储器模块与存储器控制器(亦称,存储器控制电路)。通常非易失性存储器存储装置是与主机系统一起使用,以使主机系统可将数据写入至非易失性存储器存储装置或从非易失性存储器存储装置中读取数据。Generally speaking, a nonvolatile memory storage device (also called a nonvolatile memory storage system) includes a nonvolatile memory module and a memory controller (also called a memory control circuit). Typically, a non-volatile memory storage device is used with a host system such that the host system can write data to or read data from the non-volatile memory storage device.

图1A是根据本发明范例实施例所绘示的主机系统与非易失性存储器存储装置。FIG. 1A is a diagram illustrating a host system and a non-volatile memory storage device according to an exemplary embodiment of the present invention.

请参照图1A,主机系统1000一般包括计算机1100与输入/输出(input/output,I/O)装置1106。计算机1100包括微处理器1102、随机存取存储器(random access memory,RAM)1104、系统总线1108与数据传输接口1110。输入/输出装置1106包括如图1B的鼠标1202、键盘1204、显示器1206与打印机1208。必须了解的是,图1B所示的装置非限制输入/输出装置1106,输入/输出装置1106可还包括其他装置。Referring to FIG. 1A , the host system 1000 generally includes a computer 1100 and an input/output (I/O) device 1106 . The computer 1100 includes a microprocessor 1102 , a random access memory (random access memory, RAM) 1104 , a system bus 1108 and a data transmission interface 1110 . The input/output device 1106 includes a mouse 1202, a keyboard 1204, a monitor 1206 and a printer 1208 as shown in FIG. 1B. It must be understood that the device shown in FIG. 1B is not limited to the I/O device 1106, and the I/O device 1106 may also include other devices.

在本发明实施例中,非易失性存储器存储装置100是通过数据传输接口1110与主机系统1000的其他元件电性连接。通过微处理器1102、随机存取存储器1104与输入/输出装置1106的运作可将数据写入至非易失性存储器存储装置100或从非易失性存储器存储装置100中读取数据。例如,非易失性存储器存储装置100可以是如图1B所示的随身碟1212、存储卡1214或固态硬盘(Solid State Drive,SSD)1216等的非易失性存储器存储装置。In the embodiment of the present invention, the non-volatile memory storage device 100 is electrically connected with other components of the host system 1000 through the data transmission interface 1110 . Data can be written into the non-volatile memory storage device 100 or read from the non-volatile memory storage device 100 through the operation of the microprocessor 1102 , the random access memory 1104 and the input/output device 1106 . For example, the non-volatile memory storage device 100 may be a non-volatile memory storage device such as a flash drive 1212, a memory card 1214, or a solid state drive (Solid State Drive, SSD) 1216 as shown in FIG. 1B.

一般而言,主机系统1000可实质地为可存储数据的任意系统。虽然在本范例实施例中,主机系统1000是以计算机系统来作说明,然而,在本发明另一范例实施例中主机系统1000可以是数字相机、摄像机、通信装置、音频播放器或视频播放器等系统。例如,在主机系统为数字相机(摄像机)1310时,非易失性存储器存储装置100则为其所使用的SD卡1312、MMC卡1314、记忆棒(memory stick)1316、CF卡1318或嵌入式存储装置1320(如图1C所示)。嵌入式存储装置1320包括嵌入式多媒体卡(EmbeddedMMC,eMMC)。值得一提的是,嵌入式多媒体卡是直接电性连接于主机系统的基板上。In general, host system 1000 can be virtually any system that can store data. Although in this exemplary embodiment, the host system 1000 is illustrated as a computer system, however, in another exemplary embodiment of the present invention, the host system 1000 may be a digital camera, video camera, communication device, audio player or video player and other systems. For example, when the host system is a digital camera (video camera) 1310, the nonvolatile memory storage device 100 is an SD card 1312, an MMC card 1314, a memory stick (memory stick) 1316, a CF card 1318 or an embedded The storage device 1320 (as shown in FIG. 1C ). The embedded storage device 1320 includes an embedded multimedia card (EmbeddedMMC, eMMC). It is worth mentioning that the embedded multimedia card is directly electrically connected to the substrate of the host system.

图2是绘示图1A所示的非易失性存储器存储装置的概要方块图。FIG. 2 is a schematic block diagram illustrating the nonvolatile memory storage device shown in FIG. 1A .

请参照图2,非易失性存储器存储装置100包括连接器102、存储器控制器104、非易失性存储器模块106、储能电路108以及电源转换与供应电路110。Referring to FIG. 2 , the nonvolatile memory storage device 100 includes a connector 102 , a memory controller 104 , a nonvolatile memory module 106 , an energy storage circuit 108 and a power conversion and supply circuit 110 .

连接器102电性连接至存储器控制器104,并且用以电性连接至主机系统1000。也就是说,非易失性存储器存储装置100是通过连接器102与主机系统1000上的对应连接端口相连。The connector 102 is electrically connected to the memory controller 104 and used for electrically connecting to the host system 1000 . That is to say, the non-volatile memory storage device 100 is connected to the corresponding connection port on the host system 1000 through the connector 102 .

在本范例实施例中,连接器102为通用串行总线(Universal Serial Bus,USB)连接器。然而,必须了解的是,本发明不限于此,在本发明另一范例实施例中,连接器102也可以是电气和电子工程师协会(Institute ofElectrical and Electronic Engineers,IEEE)1394连接器、高速外围零件连接接口(Peripheral Component Interconnect Express,PCI Express)连接器、串行先进附件(Serial Advanced Technology Attachment,SATA)连接器、安全数字(Secure Digital,SD)接口连接器、记忆棒(Memory Stick,MS)接口连接器、多媒体存储卡(Multi Media Card,MMC)接口连接器、小型快闪(Compact Flash,CF)接口连接器、整合式驱动电子接口(IntegratedDevice Electronics,IDE)连接器或其他适合的连接器。In this exemplary embodiment, the connector 102 is a Universal Serial Bus (USB) connector. However, it must be understood that the present invention is not limited thereto, and in another exemplary embodiment of the present invention, the connector 102 may also be an Institute of Electrical and Electronic Engineers (Institute of Electrical and Electronic Engineers, IEEE) 1394 connector, a high-speed peripheral component Connection interface (Peripheral Component Interconnect Express, PCI Express) connector, Serial Advanced Technology Attachment (Serial Advanced Technology Attachment, SATA) connector, secure digital (Secure Digital, SD) interface connector, memory stick (Memory Stick, MS) interface Connector, Multi Media Card (Multi Media Card, MMC) interface connector, Compact Flash (Compact Flash, CF) interface connector, Integrated Device Electronics (Integrated Device Electronics, IDE) connector or other suitable connectors.

存储器控制器104用以执行以硬件形式或固件形式实作的多个逻辑门或控制指令,并且根据主机系统1000的指令在非易失性存储器模块106中进行数据的写入、读取与擦除等运作。特别是,存储器控制器104会执行本范例实施例的数据存储方法与存储器管理方法来对非易失性存储器模块106中进行数据的写入、读取、擦除以及区块管理等运作。根据本发明范例实施例的数据存储方法与存储器管理方法将于以下配合附图作详细说明。The memory controller 104 is used to execute a plurality of logic gates or control instructions implemented in the form of hardware or firmware, and write, read and erase data in the non-volatile memory module 106 according to the instructions of the host system 1000 operation. In particular, the memory controller 104 executes the data storage method and the memory management method of the exemplary embodiment to perform data writing, reading, erasing and block management operations on the non-volatile memory module 106 . The data storage method and memory management method according to exemplary embodiments of the present invention will be described in detail below with the accompanying drawings.

非易失性存储器模块106是电性连接至存储器控制器104,并且用以存储主机系统1000所写入的数据。非易失性存储器模块106包括多个物理区块。各物理区块分别具有多个页面,其中属于于同一个物理区块的物理页面可被独立地写入且被同时地擦除。更详细来说,物理区块为擦除的最小单位。亦即,每一物理区块含有最小数目之一并被擦除的记忆胞。物理页面为可编程的最小单元。即,物理页面为写入数据的最小单元。每一物理页面通常包括数据位区与冗余位区。数据位区用以存储使用者的数据,而冗余位区用以存储系统的数据(例如,错误检查与校正码)。数据位区与冗余位区的配置为此领域技术人员所知的一般知识,在此不详细描述。在本范例实施中,非易失性存储器模块106为多层记忆胞(Multi Level Cell,MLC)NAND快闪存储器模块。然而,本发明不限于此,非易失性存储器模块106也可是单层记忆胞(Single Level Cell,SLC)NAND快闪存储器模块、其他快闪存储器模块或其他具有相同特性的存储器模块。The non-volatile memory module 106 is electrically connected to the memory controller 104 and used for storing data written by the host system 1000 . Non-volatile memory module 106 includes a plurality of physical blocks. Each physical block has a plurality of pages, wherein the physical pages belonging to the same physical block can be written independently and erased simultaneously. In more detail, a physical block is the smallest unit of erasing. That is, each physical block contains a minimum number of memory cells that are erased. A physical page is the smallest unit of programming. That is, a physical page is the minimum unit for writing data. Each physical page generally includes a data bit field and a redundant bit field. The data bit area is used to store user data, and the redundant bit area is used to store system data (eg, error checking and correction code). The configuration of the data bit area and the redundant bit area is common knowledge known to those skilled in the art, and will not be described in detail here. In this exemplary implementation, the non-volatile memory module 106 is a multi-level memory cell (Multi Level Cell, MLC) NAND flash memory module. However, the present invention is not limited thereto, and the non-volatile memory module 106 can also be a single-level memory cell (Single Level Cell, SLC) NAND flash memory module, other flash memory modules, or other memory modules with the same characteristics.

储能电路108电性连接至存储器控制器104。在本范例实施例中,非易失性存储器存储装置100运作所需的电源是通过连接器102由主机系统1000所提供。在此,储能电路108用以通过连接器102从主机系统1000中接收输入电压并且提供输出电压,以供应给非易失性存储器存储装置100的存储器控制器104与非易失性存储器模块106。特别是,在本范例实施例中,储能电路108还用以存储一备用电能,并且当主机系统1000中断供电时,储能电路108会提供此备用电能作为输出电压,以供应给存储器控制器104与非易失性存储器模块106作为短暂运作之用。The energy storage circuit 108 is electrically connected to the memory controller 104 . In this exemplary embodiment, the power required for the operation of the non-volatile memory storage device 100 is provided by the host system 1000 through the connector 102 . Here, the energy storage circuit 108 is used to receive an input voltage from the host system 1000 through the connector 102 and provide an output voltage to be supplied to the memory controller 104 and the nonvolatile memory module 106 of the nonvolatile memory storage device 100 . Especially, in this exemplary embodiment, the energy storage circuit 108 is also used to store a backup electric energy, and when the host system 1000 interrupts the power supply, the energy storage circuit 108 will provide the backup electric energy as an output voltage to supply to the memory controller 104 and non-volatile memory module 106 are used for short-term operation.

电源转换与供应电路110电性连接至储能电路108并且用以控制非易失性存储器存储装置100的电源。具体来说,电源转换与供应电路110会将所接收到的电压(即,储能电路108所提供的输出电压)转换为第一电压与第二电压,将第一电压提供给非易失性存储器模块106,并且将第二电压提供给存储器控制器104。The power conversion and supply circuit 110 is electrically connected to the energy storage circuit 108 and used to control the power of the non-volatile memory storage device 100 . Specifically, the power conversion and supply circuit 110 converts the received voltage (that is, the output voltage provided by the energy storage circuit 108 ) into a first voltage and a second voltage, and provides the first voltage to the nonvolatile The memory module 106 and provides the second voltage to the memory controller 104 .

图3是根据本发明范例实施例所绘示的存储器控制器的概要方块图。FIG. 3 is a schematic block diagram of a memory controller according to an exemplary embodiment of the invention.

请参照图3,存储器控制器104包括存储器管理电路202、主机接口204、存储器接口206与缓冲存储器208。Referring to FIG. 3 , the memory controller 104 includes a memory management circuit 202 , a host interface 204 , a memory interface 206 and a buffer memory 208 .

存储器管理电路202用以控制存储器控制器104的整体运作,以进行数据的写入、读取、擦除等运作。例如,存储器管理电路202具有多个控制指令,并且在便携式非易失性存储器存储装置100运作时,这些控制指令会被执行以根据本范例实施例的数据存储方法与存储器管理方法。The memory management circuit 202 is used to control the overall operation of the memory controller 104 to perform operations such as writing, reading, and erasing data. For example, the memory management circuit 202 has a plurality of control commands, and when the portable non-volatile memory storage device 100 is operating, these control commands will be executed to implement the data storage method and the memory management method according to the exemplary embodiment.

例如,在本范例实施例中,存储器管理电路202的控制指令是以固件形式来实作。例如,存储器管理电路202具有微处理器单元(未绘示)与只读存储器(未绘示),并且这些控制指令是被烧录至此只读存储器中。当便携式非易失性存储器存储装置100运作时,这些控制指令会由微处理器单元来执行以完成根据本发明实施例的数据存储方法与存储器管理方法。For example, in this exemplary embodiment, the control instructions of the memory management circuit 202 are implemented in the form of firmware. For example, the memory management circuit 202 has a microprocessor unit (not shown) and a ROM (not shown), and these control instructions are burned into the ROM. When the portable non-volatile memory storage device 100 is operating, these control instructions will be executed by the microprocessor unit to implement the data storage method and the memory management method according to the embodiment of the present invention.

在本发明另一范例实施例中,存储器管理电路202的控制指令也可以程序代码形式存储于非易失性存储器模块106的特定区域(例如,存储器模块中专用于存放系统数据的系统区)中。此外,存储器管理电路202具有微处理器单元(未绘示)、只读存储器(未绘示)及随机存取存储器(未绘示)。特别是,此只读存储器具有驱动代码段,并且当存储器控制器104被致能时,微处理器单元会先执行此驱动代码段来将存储于非易失性存储器模块106中的控制指令载入至存储器管理电路202的随机存取存储器中。之后,微处理器单元会运转这些控制指令以执行本发明范例实施例的数据存储方法与存储器管理方法。此外,在本发明另一范例实施例中,存储器管理电路202的控制指令也可以一硬件形式来实作。In another exemplary embodiment of the present invention, the control instructions of the memory management circuit 202 may also be stored in a specific area of the non-volatile memory module 106 (for example, a system area dedicated to storing system data in the memory module) in the form of program codes. . In addition, the memory management circuit 202 has a microprocessor unit (not shown), a read only memory (not shown) and a random access memory (not shown). In particular, the ROM has a driver code segment, and when the memory controller 104 is enabled, the microprocessor unit will first execute the driver code segment to load the control instructions stored in the non-volatile memory module 106. into the random access memory of the memory management circuit 202. Afterwards, the microprocessor unit executes these control instructions to execute the data storage method and the memory management method of the exemplary embodiments of the present invention. In addition, in another exemplary embodiment of the present invention, the control instructions of the memory management circuit 202 may also be implemented in a hardware form.

主机接口204是电性连接至存储器管理电路202并且用以接收与识别主机系统1000所传送的指令与数据。也就是说,主机系统1000所传送的指令与数据会通过主机接口204来传送至存储器管理电路202。在本范例实施例中,主机接口204是对应连接器102为USB接口。然而,必须了解的是本发明不限于此,主机接口204也可以是PATA接口、IEEE 1394接口、PCI Express接口、SD接口、MS接口、MMC接口、CF接口、SATA接口、IDE接口或其他适合的数据传输接口。The host interface 204 is electrically connected to the memory management circuit 202 and used for receiving and identifying commands and data transmitted by the host system 1000 . That is to say, the commands and data transmitted by the host system 1000 are transmitted to the memory management circuit 202 through the host interface 204 . In this exemplary embodiment, the host interface 204 is a USB interface corresponding to the connector 102 . However, it must be understood that the present invention is not limited thereto, and the host interface 204 can also be a PATA interface, IEEE 1394 interface, PCI Express interface, SD interface, MS interface, MMC interface, CF interface, SATA interface, IDE interface or other suitable Data transfer interface.

存储器接口206是电性连接至存储器管理电路202并且用以存取非易失性存储器模块106。也就是说,欲写入至非易失性存储器模块106的数据会经由存储器接口206转换为非易失性存储器模块106所能接受的格式。The memory interface 206 is electrically connected to the memory management circuit 202 and used for accessing the non-volatile memory module 106 . That is to say, the data to be written into the non-volatile memory module 106 is converted into a format acceptable to the non-volatile memory module 106 via the memory interface 206 .

缓冲存储器208是电性连接至存储器管理电路202并且用以暂存来自于主机系统1000的数据与指令或来自于非易失性存储器模块106的数据。在此,缓冲存储器208为静态随机存取存储器(Static Random-AccessMemory,SRAM)。然而,必须了解的是,本发明不限于此,在另一范例实施例中,缓冲存储器208也可是动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)或其他适合的存储器。此外,在本范例另一实施例中,缓冲存储器208也可独立于存储器控制器104来配置。也就是说,缓冲存储器208可配置在存储器控制器104的外部,并且通过总线与存储器控制器104电性连接。The buffer memory 208 is electrically connected to the memory management circuit 202 and used for temporarily storing data and instructions from the host system 1000 or data from the non-volatile memory module 106 . Here, the buffer memory 208 is a static random access memory (Static Random-Access Memory, SRAM). However, it must be understood that the present invention is not limited thereto. In another exemplary embodiment, the buffer memory 208 may also be a Dynamic Random Access Memory (DRAM) or other suitable memory. In addition, in another embodiment of this example, the buffer memory 208 can also be configured independently of the memory controller 104 . That is to say, the buffer memory 208 can be configured outside the memory controller 104 and electrically connected to the memory controller 104 through a bus.

在本发明一范例实施例中,存储器控制器104还包括错误检查与校正电路210。错误检查与校正电路210是电性连接至存储器管理电路202并且用以执行错误检查与校正程序以确保数据的正确性。例如,当存储器管理电路202从主机系统1000中接收到写入指令时,错误检查与校正电路210会为对应此写入指令的数据产生对应的错误检查与校正码(Error Checkingand Correcting Code,ECC Code),并且存储器管理电路202会将对应此写入指令的数据与对应的错误检查与校正码写入至非易失性存储器模块106中。之后,当存储器管理电路202从非易失性存储器模块106中读取数据时会同时读取此数据对应的错误检查与校正码,并且错误检查与校正电路210会依据此错误检查与校正码对所读取的数据执行错误检查与校正程序。In an exemplary embodiment of the invention, the memory controller 104 further includes an error checking and correction circuit 210 . The error checking and correcting circuit 210 is electrically connected to the memory management circuit 202 and used for executing error checking and correcting procedures to ensure the correctness of data. For example, when the memory management circuit 202 receives a write command from the host system 1000, the error checking and correction circuit 210 will generate a corresponding error checking and correcting code (Error Checking and Correcting Code, ECC Code) for the data corresponding to the write command ), and the memory management circuit 202 writes the data corresponding to the write command and the corresponding ECC code into the non-volatile memory module 106 . Afterwards, when the memory management circuit 202 reads data from the non-volatile memory module 106, it will simultaneously read the error checking and correction code corresponding to the data, and the error checking and correction circuit 210 will use the error checking and correction code pair The read data is subjected to error checking and correction procedures.

图4与图5是根据本发明范例实施例所绘示的管理存储器模块的范例示意图。FIG. 4 and FIG. 5 are exemplary schematic diagrams of a management memory module according to an exemplary embodiment of the present invention.

必须了解的是,在此描述非易失性存储器模块106的物理区块的运作时,以“提取”、“交换”、“分组”、“轮替”等词来操作物理区块是逻辑上的概念。也就是说,存储器模块106的物理区块的实际位置并未更动,而是逻辑上对非易失性存储器模块106的物理区块进行操作。It must be understood that when describing the operation of the physical blocks of the non-volatile memory module 106 herein, terms such as "extract", "swap", "group", "rotate" to manipulate the physical blocks are logical the concept of. That is to say, the actual location of the physical block of the memory module 106 is not changed, but the physical block of the non-volatile memory module 106 is logically operated.

请参照图4,存储器管理电路202会将非易失性存储器模块106的物理区块304(0)~304(R)逻辑地分组为数据区402、备用区404、系统区406与取代区408。Referring to FIG. 4, the memory management circuit 202 logically groups the physical blocks 304(0)-304(R) of the non-volatile memory module 106 into a data area 402, a spare area 404, a system area 406, and a replacement area 408. .

数据区402与备用区404的物理区块是用以存储来自于主机系统1000的数据。具体来说,数据区402是已存储数据的物理区块,而备用区404的物理区块是用以替换数据区402的物理区块。因此,备用区404的物理区块为空或可使用的物理区块,即无记录数据或标记为已没用的无效数据。也就是说,在备用区中的物理区块已被执行擦除运作,或者当备用区中的物理区块被提取用于存储数据之前所提取的物理区块会被执行擦除运作。因此,备用区的物理区块为可被使用的物理区块。The physical blocks of the data area 402 and the spare area 404 are used to store data from the host system 1000 . Specifically, the data area 402 is a physical block of stored data, and the physical block of the spare area 404 is used to replace the physical block of the data area 402 . Therefore, the physical blocks of the spare area 404 are empty or usable physical blocks, that is, no recorded data or invalid data marked as useless. That is, the physical blocks in the spare area have been erased, or the physical blocks extracted before the physical blocks in the spare area are extracted for storing data will be erased. Therefore, the physical blocks in the spare area are usable physical blocks.

逻辑上属于系统区406的物理区块是用以记录系统数据,其中此系统数据包括关于存储器芯片的制造商与型号、存储器芯片的物理区块数、每一物理区块的物理页面数等。The physical blocks logically belonging to the system area 406 are used to record system data, wherein the system data includes the manufacturer and model of the memory chip, the number of physical blocks of the memory chip, the number of physical pages of each physical block, and the like.

逻辑上属于取代区408中的物理区块是替代物理区块。例如,非易失性存储器模块106于出厂时会预留4%的物理区块作为更换使用。也就是说,当数据区402、备用区404与系统区406中的物理区块损毁时,预留于取代区408中的物理区块是用以取代损坏的物理区块(即,坏物理区块(badblock))。因此,倘若取代区408中仍存有正常的物理区块且发生物理区块损毁时,存储器管理电路202会从取代区408中提取正常的物理区块来更换损毁的物理区块。倘若取代区408中无正常的物理区块且发生物理区块损毁时,则存储器管理电路202会将整个非易失性存储器存储装置100宣告为写入保护(write protect)状态,而无法再写入数据。Physical blocks that logically belong to the replacement area 408 are replacement physical blocks. For example, when the non-volatile memory module 106 leaves the factory, 4% of the physical blocks are reserved for replacement. That is to say, when the physical blocks in the data area 402, the spare area 404, and the system area 406 are damaged, the physical blocks reserved in the replacement area 408 are used to replace the damaged physical blocks (that is, bad physical blocks) block (badblock)). Therefore, if a normal physical block still exists in the replacement area 408 and the physical block is damaged, the memory management circuit 202 will extract a normal physical block from the replacement area 408 to replace the damaged physical block. If there is no normal physical block in the replacement area 408 and the physical block is damaged, the memory management circuit 202 will declare the entire nonvolatile memory storage device 100 as a write-protected (write protect) state, and can no longer write input data.

特别是,数据区402、备用区404、系统区406与取代区408的物理区块的数量会依据不同的存储器规格而有所不同。此外,必须了解的是,在非易失性存储器存储装置100的运作中,物理区块关联至数据区402、备用区404、系统区406与取代区408的分组关系会动态地变动。例如,当备用区中的物理区块损坏而被取代区的物理区块取代时,则原本取代区的物理区块会被关联至备用区。In particular, the number of physical blocks in the data area 402 , the spare area 404 , the system area 406 and the replacement area 408 varies according to different memory specifications. In addition, it must be understood that during the operation of the nonvolatile memory storage device 100 , the grouping relationship of the physical blocks associated with the data area 402 , the spare area 404 , the system area 406 and the replacement area 408 will change dynamically. For example, when a physical block in the spare area is damaged and replaced by a physical block in the replacement area, the original physical block in the replacement area will be associated with the spare area.

请参照图5,如上所述,数据区402与备用区404的物理区块是以轮替方式来存储主机系统1000所写入的数据。在本范例实施例中,存储器管理电路202会配置逻辑地址给主机系统1000以利于在以上述轮替方式来存储数据的物理区块中进行数据存取。特别是,存储器管理电路202会将所提供的逻辑地址分组为逻辑区块510(0)~510(H),并且将逻辑区块510(0)~510(H)映射至数据区402的物理区块。例如,当非易失性存储器存储装置100被主机系统1000的操作系统以文件系统(例如,FAT 32)格式化时,逻辑区块510(0)~510(H)分别地映射至数据区402的物理区块304(0)~304(D)。也就是说,一个逻辑区块会映射数据区402中的一个物理区块。在此,存储器管理电路202会建立逻辑区块-物理区块映射表(logicalblock-physical block mapping table),以记录逻辑区块与物理区块之间的映射关系。Referring to FIG. 5 , as mentioned above, the physical blocks of the data area 402 and the spare area 404 store data written by the host system 1000 in an alternate manner. In this exemplary embodiment, the memory management circuit 202 allocates logical addresses to the host system 1000 to facilitate data access in the physical blocks that store data in the aforementioned alternate manner. In particular, the memory management circuit 202 will group the provided logical addresses into logical blocks 510(0)-510(H), and map the logical blocks 510(0)-510(H) to the physical addresses of the data area 402 blocks. For example, when the non-volatile memory storage device 100 is formatted with a file system (for example, FAT 32) by the operating system of the host system 1000, the logical blocks 510(0)˜510(H) are respectively mapped to the data area 402 The physical blocks 304(0)-304(D) of . That is to say, one logical block maps one physical block in the data area 402 . Here, the memory management circuit 202 will establish a logical block-physical block mapping table (logical block-physical block mapping table) to record the mapping relationship between the logical block and the physical block.

图6~图8是根据本发明范例实施例所绘示的写入数据至非易失性存储器模块的范例。6-8 are examples of writing data to a non-volatile memory module according to an exemplary embodiment of the present invention.

请同时参照图6~图8,例如,在逻辑区块510(0)是映射至物理区块304(0)的映射状态下,当存储器控制器104从主机系统1000中接收到写入指令而欲写入数据至属于逻辑区块510(0)的逻辑地址时,存储器管理电路202会依据逻辑区块-物理区块映射表识别逻辑区块510(0)目前是映射至物理区块304(0)并且从备用区404中提取物理区块304(D+1)作为替换物理区块来轮替物理区块304(0)。然而,当存储器管理电路202将新数据写入至物理区块304(D+1)的同时,存储器管理电路202不会立刻将物理区块304(0)中的所有有效数据搬移至物理区块304(D+1)而擦除物理区块304(0)。具体来说,存储器管理电路202会将物理区块304(0)中欲写入物理页面之前的有效数据(即,物理区块304(0)的第0物理页面与第1物理页面中的数据)复制至物理区块304(D+1)的第0物理页面与第1物理页面中(如图6所示),并且将新数据写入至物理区块304(D+1)的第2物理页面与第3物理页面中(如图7所示)。此时,存储器管理电路202即完成写入的运作。因为物理区块304(0)中的有效数据有可能在下个操作(例如,写入指令)中变成无效,因此立刻将物理区块304(0)中的有效数据搬移至物理区块304(D+1)可能会造成无谓的搬移。此外,数据必须依序地写入至物理区块内的物理页面,因此,存储器管理电路202仅会先搬移欲写入物理页面之前的有效数据。Please refer to FIGS. 6-8 at the same time. For example, in the mapping state where the logical block 510(0) is mapped to the physical block 304(0), when the memory controller 104 receives a write command from the host system 1000 and When writing data to the logical address belonging to the logical block 510(0), the memory management circuit 202 will identify that the logical block 510(0) is currently mapped to the physical block 304( 0) and extract the physical block 304(D+1) from the spare area 404 as a replacement physical block to replace the physical block 304(0). However, when the memory management circuit 202 writes new data into the physical block 304(D+1), the memory management circuit 202 will not immediately move all valid data in the physical block 304(0) to the physical block 304(D+1) and erase physical block 304(0). Specifically, the memory management circuit 202 will write the valid data before the physical page in the physical block 304(0) (that is, the data in the 0th physical page and the 1st physical page of the physical block 304(0) ) to the 0th physical page and the 1st physical page of the physical block 304 (D+1) (as shown in FIG. 6 ), and write new data to the 2nd physical page of the physical block 304 (D+1). The physical page and the third physical page (as shown in FIG. 7 ). At this point, the memory management circuit 202 completes the writing operation. Because the valid data in the physical block 304(0) may become invalid in the next operation (for example, a write command), the valid data in the physical block 304(0) is immediately moved to the physical block 304( D+1) may cause unnecessary movement. In addition, data must be sequentially written to the physical pages in the physical block. Therefore, the memory management circuit 202 will only move the valid data before the physical pages to be written.

在本范例实施例中,暂时地维持此等母子暂态关系(即,物理区块304(0)与物理区块304(D+1))的运作称为开启(open)母子区块,并且原物理区块称为母物理区块而替换物理区块称为子物理区块。In this exemplary embodiment, the operation of temporarily maintaining the parent-child transient relationship (ie, physical block 304(0) and physical block 304(D+1)) is called opening (open) the parent-child block, and The original physical block is called a parent physical block and the replacement physical block is called a child physical block.

之后,当需要将物理区块304(0)与物理区块304(D+1)的内容真正合并时,存储器管理电路202才会将物理区块304(0)与物理区块304(D+1)的数据整并至一个物理区块,由此提升物理区块的使用效率。在此,合并母子区块的运作称为关闭(close)母子区块。例如,如图8所示,当进行关闭母子区块时,存储器管理电路202会将物理区块304(0)中剩余的有效数据(即,物理区块304(0)的第4物理页面~第(K)物理页面中的数据)复制至替换物理区块304(D+1)的第4物理页面~第(K)物理页面中,然后将物理区块304(0)擦除并关联至备用区404,同时,将物理区块304(D+1)关联至数据区402。也就是说,存储器管理电路202会在逻辑区块-物理区块映射表中将逻辑区块510(0)重新映射至304(D+1)。此外,在本范例实施例中,存储器管理电路202会建立备用区物理区块表(未绘示)来记录目前被关联至备用区的物理区块。值得一提的是,在开启母子区块时存储器管理电路202需使用更多缓冲存储器252的存储空间来存储管理变数,以记录更详细的存储状态。例如,这些管理变数会记录属于逻辑区块510(0)的有效数据被分散地存储在物理区块304(0)与物理区块304(D+1)的哪些物理页面中(如图7所示)。基此,在便携式非易失性存储器存储装置100运作期间,母子区块的组数是有限的。因此,当便携式非易失性存储器存储装置100接收到来自于主机系统1000的写入指令时,倘若已开启母子区块的组数达到上限时,存储器管理电路202需关闭至少一组目前已开启的母子区块(即,执行关闭母子区块运作)以执行此写入指令。在此,图6~图8所示的写入运作称为一般写入模式。Afterwards, when the contents of the physical block 304(0) and the physical block 304(D+1) need to be actually merged, the memory management circuit 202 will combine the physical block 304(0) with the physical block 304(D+1). 1) The data is integrated into one physical block, thereby improving the efficiency of the physical block. Here, the operation of merging the parent and child blocks is called closing the parent and child blocks. For example, as shown in FIG. 8 , when closing the parent and child blocks, the memory management circuit 202 will save the remaining valid data in the physical block 304 (0) (that is, the fourth physical page ~ 4th physical page of the physical block 304 (0) The data in the (K)th physical page) is copied to the 4th physical page to the (K)th physical page of the replacement physical block 304 (D+1), and then the physical block 304 (0) is erased and associated to The spare area 404 , meanwhile, associates the physical block 304 (D+1) with the data area 402 . That is to say, the memory management circuit 202 remaps the logical block 510(0) to 304(D+1) in the logical block-physical block mapping table. In addition, in this exemplary embodiment, the memory management circuit 202 creates a physical block table (not shown) in the spare area to record the physical blocks currently associated with the spare area. It is worth mentioning that the memory management circuit 202 needs to use more storage space of the buffer memory 252 to store management variables when the mother-child block is enabled, so as to record more detailed storage status. For example, these management variables will record which physical pages of the physical block 304(0) and the physical block 304(D+1) the valid data belonging to the logical block 510(0) are distributed into (as shown in FIG. 7 Show). Based on this, during the operation of the portable non-volatile memory storage device 100, the number of sets of parent and child blocks is limited. Therefore, when the portable non-volatile memory storage device 100 receives a write command from the host system 1000, if the number of groups of the mother and child blocks that have been opened reaches the upper limit, the memory management circuit 202 needs to close at least one group that is currently open. parent-child block (i.e., execute the operation of closing the parent-child block) to execute the write command. Here, the writing operations shown in FIGS. 6 to 8 are called normal writing modes.

图9是根据本发明范例实施例所绘示的储能电路的示意图。FIG. 9 is a schematic diagram of an energy storage circuit according to an exemplary embodiment of the present invention.

请参照图9,储能电路1110包括二极管D、第一电阻R1、第二电阻R2、开关S与电容组C。二极管D的阳极用以接收来自于主机系统1000的输入电压Vin,并且二极管D的阴极用以提供输出电压Vout。第一电阻R1的第一端和第二电阻R2的第一端电性连接至二极管D的阴极。开关S的第一端电性连接至第二电阻R2的第二端,并且开关S的控制端电性连接至存储器控制器104。电容组C的第一端电性连接至开关S的第二端且电性连接至第一电阻R1的第二端,并且电容组C的第二端电性连接至接地端。在本范例实施例中,电容组C可包括并联的多个电容。Referring to FIG. 9 , the energy storage circuit 1110 includes a diode D, a first resistor R1 , a second resistor R2 , a switch S and a capacitor group C. Referring to FIG. The anode of the diode D is used to receive the input voltage Vin from the host system 1000 , and the cathode of the diode D is used to provide the output voltage Vout. The first terminal of the first resistor R1 and the first terminal of the second resistor R2 are electrically connected to the cathode of the diode D. The first end of the switch S is electrically connected to the second end of the second resistor R2 , and the control end of the switch S is electrically connected to the memory controller 104 . The first end of the capacitor set C is electrically connected to the second end of the switch S and to the second end of the first resistor R1 , and the second end of the capacitor set C is electrically connected to the ground. In this exemplary embodiment, the capacitor group C may include a plurality of capacitors connected in parallel.

在本范例实施例中,当非易失性存储器存储装置100电性连接至主机系统1000时,电容组C会存储备用电能。电容组C所存储的备用电能是于主机系统1000所提供的输入电压不足时用以维持存储器控制器104与非易失性存储器模块106的短暂运作。在本范例实施例中,例如,电容组的容量为470~2200微法拉(uF)。值得一提的是,在本范例实施例中,第一电阻R1是为了避免当非易失性存储器存储装置100电性连接至主机系统1000时电容组C所造成的大量吸入电流(inrush current)。例如,第一电阻R1的电阻值为200欧姆。特别是,第一电阻R1会造成输出电压Vout偏低而使存储器控制器104与非易失性存储器模块106无法正常地运作。基此,在本范例实施例中,在第一次接收到来自于主机系统1000的小型计算机标准接口(Small Computer Standard Interface,SCSI)时,存储器控制器104(或存储器控制器104的存储器管理电路202)会开启(turn on)开关S,以使开关S闭合来并联第二电阻R2,由此增加输出电压Vout。例如,第二电阻R2的电阻值为1欧姆。基此,在开关S被开启的状态下,存储器控制器104与非易失性存储器模块106就能够在正常的操作电压下根据主机系统1000的指令来运作。In this exemplary embodiment, when the nonvolatile memory storage device 100 is electrically connected to the host system 1000 , the capacitor bank C stores backup electric energy. The backup power stored in the capacitor group C is used to maintain the short-term operation of the memory controller 104 and the non-volatile memory module 106 when the input voltage provided by the host system 1000 is insufficient. In this exemplary embodiment, for example, the capacity of the capacitor bank is 470˜2200 microfarads (uF). It is worth mentioning that, in this exemplary embodiment, the first resistor R1 is to avoid a large amount of inrush current (inrush current) caused by the capacitor group C when the nonvolatile memory storage device 100 is electrically connected to the host system 1000 . For example, the resistance value of the first resistor R1 is 200 ohms. In particular, the first resistor R1 will cause the output voltage Vout to be low, so that the memory controller 104 and the non-volatile memory module 106 cannot work normally. Based on this, in this exemplary embodiment, when receiving a small computer standard interface (Small Computer Standard Interface, SCSI) from the host system 1000 for the first time, the memory controller 104 (or the memory management circuit of the memory controller 104 202) will turn on the switch S, so that the switch S is closed to connect the second resistor R2 in parallel, thereby increasing the output voltage Vout. For example, the resistance value of the second resistor R2 is 1 ohm. Based on this, when the switch S is turned on, the memory controller 104 and the non-volatile memory module 106 can operate under the normal operating voltage according to the command of the host system 1000 .

必须了解的是,在本发明范例实施例中,存储器控制器104(或存储器控制器104的存储器管理电路202)会在被致能后第一次接收到来自于主机系统1000的SCSI指令时,开启开关S。然而,本发明不限于此,在本发明另一范例实施例中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)也可在被致能后第一次接收到来自于主机系统1000的写入指令时,开启开关S。或者,在在本发明另一范例实施例中,存储器控制器104(或存储器控制器104的存储器管理电路202)会被致能且等待一延迟时间后,开启开关S。例如,此延迟时间为3秒钟。It must be understood that, in the exemplary embodiment of the present invention, when the memory controller 104 (or the memory management circuit 202 of the memory controller 104 ) receives the SCSI command from the host system 1000 for the first time after being enabled, Turn on switch S. However, the present invention is not limited thereto. In another exemplary embodiment of the present invention, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104 ) may also receive a message from the host for the first time after being enabled. When the system 1000 writes a command, the switch S is turned on. Or, in another exemplary embodiment of the present invention, the memory controller 104 (or the memory management circuit 202 of the memory controller 104 ) is enabled and waits for a delay time before turning on the switch S. For example, this delay time is 3 seconds.

在本发明范例实施例中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会检测对应输入电压Vin的检测信号。并且,当检测信号指示输入电压Vin在一预设时间(例如,10秒钟)内持续小于一预设电压(例如,4伏特(V))时,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会启动特殊写入模式将暂存于缓冲存储器208中的数据写入至非易失性存储器模块106中。In an exemplary embodiment of the present invention, the memory controller 104 (eg, the memory management circuit 202 of the memory controller 104 ) detects a detection signal corresponding to the input voltage Vin. And, when the detection signal indicates that the input voltage Vin is continuously lower than a preset voltage (for example, 4 volts (V)) within a preset time (for example, 10 seconds), the memory controller 104 (for example, the memory controller 104 The memory management circuit 202) will start the special write mode to write the data temporarily stored in the buffer memory 208 into the non-volatile memory module 106.

特别是,在特殊写入模式中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会从备用区404中提取一个物理区块,并且将暂存于缓冲存储器208中的数据在所提取的物理区块的物理页面中依序地写入。具体来说,暂存于缓冲存储器208中的数据会从所提取的物理区块的第0个物理页面开始依序地被写入。也就是说,存储器控制器104(例如,存储器控制器104的存储器管理电路202)不会依据逻辑存取地址的对应关系来写入数据(即,如图6~图8所示的一般写入模式)。基此,存储器控制器104(例如,存储器控制器104的存储器管理电路202)可以较少的时间将暂存于缓冲存储器208中的数据写入至非易失性存储器模块106中。In particular, in the special write mode, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) extracts a physical block from the spare area 404, and stores the data temporarily stored in the buffer memory 208 Write sequentially in the physical pages of the extracted physical blocks. Specifically, the data temporarily stored in the buffer memory 208 will be sequentially written starting from the 0th physical page of the extracted physical block. That is to say, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) will not write data according to the corresponding relationship of the logical access addresses (that is, the general writing shown in FIGS. 6-8 ). model). Based on this, the memory controller 104 (eg, the memory management circuit 202 of the memory controller 104 ) can write the data temporarily stored in the buffer memory 208 into the non-volatile memory module 106 in less time.

在特殊写入模式中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会在所提取的物理区块的物理页面的冗余位区中记录特殊标记,以将以特殊写入模式来运作的物理区块和其他物理区块来区别。此外,对应暂存于缓冲存储器208中的数据的逻辑地址(即,映射信息)亦会被记录在所提取的物理区块的物理页面的冗余位区中,以利于非易失性存储器存储装置100被重新启动时存储器控制器104(例如,存储器控制器104的存储器管理电路202)能够正确地将以特殊写入模式所写入的数据搬移(即,重新写入)至所映射的物理区块中。In the special write mode, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) will record a special mark in the redundant bit area of the physical page of the extracted physical block, so as to write Physical blocks that operate in entry mode are distinguished from other physical blocks. In addition, the logical address (i.e., mapping information) corresponding to the data temporarily stored in the buffer memory 208 will also be recorded in the redundant bit area of the physical page of the extracted physical block, so as to facilitate non-volatile memory storage When the device 100 is restarted, the memory controller 104 (e.g., the memory management circuit 202 of the memory controller 104) can correctly move (i.e., rewrite) the data written in the special write mode to the mapped physical in the block.

必须了解的是,在本范例实施例中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)是在所提取的物理区块的物理页面的冗余位区中记录特殊标记与对应暂存于缓冲存储器208中的数据的映射信息。然而,本发明不限于此,在本发明另一范例实施例中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)也可从备用区404中提取另一个物理区块作为特殊物理区块,来记录哪些物理区块的哪些物理页面被用来以特殊写入模式来写入暂存于缓冲存储器208中的数据以及对应暂存于缓冲存储器208中的数据的映射信息。之后,当非易失性存储器存储装置100被重新启动时,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会从此特殊物理区块中读取相关的映射信息,由此将以特殊写入模式所写入的数据正确地搬移至所映射的物理区块中。值得一提的是,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会预先设定某些物理区块可被用来作为特殊物理区块。例如,在一范例实施例中,物理区块304(D+1)~物理区块304(D+10)会被用来作为特殊物理区块。基此,当非易失性存储器存储装置100被重新启动时,存储器控制器104(例如,存储器控制器104的存储器管理电路202)仅需确认物理区块304(D+1)~物理区块304(D+10)中的数据,就可获知在前次关机时暂存于缓冲存储器208中的数据是否是以特殊写入模式被写入的至非易失性存储器模块106中,由此判断是否需执行搬移数据的运作。It must be understood that, in this exemplary embodiment, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) records the special mark and Mapping information corresponding to data temporarily stored in the buffer memory 208 . However, the present invention is not limited thereto. In another exemplary embodiment of the present invention, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) may also extract another physical block from the spare area 404 as a special The physical blocks are used to record which physical pages of which physical blocks are used to write the data temporarily stored in the buffer memory 208 and the mapping information corresponding to the data temporarily stored in the buffer memory 208 in a special writing mode. Afterwards, when the non-volatile memory storage device 100 is restarted, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) will read the relevant mapping information from this special physical block, thereby converting Data written in the special write mode is correctly moved to the mapped physical block. It is worth mentioning that the memory controller 104 (eg, the memory management circuit 202 of the memory controller 104 ) presets certain physical blocks to be used as special physical blocks. For example, in an exemplary embodiment, physical block 304(D+1)˜physical block 304(D+10) are used as special physical blocks. Based on this, when the non-volatile memory storage device 100 is restarted, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) only needs to confirm the physical block 304(D+1)~physical block 304 (D+10), it can be known whether the data temporarily stored in the buffer memory 208 was written into the non-volatile memory module 106 in a special write mode when the power was turned off last time, thus Determine whether to perform the operation of moving data.

此外,在本发明另一范例实施例中,在特殊写入模式中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)还可仅使用所提取的物理区块的物理页面之中属于下页面的物理页面来写入暂存于缓冲存储器208中的数据。In addition, in another exemplary embodiment of the present invention, in the special write mode, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) can also only use one of the physical pages of the extracted physical block The data temporarily stored in the buffer memory 208 is written to the physical page belonging to the lower page.

具体来说,NAND型快闪存储器可根据每一记忆胞中可存储的位数区分为SLC NAND型快闪存储器与MLC NAND型快闪存储器。在对SLCNAND型快闪存储器的记忆胞进行写入(亦称为可编程(program))时仅能执行单阶的可编程,因此每一记忆胞仅能存储一位的数据。而MLCNAND型快闪存储器的物理区块的可编程可分为多阶段。例如,以4层记忆胞为例,物理区块的可编程可分为2阶段。第一阶段是下页面(lower page)的写入部分,其物理特性类似于单层记忆胞(Single Level Cell,SLC)NAND快闪存储器。第二阶段为可编程上页面(upper page),其中下页面的写入速度会快于上页面。因此,每一物理区块的页面可区分为慢速页面(即,上页面)与快速页面(即,下页面)。类似地,在8层记忆胞或16层记忆胞的案例中,记忆胞会包括更多个页面并且会以更多阶段来写入。在此,将写入速度最快的页面称为下页面,其他写入速度较慢的页面统称为上页面。例如,上页面包括具有不同写入速度的多个页面。此外,在其他实施例中,上页面也可为写入速度最慢的页面,或者写入速度最慢与部分写入速度快于写入速度最慢页面的页面。例如,在4层记忆胞中,下页面为写入速度最快与写入速度次快的页面,上页面则为写入速度最慢与写入速度次慢的页面。在本范例实施例中,物理区块的物理页面可根据其写入特性区分为属于上页面或下页面。Specifically, NAND flash memory can be divided into SLC NAND flash memory and MLC NAND flash memory according to the number of bits that can be stored in each memory cell. When writing into memory cells of the SLC NAND flash memory (also known as a program), only single-level programming can be performed, so each memory cell can only store one bit of data. The programming of the physical block of the MLCNAND flash memory can be divided into multiple stages. For example, taking a 4-layer memory cell as an example, the programming of the physical block can be divided into two stages. The first stage is the writing part of the lower page, whose physical characteristics are similar to single-level memory cell (Single Level Cell, SLC) NAND flash memory. The second stage is the programmable upper page, in which the writing speed of the lower page will be faster than that of the upper page. Therefore, the pages of each physical block can be divided into slow pages (ie, upper pages) and fast pages (ie, lower pages). Similarly, in the case of 8-layer memory cells or 16-layer memory cells, the memory cells will include more pages and will be written in more stages. Here, the page with the fastest writing speed is called the lower page, and the other pages with the slower writing speed are collectively called the upper page. For example, the upper page includes multiple pages with different write speeds. In addition, in other embodiments, the upper page may also be the page with the slowest writing speed, or the page with the slowest writing speed and part of which is faster than the slowest writing speed page. For example, in a 4-layer memory cell, the lower page is the page with the fastest writing speed and the second fastest writing speed, and the upper page is the page with the slowest writing speed and the second slowest writing speed. In this exemplary embodiment, the physical pages of the physical block can be classified as belonging to the upper page or the lower page according to their write characteristics.

基此,通过仅使用所提取的物理区块的物理页面之中属于下页面的物理页面来写入暂存于缓冲存储器208中的数据,可更缩短写入暂存于缓冲存储器208中的数据所需的时间。Based on this, by writing the data temporarily stored in the buffer memory 208 using only the physical page belonging to the lower page among the physical pages of the extracted physical block, the data temporarily stored in the buffer memory 208 can be shortened further. the time required.

此外,在本发明范例实施例中,非易失性存储器存储装置100配置有存取指示灯(未绘示),以显示非易失性存储器存储装置100正在进行存取运作。例如,此存取指示灯为LED灯。In addition, in an exemplary embodiment of the present invention, the non-volatile memory storage device 100 is configured with an access indicator light (not shown) to indicate that the non-volatile memory storage device 100 is in an access operation. For example, the access indicator is an LED light.

特别是,在本发明另一范例实施例中,在特殊写入模式中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)更会关闭存取指示灯以减少耗电。In particular, in another exemplary embodiment of the present invention, in the special writing mode, the memory controller 104 (eg, the memory management circuit 202 of the memory controller 104 ) may further turn off the access LED to reduce power consumption.

值得一提的是,在本范例实施例中,当检测信号指示输入电压Vin在预设时间内持续小于预设电压时,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会启动特殊写入模式。然而,本发明不限于此,例如,在本发明另一范例实施例中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)也可根据指示连接器102的非激活状态的检测信号来启动特殊写入模式。具体来说,在连接器102为USB 3.0的例子中,当非易失性存储器存储装置100与主机系统1000之间的超速(superspeed)连接失败时,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会检测到连接器102的非激活(SS.Inactive)状态,由此判定非易失性存储器存储装置100可能被不正常地从主机系统1000中被拔除。此外,在本发明另一范例实施例中,存储器控制器104(例如,存储器控制器104的存储器管理电路202)也可根据来自于主机系统1000的暂停模式(suspend mode)信号、暖重置(warm reset)信号或热重置(hotreset)信号来启动特殊写入模式,其中暖重置信号是用以在电压不下降的状态下重新驱动系统的信号,热动置信号则是使系统重新整理数据且使系统在系统起始点(starting point)启动的信号。It is worth mentioning that, in this exemplary embodiment, when the detection signal indicates that the input voltage Vin is continuously lower than the preset voltage within the preset time, the memory controller 104 (eg, the memory management circuit 202 of the memory controller 104 ) will Start special write mode. However, the present invention is not limited thereto. For example, in another exemplary embodiment of the present invention, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104 ) may also detect signal to initiate a special write mode. Specifically, in an example where the connector 102 is USB 3.0, when the superspeed (superspeed) connection between the nonvolatile memory storage device 100 and the host system 1000 fails, the memory controller 104 (for example, the memory controller 104 The memory management circuit 202) of the connector 102 will detect the inactive (SS.Inactive) state of the connector 102, thereby determining that the non-volatile memory storage device 100 may be unplugged from the host system 1000 abnormally. In addition, in another exemplary embodiment of the present invention, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104 ) may also respond to a suspend mode (suspend mode) signal from the host system 1000, a warm reset ( warm reset) signal or hot reset (hotreset) signal to start the special write mode, where the warm reset signal is used to re-drive the system without voltage drop, and the hot reset signal is to reorganize the system Data and a signal that causes the system to start at the starting point of the system.

图10是根据本发明范例实施例所绘示的数据存储方法的流程图。FIG. 10 is a flowchart of a data storage method according to an exemplary embodiment of the present invention.

请参照图10,在非易失性存储器存储装置100运作期间,在步骤S1001中来自于主机系统1000的输入电压会被判断是否在预设时间内持续小于预设电压。具体来说,在步骤S1001,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会持续检测来自于主机系统1000的输入电压,以判断此输入电压是否在预设时间内持续小于预设电压。Referring to FIG. 10 , during the operation of the nonvolatile memory storage device 100 , in step S1001 , it is determined whether the input voltage from the host system 1000 is continuously lower than the preset voltage within a preset time. Specifically, in step S1001, the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104) will continuously detect the input voltage from the host system 1000 to determine whether the input voltage is continuously less than preset voltage.

倘若来自于主机系统的输入电压在预设时间内持续小于预设电压时,在步骤S1003中会判断缓冲存储器208中是否暂存有尚未写入至非易失性存储器106中的数据。If the input voltage from the host system continues to be lower than the preset voltage within the preset time, it is determined in step S1003 whether the buffer memory 208 temporarily stores data that has not been written into the non-volatile memory 106 .

倘若缓冲存储器208中暂存有尚未写入至非易失性存储器106中的数据时,在步骤S1005中暂存于缓冲存储器208中的数据会以特殊写入模式来被写入至非易失性存储器106中。倘若来自于主机系统的输入电压未在预设时间内持续小于预设电压或缓冲存储器208中无暂存有尚未写入至非易失性存储器106中的数据时,则步骤S1001会被执行以继续检测来自于主机系统的输入电压。在本范例实施例中,图10所示的流程会于非易失性存储器存储装置100致能后持续的运作直到非易失性存储器存储装置100中止运作为止。If there is data temporarily stored in the buffer memory 208 that has not yet been written into the non-volatile memory 106, the data temporarily stored in the buffer memory 208 in step S1005 will be written into the non-volatile memory in a special write mode. in sex memory 106. If the input voltage from the host system is not continuously lower than the preset voltage within the preset time or there is no data temporarily stored in the buffer memory 208 that has not yet been written into the non-volatile memory 106, step S1001 will be executed to Continue to detect the input voltage from the host system. In this exemplary embodiment, the process shown in FIG. 10 will continue to operate after the non-volatile memory storage device 100 is enabled until the non-volatile memory storage device 100 stops operating.

图11是根据本发明另一范例实施例所绘示的数据存储方法的流程图。FIG. 11 is a flowchart of a data storage method according to another exemplary embodiment of the present invention.

请参照图11,在非易失性存储器存储装置100运作期间,在步骤S1101中会判断是否检测到连接器102的非激活状态。具体来说,在步骤S1101,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会判断是否检测到连接器102的非激活状态。Referring to FIG. 11 , during the operation of the nonvolatile memory storage device 100 , in step S1101 it is determined whether the inactive state of the connector 102 is detected. Specifically, in step S1101 , the memory controller 104 (for example, the memory management circuit 202 of the memory controller 104 ) determines whether an inactive state of the connector 102 is detected.

倘若检测到连接器102的非激活状态时,在步骤S1103中会判断缓冲存储器208中是否暂存有尚未写入至非易失性存储器106中的数据。If the inactive state of the connector 102 is detected, in step S1103 it is determined whether there is data not yet written into the non-volatile memory 106 temporarily stored in the buffer memory 208 .

倘若缓冲存储器208中暂存有尚未写入至非易失性存储器106中的数据时,在步骤S1105中暂存于缓冲存储器208中的数据会以特殊写入模式来写入至非易失性存储器106中。If there is temporarily stored data in the buffer memory 208 that has not yet been written into the non-volatile memory 106, the data temporarily stored in the buffer memory 208 will be written into the non-volatile memory in a special write mode in step S1105. in memory 106.

倘若未检测到连接器102的非激活状态或缓冲存储器208中无暂存有尚未写入至非易失性存储器106中的数据时,则步骤S1101会被执行以继续检测来自于主机系统的输入电压。同样的,在此一范例实施例中,图11所示的流程会于非易失性存储器存储装置100致能后持续的运作直到非易失性存储器存储装置100中止运作为止。If the inactive state of the connector 102 is not detected or there is no data temporarily stored in the buffer memory 208 that has not been written into the non-volatile memory 106, then step S1101 will be executed to continue to detect the input from the host system Voltage. Similarly, in this exemplary embodiment, the process shown in FIG. 11 will continue to operate after the non-volatile memory storage device 100 is enabled until the non-volatile memory storage device 100 stops operating.

图12是根据本发明另一范例实施例所绘示的数据存储方法的流程图。FIG. 12 is a flowchart of a data storage method according to another exemplary embodiment of the present invention.

请参照图12,在非易失性存储器存储装置100运作期间,在步骤S1201中会判断是否接收到来自于主机系统1000的暂停模式信号、暖重置信号或热重置信号。具体来说,在步骤S1201,存储器控制器104(例如,存储器控制器104的存储器管理电路202)会判断是否接收到来自于主机系统1000的暂停模式信号、暖重置信号或热重置信号。Referring to FIG. 12 , during the operation of the nonvolatile memory storage device 100 , it is determined whether a suspend mode signal, a warm reset signal or a warm reset signal from the host system 1000 is received in step S1201 . Specifically, in step S1201 , the memory controller 104 (eg, the memory management circuit 202 of the memory controller 104 ) determines whether a suspend mode signal, a warm reset signal or a warm reset signal is received from the host system 1000 .

倘若接收到来自于主机系统1000的暂停模式信号、暖重置信号或热重置信号时,在步骤S1203中会判断缓冲存储器208中是否暂存有尚未写入至非易失性存储器106中的数据。If a suspend mode signal, a warm reset signal or a warm reset signal from the host system 1000 is received, it will be judged in step S1203 whether there is any temporary storage in the buffer memory 208 that has not yet been written into the non-volatile memory 106. data.

倘若缓冲存储器208中暂存有尚未写入至非易失性存储器106中的数据时,在步骤S1205中暂存于缓冲存储器208中的数据会以特殊写入模式来写入至非易失性存储器106中。If there is temporarily stored data in the buffer memory 208 that has not yet been written into the non-volatile memory 106, the data temporarily stored in the buffer memory 208 will be written into the non-volatile memory in a special write mode in step S1205. in memory 106.

倘若未接收到来自于主机系统1000的暂停模式信号、暖重置信号或热重置信号或缓冲存储器208中无暂存有尚未写入至非易失性存储器106中的数据时,则步骤S1201会被执行以继续判断是否接收到来自于主机系统1000的暂停模式信号、暖重置信号或热重置信号。同样的,在此一范例实施例中,图11所示的流程会于非易失性存储器存储装置100致能后持续的运作直到非易失性存储器存储装置100中止运作为止。If no suspend mode signal, warm reset signal or warm reset signal from the host system 1000 is received or there is no data temporarily stored in the buffer memory 208 that has not yet been written into the non-volatile memory 106, then step S1201 It will be executed to continue to determine whether a suspend mode signal, a warm reset signal or a warm reset signal from the host system 1000 is received. Similarly, in this exemplary embodiment, the process shown in FIG. 11 will continue to operate after the non-volatile memory storage device 100 is enabled until the non-volatile memory storage device 100 stops operating.

综上所述,本发明范例实施例的非易失性存储器存储装置、存储器控制器与数据存储方法能够避免因不正常的断电所造成的缓冲存储器内的数据的遗失。To sum up, the nonvolatile memory storage device, memory controller and data storage method of the exemplary embodiments of the present invention can avoid loss of data in the buffer memory caused by abnormal power failure.

虽然本发明已以实施例公开如上,然其并非用以限定本发明,本领域技术人员在不脱离本发明的精神和范围内,当可作些许的更动与润饰,故本发明的保护范围当视所附权利要求书所界定者为准。Although the present invention has been disclosed as above with the embodiments, it is not intended to limit the present invention. Those skilled in the art can make some changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention When depending on what is defined in the appended claims shall prevail.

Claims (18)

1. nonvolatile memory stores device comprises:
A connector is in order to be electrically connected to a host computer system;
One tank circuit is in order to receive an input voltage and an output voltage is provided;
One power source conversion and supply circuit electrically connect this tank circuit and in order to this output voltage is converted to one first voltage and one second voltage;
One non-volatile memory module electrically connects this power source conversion and supply circuit and operates in this first voltage;
One Memory Controller electrically connects this connector, this tank circuit and this power source conversion and supply circuit and operates in this second voltage; And
One memory buffer electrically connects this Memory Controller, in order to temporary data,
Wherein this Memory Controller writes to this non-volatile memory module in order to these data that when receiving a signal, will be temporarily stored in this memory buffer, and wherein this signal is in order to indicate this input voltage in a Preset Time, to continue less than a detection signal of a predeterminated voltage or in order to a detection signal or a park mode signal, a warm reset signal or a warm reset signal for from this host computer system, being received of the unactivated state of indicating this connector.
2. nonvolatile memory stores device as claimed in claim 1, wherein this tank circuit comprises:
One diode has an anode and a negative electrode, and this anode is in order to receive this input voltage, and this negative electrode is in order to provide this output voltage;
One first end that one first resistance and one second resistance, one first end of this first resistance are electrically connected to this negative electrode and this second resistance of this diode is electrically connected to this negative electrode of this diode;
One switch, one first end of this switch is electrically connected to one second end of this second resistance and a control end of this switch is electrically connected to this Memory Controller; And
One capacitance group, one first end of this capacitance group are electrically connected to one second end of this first resistance and one second end of this switch and one second end of this capacitance group and are electrically connected to an earth terminal,
Wherein this Memory Controller also in order to when receive the small computer standard interface SCSI instruction that comes from this host computer system the back first time that is enabled, is opened this switch.
3. nonvolatile memory stores device as claimed in claim 1, wherein this tank circuit comprises:
One diode has an anode and a negative electrode, and this anode is in order to receive this input voltage, and this negative electrode is in order to provide this output voltage;
One first end that one first resistance and one second resistance, one first end of this first resistance are electrically connected to this negative electrode and this second resistance of this diode is electrically connected to this negative electrode of this diode;
One switch, one first end of this switch is electrically connected to one second end of this second resistance and a control end of this switch is electrically connected to this Memory Controller; And
One capacitance group, one first end of this capacitance group are electrically connected to one second end of this first resistance and one second end of this switch and one second end of this capacitance group and are electrically connected to an earth terminal,
Wherein this Memory Controller also in order to receive for the first time in the back that is enabled when coming from one of this host computer system and writing instruction, is opened this switch.
4. nonvolatile memory stores device as claimed in claim 1, wherein this tank circuit comprises:
One diode has an anode and a negative electrode, and this anode is in order to receive this input voltage, and this negative electrode is in order to provide this output voltage;
One first end that one first resistance and one second resistance, one first end of this first resistance are electrically connected to this negative electrode and this second resistance of this diode is electrically connected to this negative electrode of this diode;
One switch, one first end of this switch is electrically connected to one second end of this second resistance and a control end of this switch is electrically connected to this Memory Controller; And
One capacitance group, one first end of this capacitance group are electrically connected to one second end of this first resistance and one second end of this switch and one second end of this capacitance group and are electrically connected to an earth terminal,
Wherein this Memory Controller is opened this switch also in order to after being enabled and waiting for a time delay.
5. nonvolatile memory stores device as claimed in claim 1, wherein this non-volatile memory module comprises that a plurality of physical blocks and these physical blocks are grouped into a data field and a spare area at least,
Wherein this Memory Controller extracts a physical blocks and this data that will be temporary in this memory buffer write in this physical blocks from this spare area when receiving this signal.
6. nonvolatile memory stores device as claimed in claim 5, wherein this Memory Controller only uses the physical page that belongs to a lower page among a plurality of physical pages of this physical blocks of from this spare area, being extracted to write these data that are temporary in this memory buffer when receiving this signal.
7. nonvolatile memory stores device as claimed in claim 5, wherein this Memory Controller also in order to when receiving this signal in a redundant digit district of this physical blocks record to a map information that should data.
8. nonvolatile memory stores device as claimed in claim 5, wherein this Memory Controller also in order to when receiving this signal, from this spare area, extract another physical blocks and in this another physical blocks of being extracted record to a map information that should data.
9. nonvolatile memory stores device as claimed in claim 5 also comprises an access pilot lamp,
Wherein this Memory Controller is also in order to close this access pilot lamp when receiving this signal.
10. Memory Controller comprises:
One HPI is in order to be electrically connected to a host computer system;
One memory interface is in order to be electrically connected to a non-volatile memory module;
One memory management circuitry electrically connects this HPI and this memory interface; And
One memory buffer electrically connects this memory management circuitry and in order to temporary data that come from this host computer system,
Wherein this memory management circuitry writes to this non-volatile memory module in order to these data that when receiving a signal, will be temporarily stored in this memory buffer; Wherein this signal is in order to indicate this input voltage in a Preset Time, to continue less than a detection signal of a predeterminated voltage or in order to a detection signal or a park mode signal, a warm reset signal or a warm reset signal for from this host computer system, being received of the unactivated state of indicating this connector
Wherein this memory management circuitry also is included in the switch in the tank circuit in order to unlatching.
11. a date storage method is used for a non-volatile memory module, this date storage method comprises:
Judge whether an input voltage that comes from this host computer system continues less than a predeterminated voltage in a Preset Time; And
When this input voltage that comes from this host computer system continues less than this predeterminated voltage, data that are temporarily stored in the memory buffer are write to this non-volatile memory module in this Preset Time.
12. date storage method as claimed in claim 11, wherein this non-volatile memory module has a plurality of physical blocks and these physical blocks are grouped into a data field and a spare area at least,
Wherein will be temporarily stored in the step that these data in this memory buffer write to this non-volatile memory module comprises:
From this spare area, extract a physical blocks; And
These data that are temporary in this memory buffer are write in this physical blocks.
13. date storage method as claimed in claim 12; Wherein each these physical blocks comprises that speed that a plurality of physical pages and these physical pages belong to the page on a lower page and respectively and write data to the physical page that belongs to this lower page is faster than writing data to the speed that belongs to the physical page of the page on this
Wherein will be temporary in the step that these data in this memory buffer write in this physical blocks comprises: only use the physical page that belongs to this lower page among these physical pages of this physical blocks of from this spare area, being extracted to write these data that are temporary in this memory buffer.
14. date storage method as claimed in claim 12 wherein will be temporarily stored in the step that these data in this memory buffer write to this non-volatile memory module and also comprise:
Record is to a map information that should data in a redundant digit district of this physical blocks.
15. date storage method as claimed in claim 12 wherein will be temporarily stored in the step that these data in this memory buffer write to this non-volatile memory module and also comprise:
From this spare area, extract another physical blocks and in this another physical blocks of being extracted record to a map information that should data.
16. date storage method as claimed in claim 12 wherein will be temporarily stored in the step that these data in this memory buffer write to this non-volatile memory module and also comprise:
Close an access pilot lamp.
17. a date storage method is used for a non-volatile memory module, this date storage method comprises:
Judge whether to detect a unactivated state of a connector; And
When detecting this unactivated state of this connector, data that are temporarily stored in the memory buffer are write to this non-volatile memory module.
18. a date storage method is used for a non-volatile memory module, this date storage method comprises:
Judge whether from this host computer system, to receive a park mode signal, a warm reset signal or a warm reset signal; And
When from this host computer system, receiving this park mode signal, this warm reset signal or this warm reset signal, data that are temporarily stored in the memory buffer are write to this non-volatile memory module.
CN2010105279215A 2010-10-21 2010-10-21 Non-volatile memory storage device, memory controller and data storage method Pending CN102456404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105279215A CN102456404A (en) 2010-10-21 2010-10-21 Non-volatile memory storage device, memory controller and data storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105279215A CN102456404A (en) 2010-10-21 2010-10-21 Non-volatile memory storage device, memory controller and data storage method

Publications (1)

Publication Number Publication Date
CN102456404A true CN102456404A (en) 2012-05-16

Family

ID=46039495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105279215A Pending CN102456404A (en) 2010-10-21 2010-10-21 Non-volatile memory storage device, memory controller and data storage method

Country Status (1)

Country Link
CN (1) CN102456404A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831920A (en) * 2012-07-22 2012-12-19 北京忆恒创源科技有限公司 Power supply circuit and power supply method
CN104252219A (en) * 2012-07-22 2014-12-31 北京忆恒创源科技有限公司 Power supply circuit and power supply method
CN104570821A (en) * 2013-10-09 2015-04-29 新唐科技股份有限公司 Integrated circuit and operation method thereof
CN104809082A (en) * 2014-01-29 2015-07-29 群联电子股份有限公司 Data protection method, memory storage device and memory control circuit unit
CN104900267A (en) * 2015-06-16 2015-09-09 无锡中星微电子有限公司 Read control circuit for retention memory
CN105810245A (en) * 2014-12-31 2016-07-27 群联电子股份有限公司 Data sampling circuit module, data sampling method and memory storage device
CN107403644A (en) * 2017-05-22 2017-11-28 宜鼎国际股份有限公司 Flash Memory Device with Abnormal Power Protection
CN110069211A (en) * 2018-01-23 2019-07-30 纬创资通股份有限公司 Data management circuit
CN110781029A (en) * 2018-07-30 2020-02-11 慧荣科技股份有限公司 Power-off protection method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187830A (en) * 2007-12-27 2008-05-28 华为技术有限公司 Power-down protection method, device, logic device and storage system
CN101552032A (en) * 2008-12-12 2009-10-07 深圳市晶凯电子技术有限公司 Method and device for constructing a high-speed solid state memory disc by using higher-capacity DRAM to join in flash memory medium management
CN101710252A (en) * 2009-12-08 2010-05-19 成都市华为赛门铁克科技有限公司 Power supply method and power supply device of storage system
CN101866320A (en) * 2009-04-14 2010-10-20 群联电子股份有限公司 Data management method and flash memory storage system and controller using the method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187830A (en) * 2007-12-27 2008-05-28 华为技术有限公司 Power-down protection method, device, logic device and storage system
CN101552032A (en) * 2008-12-12 2009-10-07 深圳市晶凯电子技术有限公司 Method and device for constructing a high-speed solid state memory disc by using higher-capacity DRAM to join in flash memory medium management
CN101866320A (en) * 2009-04-14 2010-10-20 群联电子股份有限公司 Data management method and flash memory storage system and controller using the method
CN101710252A (en) * 2009-12-08 2010-05-19 成都市华为赛门铁克科技有限公司 Power supply method and power supply device of storage system

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831920A (en) * 2012-07-22 2012-12-19 北京忆恒创源科技有限公司 Power supply circuit and power supply method
CN102831920B (en) * 2012-07-22 2014-11-12 北京忆恒创源科技有限公司 Power supply circuit and power supply method
CN104252219A (en) * 2012-07-22 2014-12-31 北京忆恒创源科技有限公司 Power supply circuit and power supply method
CN104570821A (en) * 2013-10-09 2015-04-29 新唐科技股份有限公司 Integrated circuit and operation method thereof
CN104809082A (en) * 2014-01-29 2015-07-29 群联电子股份有限公司 Data protection method, memory storage device and memory control circuit unit
CN104809082B (en) * 2014-01-29 2018-02-02 群联电子股份有限公司 Data protection method, memory storage device and memory control circuit unit
CN105810245A (en) * 2014-12-31 2016-07-27 群联电子股份有限公司 Data sampling circuit module, data sampling method and memory storage device
CN105810245B (en) * 2014-12-31 2019-08-27 群联电子股份有限公司 Data sampling circuit module, data sampling method and memory storage device
CN104900267A (en) * 2015-06-16 2015-09-09 无锡中星微电子有限公司 Read control circuit for retention memory
CN104900267B (en) * 2015-06-16 2019-01-11 无锡中感微电子股份有限公司 The read control circuit of terminate-and-stay-resident
CN107403644A (en) * 2017-05-22 2017-11-28 宜鼎国际股份有限公司 Flash Memory Device with Abnormal Power Protection
CN107403644B (en) * 2017-05-22 2020-01-10 宜鼎国际股份有限公司 Flash memory device with abnormal power protection
CN110069211A (en) * 2018-01-23 2019-07-30 纬创资通股份有限公司 Data management circuit
CN110069211B (en) * 2018-01-23 2022-07-29 纬创资通股份有限公司 Data management circuit
CN110781029A (en) * 2018-07-30 2020-02-11 慧荣科技股份有限公司 Power-off protection method and system

Similar Documents

Publication Publication Date Title
TWI451435B (en) Non-volatile memory storage apparatus, memory controller and data storage method
CN102456404A (en) Non-volatile memory storage device, memory controller and data storage method
US9652330B2 (en) Method for data management and memory storage device and memory control circuit unit
CN103514096B (en) Data storage method, memory controller and memory storage device
US8423838B2 (en) Block management method, memory controller, and memory storage apparatus
CN104699413A (en) Data management method, memory storage device and memory control circuit unit
CN102073600B (en) Data backup method, flash memory controller and flash memory storage system
US9383929B2 (en) Data storing method and memory controller and memory storage device using the same
CN102902626B (en) Block management method, memory controller and memory storage device
CN102915273B (en) Data writing method, memory controller and memory storage device
CN102866861B (en) Flash memory storage system, flash memory controller and data writing method
CN102446137B (en) Data writing method, memory controller and memory storage device
CN103678162B (en) System data storage method, memory controller and memory storage device
TWI536392B (en) Non-volatile memory storage apparatus, memory controller and data storage method
CN102800357B (en) Program code loading and accessing method, memory controller and memory storage device
CN104536906A (en) Data writing method, memory controller and memory storage device
CN102402396B (en) Composite storage device and its composite storage media controller and addressing method
CN102122233B (en) Block management and data writing method, flash storage system and controller
CN104731710B (en) Memory management method, memory control circuit unit and memory storage device
CN103488579B (en) Memory management method, memory controller and memory storage device
CN103513930A (en) Memory management method, memory controller and memory storage device
TWI521538B (en) Non-volatile memory storage apparatus, memory controller and data storage method
CN103019952B (en) Data writing method, memory controller and memory storage device
CN102087632B (en) Data storage method for flash memory, controller and storage system thereof
CN104598167B (en) Memory erasing method, memory controller and memory storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20120516

RJ01 Rejection of invention patent application after publication