Movatterモバイル変換


[0]ホーム

URL:


CN101196851B - Data management method of flash memory - Google Patents

Data management method of flash memory
Download PDF

Info

Publication number
CN101196851B
CN101196851BCN2006101618774ACN200610161877ACN101196851BCN 101196851 BCN101196851 BCN 101196851BCN 2006101618774 ACN2006101618774 ACN 2006101618774ACN 200610161877 ACN200610161877 ACN 200610161877ACN 101196851 BCN101196851 BCN 101196851B
Authority
CN
China
Prior art keywords
data
flash memory
buffer
temporary storage
address
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
CN2006101618774A
Other languages
Chinese (zh)
Other versions
CN101196851A (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.)
Silicon Motion Inc
Original Assignee
Silicon Motion Inc
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 Silicon Motion IncfiledCriticalSilicon Motion Inc
Priority to CN2006101618774ApriorityCriticalpatent/CN101196851B/en
Publication of CN101196851ApublicationCriticalpatent/CN101196851A/en
Application grantedgrantedCritical
Publication of CN101196851BpublicationCriticalpatent/CN101196851B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

A data management method for flash memory includes reading a temporary storage block data to external buffer, executing a write command and writing the temporary storage block data with a target block address to buffer of flash memory when data transmitted from host is transmitted for the first time and the write address of the data is temporary storage block address. When the data in the buffer of the flash memory is in a state of not fully occupying the buffer, writing the data into a temporary storage block; the method for writing the temporary storage block comprises the steps of using the address changing instruction or executing a writing instruction, and then rewriting data of the external buffer into the buffer of the flash memory so as to write the data into the temporary storage block.

Description

Translated fromChinese
闪存的数据管理方法Data management method of flash memory

技术领域technical field

本发明涉及一种内存的数据管理,且特别是关于使用一数据的写入方法以管理闪存的数据。The present invention relates to a kind of data management of memory, and especially relates to using a data writing method to manage the data of flash memory.

背景技术Background technique

闪存为一存储系统,具有高存取速度与高稳定性的优点。闪存为一非挥发性内存,也就是说,数据一旦储存到闪存之后,就不需要电源以保存数据。Flash memory is a storage system with advantages of high access speed and high stability. Flash memory is a non-volatile memory, that is, once data is stored in flash memory, it does not require power to save the data.

闪存数据存取架构是以块(block)为单位,每一块再分为页(page)或扇区(section)。当数据需要写入至闪存,需执行一数据写入指令,将外部缓冲区内的数据写入至闪存的缓冲器,然后再从闪存的缓冲器写入至闪存内。在NOP(number of program,即闪存的块只能存取一次)为一的条件下,页内的数据只能写入一次,在应用上,容易造成数据未能占满闪存的块或储存数据不连续的缺点。如果当数据未占满闪存的块或数据储存不连续,则会造成闪存的储存效能降低。数据重整可以解决这个问题,但是相对的必须花费大量地时间来重新整理闪存内的数据。其中,在外部缓冲器中指派一目的块地址给此数据之后,如果要改变此数据的目的块地址,在目前闪存的架构限制下,无法将闪存的缓冲区内的数据改变其写入的地址,或将数据读出闪存的缓冲区之外。而且,此架构将更不利于加速资料重新整理。The data access architecture of flash memory is based on blocks, and each block is further divided into pages or sections. When data needs to be written into the flash memory, a data write command needs to be executed to write the data in the external buffer into the buffer of the flash memory, and then write from the buffer of the flash memory into the flash memory. Under the condition that the NOP (number of program, that is, the block of flash memory can only be accessed once) is one, the data in the page can only be written once. In application, it is easy to cause the data to not occupy the block of flash memory or store data Discontinuous disadvantages. If the data does not fill up the blocks of the flash memory or the data storage is discontinuous, the storage performance of the flash memory will decrease. Data reorganization can solve this problem, but it must spend a lot of time to reorganize the data in the flash memory. Among them, after assigning a destination block address to the data in the external buffer, if you want to change the destination block address of the data, under the limitation of the current flash memory architecture, the data in the buffer memory of the flash memory cannot be changed to its written address , or read data out of the flash memory buffer. Also, this architecture would be less conducive to speeding up data reorganization.

因此需要一个新的闪存的数据管理方法以避免因数据分散或数据不连续而必须花费大量的时间来重新整理闪存内的数据,并减少对外部缓冲器的需求,以使闪存储存数据的能力最佳化。Therefore, a new flash memory data management method is needed to avoid the need to spend a lot of time to rearrange the data in the flash memory due to data dispersion or data discontinuity, and reduce the need for external buffers to maximize the ability of flash memory to store data. optimization.

发明内容Contents of the invention

本发明所要解决的技术问题在于,提供一种闪存的数据管理方法,用以克服因为存储数据分散或数据不连续而必须花费大量地时间来重新整理闪存内的数据,以提高闪存储存数据的能力。The technical problem to be solved by the present invention is to provide a data management method for flash memory to overcome the need to spend a lot of time rearranging the data in the flash memory due to scattered or discontinuous data storage, so as to improve the ability of flash memory to store data .

