[go: up one dir, main page]

CN102279815A - Flash memory based storage device and data writing method thereof - Google Patents

Flash memory based storage device and data writing method thereof Download PDF

Info

Publication number
CN102279815A
CN102279815A CN2010102066151A CN201010206615A CN102279815A CN 102279815 A CN102279815 A CN 102279815A CN 2010102066151 A CN2010102066151 A CN 2010102066151A CN 201010206615 A CN201010206615 A CN 201010206615A CN 102279815 A CN102279815 A CN 102279815A
Authority
CN
China
Prior art keywords
block
written
data
flash memory
storage device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2010102066151A
Other languages
Chinese (zh)
Inventor
李俊昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apacer Technology Inc
Original Assignee
Apacer Technology 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 Apacer Technology Inc filed Critical Apacer Technology Inc
Priority to CN2010102066151A priority Critical patent/CN102279815A/en
Publication of CN102279815A publication Critical patent/CN102279815A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Read Only Memory (AREA)

Abstract

A method for writing to a flash-based memory device, the method being characterized in that each block of the flash memory device is permitted to be written to a predetermined number of writes. If data is to be written into the block which has been written for the predetermined number of times, the block is prohibited from being written with data. The device comprises a flash memory with a plurality of blocks; and a flash controller having a primary lookup table and a plurality of secondary lookup tables, each secondary lookup table recording an operation record of a block, and a data access control unit configured to allow all blocks to be written with data for a predetermined number of times via the secondary lookup tables and to prohibit the block to be written with data when the block to be written with data has been written with the predetermined number of times. The present invention permits each block of the flash memory to be written a predetermined number of writes. If the block to be written with data has been written with the predetermined number of times, the block is prohibited from being written with data.

Description

