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
data
write
flash memory
less important
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

The invention discloses a flash-memory-based storage device and a writing method thereof. The method is characterized by comprising the following steps of: allowing each block of the flash memory to be written for preset writing times; and if the data to be written is written into the block for the preset writing times, forbidding the data from being written into the block. The device comprises a flash memory having a plurality of blocks; a flash controller having a primary contrast list and a plurality of secondary contrast lists, each secondary contrast list recording an operating record of one block; and a data access control unit configured for allowing all the blocks are written with data for preset writing times through the secondary contrast lists and forbidding the data writing in the block when the block with the data to be written is written for preset writing times. The invention allows each block of the flash memory to be written for preset writing times. If the block with the data to be written is written for preset writing times, the data is forbidden from being written into the block.

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. memory storage based on flash memory, it comprises:
One flash memory has a plurality of blocks; And
One 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.
2. the memory storage based on flash memory as claimed in claim 1, wherein this block is represented by a logical block addresses.
3. the memory storage based on flash memory as claimed in claim 1, wherein this main table of comparisons writes down the logical place of described a plurality of blocks and the corresponding relation between the physical location.
4. the memory storage based on flash memory as claimed in claim 1, wherein this less important table of comparisons comprises a counter of writing indegree of counting a block and a flag of indicating this block whether can be written into.
5. the memory storage based on flash memory as claimed in claim 4, wherein this data access control module is set at that this is predetermined when writing indegree when a block has been written into, the flag whether this block of indication of this less important table of comparisons can be written into is set at and stops, and indicates this block to be written into.
6. method for writing data that is used for based on a memory storage of 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 whether this block of indication can be written into, and this wiring method comprises the following step:
Judge to desire flag in the less important record sheet of the block that data write whether at the state of activity; And
If the flag in the less important record sheet of the block that the desire data write not is the state in activity, forbidden data writes this block.
7. the method for writing data that is used for based on a memory storage of flash memory as claimed in claim 6, wherein this less important table of comparisons also comprises a counter of writing indegree of counting a block, and this wiring method comprises the following step:
If desire flag in the less important record sheet of the block that data write, data are write in the block of desiring to write and the numeral of this counter is added 1 at the state of activity.
8. the method for writing data that is used for based on a memory storage of flash memory as claimed in claim 6 also comprises the following step:
Whether the numeral of judging this counter reaches a predetermined indegree of writing; And
Be scheduled to write indegree if the numeral of this counter reaches this, the flag in this less important record sheet is set in the state that stops.
9. the method for writing data that is used for based on a memory storage of flash memory as claimed in claim 6, wherein whether the flag in less important record sheet that judge to desire the block that data write before the step of the state of activity, also comprises following steps:
Judged whether that data will write or delete; And
If judging has data to delete, send the just content deletion of all blocks of a delete command.
10. the method for writing data that is used for based on a memory storage of flash memory as claimed in claim 9, wherein this delete command is a Secure Erase order or the ata command of ordering certainly that ata command is concentrated.
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
CN105278867A (en) * 2014-07-24 2016-01-27 宇瞻科技股份有限公司 Loading method and partition method for storage device
CN105279101A (en) * 2014-06-24 2016-01-27 宇瞻科技股份有限公司 Storage device and address corresponding method, method for data access and method for identification and access
CN105320463A (en) * 2014-07-11 2016-02-10 宇瞻科技股份有限公司 Solid-state storage device with mixed 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 群联电子股份有限公司 Data writing method, memory system and controller for nonvolatile memory

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 群联电子股份有限公司 Data writing method, memory system and controller for nonvolatile memory

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, method for data access and method for identification and access
CN105320463A (en) * 2014-07-11 2016-02-10 宇瞻科技股份有限公司 Solid-state storage device with mixed storage mode
CN105320463B (en) * 2014-07-11 2018-07-10 宇瞻科技股份有限公司 Solid state storage device with mixing storage mode
CN105278867A (en) * 2014-07-24 2016-01-27 宇瞻科技股份有限公司 Loading method and partition method for 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
US8316176B1 (en) Non-volatile semiconductor memory segregating sequential data during garbage collection to reduce write amplification
CN104866428B (en) Data access method and data access device
CN106021013A (en) Non-volatile memory device and operation method thereof
US9329989B2 (en) System and method for pre-interleaving sequential data
CN104346292B (en) method for managing a memory device, memory device and controller
US8489805B2 (en) Memory devices operated within a communication protocol standard timeout requirement
CN101174473A (en) Method of providing block state information in semiconductor memory device including flash memory
CN103809917A (en) Method of scheduling tasks for memories and memory system thereof
US8060669B2 (en) Memory controller with automatic command processing unit and memory system including the same
CN104346288B (en) Method for managing a memory device, memory device and controller
CN103019971A (en) Method of quickly responding to trim command, SSD (Solid State Disk) controller and system
CN104298606A (en) Garbage collection action control method in SSD
KR20220104511A (en) Controller and memory system having the controller
US20190042405A1 (en) Storing data based on writing frequency in data storage systems
KR20160147509A (en) Method for managing data of storage device by temperature
TWI601059B (en) Data storage device and data storage method
CN109558334B (en) Garbage data recovery method and solid-state storage device
CN102279815A (en) Flash-memory-based storage device and data writing method thereof
KR102681181B1 (en) Memory system and operating method thereof
CN111984441B (en) Instant power-off recovery processing method and device and computer readable storage medium
US20100030953A1 (en) High-speed solid state storage system having a non-volatile ram for rapidly storing address mapping information
US11269559B2 (en) Data processing device
CN105975404A (en) Nonvolatile memory device and method of operating the same
US20150339069A1 (en) Memory system and 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