为了实现上述的目的,本发明提供了一种闪存的数据管理方法,此闪存的数据管理方法包含下列步骤:(a)写入一外部缓冲器的一数据至一闪存的一缓冲器内,其中,闪存的缓冲器内的数据具有一目的块地址;以及(b)检查存放于闪存的该缓冲器内的数据,若数据未占满闪存的缓冲器,则使用一改变地址指令,用于指派一暂存块地址给该闪存的该缓冲器内的数据,以将此数据写入至该暂存块。In order to achieve the above object, the present invention provides a data management method of flash memory, the data management method of this flash memory comprises the following steps: (a) write a data of an external buffer into a buffer of a flash memory, wherein , the data in the buffer of the flash memory has a destination block address; and (b) check the data stored in the buffer of the flash memory, if the data does not occupy the buffer of the flash memory, then use a change address instruction for assigning A temporary storage block address is given to the data in the buffer of the flash memory, so that the data is written into the temporary storage block.

为了实现上述目的,本发明还提出了一种闪存的数据管理方法,此闪存的数据管理方法包含下列步骤:(a)写入一外部缓冲器的一数据至一闪存的一缓冲器内,其中,闪存的缓冲器内的数据具有一目的块地址;(b)检查存放于闪存的缓冲器内的数据,当数据未占满闪存的缓冲器,则执行一写入指令,其中,写入指令会删掉闪存的缓冲器内的数据,并且重新指派一地址,该地址为一暂存块地址;(c)写入外部缓冲器的数据至闪存的缓冲器内,其中,闪存的缓冲器内的数据具有暂存块地址;以及(d)根据暂存块地址将数据写入至一暂存块。In order to achieve the above object, the present invention also proposes a data management method of flash memory, the data management method of this flash memory includes the following steps: (a) write a data of an external buffer to a buffer of a flash memory, wherein , the data in the buffer of the flash memory has a destination block address; (b) check the data stored in the buffer of the flash memory, and when the data does not occupy the buffer of the flash memory, execute a write command, wherein the write command The data in the buffer of the flash memory will be deleted, and an address will be reassigned, which is a temporary block address; (c) the data written into the external buffer will be in the buffer of the flash memory, wherein, in the buffer of the flash memory The data in has a temporary storage block address; and (d) writing data to a temporary storage block according to the temporary storage block address.

为了实现上述目的,本发明还提出了一种闪存的数据管理方法,此闪存的数据管理方法包含下列步骤:(a)一主机决定一数据传输的一位置,其中,此位置为一原始目的块地址;(b)等待主机将数据传送到一外部缓冲器;(c)判断外部缓冲器的数据是否为第一次传输,若外部缓冲器的数据为第一次传输,则判断主机指派的数据传输的位置是否指向一暂存块地址,当主机指派的数据传输的位置指向为暂存块地址,则读取暂存块地址内的一暂存块数据至外部缓冲器,接着,执行一写入指令,用于重新指派一地址,此地址为一新的目的块地址;(d)写入外部缓冲器内的暂存块数据至一闪存的一缓冲器内;以及(e)写入外部缓冲器内的从主机传输过来的数据至闪存的缓冲器内;其中,闪存的缓冲器内的数据具有原始目的块地址或新的目的块地址。In order to achieve the above object, the present invention also proposes a data management method of flash memory. The data management method of this flash memory includes the following steps: (a) a host computer determines a location for data transmission, where this location is an original destination block address; (b) wait for the host to transmit data to an external buffer; (c) judge whether the data in the external buffer is the first transmission, if the data in the external buffer is the first transmission, then judge the data assigned by the host Whether the transmission position points to a temporary storage block address, when the data transmission position assigned by the host points to the temporary storage block address, read a temporary storage block data in the temporary storage block address to the external buffer, and then execute a write In order to assign an address again, this address is a new target block address; (d) write the temporary storage block data in the external buffer to a buffer of a flash memory; and (e) write the external The data in the buffer is transferred from the host to the buffer of the flash memory; wherein, the data in the buffer of the flash memory has an original destination block address or a new destination block address.

当外部缓冲器的数据不是第一次传输,则直接执行步骤(e),以及当外部缓冲器的数据为第一次传输且当主机指派的数据传输的位置不是指向暂存块地址,执行一演算处理,接着,直接执行步骤(e),此演算处理包含整理外部缓冲器的数据,以使此数据为连续性的数据。When the data in the external buffer is not transmitted for the first time, then directly perform step (e), and when the data in the external buffer is transmitted for the first time and when the location of the data transmission assigned by the host is not pointing to the address of the temporary storage block, perform a Calculation processing, then, step (e) is directly performed, and this calculation processing includes arranging the data in the external buffer so that the data is continuous data.

本发明具有以下有益的效果:利用本发明提供的闪存的数据管理方法,能够克服因为存储数据分散或数据不连续而必须花费大量地时间来重新整理闪存内的数据,以提高闪存储存数据的能力。The present invention has the following beneficial effects: Utilizing the data management method of the flash memory provided by the present invention can overcome the need to spend a lot of time rearranging the data in the flash memory due to the scattered or discontinuous data stored, so as to improve the ability of the flash memory to store data .

为使能更进一步了解本发明的特征及技术内容,请参阅以下有关本发明的详细说明与附图,然而附图仅提供参考与说明用,并非用来对本发明加以限制。In order to further understand the features and technical content of the present invention, please refer to the following detailed description and drawings related to the present invention. However, the drawings are provided for reference and illustration only, and are not intended to limit the present invention.

附图说明Description of drawings

图1为本发明一较佳实施例的流程示意图。Fig. 1 is a schematic flow chart of a preferred embodiment of the present invention.

图2为本发明另一较佳实施例的流程示意图。Fig. 2 is a schematic flow chart of another preferred embodiment of the present invention.

图3为本发明另一较佳实施例的流程示意图。Fig. 3 is a schematic flow chart of another preferred embodiment of the present invention.

图4为应用本发明的图1或图2的流程示意图。Fig. 4 is a schematic flow chart of Fig. 1 or Fig. 2 applying the present invention.

其中,附图标记:Among them, reference signs:

100、200、300、400-闪存的数据管理方法100, 200, 300, 400 - data management methods for flash memory

102~118、202~220、302~344、402~434-步骤102~118, 202~220, 302~344, 402~434-steps

具体实施方式Detailed ways

本发明的闪存的数据管理方法,为若闪存的缓冲器内的数据为满的状态,则将此数据写入目的块,当闪存的缓冲器内的数据为未满的状态,则将此数据写入至暂存块。本发明的闪存的另一数据管理方法,为若主机传送过来的数据为第一次传输,且此数据的写入地址指向为暂存块地址,则读取一暂存块数据至外部缓冲器后,执行写入指令,且写入此具有一目的块地址的暂存块数据至闪存的缓冲器。因此,可降低闪存因为数据分散或数据不连续而必须花费大量地时间来重新整理闪存内的数据的情形,并减少对外部缓冲器的需求,以提高闪存储存数据的能力。下面将以图及详细说明清楚说明本发明的精神,如熟悉此技术的人员在了解本发明的较佳实施例后,当可由本发明所揭示的技术,加以改变及修饰,其并不脱离本发明的精神与范围。The data management method of flash memory of the present invention, if the data in the buffer of flash memory is full state, then write this data into target block, when the data in the buffer of flash memory is not full state, then write this data Write to scratch block. Another data management method of the flash memory of the present invention is that if the data transmitted by the host is the first transmission, and the write address of this data points to the temporary storage block address, then read a temporary storage block data to the external buffer Afterwards, execute the write command, and write the temporary block data with a target block address to the buffer of the flash memory. Therefore, it can reduce the situation that the flash memory must spend a lot of time to rearrange the data in the flash memory due to scattered or discontinuous data, and reduce the demand for external buffers, so as to improve the ability of the flash memory to store data. The spirit of the present invention will be clearly described below with drawings and detailed descriptions. After those skilled in the art understand the preferred embodiments of the present invention, they can be changed and modified by the technology disclosed in the present invention without departing from the present invention. The spirit and scope of the invention.

图1为本发明一较佳实施例的流程示意图。首先,步骤102以及步骤104使用一数据写入指令与数据地址(例如,使用5周期以传输此具有目的块地址的数据),执行写入一外部缓冲器的一数据至一闪存的一缓冲器内(步骤106),且此数据具有一目的块地址。步骤108为检查存放于闪存的缓冲器内的数据,若数据未占满闪存的缓冲器,则使用一改变地址指令(步骤110),用于指派一暂存块地址(步骤112)给闪存的缓冲器内的数据,以将数据写入至闪存的一暂存块(步骤114)。步骤116以及步骤118完成数据的写入。Fig. 1 is a schematic flow chart of a preferred embodiment of the present invention. First,step 102 andstep 104 use a data write command and data address (for example, use 5 cycles to transmit the data with the target block address), execute a data written into an external buffer to a buffer of a flash memory (step 106), and the data has a destination block address.Step 108 is to check the data stored in the buffer of the flash memory, if the data does not occupy the buffer of the flash memory, then use a change address command (step 110), for assigning a temporary storage block address (step 112) to the flash memory The data in the buffer is written to a scratch block of the flash memory (step 114).Step 116 andstep 118 finish writing data.

图2为本发明一较佳实施例的流程示意图。首先,步骤202以及步骤204使用一数据写入指令与数据地址(例如,使用5周期以传输此具有目的块地址的数据),执行写入一外部缓冲器的一数据至一闪存的一缓冲器内(步骤206),且此数据具有一目的块地址。步骤208为检查存放于闪存的缓冲器内的数据,当数据未占满闪存的缓冲器,步骤210则执行一写入指令,其中,写入指令会删掉闪存的缓冲器内的数据,并且重新指派一地址,该地址为一暂存块地址(步骤212)。步骤214为重新写入外部缓冲器的数据至闪存的缓冲器内,其中,闪存的缓冲器内的数据具有此暂存块地址。步骤216则根据暂存块地址将此数据写入至闪存的一暂存块。步骤218以及步骤220完成数据的写入。Fig. 2 is a schematic flow chart of a preferred embodiment of the present invention. First, step 202 and step 204 use a data write command and data address (for example, use 5 cycles to transmit the data with the target block address), execute a data written into an external buffer to a buffer of a flash memory (step 206), and the data has a destination block address. Step 208 is to check the data stored in the buffer of the flash memory. When the data does not occupy the buffer of the flash memory, step 210 executes a write command, wherein the write command will delete the data in the buffer of the flash memory, and Re-assign an address, which is a scratch block address (step 212). Step 214 is to rewrite the data in the external buffer into the buffer of the flash memory, wherein the data in the buffer of the flash memory has the temporary block address. Step 216 writes the data into a temporary storage block of the flash memory according to the temporary storage block address. Step 218 and step 220 finish writing data.

图3为本发明另一较佳实施例的流程示意图。步骤304为一主机决定一数据传输的一位置,其中,此位置为一原始目的块地址。步骤306为等待主机将数据传送到一外部缓冲器。步骤308判断外部缓冲器的数据是否为第一次传输,当外部缓冲器的数据为第一次传输,则在步骤310判断主机指派的数据传输的位置是否指向为一暂存块地址,步骤314当主机指派的数据传输的位置指向为暂存块地址,则读取暂存块地址内的一暂存块数据至外部缓冲器,接着,步骤316以及步骤318执行一写入指令,用于重新指派一地址,此地址为一新的目的块地址。步骤320写入外部缓冲器内的暂存块数据至一闪存的一缓冲器内。步骤322写入外部缓冲器内的从主机传输过来的数据至闪存的缓冲器内。其中,闪存的缓冲器内的数据具有原始目的块地址或新的目的块地址。Fig. 3 is a schematic flow chart of another preferred embodiment of the present invention.Step 304 determines a location for a data transfer for a host, wherein the location is an original destination block address.Step 306 is to wait for the host to transmit data to an external buffer.Step 308 judges whether the data of external buffer is transmitted for the first time, when the data of external buffer is transmitted for the first time, then instep 310 judge whether the position of the data transmission that host computer assigns points to as a temporary storage block address,step 314 When the position of the data transmission assigned by the host is pointed to as the temporary storage block address, then read a temporary storage block data in the temporary storage block address to the external buffer, and then,step 316 andstep 318 execute a write command for re- An address is assigned, and the address is a new destination block address.Step 320 writes the temporary block data in the external buffer to a buffer in a flash memory.Step 322 writes the data transmitted from the host in the external buffer into the buffer of the flash memory. Wherein, the data in the buffer of the flash memory has an original destination block address or a new destination block address.

更详细的说,在步骤308中,当外部缓冲器的数据不是第一次传输,则直接执行步骤322的写入外部缓冲器内的从主机传输过来的数据至闪存的缓冲器内。或,在步骤308当外部缓冲器的数据为第一次传输且在步骤310当主机指派的数据传输的位置不是指向暂存块地址,则在步骤312中执行一演算处理,演算处理包含整理外部缓冲器的数据,以使数据为连续性的数据。接着,直接执行步骤322的写入外部缓冲器内的从主机传输过来的数据至闪存的缓冲器内。More specifically, instep 308, when the data in the external buffer is not transmitted for the first time,step 322 of writing the data transmitted from the host into the external buffer into the buffer of the flash memory is directly executed. Or, instep 308, when the data in the external buffer is the first transmission and instep 310, when the location of the data transmission assigned by the host is not pointing to the address of the temporary storage block, then instep 312, a calculation process is performed, and the calculation process includes finishing the external buffer. The data of the buffer, so that the data is continuous data. Then, directly executestep 322 of writing the data transmitted from the host into the external buffer into the buffer of the flash memory.

在写入外部缓冲器内的从主机传输过来的数据至闪存的缓冲器内后,步骤324检查主机的数据传输至外部缓冲器的写入动作是否已经停止,当数据停止从主机写入至外部缓冲器,则步骤326检查存放于闪存的缓冲器内的数据,当数据占满闪存的缓冲器,则执行步骤330,写入具有目的块地址的数据至一目的块,其中,此目的块地址为原始目的块地址或新的目的块地址。步骤326检查存放于闪存的缓冲器内的数据,当数据未占满闪存的缓冲器,则在步骤328做一处理,以指派一暂存块给数据,并在步骤329将数据写入至暂存块,步骤332完成数据的写入至闪存内以及步骤334结束此数据的写入至闪存内。After writing the data transmitted from the host into the buffer of the flash memory in the external buffer,step 324 checks whether the writing action of the data transmission from the host to the external buffer has stopped, when the data stops being written from the host to the external buffer, thenstep 326 checks the data stored in the buffer of the flash memory, and when the data fills the buffer of the flash memory, then executesstep 330 to write data with the destination block address to a destination block, wherein the destination block address It is the original destination block address or the new destination block address.Step 326 checks the data stored in the buffer of the flash memory, and when the data does not occupy the buffer of the flash memory, then do a process instep 328 to assign a temporary storage block to the data, and write the data to the temporary storage instep 329 block,step 332 completes the writing of data into the flash memory andstep 334 ends the writing of the data into the flash memory.

步骤328,为应用本发明的实施例所提出的将未占满闪存的缓冲器的数据移动至暂存块的方法。写入暂存块的方法包含如图1所示,在数据未占满闪存的缓冲器的情况下,使用一改变地址指令,用于指派一暂存块地址给闪存的缓冲器内的数据,以将数据写入至暂存块。或如图2所示,在数据未占满闪存的缓冲器的情况下,执行一写入指令,其中,写入指令会删掉闪存的缓冲器内的数据,并且重新指派一地址,此地址为一暂存块地址;以及写入外部缓冲器的数据至闪存的缓冲器内,其中,闪存的缓冲器内的资料具有暂存块地址,并根据暂存块地址将数据写入至暂存块。Step 328 is to apply the method proposed by the embodiment of the present invention to move the data in the buffer that is not full of the flash memory to the temporary storage block. The method for writing the temporary storage block includes as shown in Figure 1, under the situation that the buffer of the flash memory is not fully occupied by the data, using a change address instruction for assigning a temporary storage block address to the data in the buffer of the flash memory, to write data to the scratch block. Or as shown in Figure 2, under the situation that data does not occupy the buffer of flash memory, execute a write command, wherein, write command can delete the data in the buffer of flash memory, and reassign an address, this address is a temporary storage block address; and the data written into the external buffer is in the buffer of the flash memory, wherein the data in the buffer of the flash memory has a temporary storage block address, and the data is written into the temporary storage according to the temporary storage block address piece.

在写入外部缓冲器内的从主机传输过来的数据至闪存的缓冲器内后,步骤324检查主机的数据传输至外部缓冲器的写入动作是否已经停止,当数据还未停止从主机写入至外部缓冲器,步骤336检查存放于闪存的缓冲器内的数据,当数据占满闪存的缓冲器,步骤338则根据目的块地址,写入数据至一目的块。步骤340为完成数据写入至目的块,在步骤342中,闪存执行一写入指令,以及步骤344累加目的块地址(例如,将上次写入地址累加)之后,回到步骤306并执行上述步骤。其中,目的块地址为原始目的块地址或新的目的块地址。After writing the data transmitted from the host in the external buffer to the buffer of the flash memory,step 324 checks whether the writing action of the data transmission of the host to the external buffer has stopped, when the data has not stopped writing from the host To the external buffer, step 336 checks the data stored in the buffer of the flash memory, when the data fills the buffer of the flash memory,step 338 writes the data to a target block according to the address of the target block. Step 340 is to complete the writing of data to the target block. Instep 342, the flash memory executes a write command, and afterstep 344 accumulates the address of the target block (for example, the last write address is accumulated), it returns to step 306 and executes the above-mentioned step. Wherein, the destination block address is an original destination block address or a new destination block address.

在检查主机的数据传输至外部缓冲器的写入动作是否已经停止,当数据还未停止从主机写入至外部缓冲器,步骤336检查存放于闪存的缓冲器内的数据,当数据未占满闪存的缓冲器,则回到步骤322的写入外部缓冲器内的从主机传输过来的数据至闪存的缓冲器内。Check whether the data transmission of the host to the external buffer has stopped, when the data has not stopped writing from the host to the external buffer, step 336 checks the data stored in the buffer of the flash memory, when the data is not full The buffer of the flash memory returns to thestep 322 of writing the data transmitted from the host into the external buffer into the buffer of the flash memory.

图4为应用本发明的实施例的流程示意图。在流程示意图400中,步骤404为一主机决定一数据传输的一位置(例如,一连续性数据),其中,此位置为一目的块地址。步骤406为等待主机将数据传送到一外部缓冲器。步骤408为判断外部缓冲器的数据是否为第一次传输,当外部缓冲器的数据为第一次传输,则步骤410对此数据执行一起头数据处理,起头数据处理用以简化此后数据的读取。步骤412为写入外部缓冲器的数据至一闪存的一缓冲器内,其中,该闪存的缓冲器内的数据具有一目的块地址。Fig. 4 is a schematic flow chart of an embodiment of the application of the present invention. In the flow diagram 400, step 404 is for a host to determine a location of a data transmission (eg, a continuous data), wherein the location is a destination block address. Step 406 is to wait for the host to transmit data to an external buffer. Step 408 is to judge whether the data of the external buffer is the first transmission, and when the data of the external buffer is the first transmission, then step 410 executes the data processing at the beginning of this data, and the data processing at the beginning is used to simplify the reading of the subsequent data Pick. Step 412 is to write the data of the external buffer into a buffer of a flash memory, wherein the data in the buffer of the flash memory has a destination block address.

在等待主机将数据传送到外部缓冲器后,判断外部缓冲器的数据是否为第一次传输,当该外部缓冲器的数据不是第一次传输,则直接执行步骤412的写入外部缓冲器的数据至闪存的缓冲器内。After waiting for the host computer to transmit data to the external buffer, judge whether the data of the external buffer is the first transmission, and when the data of the external buffer is not the first transmission, then directly execute the step 412 of writing the external buffer data into the buffer in flash memory.

步骤414为检查主机的数据传输至外部缓冲器的写入动作是否已经停止,当数据还未停止从主机写入至外部缓冲器,则在步骤426检查存放于闪存的缓冲器内的数据,当数据占满闪存的缓冲器,步骤428则会根据目的块地址将数据写入至一目的块。步骤430为完成数据写入至目的块,在步骤432中,闪存执行一写入指令,以及步骤434累加目的块地址(例如,将上次写入地址累加)之后,回到步骤406并执行上述步骤。Step 414 is to check whether the data transmission of the host to the external buffer has stopped. When the data has not stopped writing to the external buffer from the host, check the data stored in the buffer of the flash memory in step 426. The data fills up the buffer of the flash memory, and step 428 writes the data into a target block according to the target block address. Step 430 is to complete the writing of data to the target block. In step 432, the flash memory executes a write command, and after step 434 accumulates the address of the target block (for example, the last write address is accumulated), it returns to step 406 and executes the above-mentioned step.

当数据还未停止从主机写入至外部缓冲器,且在步骤426中,数据未占满闪存的缓冲器,则回到步骤406并执行上述步骤。When the data has not stopped being written from the host to the external buffer and in step 426, the data does not fill up the buffer of the flash memory, return to step 406 and perform the above steps.

步骤414检查主机的数据传输至外部缓冲器的写入动作是否已经停止,当数据停止从主机写入至外部缓冲器,则步骤416检查存放于闪存的缓冲器内的数据,当数据占满闪存的缓冲器,则执行步骤420,写入具有目的块地址的数据至一目的块。Step 414 checks whether the data transmission of the host to the external buffer has stopped. When the data stops being written from the host to the external buffer, then step 416 checks the data stored in the buffer of the flash memory. When the data fills the flash memory buffer, execute step 420 to write the data with the destination block address into a destination block.

当数据停止从主机写入至外部缓冲器,以及步骤416检查存放于闪存的缓冲器内的数据,当数据未占满闪存的缓冲器,则在步骤418做一处理,以指派一暂存块给数据,并在步骤419将数据写入至暂存块,步骤422完成数据的写入至闪存内以及步骤424结束此数据的写入至闪存内。When the data stops writing to the external buffer from the host, and step 416 checks the data stored in the buffer of the flash memory, when the data does not fill the buffer of the flash memory, then do a process in step 418 to assign a temporary storage block Give the data, and write the data to the temporary storage block in step 419, complete the writing of the data into the flash memory in step 422 and end the writing of the data into the flash memory in step 424.

步骤418为应用本发明的实施例所提出的将未占满闪存的缓冲器的数据移动至暂存块的方法。写入暂存块的方法包含如图1所示,在数据未占满闪存的缓冲器的情况下,使用一改变地址指令,用于指派一暂存块地址给闪存的缓冲器内的数据,以将数据写入至暂存块。或如图2所示,在数据未占满闪存的缓冲器的情况下,执行一写入指令,其中,写入指令会删掉闪存的缓冲器内的数据,并且重新指派一地址,此地址为一暂存块地址;以及写入外部缓冲器的数据至闪存的缓冲器内,其中,闪存的缓冲器内的资料具有暂存块地址,并根据暂存块地址将数据写入至暂存块。Step 418 is a method for moving the data in the buffer that is not full of the flash memory to the temporary storage block proposed by the embodiment of the present invention. The method for writing the temporary storage block includes as shown in Figure 1, under the situation that the buffer of the flash memory is not fully occupied by the data, using a change address instruction for assigning a temporary storage block address to the data in the buffer of the flash memory, to write data to the scratch block. Or as shown in Figure 2, under the situation that data does not occupy the buffer of flash memory, execute a write command, wherein, write command can delete the data in the buffer of flash memory, and reassign an address, this address is a temporary storage block address; and the data written into the external buffer is in the buffer of the flash memory, wherein the data in the buffer of the flash memory has a temporary storage block address, and the data is written into the temporary storage according to the temporary storage block address piece.

当然,本发明还可有其它多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的普通技术人员当可根据本发明做出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。Certainly, the present invention also can have other various embodiments, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these Corresponding changes and deformations should belong to the scope of protection of the appended claims of the present invention.

Claims (5)

Translated fromChinese
1.一种闪存的数据管理方法,使用于闪存的数据管理,其特征在于,该方法包含下列步骤:1. A data management method of flash memory, used for data management of flash memory, is characterized in that, the method comprises the following steps:(a)一主机决定一数据传输的一位置,其中,该位置为一原始目的地地址;(a) a host determines a location for a data transfer, where the location is an original destination address;(b)等待该主机将该数据传送到一外部缓冲器;(b) waiting for the host to transfer the data to an external buffer;(c)判断该外部缓冲器的该数据是否为第一次传输,若该外部缓冲器的该数据为第一次传输,则判断该主机指派的该数据传输的该位置是否指向为一暂存块地址,若该主机指派的该数据传输的该位置指向为该暂存块地址,则读取该暂存块地址内的一暂存块数据至该外部缓冲器,接着,执行一写入指令,用于重新指派一地址,该地址为一新的目的块地址;(c) judging whether the data of the external buffer is the first transmission, if the data of the external buffer is the first transmission, then judging whether the location of the data transmission assigned by the host is pointing to a temporary storage Block address, if the location of the data transmission assigned by the host computer points to the temporary storage block address, then read a temporary storage block data in the temporary storage block address to the external buffer, and then execute a write command , for reassigning an address, which is a new destination block address;(d)写入该外部缓冲器内的该暂存块数据至一闪存的一缓冲器内;以及(d) writing the scratch block data in the external buffer into a buffer of a flash memory; and(e)写入该外部缓冲器内的从该主机传输过来的该数据至该闪存的该缓冲器内,该闪存的该缓冲器内的该数据具有该原始目的块地址或该新的目的块地址,(e) write the data transmitted from the host in the external buffer into the buffer of the flash memory, the data in the buffer of the flash memory has the original destination block address or the new destination block address,其中,执行完步骤(a)、(b)以及(c)中的判断该外部缓冲器的该数据是否为第一次传输后,若该外部缓冲器的该数据不是第一次传输,则跳过步骤(c)的其余部分以及步骤(d),直接执行该步骤(e),以及执行完步骤(a)、(b)以及(c)中的判断该外部缓冲器的该数据是否为第一次传输及该主机指派的该数据传输的该位置是否指向为该暂存块地址后,当该外部缓冲器的该数据为第一次传输且当该主机指派的该数据传输的该位置不是指向该暂存块地址,执行一演算处理,接着,跳过步骤(d),直接执行步骤(e),该演算处理包含整理该外部缓冲器的该数据,以使该数据为连续性的数据;Wherein, after performing steps (a), (b) and (c) in judging whether the data of the external buffer is the first transmission, if the data of the external buffer is not the first transmission, skip Through the rest of step (c) and step (d), directly execute the step (e), and execute the step (a), (b) and (c) to determine whether the data in the external buffer is the first After a transfer and whether the location of the data transfer assigned by the host points to the address of the temporary storage block, when the data of the external buffer is the first transfer and when the location of the data transfer assigned by the host is not Point to the address of the temporary storage block, perform a calculation process, then skip step (d), directly execute step (e), the calculation process includes sorting the data of the external buffer, so that the data is continuous data ;在执行步骤(e)之后,还包含检查该主机的该数据传输至该外部缓冲器的写入动作是否已经停止,当该数据停止从该主机写入至该外部缓冲器,则执行下列步骤:After performing step (e), it also includes checking whether the writing action of the data transmission of the host to the external buffer has stopped, and when the data stops being written from the host to the external buffer, the following steps are performed:(f)检查存放于该闪存的该缓冲器内的该数据,当该数据未占满该闪存的该缓冲器,则执行(h):(f) Check the data stored in the buffer of the flash memory, and when the data does not occupy the buffer of the flash memory, execute (h):(h)指派一暂存块给该数据,并将该数据写入至该暂存块。(h) assigning a temporary storage block to the data, and writing the data to the temporary storage block.2.根据权利要求1所述的闪存的数据管理方法,其特征在于,步骤(f)包含:2. the data management method of flash memory according to claim 1, is characterized in that, step (f) comprises:若该数据占满该闪存的该缓冲器,则执行步骤(g):If the data fills up the buffer of the flash memory, step (g) is performed:(g)根据该目的块地址,写入该数据至一目的块,其中,该目的块地址为该原始目的块地址或该新的目的块地址。(g) Writing the data to a destination block according to the destination block address, wherein the destination block address is the original destination block address or the new destination block address.3.根据权利要求1所述的闪存的数据管理方法,其特征在于,该步骤(h)中写入该数据至该暂存块是使用一改变地址指令,用于指派一暂存块地址给该闪存的该缓冲器内的该数据,以将该数据写入至该暂存块。3. The data management method of flash memory according to claim 1, characterized in that, writing the data to the temporary storage block in the step (h) is to use a change address instruction for assigning a temporary storage block address to the data in the buffer of the flash memory to write the data into the temporary storage block.4.根据权利要求1所述的闪存的数据管理方法,其特征在于,该步骤(h)中写入该数据至该暂存块还包含下列步骤:4. the data management method of flash memory according to claim 1, is characterized in that, writing this data to this temporary storage block also comprises the following steps in this step (h):(i)执行一写入指令,其中,该写入指令会删掉该闪存的该缓冲器内的该数据,并且重新指派一地址,该地址为一暂存块地址;以及(i) executing a write command, wherein the write command will delete the data in the buffer of the flash memory, and reassign an address, which is a temporary storage block address; and(j)写入该外部缓冲器的该数据至该闪存的该缓冲器内,其中,该闪存的该缓冲器内的该资料具有该暂存块地址,并根据该暂存块地址将该数据写入至该暂存块。(j) write the data of the external buffer into the buffer of the flash memory, wherein the data in the buffer of the flash memory has the temporary storage block address, and the data is written according to the temporary storage block address Write to the scratch block.5.根据权利要求1所述的闪存的数据管理方法,其特征在于,执行步骤(e)之后,还包含检查该主机的该数据传输至该外部缓冲器的写入动作是否已经停止,若该数据还未停止从该主机写入至该外部缓冲器,则执行下列步骤:5. The data management method of flash memory according to claim 1, characterized in that, after performing step (e), it also includes checking whether the writing operation of the data transmission of the host computer to the external buffer has stopped, if the If data has not stopped being written from the host to the external buffer, perform the following steps:(k)检查存放于该闪存的该缓冲器内的该数据,若该数据未占满该闪存的该缓冲器,则回到该步骤(e),若该数据占满该闪存的该缓冲器,则根据该目的块地址,写入该数据至一目的块,当完成该数据写入至该目的块,该闪存执行一写入指令,以及累加该目的块地址之后,回到该步骤(b),其中,该目的块地址为该原始目的块地址或该新的目的块地址。(k) Check the data stored in the buffer of the flash memory, if the data does not occupy the buffer of the flash memory, return to step (e), if the data occupies the buffer of the flash memory , then write the data to a target block according to the target block address, when the data is written to the target block, the flash memory executes a write command, and after accumulating the target block address, return to the step (b ), wherein the destination block address is the original destination block address or the new destination block address.
CN2006101618774A2006-12-052006-12-05Data management method of flash memoryActiveCN101196851B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN2006101618774ACN101196851B (en)2006-12-052006-12-05Data management method of flash memory

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN2006101618774ACN101196851B (en)2006-12-052006-12-05Data management method of flash memory

Publications (2)

Publication NumberPublication Date
CN101196851A CN101196851A (en)2008-06-11
CN101196851Btrue CN101196851B (en)2011-09-07

Family

ID=39547283

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN2006101618774AActiveCN101196851B (en)2006-12-052006-12-05Data management method of flash memory

Country Status (1)

CountryLink
CN (1)CN101196851B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101620662B (en)*2008-07-042011-09-28北京同方微电子有限公司Method for downloading data from intelligent card based on flash memory
CN101996686B (en)*2009-08-172013-03-20慧国(上海)软件科技有限公司Method and device for writing test data into memory
CN102043728B (en)*2009-10-232012-07-04慧荣科技股份有限公司Method for improving access efficiency of flash memory and related memory device
CN102163132B (en)*2010-02-242013-03-06慧荣科技股份有限公司 Data access method of flash memory and flash memory device

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6381192B1 (en)*1999-12-282002-04-30Hyundai Electronics Industries Co., Ltd.Address buffer in a flash memory
CN1536481A (en)*2003-04-092004-10-13英业达股份有限公司Device and method for updating content of flash memory
CN1585930A (en)*2002-08-292005-02-23松下电器产业株式会社 Apparatus and method for writing data into semiconductor memory of flash memory device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6381192B1 (en)*1999-12-282002-04-30Hyundai Electronics Industries Co., Ltd.Address buffer in a flash memory
CN1585930A (en)*2002-08-292005-02-23松下电器产业株式会社 Apparatus and method for writing data into semiconductor memory of flash memory device
CN1536481A (en)*2003-04-092004-10-13英业达股份有限公司Device and method for updating content of flash memory

Also Published As

Publication numberPublication date
CN101196851A (en)2008-06-11

Similar Documents

PublicationPublication DateTitle
US9405485B2 (en)Method and apparatus for writing data to a flash memory
US12045168B2 (en)Timed data transfer between a host system and a memory sub-system
CN103049397B (en)A kind of solid state hard disc inner buffer management method based on phase transition storage and system
US11630766B2 (en)Memory system and operating method thereof
JP5384576B2 (en) Selective use of multiple disparate solid-state storage locations
CN110515859A (en) A method for parallel processing of read and write requests for solid state disks
CN101571832B (en) Data writing method, flash storage system using the method and its controller
CN101241446A (en)Virtual file system command scheduling method and apparatus in nonvolatile data storage device
CN102279712A (en)Storage control method, system and device applied to network storage system
US9569381B2 (en)Scheduler for memory
US8429339B2 (en)Storage device utilizing free pages in compressed blocks
CN109213423A (en)Concurrent I/O command is handled without lock based on address barrier
US20060218347A1 (en)Memory card
CN109164976A (en)Optimize storage device performance using write buffer
CN101256535B (en) Hard disk data reading and writing cache device and method
CN106598504A (en) Data storage method and device
CN101196851B (en)Data management method of flash memory
CN105279108A (en) How to Write Data to Solid State Drive
CN101840375A (en) semiconductor storage device
CN102520885B (en)Data management system for hybrid hard disk
CN110531928B (en)Random data writing method and device for DRAM-Less solid state disk and DRAM-Less solid state disk
CN104462181A (en)SSD rear end data path management acceleration module and SSD equipment
KR102076248B1 (en)Selective Delay Garbage Collection Method And Memory System Using The Same
WO2015118623A1 (en)Information processing device
CN116774940A (en) A file storage method, system, storage medium and electronic device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp