CN102279815A - Flash memory based storage device and data writing method thereof - Google Patents
Flash memory based storage device and data writing method thereof Download PDFInfo
- 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
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
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)
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)
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)
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 |
-
2010
- 2010-06-13 CN CN2010102066151A patent/CN102279815A/en active Pending
Patent Citations (3)
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)
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 |