[go: up one dir, main page]

CN102023811B - Method and system for issuing programmatic instructions to flash memory - Google Patents

Method and system for issuing programmatic instructions to flash memory Download PDF

Info

Publication number
CN102023811B
CN102023811B CN2009101721618A CN200910172161A CN102023811B CN 102023811 B CN102023811 B CN 102023811B CN 2009101721618 A CN2009101721618 A CN 2009101721618A CN 200910172161 A CN200910172161 A CN 200910172161A CN 102023811 B CN102023811 B CN 102023811B
Authority
CN
China
Prior art keywords
instruction
flash memory
write
data
main frame
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
CN2009101721618A
Other languages
Chinese (zh)
Other versions
CN102023811A (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 CN2009101721618A priority Critical patent/CN102023811B/en
Publication of CN102023811A publication Critical patent/CN102023811A/en
Application granted granted Critical
Publication of CN102023811B publication Critical patent/CN102023811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Read Only Memory (AREA)

Abstract

The embodiment of the invention provides a method, a controller and a storage system for issuing a programming command to a flash memory. The method includes receiving a plurality of host write commands and write data corresponding to the host write commands from a host system using a Native Command Queuing (NCQ) protocol, and issuing a cache program Command to the flash memory chip to write the write data into the flash memory chip. Therefore, the time for executing the host write command can be effectively shortened by only using the cache program command and the native instruction sorting protocol to execute the data write.

Description

对闪存下达程序化指令的方法和系统Method and system for issuing programmatic instructions to flash memory

技术领域 technical field

本发明涉及一种对闪存下达程序化指令的方法以及使用此方法的闪存控制器与闪存储存系统。  The invention relates to a method for issuing programming instructions to a flash memory, a flash memory controller and a flash memory storage system using the method. the

背景技术 Background technique

由于闪存(Flash Memory)具有数据非挥发性、省电、体积小与无机械结构等的特性,最适合使用于可携式电子产品上。例如,固态硬盘就是一种以NAND闪存作为储存媒体的储存装置,并且已广泛配置于笔记型计算机中作为主要的储存装置。  Because flash memory (Flash Memory) has the characteristics of data non-volatility, power saving, small size and no mechanical structure, it is most suitable for use in portable electronic products. For example, a solid state disk is a storage device using NAND flash memory as a storage medium, and has been widely deployed in notebook computers as a main storage device. the

图1是图示一般闪存储存装置的概要方块图。一般来说,当主机系统110透过连接器122与闪存储存装置电性连接并且欲储存数据至闪存储存装置120时,写入数据至闪存储存装置120的闪存模块126的程序可区分为数据传输(transfer)以及数据程序化(program)两个部分。具体来说,当主机系统110欲在闪存储存装置120中储存数据时,闪存控制器124会通过数据输入/输出总线128将数据传输至闪存模块126内的缓冲区132,之后闪存模块126会将缓冲区132内的数据程序化至闪存模块126的存储器(即,储存区)134,其中在闪存模块126将数据程序化至存储器134的期间,闪存模块126是处于一实际忙碌(busy)状态,且当闪存模块126处于实际忙碌状态下闪存控制器124无法对其下达任何指令或传输任何数据。也就是说,闪存控制器124必须于闪存模块126完成程序化后才能响应主机系统110并处理主机系统110的下一个指令。  FIG. 1 is a schematic block diagram illustrating a general flash storage device. In general, when the host system 110 is electrically connected to the flash storage device through the connector 122 and intends to store data in the flash storage device 120, the process of writing data to the flash memory module 126 of the flash storage device 120 can be divided into data transmission. (transfer) and data programming (program) two parts. Specifically, when the host system 110 intends to store data in the flash storage device 120, the flash controller 124 will transmit the data to the buffer 132 in the flash memory module 126 through the data input/output bus 128, and then the flash memory module 126 will The data in the buffer 132 is programmed to the memory (i.e., the storage area) 134 of the flash memory module 126, wherein the flash memory module 126 is in an actual busy (busy) state while the flash memory module 126 is programming data to the memory 134, And when the flash memory module 126 is actually in a busy state, the flash memory controller 124 cannot issue any instructions or transmit any data to it. That is to say, the flash memory controller 124 can respond to the host system 110 and process the next command of the host system 110 only after the flash memory module 126 is programmed. the

具体来说,当闪存控制器124从主机系统110接收到主机写入指令与写 入数据而需将写入数据写入至闪存模块126时,闪存控制器124会通过数据输入/输出总线128下达程序化指令,而此程序化指令中的相关信息就会暂存于缓冲区132中。例如,此程序化指令是由“指令W1”、“实体地址”、“写入数据”与“指令W2”等字符串所组成,其中闪存控制器124通过“指令W1”指示闪存模块126准备执行程序化程序,通过“实体地址”指示闪存模块126欲程序化的地址,通过“写入数据”指示闪存模块126欲程序化的数据以及通过“指令W2”指示闪存模块126开始执行程序化。因此,当闪存模块126根据程序化指令中的“指令W2”开始将缓冲区132内的数据写入至存储器134时,闪存控制器124需接收到来自于闪存模块126的完成程序化的确认(acknowl edgement)信息后才会回复主机系统110,一般来说,当主机系统下达指令到主机系统接收到确认信息的时间称为响应时间(response time)。  Specifically, when the flash memory controller 124 receives the host write command and write data from the host system 110 and needs to write the write data to the flash memory module 126, the flash memory controller 124 will issue a command via the data input/output bus 128. programming instructions, and the relevant information in the programming instructions will be temporarily stored in the buffer 132 . For example, the programmed command is composed of character strings such as "command W1", "physical address", "write data" and "command W2", wherein the flash memory controller 124 instructs the flash memory module 126 to prepare to execute The programming procedure indicates the address of the flash memory module 126 to be programmed by "physical address", the data to be programmed by the flash memory module 126 by "write data" and the flash memory module 126 to start programming by "command W2". Therefore, when the flash memory module 126 starts to write the data in the buffer 132 to the memory 134 according to the "command W2" in the programming instruction, the flash memory controller 124 needs to receive the confirmation from the flash memory module 126 that the programming is completed ( acknowl edgement) information, the host system 110 will be replied. Generally speaking, the time from when the host system issues an instruction to when the host system receives the acknowledgment information is called response time (response time). the

随着传输技术的发展,使得连接器的传输速度已大幅提升,例如,序列先进附件(Serial Advanced Technology Attachment,SATA)连接器已可达到每秒15亿位(Gigabit,Gb),甚至每秒30Gb。然而,上述程序化闪存的速度却远低连接器的速度下,整体储存的效能仍无法有效改善,因此如何缩短执行主机写入指令的时间是此领域技术人员所致力的目标。  With the development of transmission technology, the transmission speed of connectors has been greatly improved. For example, Serial Advanced Technology Attachment (SATA) connectors can reach 1.5 billion bits per second (Gigabit, Gb), or even 30Gb per second. . However, the speed of the above-mentioned programmable flash memory is far lower than the speed of the connector, and the performance of the overall storage cannot be effectively improved. Therefore, how to shorten the time for executing the host write command is the goal of those skilled in the art. the

发明内容 Contents of the invention

本发明提供一种下达程序化指令的方法,其能够有效地缩短执行主机写入指令的时间。  The invention provides a method for issuing programmed instructions, which can effectively shorten the time for executing the write instructions of the host. the

本发明提供一种闪存控制器,其能够有效地缩短执行主机写入指令的时间。  The present invention provides a flash memory controller, which can effectively shorten the time for executing a host write command. the

本发明提供一种闪存储存系统,能够有效地缩短执行主机写入指令的时间。  The invention provides a flash memory storage system, which can effectively shorten the time for executing a host write command. the

本发明范例实施例提出一种下达程序化指令的方法,用于将来自于一主机系统的数据写入至一闪存芯片中。本下达程序化指令的方法包括提供一闪 存控制器,以及由闪存控制器使用一原生指令排序(Native Command Queuing,NCQ)协议从主机系统中接收多个主机写入指令。本下达程序化指令的方法也包括由闪存控制器依据主机写入指令传送一下达指令顺序给主机系统。本下达程序化指令的方法还包括依据下达指令顺序从主机系统中依序地接收主机写入指令与对应主机写入指令的多个写入数据,并且分别地向闪存芯片下达一快取程序化指令以将写入数据写入至闪存芯片中。  Exemplary embodiments of the present invention provide a method for issuing programming instructions for writing data from a host system into a flash memory chip. The method for issuing programmed commands includes providing a flash controller, and the flash controller receives a plurality of host write commands from the host system using a native command queuing (Native Command Queuing, NCQ) protocol. The method for issuing programmed instructions also includes that the flash memory controller transmits an instruction sequence to the host system according to the host write instruction. The method for issuing programming commands also includes sequentially receiving the host write command and a plurality of write data corresponding to the host write command from the host system according to the command order, and issuing a cache programming command to the flash memory chip respectively. command to write the write data into the flash memory chip. the

本发明范例实施例提出一种闪存控制器,用于将来自于一主机系统的数据写入至一闪存芯片中。本闪存控制器包括一微处理器单元、一缓冲存储器、一闪存接口单元、一主机接口单元与一内存管理单元。闪存接口单元电性连接至微处理器单元,并且用以连接闪存芯片。缓冲存储器电性连接至微处理器单元。主机接口单元电性连接至微处理器单元,并且用以连接上述主机系统,其中主机接口单元支持NCQ协议。内存管理单元电性连接至微处理单元,并且用以通过主机接口单元使用NCQ协议从主机系统中接收多个主机写入指令。此外,内存管理单元通过主机接口单元依据主机写入指令传送一下达指令顺序给主机系统。再者,内存管理单元透过主机接口单元依据下达指令顺序从主机系统中依序地接收主机写入指令与对应主机写入指令的多个写入数据,并且分别地向闪存芯片下达快取程序化指令以将写入数据写入至闪存芯片中。  Exemplary embodiments of the present invention provide a flash memory controller for writing data from a host system into a flash memory chip. The flash memory controller includes a microprocessor unit, a buffer memory, a flash memory interface unit, a host interface unit and a memory management unit. The flash memory interface unit is electrically connected to the microprocessor unit and used for connecting the flash memory chip. The buffer memory is electrically connected to the microprocessor unit. The host interface unit is electrically connected to the microprocessor unit and used to connect to the above-mentioned host system, wherein the host interface unit supports the NCQ protocol. The memory management unit is electrically connected to the micro-processing unit, and is used for receiving a plurality of host write commands from the host system through the host interface unit using the NCQ protocol. In addition, the memory management unit transmits a command sequence to the host system through the host interface unit according to the host write command. Furthermore, the memory management unit sequentially receives the host write command and a plurality of write data corresponding to the host write command from the host system through the host interface unit according to the command order, and issues cache programs to the flash memory chip respectively. Write instructions to write the write data into the flash memory chip. the

本发明范例实施例提出一种闪存储存系统,用于储存来自于一主机系统的数据。本闪存储存系统包括用以电性连接上述主机系统的一连接器、一闪存芯片以及一闪存控制器,其中连接器支持NCQ协议。闪存控制器电性连接至连接器与闪存芯片,并且用以通过连接器使用NCQ协议从主机系统中接收多个主机写入指令。此外,闪存控制器依据主机写入指令传送一下达指令顺序给主机系统。再者,闪存控制器透过连接器依据上述下达指令顺序从主机系统中依序地接收主机写入指令与对应主机写入指令的多个写入数据,并且分别地向闪存芯片下达一快取程序化指令以将写入数据写入至闪存芯片中。  Exemplary embodiments of the present invention provide a flash storage system for storing data from a host system. The flash memory storage system includes a connector, a flash memory chip and a flash memory controller for electrically connecting the above-mentioned host system, wherein the connector supports the NCQ protocol. The flash memory controller is electrically connected to the connector and the flash memory chip, and used for receiving a plurality of host write commands from the host system through the connector using the NCQ protocol. In addition, the flash memory controller transmits a command sequence to the host system according to the host write command. Furthermore, the flash memory controller sequentially receives the host write command and a plurality of write data corresponding to the host write command from the host system through the connector according to the order of issuing the above commands, and issues a cache memory to the flash memory chip respectively. Program instructions to write write data into the flash memory chip. the

基于上述,本发明范例实施例的下达程序化指令的方法、闪存控制器与闪存储存系统能够有效地缩短执行主机写入指令的时间,由此提升数据存取的效能。  Based on the above, the method for issuing programming instructions, the flash memory controller and the flash memory storage system of the exemplary embodiments of the present invention can effectively shorten the execution time of the host write instruction, thereby improving the performance of data access. the

下面通过具体实施例并结合附图对本发明做进一步的详细描述。  The present invention will be described in further detail below through specific embodiments and in conjunction with the accompanying drawings. the

附图说明 Description of drawings

图1是图示一般闪存储存系统的概要方块图;  Figure 1 is a schematic block diagram illustrating a general flash memory storage system;

图2A是根据本发明实施例图示使用闪存储存装置的主机系统;  2A is a diagram illustrating a host system using a flash memory storage device according to an embodiment of the present invention;

图2B是根据本发明范例实施例所图示的计算机、输入/输出装置与闪存储存装置的示意图;  2B is a schematic diagram of a computer, an input/output device, and a flash storage device according to an exemplary embodiment of the present invention;

图2C是根据本发明另一范例实施例所图示的主机系统与闪存储存装置的示意图;  2C is a schematic diagram of a host system and a flash storage device according to another exemplary embodiment of the present invention;

图2D是根据本发明范例实施例所图示的闪存储存装置的概要方块图;  2D is a schematic block diagram of a flash memory storage device illustrated according to an exemplary embodiment of the present invention;

图3是根据本发明范例实施例所图示的闪存晶粒的概要方块图;  3 is a schematic block diagram of a flash memory die illustrated according to an exemplary embodiment of the present invention;

图4A是根据本发明范例实施例所图示的闪存控制器透过数据输入/输出总线下达快取程序化指令的范例示意图;  FIG. 4A is a schematic diagram of an example of a flash memory controller issuing cache programming instructions through a data input/output bus according to an exemplary embodiment of the present invention;

图4B是根据图4A所示的指令所图示闪存芯片的运作时序图;  FIG. 4B is an operation timing diagram of the illustrated flash memory chip according to the instruction shown in FIG. 4A;

图5是根据本发明范例实施例所图示的下达程序化指令的流程图。  FIG. 5 is a flowchart illustrating issuing a programmatic instruction according to an exemplary embodiment of the present invention. the

附图标记说明:  Explanation of reference signs:

110:主机系统;                120:闪存储存装置;  110: host system; 120: flash storage device;

122:连接器;                  124:闪存控制器;  122: connector; 124: flash memory controller;

126:闪存模块;                128:数据输入/输出总线;  126: Flash memory module; 128: Data input/output bus;

132:缓冲区;                  134:存储器;  132: Buffer; 134: Memory;

200:闪存储存装置;            202:连接器;  200: flash storage device; 202: connector;

204:闪存控制器;              206:微处理器单元;  204: flash controller; 206: microprocessor unit;

208:内存管理单元;            210:主机接口单元;  208: memory management unit; 210: host interface unit;

212:闪存接口单元;            214:缓冲存储器;  212: Flash memory interface unit; 214: Buffer memory;

220:闪存芯片;                290:主机系统;  220: flash memory chip; 290: host system;

295:总线;                    300:第0闪存模块;  295: bus; 300: 0th flash memory module;

302:第0数据输入/输出总线;    310:第1闪存模块;  302: the 0th data input/output bus; 310: the 1st flash memory module;

312:第1数据输入/输出总线;    320:第2闪存模块;  312: the first data input/output bus; 320: the second flash memory module;

322:第2数据输入/输出总线;    330:第3闪存模块;  322: the second data input/output bus; 330: the third flash memory module;

332:第3数据输入/输出总线;    340:第4闪存模块;  332: the third data input/output bus; 340: the fourth flash memory module;

342:第4数据输入/输出总线;    350:第5闪存模块;  342: the 4th data input/output bus; 350: the 5th flash memory module;

352:第5数据输入/输出总线;    360:第6闪存模块;  352: the fifth data input/output bus; 360: the sixth flash memory module;

362:第6数据输入/输出总线;    370:第7闪存模块;  362: the sixth data input/output bus; 370: the seventh flash memory module;

372:第7数据输入/输出总线;    400:第0闪存晶粒;  372: the 7th data input/output bus; 400: the 0th flash memory die;

402:储存区;                  404:第一缓冲区;  402: storage area; 404: first buffer zone;

406:第二缓冲区;              410:第1闪存晶粒;  406: the second buffer zone; 410: the first flash memory die;

420:第2闪存晶粒;             430:第3闪存晶粒;  420: the second flash memory die; 430: the third flash memory die;

440:第4闪存晶粒;             450:第5闪存晶粒;  440: the fourth flash memory die; 450: the fifth flash memory die;

460:第6闪存晶粒;             470:第7闪存晶粒;  460: the sixth flash memory die; 470: the seventh flash memory die;

480:第8闪存晶粒;             490:第9闪存晶粒;  480: the 8th flash memory die; 490: the 9th flash memory die;

500:第10闪存晶粒;            510:第11闪存晶粒;  500: the 10th flash memory die; 510: the 11th flash memory die;

520:第12闪存晶粒;            530:第13闪存晶粒;  520: the 12th flash memory die; 530: the 13th flash memory die;

540:第14闪存晶粒;            550:第15闪存晶粒;  540: the 14th flash memory grain; 550: the 15th flash memory grain;

1100:计算机;                 1102:微处理器;  1100: computer; 1102: microprocessor;

1104:随机存取内存;           1106:输入/输出装置;  1104: random access memory; 1106: input/output device;

1108:系统总线;               1110:数据传输接口;  1108: system bus; 1110: data transmission interface;

1202:鼠标;                   1204:键盘;  1202: mouse; 1204: keyboard;

1206:显示器;                 1208:打印机;  1206: monitor; 1208: printer;

1212:随身碟;                 1214:记忆卡;  1212: flash drive; 1214: memory card;

1216:固态硬盘;               1310:数位相机;  1216: SSD; 1310: Digital camera;

1310a:SD卡;                  1310b:MMC卡;  1310a: SD card; 1310b: MMC card;

1310c:CF卡;                  1310d:记忆棒;  1310c: CF card; 1310d: memory stick;

1310e:嵌入式储存装置;        W1、W2、W3:指令;  1310e: embedded storage device; W1, W2, W3: instructions;

D1、D2、D3:数据;             ADD1、ADD2、ADD3:实体地址;  D1, D2, D3: data; ADD1, ADD2, ADD3: entity address;

CM1、CM2、CM3、CM4、CM5、CM6、CM7、CM8、CM9:指令;  CM1, CM2, CM3, CM4, CM5, CM6, CM7, CM8, CM9: instructions;

T1、T2、T3:数据传输;         B1、B2、B3:忙碌时间;  T1, T2, T3: data transmission; B1, B2, B3: busy time;

S501、S503、S505、S507、S509、S511、S513、S515、S517:下达程序化指令的步骤。  S501, S503, S505, S507, S509, S511, S513, S515, S517: the step of issuing a programming instruction. the

具体实施方式 Detailed ways

闪存储存装置一般而言包括闪存芯片与控制器(也称,控制电路)。通常闪存储存装置会与主机系统一起使用,以使主机系统可将数据写入至闪存储存装置或从闪存储存装置中读取数据。另外,也有闪存储存装置是包括嵌入式闪存与可执行于主机系统上以实质地作为此嵌入式闪存控制器的软件。  A flash memory storage device generally includes a flash memory chip and a controller (also referred to as a control circuit). Typically, a flash storage device is used with a host system so that the host system can write data to or read data from the flash storage device. In addition, there are also flash storage devices that include embedded flash memory and software executable on a host system that essentially acts as a controller for the embedded flash memory. the

图2A是根据本发明实施例图示使用闪存储存装置的主机系统。  FIG. 2A illustrates a host system using a flash storage device according to an embodiment of the present invention. the

请参照图2A,主机系统290一般包括计算机1100与输入/输出(input/output,I/O)装置1106。计算机1100包括微处理器1102、随机存取内存(random access memory,RAM)1104、系统总线1108以及数据传输接口1110。输入/输出装置1106包括如图2B的鼠标1202、键盘1204、显示器1206与打印机1208。必须了解的是,图2B所示的装置非限制输入/输出装置1106,输入/输出装置1106可还包括其它装置。  Referring to FIG. 2A , the host system 290 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. 2B. It must be understood that the device shown in FIG. 2B is not limited to the I/O device 1106, and the I/O device 1106 may also include other devices. the

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

一般而言,主机系统290可实质地为可储存数据的任意系统。虽然在本范例实施例中,主机系统290是以计算机系统来作说明,然而,在本发明另一范例实施例中主机系统290可以是数字相机、摄影机、通信装置、音讯播放器或视讯播放器等系统。例如,在主机系统为数字相机(摄影机)1310时,闪存储存装置则为其所使用的SD卡1310a、MMC卡1310b、CF卡1310c、记忆棒(memory stick)1310d或嵌入式储存装置1310e(如图2C所示)。嵌入式储存装置1310e包括嵌入式多媒体卡(Embedded MMC,eMMC)。值得一提的是,嵌入式多媒体卡是直接电性连接于主机系统的基板上。  In general, host system 290 can be virtually any system that can store data. Although in this exemplary embodiment, the host system 290 is illustrated as a computer system, however, in another exemplary embodiment of the present invention, the host system 290 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 flash storage device is an SD card 1310a, an MMC card 1310b, a CF card 1310c, a memory stick (memory stick) 1310d or an embedded storage device 1310e (such as Figure 2C). The embedded storage device 1310e includes an embedded multimedia card (Embedded MMC, eMMC). It is worth mentioning that the embedded multimedia card is directly electrically connected to the substrate of the host system. the

图2D是图示图2A所示闪存储存装置200的详细方块图。  FIG. 2D is a detailed block diagram illustrating the flash storage device 200 shown in FIG. 2A . the

请参照图2D,闪存储存装置200包括连接器202、闪存控制器204与闪存芯片220。  Referring to FIG. 2D , the flash storage device 200 includes a connector 202 , a flash controller 204 and a flash chip 220 . the

连接器202是电性连接至闪存控制器204并且用以通过总线295连接主机系统290。在本范例实施例中,连接器202为序列先进附件(Serial AdvancedTechnology Attachment,SATA)连接器。特别是,连接器202支持原生指令排序(Native Command Queuing,NCQ)协议,并且主机系统290与闪存控制器204之间是以NCQ协议来传送写入指令。具体来说,当主机系统290与闪存控制器204之间以NCQ协议传送主机写入指令时,主机系统290会先将欲发送的多个主机写入指令一起传送给闪存控制器204,并且闪存控制器204向主机系统290响应其预期下达指令顺序,特别是,在此过程中主机系统290仅传送欲下达的指令给闪存控制器204,而不会传送欲写入的数据。之后,主机系统290依据闪存控制器204的响应来传送主机写入指令与数据,并且闪存控制器204于完成所有主机写入指令后再响应主机系统290每一个写入指令的执行状态。特别是,当发生程序化错误(program fail)时,主机系统290会根据闪存控制器204的回报信息(即,执行状态)来将对应发生程序化错误的指令与数据重新传送给闪存控制器204。或者,在本发明另一范例实 施例中,当发生程序化错误(program fail)时,主机系统290会将所有指令与数据重新传送给闪存控制器204。  The connector 202 is electrically connected to the flash memory controller 204 and used for connecting to the host system 290 through the bus 295 . In this exemplary embodiment, the connector 202 is a Serial Advanced Technology Attachment (SATA) connector. In particular, the connector 202 supports the native command queuing (Native Command Queuing, NCQ) protocol, and the write command is transmitted between the host system 290 and the flash memory controller 204 using the NCQ protocol. Specifically, when the host system 290 and the flash memory controller 204 transmit host write commands with the NCQ protocol, the host system 290 will first transmit the multiple host write commands to be sent to the flash controller 204 together, and the flash memory The controller 204 responds to the host system 290 in response to its expected command sequence. In particular, the host system 290 only transmits the command to be issued to the flash memory controller 204 but does not transmit the data to be written. Afterwards, the host system 290 transmits the host write command and data according to the response of the flash controller 204, and the flash controller 204 responds to the host system 290 with the execution status of each write command after completing all the host write commands. In particular, when a programming error (program fail) occurs, the host system 290 will retransmit the instructions and data corresponding to the programming error to the flash controller 204 according to the report information (ie, execution status) of the flash controller 204 . Or, in another exemplary embodiment of the present invention, when a program fail occurs, the host system 290 will retransmit all instructions and data to the flash memory controller 204. the

此外,必须了解的是,在本发明范例实施例中,连接器202为支持NCQ的SATA连接器,然本发明不限于此,连接器202也可以是其它支持NCQ协议的连接器。  In addition, it must be understood that, in the exemplary embodiment of the present invention, the connector 202 is a SATA connector supporting NCQ, but the present invention is not limited thereto, and the connector 202 may also be other connectors supporting the NCQ protocol. the

闪存控制器204会执行以硬件型式或韧体型式实作的多个逻辑闸或控制指令,并且根据主机系统290的指令在闪存芯片220中进行数据的写入、读取与抹除等运作。闪存控制器204包括微处理器单元206、内存管理单元208、主机接口单元210、闪存接口单元212与缓冲存储器214。  The flash memory controller 204 executes a plurality of logic gates or control commands implemented in hardware or firmware, and writes, reads, and erases data in the flash memory chip 220 according to the instructions of the host system 290 . The flash memory controller 204 includes a microprocessor unit 206 , a memory management unit 208 , a host interface unit 210 , a flash memory interface unit 212 and a cache memory 214 . the

微处理器单元206为闪存控制器204的主控单元,用以与内存管理单元208、主机接口单元210、闪存接口单元212与缓冲存储器214等协同合作以进行闪存储存装置200的各种运作。  The microprocessor unit 206 is the main control unit of the flash memory controller 204 , and cooperates with the memory management unit 208 , the host interface unit 210 , the flash memory interface unit 212 , and the buffer memory 214 to perform various operations of the flash memory storage device 200 . the

内存管理单元208是电性连接至微处理器单元206,用以执行根据本范例实施例的下达程序化指令与区块管理机制,内存管理单元208的运作将于以下配合图式作详细说明。  The memory management unit 208 is electrically connected to the microprocessor unit 206 for executing the programmed instructions and the block management mechanism according to the present exemplary embodiment. The operation of the memory management unit 208 will be described in detail below with reference to the drawings. the

在本范例实施例中,内存管理单元208是以一韧体型式实作在闪存控制器204中。例如,将包括多个控制指令的内存管理单元208烧录至一程序内存(例如,只读存储器(Read Only Memory,ROM))中并且将此程序内存嵌入在闪存控制器204中,当闪存储存装置200运作时,内存管理单元208的多个控制指令会由微处理器单元206来执行以完成根据本发明实施例的下达程序化指令与区块管理机制。  In this exemplary embodiment, the memory management unit 208 is implemented in the flash memory controller 204 in the form of a firmware. For example, burn the memory management unit 208 including a plurality of control instructions into a program memory (for example, read only memory (Read Only Memory, ROM)) and embed this program memory in the flash memory controller 204, when the flash memory stores When the device 200 is running, a plurality of control commands of the memory management unit 208 will be executed by the microprocessor unit 206 to implement the programmed command and block management mechanism according to the embodiment of the present invention. the

在本发明另一范例实施例中,内存管理单元208的控制指令也可以程序代码型式储存于闪存芯片220的特定区域(例如,闪存芯片中专用于存放系统数据的系统区)中。同样的,当闪存储存装置200运作时,内存管理单元208的多个控制指令会由微处理器单元206来执行。此外,在本发明另一范例实施例中,内存管理单元208也可以一硬件型式实作在闪存控制器204中。  In another exemplary embodiment of the present invention, the control instructions of the memory management unit 208 may also be stored in a specific area of the flash memory chip 220 (for example, a system area dedicated to storing system data in the flash memory chip) in the form of program code. Likewise, when the flash storage device 200 is operating, a plurality of control commands of the memory management unit 208 will be executed by the microprocessor unit 206 . In addition, in another exemplary embodiment of the present invention, the memory management unit 208 may also be implemented in the flash memory controller 204 in a hardware form. the

主机接口单元210是电性连接至微处理器单元206并且用以接收与识别主机系统290所传送的指令与数据。也就是说,主机系统290所传送的指令与数据会通过主机接口单元210来传送至微处理器单元206。在本范例实施例中,主机接口单元210是对应连接器202为SATA接口。然而,必须了解的是本发明不限于此,主机接口单元210也可以是其它适合的数据传输接口。  The host interface unit 210 is electrically connected to the microprocessor unit 206 and used for receiving and identifying instructions and data transmitted by the host system 290 . That is to say, the instructions and data sent by the host system 290 are sent to the microprocessor unit 206 through the host interface unit 210 . In this exemplary embodiment, the host interface unit 210 corresponds to the SATA interface of the connector 202 . However, it must be understood that the present invention is not limited thereto, and the host interface unit 210 may also be other suitable data transmission interfaces. the

闪存接口单元212是电性连接至微处理器单元206并且用以存取闪存芯片220。也就是说,欲写入至闪存芯片220的数据会通过闪存接口单元212转换为闪存芯片220所能接受的格式。  The flash interface unit 212 is electrically connected to the microprocessor unit 206 and used for accessing the flash chip 220 . That is to say, the data to be written into the flash memory chip 220 will be converted into a format acceptable to the flash memory chip 220 through the flash memory interface unit 212 . the

缓冲存储器214是电性连接至微处理器单元206并且用以暂存来自于主机系统290的数据与指令或来自于闪存芯片220的数据。  The buffer memory 214 is electrically connected to the microprocessor unit 206 and used for temporarily storing data and instructions from the host system 290 or data from the flash chip 220 . the

此外,虽未图示于本范例实施例中,但闪存控制器204也还包括错误校正单元与电源管理单元等一般功能模块。  In addition, although not shown in this exemplary embodiment, the flash memory controller 204 also includes general functional modules such as an error correction unit and a power management unit. the

闪存芯片220是电性连接至闪存控制器204并且用以储存数据。闪存芯片220包括第0闪存模块300、第1闪存模块310、第2闪存模块320、第3闪存模块330、第4闪存模块340、第5闪存模块350、第6闪存模块360与第7闪存模块370。在本范例实施例中,第0闪存模块300、第1闪存模块310、第2闪存模块320、第3闪存模块330、第4闪存模块340、第5闪存模块350、第6闪存模块360与第7闪存模块370为多层存储器(Multi LevelCell,MLC)NAND闪存模块。然而,本发明不限于此,第0闪存模块300、第1闪存模块310、第2闪存模块320、第3闪存模块330、第4闪存模块340、第5闪存模块350、第6闪存模块360与第7闪存模块370也可是单层存储器(Single Level Cell,SLC)NAND闪存模块。  The flash chip 220 is electrically connected to the flash controller 204 and used for storing data. The flash memory chip 220 includes the 0th flash memory module 300, the 1st flash memory module 310, the 2nd flash memory module 320, the 3rd flash memory module 330, the 4th flash memory module 340, the 5th flash memory module 350, the 6th flash memory module 360 and the 7th flash memory module 370. In this exemplary embodiment, the 0th flash memory module 300, the 1st flash memory module 310, the 2nd flash memory module 320, the 3rd flash memory module 330, the 4th flash memory module 340, the 5th flash memory module 350, the 6th flash memory module 360 and the 7. The flash memory module 370 is a multi-level memory (Multi LevelCell, MLC) NAND flash memory module. However, the present invention is not limited thereto, the 0th flash memory module 300, the 1st flash memory module 310, the 2nd flash memory module 320, the 3rd flash memory module 330, the 4th flash memory module 340, the 5th flash memory module 350, the 6th flash memory module 360 and The seventh flash memory module 370 may also be a single-level memory (Single Level Cell, SLC) NAND flash memory module. the

在本范例实施例中,第0闪存模块300、第1闪存模块310、第2闪存模块320、第3闪存模块330、第4闪存模块340、第5闪存模块350、第6闪存模块360与第7闪存模块370是分别地电性连接至闪存控制器204。具体来说,闪存控制器204的闪存接口单元212分别地通过第0数据输入/输出总 线(Data input/output bus)302、第1数据输入/输出总线312、第2数据输入/输出总线322、第3数据输入/输出总线332、第4数据输入/输出总线342、第5数据输入/输出总线352、第6数据输入/输出总线362与第7数据输入/输出总线372传送数据给第0闪存模块300、第1闪存模块310、第2闪存模块320、第3闪存模块330、第4闪存模块340、第5闪存模块350、第6闪存模块360与第7闪存模块370。  In this exemplary embodiment, the 0th flash memory module 300, the 1st flash memory module 310, the 2nd flash memory module 320, the 3rd flash memory module 330, the 4th flash memory module 340, the 5th flash memory module 350, the 6th flash memory module 360 and the 7. The flash memory modules 370 are electrically connected to the flash memory controller 204 respectively. Specifically, the flash memory interface unit 212 of the flash memory controller 204 passes through the 0th data input/output bus (Data input/output bus) 302, the first data input/output bus 312, and the second data input/output bus 322 respectively. , the 3rd data input/output bus 332, the 4th data input/output bus 342, the 5th data input/output bus 352, the 6th data input/output bus 362 and the 7th data input/output bus 372 transmit data to the 0th The flash memory module 300 , the first flash memory module 310 , the second flash memory module 320 , the third flash memory module 330 , the fourth flash memory module 340 , the fifth flash memory module 350 , the sixth flash memory module 360 and the seventh flash memory module 370 . the

在本范例实施例中,第0闪存模块300包括第0闪存晶粒(die)400与第1闪存晶粒410,第1闪存模块310包括第2闪存晶粒420与第3闪存晶粒430,第2闪存模块320包括第4闪存晶粒440与第5闪存晶粒450,第3闪存模块330包括第6闪存晶粒460与第7闪存晶粒470,第4闪存模块340包括第8闪存晶粒480与第9闪存晶粒490,第5闪存模块350包括第10闪存晶粒500与第11闪存晶粒510,第6闪存模块360包括第12闪存晶粒520与第13闪存晶粒530以及第7闪存模块370包括第14闪存晶粒540与第15闪存晶粒550。  In this exemplary embodiment, the 0th flash memory module 300 includes a 0th flash memory die 400 and a first flash memory die 410, and the first flash memory module 310 includes a second flash memory die 420 and a third flash memory die 430, The 2nd flash memory module 320 includes the 4th flash memory die 440 and the 5th flash memory die 450, the 3rd flash memory module 330 includes the 6th flash memory die 460 and the 7th flash memory die 470, the 4th flash memory module 340 includes the 8th flash memory die 480 and the 9th flash memory die 490, the 5th flash memory module 350 includes the 10th flash memory die 500 and the 11th flash memory die 510, the sixth flash memory module 360 includes the 12th flash memory die 520 and the 13th flash memory die 530 and The seventh flash memory module 370 includes a fourteenth flash memory die 540 and a fifteenth flash memory die 550 . the

值得一提的是,在本发明范例实施例中,第0闪存模块300、第1闪存模块310、第2闪存模块320、第3闪存模块330、第4闪存模块340、第5闪存模块350、第6闪存模块360与第7闪存模块370和闪存控制器204之间分别地配置第0数据输入/输出总线302、第1数据输入/输出总线312、第2数据输入/输出总线322、第3数据输入/输出总线332、第4数据输入/输出总线342、第5数据输入/输出总线352、第6数据输入/输出总线362与第7数据输入/输出总线372,因此内存管理单元208会使用平行模式(parallelmode)同时通过多条数据输入/输出总线来传送写入数据至对应的闪存模块,以提升存取速度。此外,每一闪存模块包括两个闪存晶粒,因此内存管理单元208会使用一交错模式(interleave mode)来将写入数据交错地传送至同一闪存模块内的两个闪存晶粒,以更增加存取效能。更详细来说,如上所述,在闪存晶粒中写入数据的过程包括数据传输(transfer)以及数据程序化 (program)两个部分,而交错模式(interleave mode)就是在使用同一条数据输入/输出总线传输数据的两个闪存晶粒的例子中,利用其中一个闪存晶粒正执行数据程序化的期间传送数据给另一个闪存晶粒。  It is worth mentioning that, in the exemplary embodiment of the present invention, the 0th flash memory module 300, the 1st flash memory module 310, the 2nd flash memory module 320, the 3rd flash memory module 330, the 4th flash memory module 340, the 5th flash memory module 350, The 0th data input/output bus 302, the first data input/output bus 312, the second data input/output bus 322, the third The data input/output bus 332, the 4th data input/output bus 342, the 5th data input/output bus 352, the 6th data input/output bus 362 and the 7th data input/output bus 372, so the memory management unit 208 will use Parallel mode transmits write data to corresponding flash memory modules through multiple data input/output buses at the same time, so as to improve access speed. In addition, each flash memory module includes two flash memory dies, so the memory management unit 208 uses an interleave mode to interleave write data to the two flash memory dies in the same flash memory module to further increase access performance. In more detail, as mentioned above, the process of writing data in the flash memory grain includes two parts: data transfer and data programming (program), and the interleave mode (interleave mode) is to use the same data input In the example of two flash dies that transfer data via the I/O bus, data is transferred to the other flash die while one of the flash dies is performing data programming. the

图3是根据本发明范例实施例所图示的闪存晶粒的概要方块图。在此,第0闪存晶粒400、第1闪存晶粒410、第2闪存晶粒420、第3闪存晶粒430、第4闪存晶粒440、第5闪存晶粒450、第6闪存晶粒460、第7闪存晶粒470、第8闪存晶粒480、第9闪存晶粒490、第10闪存晶粒500、第11闪存晶粒510、第12闪存晶粒520、第13闪存晶粒530、第14闪存晶粒540与第15闪存晶粒550的结构与运作方式皆相同,以下仅以第0闪存晶粒400来进行说明。  FIG. 3 is a schematic block diagram of a flash memory die illustrated according to an exemplary embodiment of the present invention. Here, the 0th flash memory die 400, the first flash memory die 410, the second flash memory die 420, the third flash memory die 430, the fourth flash memory die 440, the fifth flash memory die 450, and the sixth flash memory die 460, the seventh flash memory die 470, the eighth flash memory die 480, the ninth flash memory die 490, the tenth flash memory die 500, the eleventh flash memory die 510, the twelfth flash memory die 520, and the thirteenth flash memory die 530 The structure and operation of the 14th flash memory die 540 and the 15th flash memory die 550 are the same, and only the 0th flash memory die 400 will be described below. the

请参照图3,第0闪存晶粒400包括储存区402、第一缓冲区404与第二缓冲区406。  Referring to FIG. 3 , the 0th flash die 400 includes a storage area 402 , a first buffer 404 and a second buffer 406 . the

储存区402包括多个实体区块并且用以储存数据。实体区块为抹除的最小单位。亦即,每一实体区块含有最小数目的一并被抹除的存储器。每一实体区块具有数个页面(page)。在本范例实施例中,页面为程序化的最小单元。换言之,页面为写入数据或读取数据的最小单元。每一页面通常包括使用者数据区与冗余区。使用者数据区用以储存使用者的数据,而冗余区用以储存系统的数据(例如,错误检查与校正码(Error Checking and Correcting Code,ECC Code)。  The storage area 402 includes a plurality of physical blocks and is used for storing data. A physical block is the smallest unit of erasure. That is, each physical block contains the minimum number of memories that are erased together. Each physical block has several pages. In this exemplary embodiment, a page is the smallest unit of programming. In other words, a page is the smallest unit for writing data or reading data. Each page generally includes a user data area and a redundant area. The user data area is used to store user data, and the redundant area is used to store system data (for example, Error Checking and Correcting Code (ECC Code). 

值得一提的是,第0闪存晶粒400、第1闪存晶粒410、第2闪存晶粒420、第3闪存晶粒430、第4闪存晶粒440、第5闪存晶粒450、第6闪存晶粒460、第7闪存晶粒470、第8闪存晶粒480、第9闪存晶粒490、第10闪存晶粒500、第11闪存晶粒510、第12闪存晶粒520、第13闪存晶粒530、第14闪存晶粒540与第15闪存晶粒550中的实体区块会被内存管理单元208群组为多个实体单元来进行数据的写入、读取与抹除。特别是每一实体单元是由多个闪存晶粒中的实体区块所组成,因此内存管理单元208会使用上述 平行模式与交错模式来提升存取的速度。  It is worth mentioning that the 0th flash memory grain 400, the 1st flash memory grain 410, the 2nd flash memory grain 420, the 3rd flash memory grain 430, the 4th flash memory grain 440, the 5th flash memory grain 450, the 6th flash memory grain Flash memory grain 460, seventh flash memory grain 470, eighth flash memory grain 480, ninth flash memory grain 490, tenth flash memory grain 500, eleventh flash memory grain 510, twelfth flash memory grain 520, thirteenth flash memory The physical blocks in the die 530 , the 14th flash memory die 540 and the 15th flash memory die 550 are grouped into a plurality of physical units by the memory management unit 208 for writing, reading and erasing data. In particular, each physical unit is composed of physical blocks in a plurality of flash memory dies, so the memory management unit 208 uses the above-mentioned parallel mode and interleaved mode to improve the access speed. the

再者,由于闪存的存储器仅能从“1”程序化为“0”,因此要更新实体区块内的数据时必须先抹除实体区块内的数据。然而,闪存的写入是以页面为单位,而抹除是以实体区块为单位,所以储存区402中的实体区块会以轮替方式来储存数据。具体来说,内存管理单元208会将分组的实体单元逻辑地分组为系统区(system area)、数据区(data area)、备用区(spare area)与取代区(replacement area),其中分组为系统区的实体单元是用以储存闪存储存装置的相关重要信息,而分组为取代区的实体单元是用以取代数据区或备用区中已损坏的实体单元,因此在一般存取状态下,主机系统290是无法存取系统区与取代区中的实体单元。至于分组为数据区的实体单元中会储存由主机写入指令所写入的数据,而备用区中的实体单元是用以在执行主机写入指令时替换数据区中的实体单元。例如,当闪存储存装置200接受到主机系统290的主机写入指令而欲更新(或写入)数据至数据区中某一实体单元的某一页面时,内存管理单元208会从备用区中提取一实体单元并且将欲被更新的实体单元中的有效旧数据与欲写入的新数据写入至从备用区中提取的实体单元中,并且将已写入有效旧数据与新数据的实体单元逻辑地关联为数据区,并且将数据区中欲被更新的实体单元进行抹除并逻辑地关联为备用区。为了能够让主机系统290能够顺利地存取以轮替方式储存数据的实体单元,闪存储存装置200会提供逻辑地址给主机系统290。也就是说,闪存储存装置200会通过在逻辑地址-实体地址对映表(logical address-physicaladdress mapping table)中记录与更新逻辑地址与数据区的实体单元之间的对映关系来反映实体单元的轮替,所以主机系统290仅需要针对所提供逻辑地址进行写入而闪存储存装置200会依据逻辑地址-实体地址对映表对所对映的实体单元的实体地址进行读取或写入数据。  Furthermore, since the memory of the flash memory can only be programmed from "1" to "0", the data in the physical block must be erased first when updating the data in the physical block. However, the flash memory is written in units of pages and erased in units of physical blocks, so the physical blocks in the storage area 402 store data in an alternate manner. Specifically, the memory management unit 208 logically groups the grouped entity units into system area, data area, spare area and replacement area, wherein the grouping is system area, data area, spare area, and replacement area. The physical units in the area are used to store relevant important information of the flash storage device, and the physical units grouped into the replacement area are used to replace the damaged physical units in the data area or spare area. Therefore, in the normal access state, the host system 290 is unable to access the physical units in the system area and the replacement area. The data written by the host write command is stored in the physical units grouped into the data area, and the physical units in the spare area are used to replace the physical units in the data area when the host write command is executed. For example, when the flash storage device 200 receives a host write command from the host system 290 and intends to update (or write) data to a certain page of a physical unit in the data area, the memory management unit 208 will extract the data from the spare area. a physical unit and write valid old data and new data to be written in the physical unit to be updated into the physical unit extracted from the spare area, and write valid old data and new data to the physical unit It is logically associated as a data area, and the physical units to be updated in the data area are erased and logically associated as a spare area. In order to enable the host system 290 to smoothly access the physical units that store data in a rotating manner, the flash storage device 200 provides a logical address to the host system 290 . That is to say, the flash storage device 200 will reflect the physical unit by recording and updating the mapping relationship between the logical address and the physical unit in the data area in the logical address-physical address mapping table. Alternately, the host system 290 only needs to write to the provided logical address and the flash storage device 200 reads or writes data to the physical address of the corresponding physical unit according to the logical address-physical address mapping table. the

第一缓冲区404与第二缓冲区406是用以暂存闪存控制器204所传送的数据。如上所述,在第0闪存晶粒400中写入数据的过程包括数据传输以及 数据程序化两个部分。在数据传输的部分,闪存控制器204会将欲写入的数据传输至第一缓冲区404,并且之后,欲写入的数据会被搬移至第二缓冲区406。而在数据程序化的部分,欲写入的数据会从第二缓冲区406中写入至储存区402。在此,第一缓冲区404也称为数据快取(data cache)区,而第二缓冲区406也称为快取缓冲(cache buffer)区,其中第一缓冲区404与第二缓冲区406可分别暂存一个页面的写入数据以对应程序化单位(即,页面)。  The first buffer 404 and the second buffer 406 are used to temporarily store data transmitted by the flash memory controller 204 . As mentioned above, the process of writing data in the 0th flash memory die 400 includes two parts: data transmission and data programming. In the part of data transmission, the flash memory controller 204 transmits the data to be written to the first buffer 404 , and then, the data to be written is moved to the second buffer 406 . In the part of data programming, the data to be written is written from the second buffer 406 to the storage area 402 . Here, the first buffer 404 is also referred to as a data cache (data cache) area, and the second buffer 406 is also referred to as a cache buffer (cache buffer), wherein the first buffer 404 and the second buffer 406 A page of write data can be temporarily stored to correspond to a programming unit (ie, a page). the

具体来说,当内存管理单元208从主机系统290接收到主机写入指令与写入数据而需将写入数据写入至第0闪存晶粒400时,内存管理单元208会通过闪存接口单元212与数据输入/输出总线302下达程序化指令,而此程序化指令中的欲写入的数据从缓冲存储器214中被传输至第一缓冲区404,之后欲写入的数据会从第一缓冲区404中被搬移至第二缓冲区406,最后,数据会从第二缓冲区406被程序化至储存区402。特别是,在本范例实施例中,内存管理单元208仅会使用是由“指令W1”、“实体地址”、“写入数据”与“指令W3”等字符串所组成程序化指令来程序化数据,其中内存管理单元208通过“指令W1”指示第0闪存晶粒400准备执行程序化程序,通过“实体地址”指示第0闪存晶粒400欲程序化的实体地址,通过“写入数据”指示第0闪存晶粒400欲程序化的数据以及通过“指令W3”指示第0闪存晶粒400开始执行快取程序化(cache program)。在此,当使用程序化指令中的“指令W3”时,闪存控制器204会于数据已从第一缓冲区404中被搬移第二缓冲区406时就接收到第0闪存晶粒400的确认信息,而可处理下一个指令。  Specifically, when the memory management unit 208 receives the host write command and write data from the host system 290 and needs to write the write data to the 0th flash memory die 400, the memory management unit 208 will pass the flash memory interface unit 212 A programming instruction is issued with the data input/output bus 302, and the data to be written in the programming instruction is transferred from the buffer memory 214 to the first buffer 404, and then the data to be written will be transferred from the first buffer 404 is moved to the second buffer 406 , and finally, the data is programmed from the second buffer 406 to the storage area 402 . In particular, in this exemplary embodiment, the memory management unit 208 only uses programming instructions composed of character strings such as "command W1", "physical address", "write data" and "command W3" to program Data, wherein the memory management unit 208 instructs the 0th flash memory die 400 to prepare to execute the programming program through the "command W1", indicates the physical address of the 0th flash memory die 400 to be programmed through the "physical address", and passes the "write data" Indicate the data to be programmed by the 0th flash memory die 400 and instruct the 0th flash memory die 400 to start executing the cache program through the "command W3". Here, when the "command W3" in the programming command is used, the flash memory controller 204 will receive the acknowledgment from the 0th flash die 400 when the data has been moved from the first buffer 404 to the second buffer 406 information, and the next command can be processed. the

例如,在闪存控制器204使用NCQ协议从主机系统290中接收到两个连续主机写入指令而需于第0闪存晶粒400的两个页面执行程序化的例子中,由于第0闪存晶粒400具有两个缓冲区(即,第一缓冲区404与第二缓冲区406),因此当第0闪存晶粒400已将第一个主机写入指令的数据从第一缓冲区404搬移至第二缓冲区406之后,第一缓冲区404就可被清除并接收第二个主机写入指令的数据。特别是,在第0闪存晶粒400正将第一个主机写入 指令的写入数据从第二缓冲区406中程序化至储存区402期间,第一缓冲区404可负责接收下一个程序化指令的写入数据(即,第二个主机写入指令的数据)。也就是说,通过使用“指令W3”可使得内存管理单元208在无需等待第0闪存晶粒400完成第一个主机写入指令的程序化的情况下,就可继续处理第二个主机写入指令,并将第二个主机写入指令的写入数据传输至第一缓冲区404中。因此,第0闪存晶粒400可同时地执行第一个主机写入指令的写入数据的数据程序化和第二个主机指令的写入数据的数据传输,而缩短执行主机写入指令的时间。  For example, in the example where the flash controller 204 receives two consecutive host write commands from the host system 290 using the NCQ protocol and needs to perform programming on two pages of the 0th flash die 400, since the 0th flash die 400 has two buffers (i.e., the first buffer 404 and the second buffer 406), so when the 0th flash die 400 has moved the data of the first host write command from the first buffer 404 to the 0th After the second buffer 406, the first buffer 404 can be cleared and receive the data of the second host write command. In particular, during the 0th flash memory die 400 is programming the write data of the first host write command from the second buffer 406 to the storage area 402, the first buffer 404 can be responsible for receiving the next programming The write data of the command (that is, the data of the second master write command). That is to say, by using "command W3", the memory management unit 208 can continue to process the second host write command without waiting for the 0th flash die 400 to complete the programming of the first host write command. command, and transmit the write data of the second host write command to the first buffer 404 . Therefore, the 0th flash memory die 400 can simultaneously execute the data programming of the write data of the first host write command and the data transmission of the write data of the second host command, thereby shortening the time for executing the host write command. . the

图4A是根据本发明范例实施例所图示的闪存控制器透过数据输入/输出总线下达快取程序化指令的范例示意图,并且图4B是根据图4A所示的指令所图示闪存芯片的运作时序图。在图4A与图4B的范例中,内存管理单元208是使用NCQ协议从主机系统290中接收到3个主机写入指令。在此,此3个主机写入指令欲写入的逻辑地址为连续的3个逻辑地址,并且内存管理单元208会依据此些逻辑地址的顺序来产生下达指令顺序,以使主机系统290依据内存管理单元208所产生的下达指令顺序来下达此3个主机写入指令,其中第1个主机写入指令包括欲写入的逻辑地址及欲写入的数据D1,第2个主机写入指令包括欲写入的逻辑地址及欲写入的数据D2,第3个主机写入指令包括欲写入的逻辑地址及欲写入的数据D3,并且此3个主机写入指令欲于写入的逻辑地址是对映至第0闪存晶粒400的实体区块。  FIG. 4A is an exemplary schematic diagram of a flash memory controller illustrating a cache programming command through a data input/output bus according to an exemplary embodiment of the present invention, and FIG. 4B is a diagram of a flash memory chip illustrated according to the command shown in FIG. 4A Operation sequence diagram. In the example shown in FIG. 4A and FIG. 4B , the memory management unit 208 receives three host write commands from the host system 290 using the NCQ protocol. Here, the logical addresses to be written by the three host write commands are three consecutive logical addresses, and the memory management unit 208 will generate the instruction order according to the order of these logical addresses, so that the host system 290 can use the memory The command sequence generated by the management unit 208 is to issue the three host write commands, wherein the first host write command includes the logical address to be written and the data D1 to be written, and the second host write command includes The logical address to be written and the data to be written D2, the third host write command includes the logical address to be written and the data to be written D3, and these three host write commands are to be written in the logic The address is mapped to the physical block of the 0th flash memory die 400 . the

请参照图4A与图4B,当闪存控制器204的内存管理单元208依据该下达指令顺序接收到来自于主机系统290的第1个主机写入指令及欲写入的数据后,内存管理单元208会依据第1个主机写入指令中的逻辑地址与其欲写入的数据D1中向闪存芯片220下达由“指令W1”、“ADD1”、“数据D1”与“指令W3”等字符串所组成的快取程序化指令(如图4A所示的指令CM1、指令CM2、传输T1与指令CM3),其中“ADD1”表示程序化数据的实体地址。也是就说,内存管理单元208会依据逻辑地址-实体地址对映表将主机写入指 令中的逻辑地址所对映的实体地址传送给第0闪存晶粒400(即,指令CM2),并且将数据D1传输至第一缓冲区404(即,传输T1)。之后,第0闪存晶粒400会依据快取程序化指令(即,指令CM3)将数据D1从第一缓冲区404搬移至第二缓冲区406,并且在完成将数据D1从第一缓冲区404搬移至第二缓冲区406之后,将数据D1从第二缓冲区406中程序化至储存区402。特别是,在第0闪存晶粒400开始执行指令CM3时,第0闪存晶粒400会处于一忙碌状态,并且在完成将数据D1从第一缓冲区404搬移至第二缓冲区406之后即回复为一待命(ready)状态(即,忙碌时间B1)。在第0闪存晶粒400回复为待命状态时,内存管理单元208会响应主机系统290,从主机系统290中接收第2个主机写入指令与数据D2,并且对第0闪存晶粒400下达由“指令W1”、“ADD2”、“数据D2”与“指令W3”等字符串所组成的快取程序化指令(如图4A所示的指令CM4、指令CM5、传输T2与指令CM6)以将第2个主机写入指令的数据D2传输至第一缓冲区404(即,传输T2)。此时,数据D1的数据程序化与数据D2的数据传输是同时地进行。也就是说,由于第0闪存晶粒400中存有2个缓冲区(即,第一缓冲区404与第二缓冲区406),因此透过快取写入指令来将欲写入的数据从第一缓冲区404搬移至第二缓冲区406后,第二缓冲区406用于将数据程序化至储存区402,而第一缓冲区406就可继续从缓冲存储器214中接收数据。  Please refer to FIG. 4A and FIG. 4B, when the memory management unit 208 of the flash memory controller 204 receives the first host write command and the data to be written from the host system 290 according to the command order, the memory management unit 208 According to the logical address in the first host write command and the data D1 to be written, it will issue a string consisting of "command W1", "ADD1", "data D1" and "command W3" to the flash memory chip 220 cache programming instructions (command CM1 , command CM2 , transfer T1 and command CM3 shown in FIG. 4A ), wherein “ADD1” represents the physical address of the programming data. That is to say, the memory management unit 208 will transmit the physical address corresponding to the logical address in the host write instruction to the 0th flash memory die 400 (that is, the instruction CM2) according to the logical address-physical address mapping table, and The data D1 is transmitted to the first buffer 404 (ie, T1 is transmitted). Afterwards, the 0th flash memory die 400 will move the data D1 from the first buffer 404 to the second buffer 406 according to the cache programming instruction (ie, the instruction CM3 ), and after completing the transfer of the data D1 from the first buffer 404 After moving to the second buffer 406 , program the data D1 from the second buffer 406 to the storage area 402 . In particular, when the 0th flash memory die 400 starts to execute the command CM3, the 0th flash memory die 400 will be in a busy state, and will resume after completing the transfer of the data D1 from the first buffer 404 to the second buffer 406 It is a ready state (ie, busy time B1). When the 0th flash memory die 400 returns to the standby state, the memory management unit 208 will respond to the host system 290, receive the second host write command and data D2 from the host system 290, and issue a command to the 0th flash memory die 400 The cache programming instructions (command CM4, command CM5, transmission T2 and command CM6 shown in FIG. The data D2 of the second host write command is transmitted to the first buffer 404 (ie, transmission T2). At this time, the data programming of the data D1 and the data transmission of the data D2 are performed simultaneously. That is to say, since there are two buffers (i.e., the first buffer 404 and the second buffer 406) in the 0th flash memory die 400, the data to be written is read from After the first buffer 404 is moved to the second buffer 406 , the second buffer 406 is used to program data into the storage area 402 , and the first buffer 406 can continue to receive data from the buffer memory 214 . the

接着,在传输数据D2之后,当第0闪存晶粒400完成数据D1的数据程序化后,第0闪存晶粒400会依据指令CM6将数据D2从第一缓冲区404搬移至第二缓冲区406,并且在完成将数据D2从第一缓冲区404搬移至第二缓冲区406之后,将数据D2从第二缓冲区406中程序化至储存区402。在第0闪存晶粒400开始执行指令CM6时,第0闪存晶粒400会处于忙碌状态,并且在完成将数据D2从第一缓冲区404搬移至第二缓冲区406之后即回复为待命状态(即,忙碌时间B2)。类似地,在第0闪存晶粒400回复为待命状态时,内存管理单元208会响应主机系统290,从主机系统290中接收第3个主机 写入指令与数据D3,并且对第0闪存晶粒400下达由“指令W1”、“ADD3”、“数据D3”与“指令W3”等字符串所组成的快取程序化指令(如图4A所示的指令CM7、指令CM8、传输T3与指令CM9)以将第3个主机写入指令的数据D3传输至第一缓冲区404(即,传输T3)。  Next, after the data D2 is transmitted, when the 0th flash memory die 400 completes the data programming of the data D1, the 0th flash memory die 400 will move the data D2 from the first buffer 404 to the second buffer 406 according to the command CM6 , and after moving the data D2 from the first buffer 404 to the second buffer 406 , program the data D2 from the second buffer 406 to the storage area 402 . When the 0th flash memory grain 400 starts to execute the instruction CM6, the 0th flash memory grain 400 will be in a busy state, and will return to the standby state after completing the transfer of the data D2 from the first buffer 404 to the second buffer 406 ( That is, the busy time B2). Similarly, when the 0th flash memory grain 400 returns to the standby state, the memory management unit 208 will respond to the host system 290, receive the third host write command and data D3 from the host system 290, and write the 0th flash memory grain 400 issues a fast-fetching programming instruction composed of character strings such as "command W1", "ADD3", "data D3" and "command W3" (command CM7, command CM8, transmission T3 and command CM9 shown in FIG. 4A ) to transfer the data D3 of the third host write command to the first buffer 404 (ie, transfer T3). the

接着,在传输数据D3之后,当第0闪存晶粒400完成数据D2的数据程序化后,第0闪存晶粒400会依据指令CM9将数据D3从第一缓冲区404搬移至第二缓冲区406,并且在完成将数据D3从第一缓冲区404搬移至第二缓冲区406之后,将数据D 3从第二缓冲区406中程序化至储存区402。类似地,在第0闪存晶粒400开始执行指令CM9时,第0闪存晶粒400会处于忙碌状态,并且在完成将数据D3从第一缓冲区404搬移至第二缓冲区406之后即回复为待命状态(即,忙碌时间B3)。  Next, after the data D3 is transmitted, when the 0th flash memory die 400 completes the data programming of the data D2, the 0th flash memory die 400 will move the data D3 from the first buffer 404 to the second buffer 406 according to the command CM9 , and after moving the data D3 from the first buffer 404 to the second buffer 406, program the data D3 from the second buffer 406 to the storage area 402. Similarly, when the 0th flash memory die 400 starts to execute the command CM9, the 0th flash memory die 400 will be in a busy state, and will return to Standby state (ie, busy time B3). the

值得一提的是,在内存管理单元208从第0闪存晶粒400中收到回复为待命状态的确认信息中会包括快取状态位与实际忙碌状态位,其中快取状态位是表示第0闪存晶粒400是否已准备好再接收下一个写入资料,而实际忙碌状态位是表示第0闪存晶粒400目前是否正处于实际忙碌状态。由此,闪存控制器204通过确认信息中的信息可正确地判断第0闪存晶粒400是否正在程序化数据。在图4A与图4B的范例中,在忙碌时间B3之后,虽然第0闪存晶粒400已回复处于待命状态,然由于内存管理单元208已对此次通过NCQ协议所接收的所有主机写入指令完成下达程序化指令的动作,因此内存管理单元208会持续确认第0闪存晶粒400已完成所有数据的程序化(即,内存管理单元208会确认第0闪存晶粒400已处于非实际忙碌状态)之后,向主机系统290回复每一主机写入指令的执行状态。  It is worth mentioning that the memory management unit 208 will include the cache status bit and the actual busy status bit in the confirmation message that the memory management unit 208 receives from the 0th flash memory chip 400 to return to the standby status, wherein the cache status bit indicates that the 0th flash memory die 400 Whether the flash memory die 400 is ready to receive the next write data, and the actual busy status bit indicates whether the 0th flash memory die 400 is currently in the actual busy state. Thus, the flash memory controller 204 can correctly determine whether the 0th flash memory die 400 is programming data through the information in the confirmation information. In the example of FIG. 4A and FIG. 4B , after the busy time B3, although the 0th flash memory die 400 has returned to the standby state, the memory management unit 208 has written commands to all hosts received through the NCQ protocol this time. The action of issuing the programming instruction is completed, so the memory management unit 208 will continue to confirm that the 0th flash memory die 400 has completed the programming of all data (that is, the memory management unit 208 will confirm that the 0th flash memory die 400 has been in a non-actually busy state ) Afterwards, the execution status of each host write command is returned to the host system 290. the

图5是根据本发明范例实施例所图示的下达程序化指令的流程图。  FIG. 5 is a flowchart illustrating issuing a programmatic instruction according to an exemplary embodiment of the present invention. the

请参照图5,首先,在步骤S501中闪存储存装置200从主机系统290中接收主机写入指令。具体来说,在本范例实施例中,主机系统290是使用NCQ协议来传送多个主机写入指令(如图4A所述的2个主机写入指令)。因此,在 步骤S501中闪存储存装置200会先接收到主机系统290预计下达的多个主机写入指令。 Please refer to FIG. 5 , first, in step S501 , the flash storage device 200 receives a host write command from the host system 290 . Specifically, in this exemplary embodiment, the host system 290 uses the NCQ protocol to transmit multiple host write commands (2 host write commands as described in FIG. 4A ). Therefore, in step S501, the flash storage device 200 will first receive a plurality of host write commands expected to be issued by the host system 290.

接着,在步骤S503中内存管理单元208会依据所接收的主机写入指令所对应的逻辑地址来产生一下达指令顺序。具体来说,在本实施例中,当内存管理单元208使用NCQ协议从主机系统290中接收到多个主机写入指令时,内存管理单元208会依据主机写入指令中的逻辑地址来排序以决定预期的执行主机写入指令的顺序。值得一提的是,在本范例另一范例实施例中,内存管理单元208也可不重新排列所接收到主机写入指令的顺序,而以主机系统290原本下达主机写入指令的顺序来产生下达指令顺序。  Next, in step S503 , the memory management unit 208 generates an instruction sequence according to the logical address corresponding to the received host write instruction. Specifically, in this embodiment, when the memory management unit 208 receives multiple host write commands from the host system 290 using the NCQ protocol, the memory management unit 208 will sort according to the logical addresses in the host write commands to Determines the expected order in which host write commands are executed. It is worth mentioning that, in another exemplary embodiment of this example, the memory management unit 208 may not rearrange the sequence of the received host write commands, but generate and issue commands in the order in which the host system 290 originally issued the host write commands. order of instructions. the

在步骤S505中内存管理单元208会将所产生的下达指令顺序传送给主机系统。之后,在步骤S507中内存管理单元208会依据下达指令顺序一个接着一个地从主机系统290中接收此些主机写入指令与对应此些主机写入指令的写入数据。  In step S505 , the memory management unit 208 transmits the generated command order to the host system. Afterwards, in step S507 , the memory management unit 208 receives the host write commands and the write data corresponding to the host write commands from the host system 290 one by one according to the command order. the

之后,在步骤S509中内存管理单元208会向闪存芯片220下达快取程序化指令(例如,以“指令W1”、“实体地址”、“写入数据”与“指令W3”等字符串所组成程序化指令)。之后,在步骤S511中内存管理单元208会等候与接收闪存芯片220的确认信息,并且在步骤S513中判断是否已完成在步骤S501中主机系统290欲下达的所有主机写入指令。倘若在步骤S513中判断还未完成在步骤S501中主机系统290欲下达的所有主机写入指令时,则执行步骤S507继续接收下一个主机写入指令。  Afterwards, in step S509, the memory management unit 208 will issue a cache programming instruction to the flash memory chip 220 (for example, composed of character strings such as "command W1", "physical address", "write data" and "command W3") programmatic instructions). Afterwards, in step S511, the memory management unit 208 waits for and receives confirmation information from the flash memory chip 220, and in step S513 determines whether all host write commands to be issued by the host system 290 in step S501 have been completed. If it is determined in step S513 that all host write commands to be issued by the host system 290 in step S501 have not been completed, then step S507 is executed to continue receiving the next host write command. the

倘若在步骤S513中判断已完成在步骤S501中主机系统290欲下达的所有主机写入指令时,则在步骤S515中判断闪存芯片220是否处于实际忙碌状态。倘若在步骤S515中判断闪存芯片220非处于实际忙碌状态,则执行步骤S517响应主机系统290并结束图5的流程,反之,则继续执行步骤S511。  If it is determined in step S513 that all host write commands to be issued by the host system 290 in step S501 have been completed, then in step S515 it is determined whether the flash memory chip 220 is actually busy. If it is determined in step S515 that the flash memory chip 220 is not actually busy, then execute step S517 to respond to the host system 290 and end the process of FIG. 5 , otherwise, continue to execute step S511. the

基于上述,在使用NCQ协议来接收来自于主机系统290的多个主机写入指令的例子中,内存管理单元208会于此批依据NCQ协议所下达的所有主机 写入指令都执行完成后,向主机系统290回报所有主机写入指令的执行状态(例如,是否有发生程序化错误)。特别是,内存管理单元208会等候闪存芯片220从执行最后一个主机写入指令的实际忙碌状态回复为待命状态时,才向主机系统290回报所有主机写入指令的执行状态。  Based on the above, in the example of using the NCQ protocol to receive a plurality of host write commands from the host system 290, the memory management unit 208 will write to the batch after all the host write commands issued according to the NCQ protocol are completed. The host system 290 reports the execution status of all host write commands (for example, whether there is a programming error). In particular, the memory management unit 208 waits for the flash memory chip 220 to return to the standby state from the actual busy state of executing the last host write command before reporting the execution status of all host write commands to the host system 290 . the

综上所述,本发明范例实施例的下达程序化指令方法仅使用快取程序化指令来对闪存芯片程序化,由此可大幅缩短执行主机写入指令的时间。此外,本发明范例实施例的下达程序化指令方法更利用NCQ协议来于主机系统与闪存储存装置之间传送指令,由此可避免主机系统无法正确地判断每一个主机写入指令的实际执行状态。再者,在上述范例实施例中,更利用NCQ协议来依据主机写入指令所欲写入的逻辑地址来重新排列下达主机写入指令的顺序,由此可更缩短执行主机写入指令所需的时间。  To sum up, the method for issuing a programming command according to the exemplary embodiment of the present invention only uses the cache programming command to program the flash memory chip, thereby greatly shortening the execution time of the host write command. In addition, the method for issuing programmed commands in the exemplary embodiment of the present invention further utilizes the NCQ protocol to transmit commands between the host system and the flash storage device, thereby preventing the host system from being unable to correctly determine the actual execution status of each host write command . Furthermore, in the above-mentioned exemplary embodiment, the NCQ protocol is used to rearrange the order of issuing the host write commands according to the logical addresses to be written by the host write commands, thereby shortening the time required for executing the host write commands. time. the

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。  Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention. the

Claims (12)

1. method of flash memory being assigned programmed instructions; The data that are used for coming from a host computer system write to a flash chip; Wherein said flash chip comprises one first buffer zone, one second buffer zone and a storage area, and the said method of assigning programmed instructions comprises:
One flash controller is provided;
Use a primary instruction ordering agreement from said host computer system, to receive a plurality of main frames by said flash controller and write instruction;
Write instruction transmission one by said flash controller according to said main frame and assign instruction sequences to said host computer system; And
From said host computer system, receive said main frame in order and write instruction and write a plurality of data that write of instruction according to the said instruction sequences of assigning with corresponding said main frame; And assign a fast program fetch instruction so that the said write data are write in the said flash chip to said flash chip respectively
Wherein from said host computer system, receive said main frame in order and write instruction and write the said write data of instruction, and assign said fast program fetch instruction to said flash chip respectively and comprise with the step that the said write data are write in the said flash chip with corresponding said main frame according to the said instruction sequences of assigning:
From said host computer system, receiving said main frame writes one first main frame among the instruction and writes among instruction and the said write data corresponding said first main frame and write one first of instruction and write data;
Assign said fast program fetch instruction by said flash controller to said flash chip and write data transmission to said first buffer zone with said first, wherein said first writes data is moved to said second buffer zone and from said second buffer zone from said first buffer zone and is written into said storage area;
From said host computer system, receiving said main frame writes one second main frame among the instruction and writes among instruction and the said write data corresponding said second main frame and write one second of instruction and write data; And
Assign said fast program fetch instruction to write data transmission to said first buffer zone by said flash controller to said flash chip with said second; Wherein said second writes data is moved to said second buffer zone and from said second buffer zone from said first buffer zone and is written into said storage area
Wherein write data and moved to said second buffer zone from said first buffer zone when said first, said second writes data is transferred in said first buffer zone.
2. according to claim 1 flash memory is assigned the method for programmed instructions, wherein writes instruction according to said main frame and transmit the said instruction sequences of assigning and comprise for the step of said host computer system by said flash controller:
Assign the order that said main frame writes instruction by said flash controller according to said host computer system and decide the said instruction sequences of assigning; And
The said instruction sequences of assigning is transmitted said host computer system.
3. according to claim 1 flash memory is assigned the method for programmed instructions, wherein writes instruction according to said main frame and transmit the said instruction sequences of assigning and comprise for the step of said host computer system by said flash controller:
Decide the said instruction sequences of assigning by said flash controller according to a plurality of logical addresses that the said main frame of correspondence writes instruction; And
The said instruction sequences of assigning is transmitted said host computer system.
4. according to claim 1 flash memory is assigned the method for programmed instructions, also comprises:
The executing state that the corresponding said main frame of transmission writes instruction after said flash controller is accomplished all said main frames to write instruction is to said host computer system.
5. the method for flash memory being assigned programmed instructions according to claim 4; When wherein among corresponding said main frame writes the executing state of instruction, comprising at least one sequencing mistake, then receive said main frame again from said host computer system and write that the main frame of corresponding said at least one sequencing mistake writes instruction and writes data among the instruction by said flash controller.
6. the method for flash memory being assigned programmed instructions according to claim 4; When wherein among corresponding said main frame writes the executing state of instruction, comprising at least one sequencing mistake, then receive all said main frames again from said host computer system and write instruction and said write data by said flash controller.
7. system of flash memory being assigned programmed instructions; The data that are used for coming from a host computer system write to a flash chip; Wherein said flash chip comprises one first buffer zone, one second buffer zone and a storage area, and the said system that flash memory is assigned programmed instructions comprises:
First module writes instruction in order to use a primary instruction ordering agreement from said host computer system, to receive a plurality of main frames;
Second module is assigned instruction sequences to said host computer system in order to write instruction transmission one according to said main frame; And
Three module; In order to from said host computer system, to receive said main frame in order and write instruction and write a plurality of data that write of instruction with corresponding said main frame according to the said instruction sequences of assigning; And assign a fast program fetch instruction so that the said write data are write in the said flash chip to said flash chip respectively
Wherein said three module receives said main frame and writes one first main frame among the instruction and write among instruction and the said write data corresponding said first main frame and write one first of instruction and write data from said host computer system; Assign said fast program fetch instruction to said flash chip and write data transmission to said first buffer zone with said first, wherein said first writes data is moved to said second buffer zone and from said second buffer zone from said first buffer zone and is written into said storage area;
Wherein said three module receives said main frame and writes one second main frame among the instruction and write among instruction and the said write data corresponding said second main frame and write one second of instruction and write data from said host computer system,
Wherein said three module is assigned said fast program fetch instruction to write data transmission to said first buffer zone with said second to said flash chip; Wherein said second writes data is moved to said second buffer zone and from said second buffer zone from said first buffer zone and is written into said storage area; And write data and moved to said second buffer zone from said first buffer zone when said first, said second writes data is transferred in said first buffer zone.
8. according to claim 7 flash memory is assigned the system of programmed instructions, wherein said second module is assigned order that said main frame writes instruction according to said host computer system and is decided and saidly assign instruction sequences and the said instruction sequences of assigning is transmitted said host computer system.
9. according to claim 7 flash memory is assigned the system of programmed instructions, a plurality of logical addresses that wherein said second module writes instruction according to the said main frame of correspondence decide saidly to be assigned instruction sequences and the said instruction sequences of assigning is transmitted said host computer system.
10. according to claim 7 flash memory is assigned the system of programmed instructions, also comprises:
Four module, the executing state that writes instruction in order to the corresponding said main frame of transmission after accomplishing all said main frames to write instruction is given said host computer system.
11. according to claim 10 flash memory is assigned the system of programmed instructions, also comprises:
The 5th module; When comprising at least one sequencing mistake among the executing state that writes instruction when corresponding said main frame, from said host computer system, receive said main frame again and write that the main frame of corresponding said at least one sequencing mistake writes instruction and writes data among the instruction.
12. according to claim 10 flash memory is assigned the system of programmed instructions, also comprises:
The 6th module when comprising at least one sequencing mistake among the executing state that writes instruction when corresponding said main frame, receives said main frame again and writes instruction and said write data from said host computer system.
CN2009101721618A 2009-09-10 2009-09-10 Method and system for issuing programmatic instructions to flash memory Active CN102023811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101721618A CN102023811B (en) 2009-09-10 2009-09-10 Method and system for issuing programmatic instructions to flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101721618A CN102023811B (en) 2009-09-10 2009-09-10 Method and system for issuing programmatic instructions to flash memory

Publications (2)

Publication Number Publication Date
CN102023811A CN102023811A (en) 2011-04-20
CN102023811B true CN102023811B (en) 2012-11-28

Family

ID=43865147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101721618A Active CN102023811B (en) 2009-09-10 2009-09-10 Method and system for issuing programmatic instructions to flash memory

Country Status (1)

Country Link
CN (1) CN102023811B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707771A (en) * 2012-04-01 2012-10-03 宜鼎国际股份有限公司 Embedded memory module and host board inserted therein
TWI544487B (en) * 2015-01-22 2016-08-01 慧榮科技股份有限公司 Data storage device and flash memory control method
CN107632902B (en) * 2016-07-18 2021-03-30 深圳衡宇芯片科技有限公司 Method, controller and storage system for replying data in case of programming failure
US20200073595A1 (en) * 2018-09-02 2020-03-05 Silicon Motion Inc. Flash memory controller capable of improving IOPS performance and corresponding method
TWI808229B (en) * 2019-07-29 2023-07-11 宜鼎國際股份有限公司 System and method capable of controlling electronic apparatus to execute program
US11392499B2 (en) * 2020-09-18 2022-07-19 Kioxia Corporation Dynamic buffer caching of storage devices

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6076137A (en) * 1997-12-11 2000-06-13 Lexar Media, Inc. Method and apparatus for storing location identification information within non-volatile memory devices
CN1841297A (en) * 2005-04-01 2006-10-04 三星电子株式会社 Flash memory and processing system including flash memory
CN1914627A (en) * 2004-02-03 2007-02-14 松下电器产业株式会社 Memory card, data processor, memory card control method and memory card setting method
CN101196850A (en) * 2007-12-28 2008-06-11 祥硕科技股份有限公司 Data access integration method and its system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6076137A (en) * 1997-12-11 2000-06-13 Lexar Media, Inc. Method and apparatus for storing location identification information within non-volatile memory devices
CN1914627A (en) * 2004-02-03 2007-02-14 松下电器产业株式会社 Memory card, data processor, memory card control method and memory card setting method
CN1841297A (en) * 2005-04-01 2006-10-04 三星电子株式会社 Flash memory and processing system including flash memory
CN101196850A (en) * 2007-12-28 2008-06-11 祥硕科技股份有限公司 Data access integration method and its system

Also Published As

Publication number Publication date
CN102023811A (en) 2011-04-20

Similar Documents

Publication Publication Date Title
TWI424435B (en) Method for giving program commands to flash memory chips, and controller and storage system using the same
US9183143B2 (en) Memory device that specifies a size of a segment of write data
TWI409633B (en) Flash memory storage device, controller thereof, and method for programming data
TWI435215B (en) Method for giving read commands and reading data, and controller and storage system using the same
US8812784B2 (en) Command executing method, memory controller and memory storage apparatus
TWI454906B (en) Data read method, and flash memory controller and storage system using the same
US8812776B2 (en) Data writing method, and memory controller and memory storage device using the same
CN103377129B (en) Data writing method, memory controller and memory storage device
TWI446349B (en) Non-volatile memory access method and system, and non-volatile memory controller
CN102023811B (en) Method and system for issuing programmatic instructions to flash memory
TWI421870B (en) Data writing method for a flash memory, and controller and storage system using the same
CN102043725B (en) Data writing method for flash memory and its controller and storage system
CN102129353B (en) Data writing system and data writing method
TWI494756B (en) Method for giving read commands, flash memory controller and flash memory storage system using the same
CN102012788B (en) Issuing read command and data read method, flash memory controller and storage system
CN104252317B (en) Data writing method, memory controller and memory storage device
CN103914391A (en) Data reading method, memory controller and memory storage device
CN102890653B (en) Instruction execution method, memory controller and memory storage device
CN102999437B (en) Data transfer method, memory controller and memory storage device
CN102890617B (en) Memory control method, memory controller and memory storage device
CN102193870B (en) Memory management and write-in method, memory controller and memory storage system
US9152348B2 (en) Data transmitting method, memory controller and data transmitting system
CN104731710A (en) Memory management method, memory control circuit unit and memory storage device
TWI813362B (en) Partial erasing management method, memory storage device and memory control circuit unit
CN105573661B (en) Data writing method, memory storage device and memory control circuit unit

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