Memory storage and method for writing data thereof based on flash memory
Technical field
The present invention relates to a kind of method for writing data, more particularly the present invention relates to a kind of method for writing data of the memory storage based on flash memory and the memory storage that adopts this wiring method.
Background technology
Now, it is more general and can also increase gradually of data quantity stored that the use of flash memory (flash memory) becomes.Flash memory be a kind of Electrically Erasable Read Only Memory (electricallyerasable programmable read only memory, EEPROM).Different with general Electrically Erasable Read Only Memory is that flash memory once can be deleted a block (block).The block size of flash memory can be different along with different types of flash memory device.Generally speaking flash memory device is compact and consumes quite low electric weight.Therefore, flash memory is quite to be fit to for consumption electronic products.
Generally speaking, memory storage based on flash memory, solid magnetic disc (solid statedisk for example, SSD) or USB flash disk (USB handy drive), the file system of all passing through standard FAT (file allocationtable) or NTFS (new technology file system) is carried out file access control.Yet, when the memory storage based on flash memory is applied to industrialization computer (industrial PC), on using, some needs to accomplish to prevent that data from being revised, maybe need to keep the operation note (log) of significant data.Therefore, just having needs configuration and setting to limit writing of each magnetic region based on the controller of the memory storage of flash memory, each magnetic region can only be write once or writes a predetermined indegree of writing, and is written or removes to prevent some data.
Summary of the invention
Proposition of the present invention is with solving the demand.
A purpose of the present invention is to provide a kind of memory storage based on flash memory, and it can forbid that this block is write by data when desiring to write the block that has been written into a predetermined flash memory of writing indegree when data.
Another object of the present invention is to provide a kind of method for writing data that is used for based on the memory storage of flash memory, it can forbid that this block is write by data when desiring to write the block that has been written into a predetermined flash memory of writing indegree when data.
Memory storage based on flash memory of the present invention mainly comprises a flash memory, have a plurality of blocks, an and quickflashing controller, it has the main table of comparisons and an a plurality of less important table of comparisons, wherein each less important table of comparisons operation note of writing down a block, an and data access control module, it is set at via this less important table of comparisons and allows all blocks to be write a predetermined indegree of writing by data, and be written at the block that data are desired to write that this is predetermined when writing indegree, forbidden that this block is write by data.
In addition, method for writing data of the present invention is used for the memory storage based on flash memory, wherein this flash memory has a plurality of blocks and this memory storage has a plurality of less important tables of comparisons to write down the mode of operation of described a plurality of blocks, wherein this less important table of comparisons has the flag (flag) whether this block of indication can be written into, this wiring method comprises the following step: (I) judge to desire flag in the less important record sheet of the block that data write whether at the state of activity, and, forbid that this block is write by data (II) if the flag in the less important record sheet of the block that the desire data write not is the state in activity.
Each block that the present invention permits flash memory is written into a predetermined indegree of writing.Be written into this predetermined indegree of writing if desire to write the block of data, forbidden that then this block is write by data.
Description of drawings
Fig. 1 is the system block diagram of the preferred embodiment that shows the memory storage based on flash memory of the present invention;
Fig. 2 A is the synoptic diagram of a preferred embodiment of the demonstration main table of comparisons of the present invention;
Fig. 2 B is the synoptic diagram of a preferred embodiment of the demonstration less important table of comparisons of the present invention; And
Fig. 3 is the process flow diagram of method for writing data of the present invention.
Description of reference numerals in the above-mentioned accompanying drawing is as follows:
100 memory storages based on flash memory
102 quickflashing controllers
104 flash memories
1022 random access memory
The main table of comparisons of 1022a
The less important table of comparisons of 1022b
1024 steering logics
1024a data access control module
202 logical blocks numbering
204 physical blocks numbering
206 write counter
208 write-enable flags
Embodiment
Fig. 1 is the system block diagram of the preferred embodiment that shows the memory storage based on flash memory of the present invention.As shown in Figure 1, based on the memory storage 100 of flash memory, for example a solid magnetic disc comprises a flash memory 104 and a quickflashing controller 102.It is made up of flash memory 104 several blocks (block), and generally speaking the size of each block is 512 bit groups.(logic block addressing LBA) represents each block, and the index code of logical block addresses increases progressively along with the numbering of block by logical block addresses.As shown in Figure 2, flash memory 104 comprises N block, and it is by LBA 0, LBA 1 ... LBA N represents.Quickflashing controller 102 is used for controlling the data access of flash memory 104, it comprises a random-access memory (ram) 1022, has a main table of comparisons (primary mapping table) 1022a, the logical place of record flash memory 104 and the contrast relationship between the physical location, and several less important tables of comparisons (secondary mapping table) 1022b, (LBA 0, and LBA 1 to write down all blocks respectively,, LBA N) operation note (log).Quickflashing controller 102 also comprises a steering logic (control logic) 1024, and it has a data access control module (dataaccess control unit) 1024a.Whether data access control module 1024a can the demand operating person have data to write or to delete.If there are data to delete, data access control module 1024a can send a data deletion order with all blocks of flash memory 104 (LBA 0, and LBA 1 ..., LBA N) data deletion.This data deletion order can be the Secure Erase order of ata command collection, or concentrates the data deletion order of definition voluntarily at ata command.When data will write the block of flash memory 104, whether data access control module 1024a can read the block that the operation note (log) of less important table of comparisons 1022b desires to write with judgement and can write.If the operation note of desiring to write in the less important table of comparisons of block represents that this block can't be written into, data access control module 1024a can forbid that just this block is write by data.
Fig. 2 A is the synoptic diagram of the preferred embodiment of demonstration main table of comparisons 1022a of the present invention.Shown in Fig. 2 A, main table of comparisons 1022a comprises logical blocks numbering (logical block number) 202 and physical blocks numbering (physical block numbering) 204, numbering and physical blocks numbering in order to write down logical blocks respectively present the corresponding relation between logical blocks and the physical blocks whereby.Fig. 2 B is the synoptic diagram of the preferred embodiment of demonstration less important table of comparisons 1022b of the present invention.Shown in Fig. 2 B, less important table of comparisons 1022b comprises one and writes counter (writing counter) 206 and one write-enable (writing enable) flag 208, wherein write the number of times that counter 206 record blocks are written into, the indication that write-enable flag 208 provides block whether can be written into.In the present embodiment, if the numeral that writes in the counter 206 reaches the predetermined indegree of writing, for example once, data access control module 1024a just can be made as the write-enable flag 208 of this block and stop (inactive).For example, if block LBA 0 has write once, data access control module 1024a just can be made as the write-enable flag 208 of this block the state that 0 representative stops, and represents that this block becomes the state that can't write.Say that as described above if want the block of data write-enable flag 208 for stopping, for example LBA 0, data access control module 1024a can forbid just that just this block is write by data.
Fig. 3 is the process flow diagram of method for writing data of the present invention.Method for writing data of the present invention is applicable to the memory storage based on flash memory, is described as follows now.The program of the method for writing data of Fig. 3 starts from step 300, and wherein the write-enable flag 208 of each block is preset as activity (active) state at the beginning the time, also promptly is set at 1.Next, can judge whether in step 302 whether the data that data will write flash memory 104 or flash memory 104 will delete.If the data of flash memory 104 will be deleted, program implementation skips to step 306 and is set at activity with the data in all blocks in the deletion flash memory 104 and with the write-enable flag of the less important table of comparisons of all blocks, and then program implementation skips to step 316 and finishes.If there are data will write flash memory 104, program implementation skips to step 304 and judges whether the write-enable flag is movable (active) in the less important table of comparisons of the block of desiring to write.If not, then the write-enable flag can not write for stopping (inactive) in the less important table of comparisons of the representative block desiring to write, program implementation skips to step 314 and is write by data to forbid this block in the flash memory 104, and then program implementation skips to step 316 and finishes.If then write-enable permits writing for movable (active) in the less important table of comparisons of the representative block desiring to write, program implementation skips to the numeral that writes counter that step 308 writes data in the block of desiring to write also this block and adds 1.Next, program implementation skips to step 310 and whether reaches a predetermined indegree of writing with the numeral that writes counter of judging this block.If not, program implementation skips to step 316 and finishes.If program implementation skips to step 312 and is made as with the write-enable flag with this block and stops (inactive), and then program implementation skips to step 316 and finishes.
Generally speaking, the present invention discloses a kind of method for writing data of the memory storage based on flash memory, and each block that the characteristics of this method are to permit flash memory is written into a predetermined indegree of writing.Be written into this predetermined indegree of writing if desire to write the block of data, forbidden that then this block is write by data.In order to realize this purpose, the present invention has several less important tables of comparisons in the random access memory of the quickflashing controller of memory, and each less important table of comparisons writes down the operation note of a block, wherein comprises to be used for judging the flag whether block can write.The steering logic of quickflashing controller has a data access control module in addition, and its operation note that can read the block that the less important table of comparisons writes down is to judge whether this block can write.If this flag represents that this block can't be written into, data access control module 1024a can forbid that just this block is write by data.
The present invention must be appointed by those skilled in the art and executes that the craftsman thinks and be to modify as all, yet does not take off the scope as the desire protection of attached claim institute.

Claims (10)

1.一种以快闪存储器为基础的存储装置,其包含:1. A storage device based on flash memory, comprising: 一快闪存储器,具有多个区块;以及A flash memory having a plurality of blocks; and 一快闪控制器,其具有一主要对照表与多个次要对照表,其中每个次要对照表记录一区块的操作记录,以及一数据存取控制单元,其设定为经由该次要对照表允许所有区块被数据写入一预定的写入次数,并且在数据欲写入的区块已经被写入该预定写入次数时,禁止该区块被数据写入。A flash controller, which has a main look-up table and a plurality of secondary look-up tables, wherein each secondary look-up table records the operation record of a block, and a data access control unit, which is set to The comparison table allows all blocks to be written with data for a predetermined number of write times, and when the block to which data is to be written has been written for the predetermined number of times, the block is prohibited from being written with data. 2.如权利要求1所述的以快闪存储器为基础的存储装置,其中该区块由一逻辑区块地址来代表。2. The flash memory-based storage device of claim 1, wherein the block is represented by a logical block address. 3.如权利要求1所述的以快闪存储器为基础的存储装置,其中该主要对照表记录所述多个区块的逻辑位置以及物理位置之间的对应关系。3. The flash memory-based storage device as claimed in claim 1, wherein the main look-up table records correspondence between logical locations and physical locations of the plurality of blocks. 4.如权利要求1所述的以快闪存储器为基础的存储装置,其中该次要对照表包含计数一区块的写入次数的一计数器以及指示该区块是否能够被写入的一旗标。4. The flash memory-based storage device as claimed in claim 1, wherein the secondary look-up table includes a counter for counting the number of write times of a block and a counter for indicating whether the block can be written Flag. 5.如权利要求4所述的以快闪存储器为基础的存储装置,其中该数据存取控制单元设定为当一区块已经被写入该预定的写入次数时,将该次要对照表的指示该区块是否能够被写入的旗标设定为停止,来指示该区块无法被写入。5. The storage device based on flash memory as claimed in claim 4, wherein the data access control unit is configured to, when a block has been written for the predetermined number of write times, the secondary comparison The flag of the table indicating whether the block can be written is set to stop to indicate that the block cannot be written. 6.一种用于以快闪存储器为基础的一存储装置的数据写入方法,其中该快闪存储器具有多个区块且该存储装置具有多个次要对照表以记录所述多个区块的操作状态,其中该次要对照表具有指示该区块是否能够被写入的一旗标,该写入方法包含下列步骤:6. A data writing method for a storage device based on a flash memory, wherein the flash memory has a plurality of blocks and the storage device has a plurality of secondary look-up tables to record the plurality of areas The operation status of the block, wherein the secondary lookup table has a flag indicating whether the block can be written, the writing method includes the following steps: 判断欲数据写入的区块的次要记录表中的旗标是否在活动的状态;以及judging whether the flag in the secondary record table of the block to be written into is active; and 若欲数据写入的区块的次要记录表中的旗标并非在活动的状态,禁止数据写入该区块。If the flag in the secondary record table of the block to be written into is not active, data is prohibited from being written into the block. 7.如权利要求6所述的用于以快闪存储器为基础的一存储装置的数据写入方法,其中该次要对照表还包含计数一区块的写入次数的一计数器,并且该写入方法包含下列步骤:7. The data writing method for a storage device based on flash memory as claimed in claim 6, wherein the secondary look-up table further comprises a counter for counting the writing times of a block, and the The write method consists of the following steps: 若欲数据写入的区块的次要记录表中的旗标在活动的状态,将数据写入欲写入的区块中并将该计数器的数字加1。If the flag in the secondary record table of the block to be written into is active, write data into the block to be written and add 1 to the counter. 8.如权利要求6所述的用于以快闪存储器为基础的一存储装置的数据写入方法,还包含下列步骤:8. The data writing method for a storage device based on flash memory as claimed in claim 6, further comprising the following steps: 判断该计数器的数字是否达到一预定的写入次数;以及judging whether the number of the counter reaches a predetermined number of times of writing; and 若该计数器的数字达到该预定写入次数,将该次要记录表中的旗标设定在停止的状态。If the number of the counter reaches the predetermined writing times, the flag in the secondary recording table is set in a stopped state. 9.如权利要求6所述的用于以快闪存储器为基础的一存储装置的数据写入方法,其中在判断欲数据写入的区块的次要记录表中的旗标是否在活动的状态的步骤之前,还包含以下步骤:9. The data writing method for a storage device based on flash memory as claimed in claim 6, wherein judging whether the flag in the secondary record table of the block to be written into is active Before the state step, also include the following steps: 判断是否有数据要写入或删除;以及determine whether there is data to be written or deleted; and 若判断有数据要删除,发出一删除命令将将所有区块的内容删除。If it is judged that there is data to be deleted, issuing a delete command will delete the contents of all blocks. 10.如权利要求9所述的用于以快闪存储器为基础的一存储装置的数据写入方法,其中该删除命令为ATA命令集中的Secure Erase命令或一自订的ATA命令。10. The data writing method for a storage device based on flash memory as claimed in claim 9, wherein the delete command is a Secure Erase command in the ATA command set or a self-defined ATA command.
CN2010102066151A 2010-06-13 2010-06-13 Flash memory based storage device and data writing method thereof Pending CN102279815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102066151A CN102279815A (en) 2010-06-13 2010-06-13 Flash memory based storage device and data writing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102066151A CN102279815A (en) 2010-06-13 2010-06-13 Flash memory based storage device and data writing method thereof

Publications (1)

Publication Number Publication Date
CN102279815A true CN102279815A (en) 2011-12-14

Family

ID=45105274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102066151A Pending CN102279815A (en) 2010-06-13 2010-06-13 Flash memory based storage device and data writing method thereof

Country Status (1)

Country Link
CN (1) CN102279815A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279101A (en) * 2014-06-24 2016-01-27 宇瞻科技股份有限公司 Storage device and address corresponding method thereof, data access and identification and access method
CN105278867A (en) * 2014-07-24 2016-01-27 宇瞻科技股份有限公司 Loading method and dividing method of storage device
CN105320463A (en) * 2014-07-11 2016-02-10 宇瞻科技股份有限公司 Solid state storage device with hybrid storage mode
CN107293324A (en) * 2016-04-13 2017-10-24 华邦电子股份有限公司 Storage arrangement and memory block application method
WO2020015133A1 (en) * 2018-07-20 2020-01-23 江苏华存电子科技有限公司 Relational garbage data collection method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1627271A (en) * 2003-12-10 2005-06-15 三星电子株式会社 Flash memory and mapping control apparatus and method for flash memory
CN101075211A (en) * 2007-06-08 2007-11-21 马彩艳 Flash memory management based on sector access
CN101576859A (en) * 2008-05-06 2009-11-11 群联电子股份有限公司 Nonvolatile memory data writing method, memory system and controller thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1627271A (en) * 2003-12-10 2005-06-15 三星电子株式会社 Flash memory and mapping control apparatus and method for flash memory
CN101075211A (en) * 2007-06-08 2007-11-21 马彩艳 Flash memory management based on sector access
CN101576859A (en) * 2008-05-06 2009-11-11 群联电子股份有限公司 Nonvolatile memory data writing method, memory system and controller thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279101A (en) * 2014-06-24 2016-01-27 宇瞻科技股份有限公司 Storage device and address corresponding method thereof, data access and identification and access method
CN105320463A (en) * 2014-07-11 2016-02-10 宇瞻科技股份有限公司 Solid state storage device with hybrid storage mode
CN105320463B (en) * 2014-07-11 2018-07-10 宇瞻科技股份有限公司 Solid state storage device with hybrid storage mode
CN105278867A (en) * 2014-07-24 2016-01-27 宇瞻科技股份有限公司 Loading method and dividing method of storage device
CN107293324A (en) * 2016-04-13 2017-10-24 华邦电子股份有限公司 Storage arrangement and memory block application method
WO2020015133A1 (en) * 2018-07-20 2020-01-23 江苏华存电子科技有限公司 Relational garbage data collection method

Similar Documents

Publication Publication Date Title
KR102033491B1 (en) Managing trim operations in a flash memory system
CN106021013B (en) Non-volatile memory device and operation method thereof
US8316176B1 (en) Non-volatile semiconductor memory segregating sequential data during garbage collection to reduce write amplification
US8010770B2 (en) Caching device for NAND flash translation layer
CN104572478B (en) Data access method and data access device
US8312554B2 (en) Method of hiding file at data protecting mode for non-volatile memory module, memory controller and portable memory storage apparatus
US8055873B2 (en) Data writing method for flash memory, and controller and system using the same
US10198318B2 (en) Storage apparatus having nonvolatile memory device, and nonvolatile memory device
CN101174473A (en) Method of providing block state information in semiconductor memory device including flash memory
US10360144B2 (en) Storage apparatus and non-volatile memory device including a controller to selectively compress data based on an update frequency level
TWI691839B (en) Method for data management
CN109753234B (en) Memory system and control method of non-volatile memory
US10372382B2 (en) Methods and apparatus for read disturb detection based on logical domain
US8838877B2 (en) File system derived metadata for management of non-volatile memory
WO2013012673A2 (en) Flash disk array and controller
KR102681181B1 (en) Memory system and operating method thereof
KR20220104511A (en) Controller and memory system having the controller
US20190042405A1 (en) Storing data based on writing frequency in data storage systems
CN107632942A (en) A kind of method that solid state hard disc realizes LBA rank TRIM orders
US20080162788A1 (en) Memory Controller with Automatic Command Processing Unit and Memory System Including the Same
KR20160147509A (en) Method for managing data of storage device by temperature
US20090172269A1 (en) Nonvolatile memory device and associated data merge method
CN104346292A (en) Method for managing a memory device, memory device and controller
CN102279815A (en) Flash memory based storage device and data writing method thereof
TWI601059B (en) Data storage device and data storage method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111214