[go: up one dir, main page]

CN103186470B - Memory storage device, its memory controller, and data writing method - Google Patents

Memory storage device, its memory controller, and data writing method Download PDF

Info

Publication number
CN103186470B
CN103186470B CN201110455539.2A CN201110455539A CN103186470B CN 103186470 B CN103186470 B CN 103186470B CN 201110455539 A CN201110455539 A CN 201110455539A CN 103186470 B CN103186470 B CN 103186470B
Authority
CN
China
Prior art keywords
temporary storage
memory
data
write
write data
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.)
Active
Application number
CN201110455539.2A
Other languages
Chinese (zh)
Other versions
CN103186470A (en
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 CN201110455539.2A priority Critical patent/CN103186470B/en
Publication of CN103186470A publication Critical patent/CN103186470A/en
Application granted granted Critical
Publication of CN103186470B publication Critical patent/CN103186470B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention discloses a memory storage device, a memory controller and a data writing method thereof, wherein the memory storage device comprises a connector, a rewritable nonvolatile memory module, a second temporary storage memory and a memory controller with a first temporary storage memory. The memory controller is used for receiving the write-in command and the write-in data and temporarily storing the write-in data into the first temporary storage memory. The memory controller also copies the write-in data into the second temporary storage memory and writes the write-in data into the rewritable nonvolatile memory module according to the write-in command. In addition, the memory controller is further configured to determine whether a program error occurs during execution of the write command, and if the program error occurs, read write data from the second temporary memory and re-execute the write command. Therefore, the writing speed of the memory storage device can be effectively improved.

Description

存储器储存装置及其存储器控制器与数据写入方法Memory storage device, its memory controller, and data writing method

技术领域 technical field

本发明涉及一种存储器储存装置,尤其涉及一种能够有效地提升写入速度的存储器储存装置、存储器控制器与数据写入方法。The invention relates to a memory storage device, in particular to a memory storage device, a memory controller and a data writing method capable of effectively increasing the writing speed.

背景技术 Background technique

数码相机、手机与MP3在这几年来的成长十分迅速,使得消费者对储存媒体的需求也急速增加。由于可复写式非易失性存储器(rewritablenon-volatilememory)具有数据非易失性、省电、体积小、无机械结构、读写速度快等特性,最适于可携式电子产品,例如笔记型电脑。固态硬盘就是一种以快闪存储器作为储存媒体的存储器储存装置。因此,近年快闪存储器产业成为电子产业中相当热门的一环。Digital cameras, mobile phones, and MP3 players have grown rapidly in recent years, making consumers' demand for storage media also increase rapidly. Because rewritable non-volatile memory (rewritable non-volatile memory) has the characteristics of data non-volatility, power saving, small size, no mechanical structure, and fast read and write speed, it is most suitable for portable electronic products, such as notebooks. computer. A solid state drive is a memory storage device that uses flash memory as a storage medium. Therefore, the flash memory industry has become a very popular part of the electronics industry in recent years.

若存储器储存装置是以可复写式挥发性存储器作为储存媒体,当有数据写入至可复写式挥发性存储器时,可复写式挥发性存储器可能会发生程序错误,使得数据并没有成功地被写入。因此,一个存储器储存装置中通常会配置至少一个暂存存储器。此暂存存储器可以用来暂存欲写入存储器储存装置的数据。也就是说,每一笔欲写入至存储器储存装置的数据都需要先暂存至此暂存存储器,并且之后再从从暂存存储器中将欲写入的数据写入至可复写式挥发性存储器中。由于对于一笔写入数据来说,都需要对暂存存储器进行暂存与读取两个动作。因此,当暂存存储器的传输频宽不够大时,相对于分配给写入操作的频宽就会相对较少。If the memory storage device uses a rewritable volatile memory as the storage medium, when data is written into the rewritable volatile memory, a program error may occur in the rewritable volatile memory, making the data not successfully written enter. Therefore, at least one temporary storage device is usually configured in a memory storage device. The temporary storage can be used to temporarily store data to be written into the memory storage device. That is to say, each piece of data to be written into the memory storage device needs to be temporarily stored in the temporary storage first, and then the data to be written is written from the temporary storage to the rewritable volatile memory middle. Because for one piece of writing data, two operations of temporary storage and reading are required to the temporary storage memory. Therefore, when the transmission bandwidth of the scratchpad memory is not large enough, the bandwidth allocated to the write operation will be relatively small.

此外,当数据被暂存至暂存存储器后,存储器储存装置的控制电路就会向主机传送已完成指令的讯息,以便接收下一个指令与数据。当将数据写入至可复写式挥发性存储器时,可能会发生程序错误(programfail),使得数据并没有成功地被写入。因此,存储器储存装置的控制电路会需要从暂存存储器中将为成功写入的数据再次写入(亦称为重写)至可复写式挥发性存储器中。因此,在存储器储存装置中所配置的暂存存储器必须足够大来暂存数据,以避免无法进行重写。In addition, after the data is temporarily stored in the temporary memory, the control circuit of the memory storage device will send a message of completed command to the host to receive the next command and data. When writing data into the rewritable volatile memory, a program error (program fail) may occur, so that the data is not written successfully. Therefore, the control circuit of the memory storage device needs to rewrite (also referred to as rewriting) the successfully written data from the temporary storage to the rewritable volatile memory. Therefore, the temporary memory configured in the memory storage device must be large enough to temporarily store data, so as not to be overwritten.

基于上述,为了提升写入速度,使用频宽较大的暂存存储器是需要的。然而,为了考量上述重写的需求,必须使用大容量的暂存存储器。对于频宽较大的暂存存储器来说,每存储单位的成本较高。因此,如何能够在降低制造成本下,又具有适当容量的暂存存储器及具有适当的存储器频宽,为此领域技术人员所关心的议题。Based on the above, in order to increase the writing speed, it is necessary to use a temporary memory with a larger bandwidth. However, in order to consider the above-mentioned rewriting requirements, a large-capacity scratch memory must be used. For scratch memory with a large bandwidth, the cost per storage unit is relatively high. Therefore, how to reduce the manufacturing cost while having a temporary storage memory with an appropriate capacity and an appropriate memory bandwidth is an issue that those skilled in the art are concerned about.

发明内容 Contents of the invention

本发明实施例提供一种存储器储存装置及其存储器控制器与数据写入方法,其可有效地提升存储器储存装置的写入速度。Embodiments of the present invention provide a memory storage device, its memory controller, and a data writing method, which can effectively increase the writing speed of the memory storage device.

本发明一实施例提供一种存储器储存装置,包括连接器、可复写式非易失性存储器模组、存储器控制器与第二暂存存储器。连接器是用以电性连接至主机系统。存储器控制器是电性连接至连接器与可复写式非易失性存储器模组,并且具有第一暂存存储器,其中第一暂存存储器具有一写入数据暂存区。第二暂存存储器是电性连接第一暂存存储器,其中第二暂存存储器的传输频宽低于第一暂存存储器的传输频宽。存储器控制器用以从主机系统中接收到对应写入指令的写入数据,并且将写入数据暂存至写入数据暂存区。存储器控制器还用以从写入数据暂存区中将写入数据复制到第二暂存存储器中,并且根据写入指令从写入数据暂存区中将写入数据写入至可复写式非易失性存储器模组中。此外,存储器控制器在将写入数据写入至可复写式非易失性存储器模组中之后判断是否发生程序错误。若发生程序错误时,则存储器控制器还用以从第二暂存存储器中读取写入数据,并根据写入指令将写入数据写入至可复写式非易失性存储器模组中。An embodiment of the present invention provides a memory storage device, including a connector, a rewritable non-volatile memory module, a memory controller, and a second temporary storage memory. The connector is used to electrically connect to the host system. The memory controller is electrically connected to the connector and the rewritable non-volatile memory module, and has a first temporary storage memory, wherein the first temporary storage memory has a write-in data temporary storage area. The second temporary storage is electrically connected to the first temporary storage, wherein the transmission bandwidth of the second temporary storage is lower than the transmission bandwidth of the first temporary storage. The memory controller is used for receiving write data corresponding to a write command from the host system, and temporarily storing the write data in the write data temporary storage area. The memory controller is also used to copy the write data from the write data temporary storage area to the second temporary storage memory, and write the write data from the write data temporary storage area to the rewritable in the non-volatile memory module. In addition, the memory controller determines whether a program error occurs after writing the write data into the rewritable non-volatile memory module. If a program error occurs, the memory controller is also used to read the write data from the second temporary storage memory, and write the write data into the rewritable non-volatile memory module according to the write command.

在本发明的一实施例中,上述存储器控制器还用以从主机系统接收读取指令,并判断第二暂存存储器是否储存有对应读取指令的读取数据。若第二暂存存储器储存有对应读取指令的读取数据时,则存储器控制器从第二暂存存储器中读取此读取数据并将此读取数据传送至主机系统以回应上述读取指令。In an embodiment of the present invention, the memory controller is further configured to receive a read command from the host system, and determine whether the second temporary memory stores read data corresponding to the read command. If the second temporary memory stores the read data corresponding to the read command, the memory controller reads the read data from the second temporary memory and transmits the read data to the host system in response to the above read instruction.

在本发明的一实施例中,上述第二暂存存储器是配置在存储器控制器中或者配置在存储器控制器的外部。In an embodiment of the present invention, the above-mentioned second temporary storage memory is configured in the memory controller or configured outside the memory controller.

在本发明的一实施例中,上述第一暂存存储器为静态随机存取存储器(staticrandomaccessmemory,SRAM)。In an embodiment of the present invention, the first temporary storage memory is a static random access memory (static random access memory, SRAM).

在本发明的一实施例中,上述第二暂存存储器为同步动态随机存取存储器(synchronousdynamicrandomaccessmemory,SDRAM)。In an embodiment of the present invention, the above-mentioned second temporary storage memory is a synchronous dynamic random access memory (synchronous dynamic random access memory, SDRAM).

在本发明的一实施例中,上述第二暂存存储器的容量大于第一暂存存储器的容量。In an embodiment of the present invention, the capacity of the second temporary storage is greater than that of the first temporary storage.

在本发明的一实施例中,上述第二暂存存储器的容量为第一暂存存储器的容量的8倍。In an embodiment of the present invention, the capacity of the second temporary storage is 8 times that of the first temporary storage.

在本发明的一实施例中,上述第二暂存存储器的传输频宽是应用于单一操作程序,而上述第一暂存存储器的传输频宽可同时分享于多个操作程序。In an embodiment of the present invention, the transmission bandwidth of the second temporary storage is applied to a single operation program, and the transmission bandwidth of the first temporary storage can be shared among multiple operation programs at the same time.

以另外一个角度来说,本发明一实施例提供一种数据写入方法,用于一存储器储存装置。此存储器储存装置具有第二暂存存储器、存储器控制器以及可复写式非易失性存储器模组,其中第一暂存存储器配置在存储器控制器中并且第一暂存存储器的传输频宽大于第二暂存存储器的传输频宽。本数据写入方法包括从主机系统接收写入指令与对应写入指令的写入数据并且将写入数据暂存至第一暂存存储器的写入数据暂存区中。本数据写入方法也包括从写入数据暂存区中将写入数据复制到第二暂存存储器中,并且根据写入指令从写入数据暂存区中将写入数据写入至可复写式非易失性存储器模组中。此写入方法还包括:在将写入数据写入至可复写式非易失性存储器模组中之后判断是否发生程序错误;以及,若发生程序错误时,则从第二暂存存储器中读取写入数据,并根据写入指令将写入数据写入至可复写式非易失性存储器模组中。From another perspective, an embodiment of the present invention provides a data writing method for a memory storage device. The memory storage device has a second temporary storage, a memory controller and a rewritable non-volatile memory module, wherein the first temporary storage is configured in the memory controller and the transmission bandwidth of the first temporary storage is greater than that of the second temporary storage. 2. The transmission bandwidth of the temporary memory. The data writing method includes receiving a write command and write data corresponding to the write command from the host system and temporarily storing the write data into a write data temporary storage area of the first temporary storage memory. The data writing method also includes copying the write data from the write data temporary storage area to the second temporary storage memory, and writing the write data from the write data temporary storage area to the rewritable in the non-volatile memory module. The writing method also includes: after writing the write data into the rewritable non-volatile memory module, judging whether a program error occurs; and, if a program error occurs, reading from the second temporary storage The write data is fetched and written into the rewritable non-volatile memory module according to the write command.

在本发明的一实施例中,上述数据写入方法还包括:从主机系统接收读取指令;判断第二暂存存储器是否储存有对读取指令的读取数据;以及若第二暂存存储器储存有对应读取指令的读取数据,则从第二暂存存储器中读取对应的读取数据并将此读取数据传送至主机系统以回应读取指令。In an embodiment of the present invention, the above data writing method further includes: receiving a read command from the host system; judging whether the second temporary storage stores the read data for the read command; and if the second temporary storage If the read data corresponding to the read command is stored, the corresponding read data is read from the second temporary storage and sent to the host system to respond to the read command.

以另外一个角度来说,本发明一实施例提供一种存储器控制器,用于控制可复写式非易失性存储器模组。存储器控制器包括主机接口、存储器接口、存储器管理电路与第一暂存存储器。主机接口是用以电性连接至主机系统。存储器接口是用以电性连接至可复写式非易失性存储器模组。存储器管理电路是电性连接至主机接口与存储器接口。第一暂存存储器是电性连接至存储器管理电路,并且具有一写入数据暂存区。其中,存储器管理电路用以从主机系统中接收到对应写入指令的写入数据,并且将写入数据暂存至写入数据暂存区。存储器管理电路还用以从写入数据暂存区中根据写入指令将写入数据写入至可复写式非易失性存储器模组中。存储器管理电路还用以从写入数据暂存区中将写入数据复制到第二暂存存储器中,其中第一暂存存储器的传输频宽高于第二暂存存储器的传输频宽。存储器管理电路还用以在将写入数据写入至可复写式非易失性存储器模组中的后判断是否发生程序错误。若发生程序错误时,则存储器管理电路还用以从第二暂存存储器中读取写入数据,并根据写入指令将写入数据写入至可复写式非易失性存储器模组中。From another perspective, an embodiment of the present invention provides a memory controller for controlling a rewritable non-volatile memory module. The memory controller includes a host interface, a memory interface, a memory management circuit and a first temporary storage memory. The host interface is used to electrically connect to the host system. The memory interface is used to electrically connect to the rewritable non-volatile memory module. The memory management circuit is electrically connected to the host interface and the memory interface. The first temporary storage memory is electrically connected to the memory management circuit and has a write-in data temporary storage area. Wherein, the memory management circuit is used for receiving the write data corresponding to the write command from the host system, and temporarily storing the write data in the write data temporary storage area. The memory management circuit is also used for writing write data from the write data temporary storage area into the rewritable non-volatile memory module according to the write command. The memory management circuit is also used to copy the write data from the write data temporary storage area to the second temporary storage, wherein the transmission bandwidth of the first temporary storage is higher than the transmission bandwidth of the second temporary storage. The memory management circuit is also used to determine whether a program error occurs after writing the write data into the rewritable non-volatile memory module. If a program error occurs, the memory management circuit is also used to read the write data from the second temporary storage memory, and write the write data into the rewritable non-volatile memory module according to the write command.

在本发明的一实施例中,上述存储器管理电路还用以从主机系统接收读取指令,并判断第二暂存存储器是否储存有对应读取指令的读取数据。若第二暂存存储器储存有对应读取指令的读取数据,则存储器管理电路从第二暂存存储器中读取读取数据并将读取数据传送至主机系统以回应读取指令。In an embodiment of the present invention, the memory management circuit is further configured to receive a read command from the host system, and determine whether the second temporary memory stores read data corresponding to the read command. If the second temporary memory stores the read data corresponding to the read command, the memory management circuit reads the read data from the second temporary memory and transmits the read data to the host system to respond to the read command.

基于上述,本发明提出的存储器储存装置、写入方法与存储器控制器,能够将存储器控制器中的第一暂存存储器作为缓冲区,而第二暂存存储器的传输频宽全都作为写入数据时的传输频宽。因此,可以有效的使用第二暂存存储器的传输频宽,进而提升存储器储存装置的写入速度。Based on the above, the memory storage device, writing method and memory controller proposed by the present invention can use the first temporary storage in the memory controller as a buffer, and the transmission bandwidth of the second temporary storage can be used as the write data. time transmission bandwidth. Therefore, the transmission bandwidth of the second temporary storage memory can be effectively used, thereby increasing the writing speed of the memory storage device.

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

附图说明 Description of drawings

图1A是根据一范例实施例所绘示的主机系统与存储器储存装置。FIG. 1A shows a host system and a memory storage device according to an exemplary embodiment.

图1B是根据一范例实施例所绘示的电脑、输入/输出装置与存储器储存装置的示意图。FIG. 1B is a schematic diagram of a computer, an input/output device and a memory storage device according to an exemplary embodiment.

图1C是根据一范例实施例所绘示的主机系统与存储器储存装置的示意图。FIG. 1C is a schematic diagram of a host system and a memory storage device according to an exemplary embodiment.

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

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

图4是根据一范例实施例所绘示的存储器储存装置的方块图。FIG. 4 is a block diagram of a memory storage device according to an exemplary embodiment.

图5是一实施例所绘示的数据写入方法的流程图。FIG. 5 is a flow chart of a data writing method shown in an embodiment.

主要元件符号说明Explanation of main component symbols

1000:主机系统1000: host system

1100:电脑1100: computer

1102:微处理器1102: Microprocessor

1104:暂存存储器1104: scratch 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

100:存储器储存装置100: memory storage device

102:连接器102: Connector

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

106:可复写式非易失性存储器模组106: Rewritable non-volatile memory module

108:第二暂存存储器108: Second scratch memory

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

204:主机接口204: host interface

206:存储器接口206: memory interface

208:第一暂存存储器208: First temporary storage

300:写入数据暂存区300: Write data temporary storage area

302:写入数据302: Write data

S502、S504、S506、S508、S510:数据写入方法的步骤S502, S504, S506, S508, S510: the steps of the data writing method

具体实施方式 detailed description

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

图1A是根据一范例实施例所绘示的主机系统与存储器储存装置。FIG. 1A shows a host system and a memory storage device according to an exemplary embodiment.

请参照图1A,主机系统1000一般包括电脑1100与输入/输出(input/output,I/O)装置1106。电脑1100包括微理器1102、暂存存储器(例如随机存取存储器,randomaccessmemory,RA)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 temporary memory (such as random access memory, RA) 1104 , a system bus 1108 and a data transmission interface 1110 . The input/output device 1106 includes a mouse 1202, a keyboard 1204, a display 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或固态硬盘(SolidStateDrive,SSD)1216等的可复写式非易失性存储器储存装置。In an exemplary embodiment of the present invention, the memory storage device 100 is electrically connected to other components of the host system 1000 through the data transmission interface 1110 . Data can be written to or read from the memory storage device 100 by the operations of the microprocessor 1102 , the temporary memory 1104 and the input/output device 1106 . For example, the memory storage device 100 may be a rewritable 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为可实质地与存储器储存装置100配合以储存数据的任意系统。虽然在本范例实施例中,主机系统1000是以电脑系统来作说明,然而,在本发明另一范例实施例中主机系统1000可以是数字相机、摄影机、通信装置、音频播放器或视频播放器等系统。例如,在主机系统为数字相机(摄影机)1310时,可复写式非易失性存储器储存装置则为其所使用的SD卡1312、MMC卡1314、记忆棒(memorystick)1316、CF卡1318或嵌入式储存装置1320(如图1C所示)。嵌入式储存装置1320包括嵌入式多媒体卡(EmbeddedMMC,eMMC)。值得一提的是,嵌入式多媒体卡是直接电性连接于主机系统的基板上。In general, the host system 1000 is any system that can substantially cooperate with the memory storage device 100 to 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 rewritable non-volatile memory storage device is the SD card 1312, MMC card 1314, memory stick (memorystick) 1316, CF card 1318 or embedded type 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 memory storage device shown in FIG. 1A .

请参照图2,存储器储存装置100包括连接器102、存储器控制器104、可复写式非易失性存储器模组106与第二暂存存储器108。Referring to FIG. 2 , the memory storage device 100 includes a connector 102 , a memory controller 104 , a rewritable non-volatile memory module 106 and a second temporary storage memory 108 .

在本范例实施例中,连接器102是相容于序列先进附件(SerialAdvancedTechnologyAttachment,SATA)标准。然而,必须了解的是,本发明不限于此,连接器102亦可以是符合并列先进附件(ParellelAdvancedTechnologyAttachment,PATA)标准、电气和电子工程师协会(InstituteofElectricalandElectronicEngineers,IEEE)1394标准、高速周边零件连接接口(PeripheralComponentInterconnectExpress,PCIExpress)标准、通用序列总线(UniversalSerialBus,USB)标准、安全数字(SecureDigital,SD)接口标准、记忆棒(MemoryStick,MS)接口标准、多媒体储存卡(MultiMediaCard,MMC)接口标准、小型快闪(CompactFlash,CF)接口标准、整合式驱动电子接口(IntegratedDeviceElectronics,IDE)标准或其他适合的标准。In this exemplary embodiment, the connector 102 is compatible with the Serial Advanced Technology Attachment (SATA) standard. However, it must be understood that the present invention is not limited thereto, and the connector 102 may also be in accordance with the Parallel Advanced Technology Attachment (PATA) standard, the Institute of Electrical and Electronics Engineers (Institute of Electrical and Electronic Engineers, IEEE) 1394 standard, the high-speed peripheral component connection interface (Peripheral Component Interconnect Express , PCIExpress) standard, Universal Serial Bus (UniversalSerialBus, USB) standard, Secure Digital (SecureDigital, SD) interface standard, Memory Stick (MemoryStick, MS) interface standard, MultiMediaCard (MultiMediaCard, MMC) interface standard, small flash ( CompactFlash (CF) interface standard, Integrated Device Electronics (IDE) standard or other suitable standards.

存储器控制器104用以执行以硬件型式或固件型式实作的多个逻辑闸或控制指令,并且根据主机系统1000的指令在可复写式非易失性存储器模组106中进行数据的写入、读取与抹除等操作。The memory controller 104 is used to execute a plurality of logic gates or control instructions implemented in hardware or firmware, and write data in the rewritable non-volatile memory module 106 according to the instructions of the host system 1000, Read and erase operations.

可复写式非易失性存储器模组106是电性连接至存储器控制器104,并且用以储存主机系统1000所写入的数据。可复写式非易失性存储器模组106包括多个实体区块(未绘式)。在本范例实施例中,可复写式非易失性存储器模组106为多层记忆胞(MultiLevelCell,MLC)NAND快闪存储器模组。然而,本发明不限于此,可复写式非易失性存储器模组106亦可是单层记忆胞(SingleLevelCell,SLC)NAND快闪存储器模组、其他快闪存储器模组或其他具有相同特性的存储器模组。The rewritable non-volatile memory module 106 is electrically connected to the memory controller 104 and used for storing data written by the host system 1000 . The rewritable non-volatile memory module 106 includes a plurality of physical blocks (not shown). In this exemplary embodiment, the rewritable non-volatile memory module 106 is a multi-level memory cell (MultiLevelCell, MLC) NAND flash memory module. However, the present invention is not limited thereto, and the rewritable non-volatile memory module 106 can also be a single-level memory cell (SingleLevelCell, SLC) NAND flash memory module, other flash memory modules or other memories with the same characteristics mod.

第二暂存存储器108是配置在存储器控制器的外部且电性连接至存储器控制器104。第二暂存存储器108用以暂存存储器控制器104所执行的指令或数据。例如,第二暂存存储器是用以备份接收自主机系统1000的写入数据。本范例实施例中,第二暂存存储器108为同步动态暂存存储器(synchronousdynamicrandomaccessmemory,SDRAM)并且第二暂存存储器108的传输频宽为400M位元/秒。然而,本发明不限于此,第二暂存存储器108也可以是动态随机存取存储器(dynamicrandomaccessmemory,DRAM)、静态随机存取存储器(staticrandomaccessmemory,SRAM)、磁电阻式随机存取记忆(MagnetoresistiveRandomAccessMemory,MRAM)、快取随机存取存储器(CacheRAM)、同步动态随机存取存储器(synchronousdynamicrandomaccessmemory,SDRAM)、视频随机存取存储器(VideoRAM,VRAM)、反或闸快闪存储器(NORFlash)、嵌入式动态随机存取存储器(embeddedDRAM,eDRAM)或其他的存储器。The second temporary storage memory 108 is configured outside the memory controller and electrically connected to the memory controller 104 . The second temporary storage memory 108 is used for temporarily storing instructions or data executed by the memory controller 104 . For example, the second temporary storage is used to back up the written data received from the host system 1000 . In this exemplary embodiment, the second temporary storage memory 108 is a synchronous dynamic random access memory (SDRAM) and the transmission bandwidth of the second temporary storage memory 108 is 400 Mbit/s. However, the present invention is not limited thereto, and the second temporary storage memory 108 may also be a dynamic random access memory (dynamic random access memory, DRAM), a static random access memory (static random access memory, SRAM), a magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM) ), cache random access memory (CacheRAM), synchronous dynamic random access memory (synchronous dynamic random access memory, SDRAM), video random access memory (VideoRAM, VRAM), inverse OR gate flash memory (NORFlash), embedded dynamic random access memory access memory (embeddedDRAM, eDRAM) or other memory.

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

请参照图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 first temporary storage memory 208 .

存储器管理电路202用以控制存储器控制器104的整体操作。具体来说,存储器管理电路202具有多个控制指令,并且在存储器储存装置100操作时,此些控制指令会被执行以进行数据的写入、读取与抹除等操作。The memory management circuit 202 is used to control the overall operation of the memory controller 104 . Specifically, the memory management circuit 202 has a plurality of control instructions, and when the memory storage device 100 is operating, these control instructions are executed to perform operations such as writing, reading, and erasing data.

在本范例实施例中,存储器管理电路202的控制指令是以固件型式来实作。例如,存储器管理电路202具有微处理器单元(未绘示)与只读存储器(未绘示),并且此些控制指令是被烧录至此只读存储器中。当存储器储存装置100操作时,此些控制指令会由微处理器单元来执行以进行数据的写入、读取与抹除等操作。In this exemplary embodiment, the control commands 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 memory storage device 100 is in operation, these control instructions are executed by the microprocessor unit to perform operations such as writing, reading, and erasing data.

在本发明另一范例实施例中,存储器管理电路202的控制指令亦可以程式码型式储存于可复写式非易失性存储器模组106的特定区域(例如,存储器模组中专用于存放系统数据的系统区)中。此外,存储器管理电路202具有微处理器单元(未绘示)、只读存储器(未绘示)及暂存存储器(未绘示)。特别是,此只读存储器具有驱动码,并且当存储器控制器104被致能时,微处理器单元会先执行此驱动码段来将储存于可复写式非易失性存储器模组106中的控制指令载入至存储器管理电路202的暂存存储器中。之后,微处理器单元会运转此些控制指令以进行数据的写入、读取与抹除等操作。In another exemplary embodiment of the present invention, the control command of the memory management circuit 202 can also be stored in a specific area of the rewritable non-volatile memory module 106 in the form of code (for example, the memory module is dedicated to storing system data system area). In addition, the memory management circuit 202 has a microprocessor unit (not shown), a read-only memory (not shown) and a temporary storage memory (not shown). In particular, the ROM has driver code, and when the memory controller 104 is enabled, the microprocessor unit will first execute the driver code segment to store the data stored in the rewritable non-volatile memory module 106 The control instructions are loaded into the temporary memory of the memory management circuit 202 . Afterwards, the microprocessor unit runs these control instructions to perform operations such as writing, reading and erasing data.

此外,在本发明另一范例实施例中,存储器管理电路202的控制指令亦可以一硬件型式来实作。例如,存储器管理电路202包括微控制器、存储器管理单元、存储器写入单元、存储器读取单元、存储器抹除单元与数据处理单元。存储器管理单元、存储器写入单元、存储器读取单元、存储器抹除单元与数据处理单元是电性连接至微控制器。其中,存储器管理单元用以管理可复写式非易失性存储器模组106的实体区块;存储器写入单元用以对可复写式非易失性存储器模组106下达写入指令以将数据写入至可复写式非易失性存储器模组106中;存储器读取单元用以对可复写式非易失性存储器模组106下达读取指令以从可复写式非易失性存储器模组106中读取数据;存储器抹除单元用以对可复写式非易失性存储器模组106下达抹除指令以将数据从可复写式非易失性存储器模组106中抹除;而数据处理单元用以处理欲写入至可复写式非易失性存储器模组106的数据以及从可复写式非易失性存储器模组106中读取的数据。In addition, in another exemplary embodiment of the present invention, the control instructions of the memory management circuit 202 can also be implemented in a hardware form. For example, the memory management circuit 202 includes a microcontroller, a memory management unit, a memory writing unit, a memory reading unit, a memory erasing unit and a data processing unit. The memory management unit, the memory writing unit, the memory reading unit, the memory erasing unit and the data processing unit are electrically connected to the microcontroller. Wherein, the memory management unit is used to manage the physical block of the rewritable non-volatile memory module 106; the memory writing unit is used to issue a write command to the rewritable non-volatile memory module 106 to write data into the rewritable non-volatile memory module 106; the memory read unit is used to issue a read instruction to the rewritable non-volatile memory module 106 to read from the rewritable non-volatile memory module 106 Read data in; the memory erasing unit is used to issue erasing instructions to the rewritable non-volatile memory module 106 to erase data from the rewritable non-volatile memory module 106; and the data processing unit It is used for processing data to be written into the rewritable non-volatile memory module 106 and data read from the rewritable non-volatile memory module 106 .

主机接口204是电性连接至存储器管理电路202并且用以接收与识别主机系统1000所传送的指令与数据。也就是说,主机系统1000所传送的指令与数据会通过主机接口204来传送至存储器管理电路202。在本范例实施例中,主机接口204是相容于SATA标准。然而,必须了解的是本发明不限于此,主机接口204亦可以是相容于PATA标准、IEEE1394标准、PCIExpress标准、USB标准、SD标准、MS标准、MMC标准、CF标准、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 compatible with the SATA standard. However, it must be understood that the present invention is not limited thereto, and the host interface 204 can also be compatible with PATA standard, IEEE1394 standard, PCIExpress standard, USB standard, SD standard, MS standard, MMC standard, CF standard, IDE standard or other suitable data transmission standards.

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

第一暂存存储器208是电性连接至存储器管理电路202,用以暂存存储器管理电路202所执行的指令或是数据。具体来说,第一暂存存储器208包括写入数据暂存区300,其用以暂存主机系统1000所写入的数据。然而,必须了解的是,除了写入数据暂存区300,第一暂存存储器208可包括其他区域(未绘示),用以暂存其他数据。例如,存储器管理电路202可将可复写式非易失性存储器模组106中虚拟地址与实体地址的映射表(mappingtable)储存在第一暂存存储器208的其他区域中。在本范例实施例中,第一暂存存储器208的传输频宽大于第二暂存存储器108的传输频宽。例如,第一暂存存储器208为静态随机存取存储器(staticrandomaccessmemory,SRAM)。然而,第一暂存存储器208也可以是MRAM、CacheRAM、SDRAM、VRAM、NORFlash或是eDRAM。并且第一暂存存储器208的传输频宽为800M位元/秒。The first temporary memory 208 is electrically connected to the memory management circuit 202 for temporarily storing instructions or data executed by the memory management circuit 202 . Specifically, the first temporary storage memory 208 includes a write data temporary storage area 300 for temporarily storing data written by the host system 1000 . However, it must be understood that, in addition to the write data temporary storage area 300, the first temporary storage memory 208 may include other areas (not shown) for temporary storage of other data. For example, the memory management circuit 202 can store the mapping table (mapping table) between the virtual address and the physical address in the rewritable non-volatile memory module 106 in other areas of the first temporary memory 208 . In this exemplary embodiment, the transmission bandwidth of the first temporary storage memory 208 is greater than the transmission bandwidth of the second temporary storage memory 108 . For example, the first temporary storage memory 208 is a static random access memory (static random access memory, SRAM). However, the first temporary storage memory 208 can also be MRAM, CacheRAM, SDRAM, VRAM, NORFlash or eDRAM. And the transmission bandwidth of the first temporary storage 208 is 800 Mbit/s.

在本范例实施例中,为了增加存储器储存装置100的写入速度,是将传输频宽较大的第一暂存存储器208作为暂存写入数据的区域,并将传输频宽较小的第二暂存存储器108作为备份写入数据的区域。In this exemplary embodiment, in order to increase the writing speed of the memory storage device 100, the first temporary storage memory 208 with a larger transmission bandwidth is used as an area for temporarily storing written data, and the second temporary storage memory 208 with a smaller transmission bandwidth is used as an area for temporarily storing written data. The second temporary storage 108 is used as a backup area for writing data.

图4是根据一范例实施例所绘示的写入数据的示意图。FIG. 4 is a schematic diagram of writing data according to an exemplary embodiment.

请参照图4,当存储器储存装置100从主机系统1000中接收到写入指令及对应此写入指令的写入数据302时,存储器管理电路202会将写入数据302暂存至写入数据暂存区300。由于第一暂存存储器208的传输频宽较大,因此可满足主机系统1000的写入需求。也就是说,存储器管理电路202将写入数据302暂存在写入数据暂存区300的速度会不低于主机系统1000传送写入数据302至存储器管理电路202的速度,由此可即时地从主机系统1000接收数据并且暂存至第一暂存存储器208。Referring to FIG. 4, when the memory storage device 100 receives the write command and the write data 302 corresponding to the write command from the host system 1000, the memory management circuit 202 will temporarily store the write data 302 to the write data temporary The storage area is 300. Since the transmission bandwidth of the first temporary storage 208 is relatively large, it can meet the writing requirement of the host system 1000 . That is to say, the speed at which the memory management circuit 202 temporarily stores the write data 302 in the write data temporary storage area 300 will not be lower than the speed at which the host system 1000 transmits the write data 302 to the memory management circuit 202, thereby enabling instant transfer from The host system 1000 receives the data and temporarily stores it in the first temporary storage 208 .

其中在此范例实施例中,第一暂存存储器208的传输频宽可同时被至少两种操作程序来分享,此操作程序例如为写入或读取程序。例如,当一数据被写入至第一暂存存储器208的同时,其他数据可从第一暂存存储器208中被读取出并被传输至可复写式非易失性存储器模组106。例如,当一数据被写入至第一暂存存储器208的同时,其他数据也可从第一暂存存储器208中被读取出并且被传送至第二暂存存储器108。In this exemplary embodiment, the transmission bandwidth of the first temporary storage memory 208 can be shared by at least two operating programs at the same time, such as writing or reading programs. For example, while one piece of data is written into the first temporary storage 208 , other data can be read from the first temporary storage 208 and transmitted to the rewritable non-volatile memory module 106 . For example, while one piece of data is written into the first temporary storage 208 , other data can also be read from the first temporary storage 208 and transferred to the second temporary storage 108 .

接着,存储器管理电路202从写入数据暂存区300中读取写入数据302,并根据上述写入指令将写入数据302写入至可复写式非易失性存储器模组106中。Next, the memory management circuit 202 reads the write data 302 from the write data temporary storage area 300 , and writes the write data 302 into the rewritable non-volatile memory module 106 according to the write command.

另一方面,存储器管理电路202也会从写入数据暂存区300中读取写入数据302,并将写入数据302复制到第二暂存存储器108中。值得注意的是,在本范例实施例中,此时第二暂存存储器108的传输频宽可全部都被用来传输写入数据302。也就是说,对于一份写入数据302,存储器管理电路202可只需要对第二暂存存储器108做写入的动作,而不做读取的动作。另一方面,存储器管理电路202也可以在将写入数据302写入至可复写式非易失性存储器模组106的同时,将写入数据302复制到第二暂存存储器108中。On the other hand, the memory management circuit 202 also reads the write data 302 from the write data temporary storage area 300 , and copies the write data 302 to the second temporary storage memory 108 . It should be noted that, in this exemplary embodiment, the transmission bandwidth of the second temporary storage memory 108 can be used to transmit the writing data 302 entirely. That is to say, for a piece of write data 302 , the memory management circuit 202 may only need to perform a write operation to the second temporary storage memory 108 , but not a read operation. On the other hand, the memory management circuit 202 can also copy the write data 302 to the second temporary storage memory 108 while writing the write data 302 to the rewritable non-volatile memory module 106 .

基此,写入数据302便被备份在第二暂存存储器108中,并且存储器控制器104就可再从主机系统1000下一个写入指令并且将新的写入数据暂存至第一暂存存储器208。特别是,写入数据302已被备份至第二暂存存储器108中,因此,在第一暂存存储器208中,既使原先储存写入数据302的地址被用来暂存新的写入数据,亦不会影响存储器储存装置100的操作。Based on this, the write data 302 is backed up in the second temporary storage 108, and the memory controller 104 can issue a write command from the host system 1000 and temporarily store the new write data in the first temporary storage. memory 208 . In particular, the written data 302 has been backed up in the second temporary storage memory 108, therefore, in the first temporary storage memory 208, even if the address originally storing the written data 302 is used to temporarily store the new written data , and will not affect the operation of the memory storage device 100 .

具体来说,存储器管理电路202会在将写入数据302写入至可复写式非易失性存储器模组106中之后,判断是否发生程序错误。若发生程序错误时,存储器管理电路202会从第二暂存存储器108中读取写入数据302,并根据写入指令将写入数据302重新写入至可复写式非易失性存储器模组106中。也就是说,当发生程序错误而未成功地将写入数据302写入至可复写式非易失性存储器模组106时,既使在第一暂存存储器208中写入数据302已被覆写成新的写入数据,存储器管理电路202仍可将写入数据302从第二暂存存储器108中重新写入至可复写式非易失性存储器模组106中。基此,存储器储存装置100能够在利用频宽较大的第一暂存存储器208来提升写入速度的同时,确保写入数据302能成功的写入至可复写式非易失性存储器模组106。在本范例实施例中,当存储器管理电路202从第二暂存存储器108中读取写入数据302时,第二暂存存储器108的传输频宽可全部都被用来传输写入数据302。也就是说,在此范例实施例中,第二暂存存储器108的传输频宽可全部用来执行一个单一操作程序,此单一操作程序例如为写入或读取程序。例如,第二暂存存储器108的传输频宽全部被用来将数据写入至第二暂存存储器108。或者,第二暂存存储器108的传输频宽全部被用来将数据从第二暂存存储器108读取出。Specifically, the memory management circuit 202 determines whether a program error occurs after writing the write data 302 into the rewritable non-volatile memory module 106 . If a program error occurs, the memory management circuit 202 will read the write data 302 from the second temporary storage memory 108, and rewrite the write data 302 to the rewritable non-volatile memory module according to the write command 106 in. That is to say, when a program error occurs and the write data 302 is not successfully written to the rewritable non-volatile memory module 106, even if the write data 302 has been overwritten in the first temporary storage memory 208 For new write data, the memory management circuit 202 can still rewrite the write data 302 from the second temporary storage memory 108 to the rewritable non-volatile memory module 106 . Based on this, the memory storage device 100 can use the first temporary memory 208 with a larger bandwidth to increase the writing speed while ensuring that the written data 302 can be successfully written to the rewritable non-volatile memory module. 106. In this exemplary embodiment, when the memory management circuit 202 reads the write data 302 from the second temporary storage 108 , all the transmission bandwidth of the second temporary storage 108 can be used to transmit the write data 302 . That is to say, in this exemplary embodiment, the transmission bandwidth of the second temporary memory 108 can be entirely used to execute a single operation procedure, such as a write or read procedure. For example, all the transmission bandwidth of the second temporary storage memory 108 is used to write data into the second temporary storage memory 108 . Alternatively, all the transmission bandwidth of the second temporary storage memory 108 is used to read data from the second temporary storage memory 108 .

除此的外,在本范例实施例中,存储器管理电路202还用以从该主机系统1000接收读取指令。特别是,在接收到此读取指令以后,存储器管理电路202会判断第二暂存存储器108是否储存有对应此读取指令的读取数据。若第二暂存存储器108储存有对应此读取指令的读取数据,则存储器管理电路202会从第二暂存存储器108中读取所对应的读取数据并将此读取数据传送至该主机系统1000以回应存储器管理电路202所接收到的读取指令。举例来说,主机系统1000是先将写入数据302写入至存储器储存装置100,在一段时间以后,再从存储器储存装置100读取写入数据302。由于存储器管理电路在将写入数据302写入至可复写式非易失性存储器模组106时,会备份写入数据302至第二暂存存储器108中,因此,主机系统1000要从存储器储存装置100读取写入数据302时,写入数据302可能还存在第二暂存存储器108与可复写式非易失性存储器模组106中。因此,若对应读取指令的数据还储存在第二暂存存储器108时,直接从第二暂存存储器108中将对应的数据传送给主机系统1000,可有效地提升读取的速度。Besides, in this exemplary embodiment, the memory management circuit 202 is also configured to receive a read command from the host system 1000 . In particular, after receiving the read command, the memory management circuit 202 determines whether the second temporary storage memory 108 stores read data corresponding to the read command. If the second temporary memory 108 stores the read data corresponding to the read command, the memory management circuit 202 will read the corresponding read data from the second temporary memory 108 and send the read data to the The host system 1000 responds to the read command received by the memory management circuit 202 . For example, the host system 1000 first writes the write data 302 into the memory storage device 100 , and then reads the write data 302 from the memory storage device 100 after a period of time. Since the memory management circuit will back up the write data 302 to the second temporary storage memory 108 when writing the write data 302 to the rewritable non-volatile memory module 106, the host system 1000 needs to store When the device 100 reads the write data 302 , the write data 302 may also be stored in the second temporary storage memory 108 and the rewritable non-volatile memory module 106 . Therefore, if the data corresponding to the read command is still stored in the second temporary storage 108 , the corresponding data is directly transmitted from the second temporary storage 108 to the host system 1000 , which can effectively increase the reading speed.

在本范例实施例中,第一暂存存储器208的容量小于第二暂存存储器108的容量。例如,第二暂存存储器108的容量为第一暂存存储器208的容量的8倍,在此倍率(即,8倍)之下,第二暂存存储器108与第一暂存存储器208可以有较好的使用效率。详细来说,在第二暂存存储器108的容量小于第一暂存存储器208的容量的8倍的例子中,当写入数据暂存区300存满写入数据,并且存储器管理电路202要将写入数据暂存区300中的写入数据备份至第二暂存存储器108时,第二暂存存储器108可能会不具有足够的空间来备份这些写入数据。另一方面,若第二暂存存储器108的容量大于第一暂存存储器208的容量的8倍时,虽然不会有上述第二暂存存储器108空间不够的问题,但第二暂存存储器108可能会有太多闲置的存储器空间或者是所备份的数据太旧,主机系统1000并不常读取这么旧的数据,以致于第二暂存存储器108的使用效率降低。因此,当第二暂存存储器108的容量为第一暂存存储器208的容量的8倍时,可以有较佳的存储器使用效率,但值得说明的是,此比例关系是一经验值,其亦可依实际的需求,而改变为4倍、10倍或其他比例。In this exemplary embodiment, the capacity of the first temporary storage 208 is smaller than that of the second temporary storage 108 . For example, the capacity of the second temporary storage memory 108 is 8 times the capacity of the first temporary storage memory 208, under this multiplier (that is, 8 times), the second temporary storage memory 108 and the first temporary storage memory 208 can have Better usage efficiency. Specifically, in the example where the capacity of the second temporary storage memory 108 is less than 8 times the capacity of the first temporary storage memory 208, when the write data temporary storage area 300 is full of write data, and the memory management circuit 202 will When the written data written in the temporary data storage area 300 is backed up to the second temporary storage 108 , the second temporary storage 108 may not have enough space to back up the written data. On the other hand, if the capacity of the second temporary storage memory 108 is greater than 8 times of the capacity of the first temporary storage memory 208, although there will not be the problem that the space of the second temporary storage memory 108 is not enough, the second temporary storage memory 108 There may be too much free memory space or the backed up data is too old, and the host system 1000 does not often read such old data, so that the usage efficiency of the second temporary storage 108 is reduced. Therefore, when the capacity of the second temporary storage memory 108 is 8 times the capacity of the first temporary storage memory 208, better memory usage efficiency can be arranged, but it is worth noting that this proportional relationship is an empirical value, and it is also It can be changed to 4 times, 10 times or other ratios according to actual needs.

图5是根据一范例实施例所绘示的数据写入方法的流程图。FIG. 5 is a flowchart of a data writing method according to an exemplary embodiment.

请参照图5,在步骤S502中,存储器控制器104的存储器管理电路202会从主机系统接收写入指令与对应此写入指令的写入数据。接着,在步骤S504中,存储器管理电路202会将写入数据暂存至第一暂存存储器的写入数据暂存区中。Referring to FIG. 5 , in step S502 , the memory management circuit 202 of the memory controller 104 receives a write command and write data corresponding to the write command from the host system. Next, in step S504 , the memory management circuit 202 temporarily stores the write data into the write data temporary storage area of the first temporary storage memory.

之后,在步骤S506中,存储器管理电路202会根据写入指令从写入数据暂存区中将写入数据写入至可复写式非易失性存储器模组中,并且从写入数据暂存区中将写入数据复制到第二暂存存储器中。Afterwards, in step S506, the memory management circuit 202 will write the write data from the write data temporary storage area to the rewritable non-volatile memory module according to the write command, and write data from the write data temporary storage area Copy the written data in the zone to the second scratch memory.

然后,在步骤S508中,存储器管理电路202会在将写入数据写入至可复写式非易失性存储器模组中之后,判断是否发生程序错误。并且,若发生程序错误,则在步骤S510中,存储器管理电路202会从第二暂存存储器中读取写入数据,并根据写入指令将写入数据重新写入至可复写式非易失性存储器模组中。Then, in step S508 , the memory management circuit 202 determines whether a program error occurs after writing the write data into the rewritable non-volatile memory module. Moreover, if a program error occurs, then in step S510, the memory management circuit 202 will read the write data from the second temporary storage memory, and rewrite the write data to the rewritable non-volatile memory according to the write instruction. in the sex memory module.

然而,上述数据写入方法的各步骤可以有其他顺序,本发明并不限制图5各步骤的顺序。However, the steps of the above data writing method may have other sequences, and the present invention does not limit the sequence of the steps in FIG. 5 .

值得一提的是,尽管在本发明范例实施例中,第二暂存存储器108是配置在存储器控制器104的外部。然而,本发明不限于此,在本发明另一范例实施例中,第二暂存存储器108亦可配置在存储器控制器104的内部。It should be noted that although in the exemplary embodiment of the present invention, the second temporary storage memory 108 is configured outside the memory controller 104 . However, the present invention is not limited thereto. In another exemplary embodiment of the present invention, the second temporary storage memory 108 may also be configured inside the memory controller 104 .

综上所述,本发明实施例所提出的存储器储存装置、存储器控制器与写入方法,可以更有效率的使用存储器储存装置中一暂存存储器的传输频宽。也就是说,在写入数据时,用来备份写入数据的暂存存储器的传输频宽全都被用来传输写入数据。据此,可以增加存储器储存装置的写入速度。To sum up, the memory storage device, memory controller and writing method proposed by the embodiments of the present invention can use the transmission bandwidth of a temporary memory in the memory storage device more efficiently. That is to say, when data is written, the transmission bandwidth of the temporary memory used to back up the written data is all used to transmit the written data. Accordingly, the writing speed of the memory storage device can be increased.

虽然本发明已以实施例揭示如上,然其并非用以限定本发明,任何所属技术领域中的普通技术人员,当可作些许改动与润饰,而不脱离本发明的精神和范围。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention, and any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention.

Claims (17)

1. a memorizer memory devices, comprising:
A connector, in order to be electrically connected to a host computer system;
One type nonvolatile module;
One Memory Controller, be electrically connected to this connector and this type nonvolatile module, wherein this Memory Controller comprises one first temporary storage, and this first temporary storage comprises a write data temporary storage district; And
One second temporary storage, is electrically connected this first temporary storage, and wherein a transmitting bandwidth of this second temporary storage is lower than a transmitting bandwidth of this first temporary storage,
Wherein this Memory Controller in order to receive at least one write data of corresponding at least one write instruction from this host computer system, and by this at least one write data temporary storage to this write data temporary storage district,
Wherein this Memory Controller also in order to write in this type nonvolatile module according to this at least one write instruction by these at least one write data from this write data temporary storage district,
Wherein this Memory Controller also in order to from this write data temporary storage district according to this at least one write instruction by this at least one write data Replica in this second temporary storage,
Wherein this Memory Controller also in order to judge whether generation one program error after writing in this type nonvolatile module by these at least one write data,
If when wherein there is this program error, then this Memory Controller also in order to read this at least one write data from this second temporary storage, and these at least one write data write in this type nonvolatile module according to this at least one write instruction.
2. memorizer memory devices according to claim 1,
Wherein this Memory Controller is also in order to receive at least one reading command from this host computer system,
Wherein this Memory Controller is also in order to judge whether this second temporary storage stores should at least one reading data of at least one reading command,
If wherein this second temporary storage store to should these at least one reading data of at least one reading command time, then this Memory Controller reads these at least one reading data and these at least one reading data is sent to this host computer system to respond this at least one reading command from this second temporary storage.
3. memorizer memory devices according to claim 1, wherein this second temporary storage is the outside being configured in this Memory Controller or being configured in this Memory Controller.
4. memorizer memory devices according to claim 1, wherein this first temporary storage is a static RAM.
5. memorizer memory devices according to claim 1, wherein this second temporary storage is a Synchronous Dynamic Random Access Memory.
6. memorizer memory devices according to claim 1, wherein a capacity of this second temporary storage is greater than a capacity of this first temporary storage.
7. memorizer memory devices according to claim 6, wherein the capacity of this second temporary storage is 8 times of the capacity of this first temporary storage.
8. memorizer memory devices according to claim 1, wherein this transmitting bandwidth of this second temporary storage is applied to a single operation program, and wherein this transmitting bandwidth of this first temporary storage can be shared in multiple running program simultaneously.
9. a method for writing data, for a memorizer memory devices, wherein this memorizer memory devices has one second temporary storage, a Memory Controller and a type nonvolatile module, one first temporary storage is in this Memory Controller and a transmitting bandwidth of this first temporary storage is greater than a transmitting bandwidth of this second temporary storage, and this wiring method comprises:
From a host computer system receive at least one write instruction with to should at least one write data of at least one write instruction;
By this at least one write data temporary storage in a write data temporary storage district of this first temporary storage;
According to this at least one write instruction, these at least one write data are write in this type nonvolatile module from this write data temporary storage district;
From this write data temporary storage district according to this at least one write instruction by this at least one write data Replica in this second temporary storage;
Generation one program error is judged whether after writing in this type nonvolatile module by these at least one write data; And
If when there is this program error, then from this second temporary storage, read these at least one write data, and according to this at least one write instruction, these at least one write data are write in this type nonvolatile module.
10. method for writing data according to claim 9, also comprises:
At least one reading command is received from this host computer system;
Judge whether this second temporary storage stores at least one reading data to this at least one reading command; And
If this second temporary storage stores at least one reading data to this at least one reading command, then from this second temporary storage, read these at least one reading data and these at least one reading data are sent to this host computer system to respond this at least one reading command.
11. 1 kinds of Memory Controllers, for controlling a type nonvolatile module, this Memory Controller comprises:
One host interface, in order to be electrically connected to a host computer system;
One memory interface, in order to be electrically connected to this type nonvolatile module;
One memory management circuitry, is electrically connected to this host interface, this memory interface; And
One first temporary storage, is electrically connected to this memory management circuitry, and has a write data temporary storage district;
Wherein this memory management circuitry in order to receive at least one write data of corresponding at least one write instruction from this host computer system, and by this at least one write data temporary storage to this write data temporary storage district,
Wherein this memory management circuitry also in order to write in this type nonvolatile module according to this at least one write instruction by these at least one write data from this write data temporary storage district,
Wherein this memory management circuitry also in order to from this write data temporary storage district according to this at least one write instruction by this at least one write data Replica in one second temporary storage, wherein a transmitting bandwidth of this first temporary storage is higher than a transmitting bandwidth of this second temporary storage
Wherein this memory management circuitry also in order to judge whether generation one program error after writing in this type nonvolatile module by these at least one write data,
If when wherein there is this program error, then this memory management circuitry also in order to read this at least one write data from this second temporary storage, and these at least one write data write in this type nonvolatile module according to this at least one write instruction.
12. Memory Controllers according to claim 11,
Wherein this memory management circuitry is also in order to receive at least one reading command from this host computer system,
Wherein this memory management circuitry is also in order to judge whether this second temporary storage stores should at least one reading data of at least one reading command,
If wherein this second temporary storage store to should these at least one reading data of at least one reading command time, then this memory management circuitry reads these at least one reading data and these at least one reading data is sent to this host computer system to respond this at least one reading command from this second temporary storage.
13. Memory Controllers according to claim 11, wherein this second temporary storage is the outside being configured in this Memory Controller or being configured in this Memory Controller.
14. Memory Controllers according to claim 11, wherein this first temporary storage is a static RAM.
15. Memory Controllers according to claim 11, wherein this second temporary storage is a Synchronous Dynamic Random Access Memory.
16. Memory Controllers according to claim 11, wherein a capacity of this second temporary storage is greater than a capacity of this first temporary storage.
17. Memory Controllers according to claim 16, wherein the capacity of this second temporary storage is 8 times of the capacity of this first temporary storage.
CN201110455539.2A 2011-12-30 2011-12-30 Memory storage device, its memory controller, and data writing method Active CN103186470B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110455539.2A CN103186470B (en) 2011-12-30 2011-12-30 Memory storage device, its memory controller, and data writing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110455539.2A CN103186470B (en) 2011-12-30 2011-12-30 Memory storage device, its memory controller, and data writing method

Publications (2)

Publication Number Publication Date
CN103186470A CN103186470A (en) 2013-07-03
CN103186470B true CN103186470B (en) 2016-04-20

Family

ID=48677646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110455539.2A Active CN103186470B (en) 2011-12-30 2011-12-30 Memory storage device, its memory controller, and data writing method

Country Status (1)

Country Link
CN (1) CN103186470B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9442662B2 (en) * 2013-10-18 2016-09-13 Sandisk Technologies Llc Device and method for managing die groups
TWI566253B (en) * 2015-09-02 2017-01-11 慧榮科技股份有限公司 Method for managing a memory apparatus, and associated memory apparatus thereof and associated controller thereof
KR102565918B1 (en) * 2016-02-24 2023-08-11 에스케이하이닉스 주식회사 Data storage device and operating method thereof
TWI645286B (en) * 2017-08-31 2018-12-21 慧榮科技股份有限公司 Memory controlling device and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5359723A (en) * 1991-12-16 1994-10-25 Intel Corporation Cache memory hierarchy having a large write through first level that allocates for CPU read misses only and a small write back second level that allocates for CPU write misses only
CN101576859A (en) * 2008-05-06 2009-11-11 群联电子股份有限公司 Nonvolatile memory data writing method, memory system and controller thereof
CN102243603A (en) * 2010-05-13 2011-11-16 美光科技公司 Memory buffer having accessible information after a program-fail

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI397821B (en) * 2009-01-19 2013-06-01 Phison Electronics Corp Method, system and controller thereof for transmitting data stream

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5359723A (en) * 1991-12-16 1994-10-25 Intel Corporation Cache memory hierarchy having a large write through first level that allocates for CPU read misses only and a small write back second level that allocates for CPU write misses only
CN101576859A (en) * 2008-05-06 2009-11-11 群联电子股份有限公司 Nonvolatile memory data writing method, memory system and controller thereof
CN102243603A (en) * 2010-05-13 2011-11-16 美光科技公司 Memory buffer having accessible information after a program-fail

Also Published As

Publication number Publication date
CN103186470A (en) 2013-07-03

Similar Documents

Publication Publication Date Title
CN107844431B (en) Mapping table updating method, memory control circuit unit and memory storage device
US8812784B2 (en) Command executing method, memory controller and memory storage apparatus
TWI540583B (en) Dynamic allocation of power budget for a system having non-volatile memory
CN104423888B (en) Data writing method, memory control circuit unit and memory storage device
TWI409633B (en) Flash memory storage device, controller thereof, and method for programming data
US9619380B2 (en) Data writing method, memory control circuit unit and memory storage apparatus
CN103035282B (en) Memory storage device, memory controller and temperature management method
TWI454922B (en) Memory storage device and memory controller and data writing method thereof
CN107818808B (en) Data writing method, memory control circuit unit and memory storage device
CN103136111B (en) Data writing method, memory controller and memory storage device
US9378130B2 (en) Data writing method, and memory controller and memory storage apparatus using the same
TWI523030B (en) Method for managing buffer memory, memory controllor, and memory storage device
TWI622044B (en) Memory managing method, memory control circuit unit and memory storage apparatus
CN103914391B (en) Data reading method, memory controller and memory storage device
CN109840165B (en) Memory system and method of operating the same
CN103186470B (en) Memory storage device, its memory controller, and data writing method
CN102193871B (en) Non-volatile memory access method, system and non-volatile memory controller
KR102695482B1 (en) Data storage device and operating method thereof
CN111752858A (en) Controller, memory system and method of operation
CN103218308B (en) Buffer memory management method, memory controller and memory storage device
CN106201932A (en) Data writing method, memory control circuit unit and memory storage device
US11157401B2 (en) Data storage device and operating method thereof performing a block scan operation for checking for valid page counts
CN104142895B (en) Writing method, memory controller and memory storage device
CN114664361A (en) DRAM-less multi-level cell programming with NAND buffers
KR20180121733A (en) Data storage device and operating method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant