CN105630701B - Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table - Google Patents

Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table Download PDF

Info

Publication number
CN105630701B
CN105630701B CN201510288489.1A CN201510288489A CN105630701B CN 105630701 B CN105630701 B CN 105630701B CN 201510288489 A CN201510288489 A CN 201510288489A CN 105630701 B CN105630701 B CN 105630701B
Authority
CN
China
Prior art keywords
page
nand
write
unavailable
block
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
CN201510288489.1A
Other languages
Chinese (zh)
Other versions
CN105630701A (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.)
Shanghai Ciyu Information Technologies Co Ltd
Original Assignee
Shanghai Ciyu Information Technologies Co Ltd
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 Shanghai Ciyu Information Technologies Co Ltd filed Critical Shanghai Ciyu Information Technologies Co Ltd
Priority to CN201510288489.1A priority Critical patent/CN105630701B/en
Publication of CN105630701A publication Critical patent/CN105630701A/en
Application granted granted Critical
Publication of CN105630701B publication Critical patent/CN105630701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of data storage device, including host interface, main control chip, one or more NAND chips and MRAM for storing data, NAND chip, MRAM are connect with main control chip respectively, MRAM includes write buffer or read-write cache, MRAM further includes erasing times table and unavailable page table, erasing times table is used to store the erasing times of each block in NAND chip, and unavailable page table includes evil idea page in the block, the follow-up evil idea page in the block and their replacement page read and write use and occurred in the process when dispatching from the factory in NAND chip.Data storage device provided by the invention and reading/writing method using the table of unavailable page table/unavailable piece, MRAM includes write buffer or read-write cache, not only ensures readwrite performance, but also reduce the number of erasing NAND, extends the service life of data storage device;Safeguard the erasing times table and unavailable page table/unavailable piece of table of each block, no longer use the NAND administrative skills of strange land write-in, without preserving the logical address and the physical address table of comparisons that occupy big quantity space, not only save memory space, and without complicated processing, further improve readwrite performance.

Description

Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table
Technical field
The present invention relates to field of data storage more particularly to a kind of data storage device and unavailable page table or unavailable pieces The reading/writing method of table.
Background technology
Currently, the development of nand flash memory technology has pushed SSD industries.
As shown in Figure 1, using HSSI High-Speed Serial Interface such as SATA, PICe etc. technologies between SSD and host.Inside is by being used to deposit One group of NAND chip for storing up data calculates and data cached DDR DRAM (memory) and a main control chip for supporting (SSD Controller) is formed, and logical address and the physical address table of comparisons are also stored in NAND.Power-off is sometimes also needed to protect Protecting system.
NAND is a kind of storage device of monoblock read-write, and the unit that minimum readable takes is page, minimum erasable unit Block, a block is made often to be made of many page, the page of the inside can carry out that behaviour is individually written after block erasings Make.Write operation is very slow, more more slowly than reading, and erasing operation is more more slowly than being written.
As shown in Fig. 2, the file operation mode of mobile phone and computer is as follows:
(1) application software sends out opening, closing, reading and writing file instruction to operating system;
(2) instruction morphing instruction for reading and writing memory block of the file system portion in operating system reading and writing file;
(3) NAND drivings receive the instruction in read-write memory block area with management software, are cached, write the optimizations such as equilibrium, to Chip, which is sent out, reads page, writes the instructions such as block.
In mobile phone, NAND drivings and management software are usually as the software module being closely related with operating system, in master Movement on piece is run;In a computer, NAND drivings are usually run on the main control chip of solid state disk with management software.
One problem of nand flash memory, which is NAND, has the limited service life.Each page of the inside is by certain number After erasable, will permanent failure cannot be used continuously.The current trend of industry development is that the capacity of NAND and packing density increase Length is very fast, but to reduce the service life as cost.Erasable number is reduced to 3000 times current left sides from initial 100,000 times It is right.
Nand flash memory generally just has some blocks damaged in manufacture, and bad block can may also continuously emerge during use, Therefore all nand flash memories can generally be stored in the specified region of nand flash memory or bad all along with a bad block table It makes marks on block.
Because of the above characteristic of nand flash memory, the NAND management softwares inside SSD are more complicated.It is certain frequent in order not to make The block premature deterioration that write operation occurs, needs into row write equilibrium treatment.The logical address and physics that file system software is identified Address is different, and needs a table that the two is mapped.Since NAND erasings are too slow, not in original when generally changing a content The areas Lai Kuai update, but new content is write the areas Ge Xinkuai, and the areas Jiu Kuai wait the CPU free time to get off again labeled as in vain Wipe it.In this way, the table of comparisons of logical address physical address is that continuous dynamic is newer.This table is proportional to the total capacity of SSD, There are in DDR DRAM, in addition also there is corresponding label inside NAND.With increasing sharply for SSD capacity in the market, this Telogenesis is the maximum consumer of DRAM.
Since the read or write speed ratio DRAM of NAND is more slowly, a part of dram space can also be utilized to make the caching of reading and writing (Cache), the performance of entire SSD is improved.However it introduces write buffer and produces new problem:Once powering off, DRAM cache In the content of NAND is not yet written can lose, cause the damage of the even entire file system of system loss data.So must be same When use expensive, bulky circuit breaking protective system (being generally made of battery or a large amount of capacitor).And logical-physical Address translation table, after powering off, what the data that are available in NAND reconfigured, although time consuming.
It is encountered from the design described above that can be seen that SSD awkward:If not using write buffer, the write-in of product It can have a greatly reduced quality;If using write buffer, it is necessary to while using the expensive power-off protection equipment for accounting for volume again, causing cost effectiveness very Difference.
A kind of solid state disk being used in mixed way MRAM and DRAM, MRAM is for write buffer and logical address and physical address pair According to table cache, as shown in figure 3, due to MRAM can as Flash flash memories permanent retention data after a loss of power, do not use high Expensive, bulky circuit breaking protective system, reduces the cost of solid state disk, to improve the cost effectiveness of solid state disk.So And this method is slightly to sacrifice the performance of random read take as cost.
A kind of solid state disk using MRAM is read and write using physical address, and MRAM is used for write buffer, and Installed System Memory DRAM is used In preserving logical address and the physical address table of comparisons, as shown in figure 4, due to not using expensive, bulky power-off protection System reduces the cost of solid state disk, to improve the cost effectiveness of solid state disk.However this method need to consume it is more Installed System Memory.
Therefore, those skilled in the art is dedicated to developing a kind of cost effectiveness height and data storage device low in energy consumption, both It can ensure write performance, and data storage device cost can be reduced, while power consumption is relatively low.
Invention content
In view of the drawbacks described above of the prior art, technical problem to be solved by the invention is to provide a kind of storages of data to fill It sets, can either ensure write performance, and data storage device cost can be reduced, while power consumption is relatively low.It is provided by the invention solid State hard disk is not to sacrifice the performance of random read take slightly as cost, and without consuming more Installed System Memory.
The present invention also provides the reading/writing methods for using unavailable page table or unavailable piece of table.
The nand flash memory administrative skill generally used in solid state disk shown in FIG. 1, the method for having used strange land to be written, i.e., When changing a NAND page, it is not to be changed on original position, but distribute a new NAND page, new data is written; And old NAND page is designated as in vain, it recycles later.
There are two the reason of doing so:
(1) period of erasable NAND page is too long, if not using strange land to be written, data certainly will will preserve very in DRAM Long, cause the probability of loss of data that can increase because of power-off.
(2) balanced consideration is write, if the content of certain one page is often changed, it is likely to premature deterioration, therefore every It is that balanced good method is write in a realization that address is all changed in secondary modification.
In the present invention, write buffer is done as a result of MRAM.The content of all write-ins can retain to the greatest extent in the buffer Possible long time, reason (1) substantially eliminate;Moreover using after write buffer, relative to modification data with existing, distribute new NAND page New data is written, is small probability event, therefore the time of erasable NAND pressure caused by caching is little.
In addition, to be the NAND page being often written into can stay in the write buffer of MRAM to the principle of write buffer management in the present invention In.This writes equilibrium to realization and is very helpful, and reason (2) also substantially eliminates.
Based on above 2 points, the present invention no longer uses the NAND administrative skills of strange land write-in.
No longer strange land is used to be written, logical address will be substantially stationary with the physical address table of comparisons, therefore is not necessarily to make With the logical address and the physical address table of comparisons for consuming a large amount of memory headrooms.
In present invention, it is desirable to safeguarding the erasing times table of each block (block), a block includes up to 512 pages (page), much smaller relative to each page of logical address and the physical address table of comparisons, erasing times table.In addition of the invention Also safeguard a unavailable page table/unavailable piece of table, using write buffer, it is even more one to form dangerous page/danger block A small probability event.
Thus solid state disk provided by the invention, the MRAM that capacity can be used smaller had not only ensured write performance, but also had reduced Solid state disk cost, while power consumption is relatively low;And not to sacrifice the performance of random read take as cost, without consuming more system Memory.
The present invention provides a kind of data storage device, including host interface, main control chip, for storing data one or Multiple NAND chips and MRAM, NAND chip, MRAM are connect with main control chip respectively, and MRAM includes that write buffer or read-write are slow It deposits, MRAM further includes erasing times table and unavailable page table, and erasing times table is used to store the erasing of each block in NAND chip Number, unavailable page table include evil idea page in the block, the follow-up bad block read and write use and occurred in the process when dispatching from the factory in NAND chip In page and their replacement page.
Further, unavailable page table further includes the replacement page of dangerous page and dangerous page, and dangerous page is in NAND chip Erasing times are more than the page in the block of erasing warning value.When some page is often erasable, and number is caused to be more than warning value, choosing One is selected to replace page and data are shifted.The page for not using write-in risk ensures the safety write-in of data.
The present invention also provides a kind of write methods using unavailable page table of data storage device, include the following steps:
(1) it receives and writes NAND page instruction;
(2) NAND page, if in write buffer or read-write cache, executes step whether in write buffer or read-write cache (5);If not in write buffer or read-write cache, step (3) is executed;
(3) free page is selected from caching, and the content of NAND page is written;
(4) if write buffer or the free page of read-write cache are less than the first warning value, write buffer or read-write cache are cleared up;
(5) data write in NAND page instruction are written in the corresponding page of write buffer or read-write cache.
Further, cleaning write buffer or the method for read-write cache include the following steps in step (4):
(41) selection needs the caching page cleared up;
(42) if the corresponding NAND page of caching page is in unavailable page table and has replacement page, step (43) is executed;Otherwise Execute step (44);
(43) address for replacing page is obtained;
(44) address of NAND page is directly corresponded into physical address, finds and all in write buffer or read-write cache belongs to same One block and newer caching page;
(45) data that read corresponding piece of NAND page all belong to same piece and newer caching page with what is found The data that corresponding piece of data update NAND page;
(46) data of corresponding piece of NAND page are write back into NAND chip;
(47) if writing back NAND chip success, step (49) is executed;If writing back NAND chip failure, NAND is corresponding Block becomes bad block, executes step (48);
(48) according to erasing times table, the NAND block idle according to homeostatic principle distribution is write, as corresponding piece of NAND's Replacement block updates unavailable page table, executes step (43);
(49) erasing times for updating corresponding piece of the physical address of NAND page in erasing times table, if the wiping of NAND page It writes number and is more than warning value, NAND page becomes dangerous page, finds replacement page for NAND page, updates unavailable page table;
(50) caching page is discharged;
(51) if write buffer or the free page of read-write cache are more than the second warning value, stop cleaning write buffer or read-write is slow It deposits;It is no to then follow the steps (41).
Further, further comprising the steps of after the physical address of step (43) acquisition replacement page:
(431) according to physical address, the erasing times of corresponding piece of NAND page are obtained from erasing times table;If NAND The erasing times of corresponding piece of page add 1 to be equal to or more than erasing warning value, and the corresponding page in the block of NAND page becomes dangerous page, holds Row step (48);It is no to then follow the steps (42).
Further, unavailable page table uploads to the file system in host in booting, and in the process of running not The fresh information of page table can be used to upload file system, unavailable page is distributed to file to avoid file system.
The present invention also provides a kind of data storage devices, including main control chip, one group of NAND chip for storing data And MRAM, NAND chip, MRAM are connect with main control chip respectively, MRAM includes write buffer or read-write cache, which is characterized in that MRAM further includes erasing times table and unavailable piece of table, and erasing times table is used to store the erasing time of each block in NAND chip Number, unavailable piece of table include bad block when dispatching from the factory in NAND chip, the bad block occurred during follow-up read-write use and they Replacement block.
Unavailable page table is replaced using unavailable piece of table, is further reduced memory consumption.
Further, unavailable piece of table further includes dangerous block and their replacement that erasing times are more than erasing warning value Block.When some block is often erasable, and number is caused to be more than warning value, selects a replacement block and data are shifted. The block for not using write-in risk ensures the safety write-in of data.
The present invention also provides a kind of write methods using unavailable piece of table of data storage device, include the following steps:
(1) it receives and writes NAND page instruction;
(2) NAND page, if in write buffer or read-write cache, executes step whether in write buffer or read-write cache (5);If not in write buffer or read-write cache, step (3) is executed;
(3) free page is selected from caching, and the content of NAND page is written;
(4) if write buffer or the free page of read-write cache are less than the first warning value, write buffer or read-write cache are cleared up;
(5) data write in NAND page instruction are written in the corresponding page of write buffer or read-write cache.
Further, cleaning write buffer or the method for read-write cache include the following steps in step (4):
(41) selection needs the caching page cleared up;
(42) if corresponding piece of the corresponding NAND page of caching page is in unavailable piece of table and has replacement block, step is executed (43);It is no to then follow the steps (44);
(43) address of NAND page, is directly corresponded to the physics of corresponding NAND page in replacement block by the address for obtaining replacement block Address;
(44) according to the physical address of NAND page, find in write buffer or read-write cache it is all belong to same piece and update Caching page;
(45) data that read corresponding piece of NAND page all belong to same piece and newer caching page with what is found The data that corresponding piece of data update NAND page;
(46) data of corresponding piece of NAND page are write back into NAND chip;
(47) if writing back NAND chip success, step (49) is executed;If writing back NAND chip failure, NAND page corresponds to Block become bad block, execute step (48);
(48) according to erasing times table, according to the NAND block for writing the homeostatic principle distribution free time, as the replacement block of bad block, more New unavailable piece of table, executes step (43);
(49) erasing times for updating corresponding piece of NAND page in erasing times table, if the erasing of corresponding piece of NAND page Number is more than warning value, and corresponding piece of NAND page becomes dangerous block, finds replacement block for corresponding piece of NAND page, update is unavailable Block table;
(50) caching page is discharged;
(51) if write buffer or the free page of read-write cache are more than the second warning value, stop cleaning write buffer or read-write is slow It deposits;It is no to then follow the steps (41).
Further, further comprising the steps of after the physical address of step (43) acquisition replacement page:
(431) according to physical address, the erasing times of corresponding piece of NAND page are obtained from erasing times table;If NAND The erasing times of corresponding piece of page add 1 to be equal to or more than erasing warning value, and corresponding piece of NAND page becomes dangerous block, executes step (48)。
Further, unavailable piece of table uploads to the file system in host in booting, and in the process of running not The fresh information of available block table uploads file system, and file is distributed to unavailable piece to avoid file system.
Compared with prior art, data storage device provided by the invention and the table of unavailable page table/unavailable piece is used Reading/writing method has the advantages that:
(1) MRAM includes write buffer or read-write cache, can ensure readwrite performance, and can reduce time of erasing NAND Number, extends the service life of solid state disk;
(2) due to not using DDR DRAM, without using the expensive power-off protection equipment for accounting for volume again, it is hard to reduce solid-state The cost of disk, while reducing the power consumption of solid state disk;
(3) the erasing times table of each block (block) and unavailable page table are safeguarded, the NAND pipes of strange land write-in are no longer used Reason technology occupies the logical address and the physical address table of comparisons of big quantity space without preservation, not only saves memory space, and Without complicated processing, readwrite performance is further improved;
(4) not to sacrifice the performance of random read take as cost, and without consuming more Installed System Memory;
(5) unavailable page table is replaced using unavailable piece of table, is further reduced memory consumption.
The technique effect of the design of the present invention, concrete structure and generation is described further below with reference to attached drawing, with It is fully understood from the purpose of the present invention, feature and effect.
Description of the drawings
Fig. 1 is the structural schematic diagram of solid state disk in the prior art;
Fig. 2 is file operation flow chart in the prior art;
Fig. 3 is the structural schematic diagram for the solid state disk for being used in mixed way DRAM and MRAM;
Fig. 4 is the structural schematic diagram using the solid state disk of MRAM;
Fig. 5 is the structural schematic diagram of the solid state disk of one embodiment of the present of invention;
Fig. 6 is the flow chart of the write method using unavailable page table of solid state disk shown in fig. 5;
Fig. 7 is the flow chart of the cleaning write buffer of solid state disk shown in fig. 5;
Fig. 8 is the flow chart of another cleaning write buffer of solid state disk shown in fig. 5;
Fig. 9 is the structural schematic diagram of the solid state disk of an alternative embodiment of the invention.
Specific implementation mode
The present invention can be used in a variety of data storage devices, such as solid state disk (SSD), eMMC, SD card, microSD Card (also known as T-Flash cards), illustrates by taking solid state disk as an example below.
As shown in figure 5, the solid state disk of one embodiment of the present of invention, including host interface, main control chip, for storing The one or more NAND chips and MRAM of data, NAND chip, MRAM are connect with main control chip respectively, and MRAM is slow including writing It deposits, MRAM further includes erasing times table and unavailable page table, and erasing times table is used to store the erasing of each block in NAND chip Number, unavailable page table include evil idea page in the block, the follow-up bad block read and write use and occurred in the process when dispatching from the factory in NAND chip In page and their replacement page.
MRAM is connected by the main control chip of DDR DRAM interfaces and solid state disk.
MRAM can also include read-write cache.
Unavailable page table further includes the replacement page of dangerous page and dangerous page, and dangerous page is that erasing times are big in NAND chip In the page in the block of erasing warning value.The block for not using write-in risk ensures the safety write-in of data.
The write method using unavailable page table of the solid state disk of the present embodiment, as shown in fig. 6, including the following steps:
(1) it receives and writes NAND page instruction;
(2) NAND page, if in write buffer or read-write cache, executes step whether in write buffer or read-write cache (5);If not in write buffer or read-write cache, step (3) is executed;
(3) free page is selected from caching, and the content of NAND page is written;
(4) if write buffer or the free page of read-write cache are less than the first warning value, write buffer or read-write cache are cleared up;
(5) data write in NAND page instruction are written in the corresponding page of write buffer or read-write cache.
The method of cleaning write buffer in step (4), if unavailable page table only includes failure when being written in NAND chip Page in NAND block, as shown in fig. 7, comprises following steps:
(41) selection needs the caching page cleared up;
(42) if the corresponding NAND page of caching page is in unavailable page table and has replacement page, step (43) is executed;Otherwise Execute step (44);
(43) address for replacing page is obtained;
(44) address of NAND page is directly corresponded into physical address, finds and all in write buffer or read-write cache belongs to same One block and newer caching page;
(45) data that read corresponding piece of NAND page all belong to same piece and newer caching page with what is found The data that corresponding piece of data update NAND page;
(46) data of corresponding piece of NAND page are write back into NAND chip;
(47) if writing back NAND chip success, step (49) is executed;If writing back NAND chip failure, NAND is corresponding Block becomes bad block, executes step (48);
(48) according to erasing times table, the NAND block idle according to homeostatic principle distribution is write, as corresponding piece of NAND's Replacement block updates unavailable page table, executes step (43);
(49) erasing times for updating corresponding piece of the physical address of NAND page in erasing times table, if the wiping of NAND page It writes number and is more than warning value, NAND page becomes dangerous page, finds replacement page for NAND page, updates unavailable page table;
(50) caching page is discharged;
(51) if write buffer or the free page of read-write cache are more than the second warning value, stop cleaning write buffer or read-write is slow It deposits;It is no to then follow the steps (41).
Step (41) selection needs the caching page cleared up, and various ways may be used, such as:Selection needs to clear up in order Caching page, or selected according to the last write operation time, i.e., the more early caching page of last write operation is first cleared up, Or according to the last write operation time with whether more newly arrive selection, i.e., last time write operation is more early and updated caching Page is first cleared up.
The first warning value is set as the 10% of the total page number of write buffer or read-write cache in the present embodiment, and the second warning value It is set to the 30% of the total page number of write buffer or read-write cache, does not wait until that write buffer or read-write cache are finished and just clears up, therefore energy It is enough to ensure that always available free page distribute.
If unavailable page further includes the page that erasing times are more than in the NAND block of erasing warning value, as shown in figure 8, step (43) further comprising the steps of after the physical address of acquisition replacement page:
(431) according to physical address, the erasing times of corresponding piece of NAND page are obtained from erasing times table;If NAND The erasing times of corresponding piece of page add 1 to be equal to or more than erasing warning value, and the corresponding page in the block of NAND page becomes dangerous page, holds Row step (48);It is no to then follow the steps (42).
Unavailable page table uploads to the file system in host in booting, and unavailable page table in the process of running Fresh information uploads file system, and unavailable page is distributed to file to avoid file system.
As shown in figure 9, the solid state disk of an alternative embodiment of the invention, including main control chip, for storing data One group of NAND chip and MRAM, NAND chip, MRAM are connect with main control chip respectively, and MRAM includes that write buffer or read-write are slow It deposits, which is characterized in that MRAM further includes erasing times table and unavailable piece of table, and erasing times table is every in NAND chip for storing The erasing times of a block, bad block, follow-up read-write use when unavailable piece of table includes manufacture in NAND chip occur in the process Bad block and their replacement block.
MRAM is integrated in the main control chip of solid state disk.
In another embodiment of the present invention, with solid state disk shown in fig. 5 difference lies in:Using unavailable piece of table Instead of unavailable page table, unavailable page table is replaced using unavailable piece of table table, is further reduced memory consumption.
Unavailable piece of table further includes the NAND block that erasing times are more than erasing warning value.
MRAM further includes unavailable NAND block table, considers unavailable NAND block table when distributing idle NAND block, avoids making With the block in unavailable NAND block table.
Unavailable NAND page table is replaced using unavailable NAND block table, is further reduced memory consumption.
In the present embodiment, using the write method of unavailable piece of table, include the following steps:
(1) it receives and writes NAND page instruction;
(2) NAND page, if in write buffer or read-write cache, executes step whether in write buffer or read-write cache (5);If not in write buffer or read-write cache, step (3) is executed;
(3) free page is selected from caching, and the content of NAND page is written;
(4) if write buffer or the free page of read-write cache are less than the first warning value, write buffer or read-write cache are cleared up;
(5) data write in NAND page instruction are written in the corresponding page of write buffer or read-write cache.
If unavailable piece of table only includes the NAND block of failure when being written in NAND chip, write buffer is cleared up in step (4) Or the method for read-write cache includes the following steps:
(41) selection needs the caching page cleared up;
(42) if corresponding piece of the corresponding NAND page of caching page is in unavailable piece of table and has replacement block, step is executed (43);It is no to then follow the steps (44);
(43) address of NAND page, is directly corresponded to the physics of corresponding NAND page in replacement block by the address for obtaining replacement block Address;
(44) according to the physical address of NAND page, find in write buffer or read-write cache it is all belong to same piece and update Caching page;
(45) data that read corresponding piece of NAND page all belong to same piece and newer caching page with what is found The data that corresponding piece of data update NAND page;
(46) data of corresponding piece of NAND page are write back into NAND chip;
(47) if writing back NAND chip success, step (49) is executed;If writing back NAND chip failure, NAND page corresponds to Block become bad block, execute step (48);
(48) according to erasing times table, according to the NAND block for writing the homeostatic principle distribution free time, as the replacement block of bad block, more New unavailable piece of table, executes step (43);
(49) erasing times for updating corresponding piece of NAND page in erasing times table, if the erasing of corresponding piece of NAND page Number is more than warning value, and corresponding piece of NAND page becomes dangerous block, finds replacement block for corresponding piece of NAND page, update is unavailable Block table;
(50) caching page is discharged;
(51) if write buffer or the free page of read-write cache are more than the second warning value, stop cleaning write buffer or read-write is slow It deposits;It is no to then follow the steps (41).
If unavailable piece of table further includes the NAND block that erasing times are more than erasing warning value, step (43), which obtains, replaces page Physical address after it is further comprising the steps of:
(431) according to physical address, the erasing times of corresponding piece of NAND page are obtained from erasing times table;If NAND The erasing times of corresponding piece of page add 1 to be equal to or more than erasing warning value, and corresponding piece of NAND page becomes dangerous block, executes step (48)。
Unavailable piece of table uploads to the file system in host in booting, and unavailable piece of table in the process of running Fresh information uploads file system, and file is distributed to unavailable piece to avoid file system.
When file be deleted or reduce cause a page/block to be released when, if it be a bad page/block or dangerous page/ Block, its replacement page are just released from unavailable page table.Bad page or bad block will for good and all stay in unavailable page/block table In.Dangerous page/block then can allow its early retirement for good and all to stay in unavailable page/block as bad as the case may be In table, it can also recycle and be continuing with.Because may be because storing a text often changed as dangerous page/block Part, storing new file may be with regard to there is no problem.
The present invention may be also used in other storage devices, such as eMMC, SD card, microSD cards, eMMC (Embedded Multi Media Card) it is embedded storage ordered by MMC associations, primarily directed to products such as mobile phone or tablet computers Device standard specification, eMMC is single flash chip, main control chip composition, and provides standard host interface.SD card (Secure Digital Memory Card) it is a kind of storage card based on semiconductor flash memory technique, it is to be based on Multimedia Card (MMC) it is developed on format, Micro SD Card, original name Trans-flash Card (TF card) are formally renamed as 2004 Micro SD Card, by SanDisk (dodging enlightening), company invents.
Data storage device provided by the invention and reading/writing method using the table of unavailable page table/unavailable piece, MRAM packets Write buffer or read-write cache are included, can ensure readwrite performance, and the number of erasing NAND can be reduced, extends the longevity of solid state disk Life;Due to not using DDR DRAM, without using the expensive power-off protection equipment for accounting for volume again, reduce solid state disk at This, while reducing the power consumption of solid state disk;It safeguards the erasing times table of each block (block) and unavailable page table, no longer adopts The NAND administrative skills being written with strange land, without preserving the logical address and the physical address table of comparisons that occupy big quantity space, not only Memory space is saved, and without complicated processing, further improves readwrite performance;Not to sacrifice the performance of random read take For cost, and without consuming more Installed System Memory;Unavailable page table is replaced using unavailable piece of table, memory is further reduced and disappears Consumption.
The preferred embodiment of the present invention has been described in detail above.It should be appreciated that those skilled in the art without It needs creative work according to the present invention can conceive and makes many modifications and variations.Therefore, all technologies in the art Personnel are available by logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's idea Technical solution, all should be in the protection domain being defined in the patent claims.

Claims (10)

1. a kind of write method using unavailable page table of data storage device, which is characterized in that
Including data storage device, data storage device include host interface, main control chip, for storing data one or more A NAND chip and MRAM, the NAND chip, the MRAM are connect with the main control chip respectively, and the MRAM includes writing Caching or read-write cache, the MRAM further include erasing times table and unavailable page table, and erasing times table is described for storing The erasing times of each block in NAND chip, the unavailable page table include that evil idea when dispatching from the factory in the NAND chip is in the block The evil idea page in the block and their replacement page occurred during page, follow-up read-write use;
The write method using unavailable page table of the data storage device includes the following steps:
(1) it receives and writes NAND page instruction;
(2) whether the NAND page, if in the write buffer or the read-write cache, is held in write buffer or read-write cache Row step (5);If not in the write buffer or the read-write cache, step (3) is executed;
(3) free page is selected from caching, and the content of the NAND page is written;
(4) if the write buffer or the free page of the read-write cache are less than the first warning value, the write buffer or institute are cleared up State read-write cache;
(5) data write in NAND page instruction are written in the corresponding page of write buffer or read-write cache.
2. the write method using unavailable page table of data storage device as described in claim 1, which is characterized in that it is described not Can further include the replacement page of dangerous page and the dangerous page with page table, the danger page is erasing times in the NAND chip More than the page in the block of erasing warning value.
3. the write method using unavailable page table of data storage device as described in claim 1, which is characterized in that step (4) write buffer is cleared up in or the method for the read-write cache includes the following steps:
(41) selection needs the caching page cleared up;
(42) if the corresponding NAND page of the caching page is in unavailable page table and has replacement page, step (43) is executed;Otherwise Execute step (44);
(43) address for replacing page is obtained;
(44) address of the NAND page is directly corresponded into physical address, finds institute in the write buffer or the read-write cache Have and belongs to same piece and newer caching page;
(45) data for reading corresponding piece of the NAND page all belong to same piece and newer caching page with what is found The data that corresponding piece of NAND page described in data update;
(46) data of corresponding piece of the NAND page are write back into NAND chip;
(47) if writing back NAND chip success, step (49) is executed;If writing back NAND chip failure, the NAND is corresponding Block becomes bad block, executes step (48);
(48) according to erasing times table, the NAND block idle according to homeostatic principle distribution is write, as corresponding piece of the NAND's Replacement block updates the unavailable page table, executes step (43);
(49) corresponding piece of erasing times of NAND page described in erasing times table are updated;
(50) caching page is discharged;
(51) if the write buffer or the free page of the read-write cache are more than the second warning value, stop clearing up the write buffer Or the read-write cache;It is no to then follow the steps (41).
4. the write method using unavailable page table of data storage device as claimed in claim 3, which is characterized in that step (43) further comprising the steps of after the physical address of acquisition replacement page:
(431) according to the physical address, the erasing times of corresponding piece of the NAND page are obtained from erasing times table;If The erasing times of corresponding piece of the NAND page add 1 to be equal to or more than erasing warning value, the corresponding page in the block of the NAND page As dangerous page, step (48) is executed;It is no to then follow the steps (42).
5. the write method using unavailable page table of data storage device as described in claim 1, which is characterized in that it is described can not With page table the file system in host, and the fresh information of the unavailable page table in the process of running are uploaded in booting The file system is uploaded, unavailable page is distributed to file to avoid the file system.
6. a kind of write method using unavailable piece of table of data storage device, which is characterized in that
One group of NAND chip including main control chip, for storing data and MRAM, the NAND chip, MRAM difference Connect with the main control chip, the MRAM includes write buffer or read-write cache, the MRAM further include erasing times table with not Available block table, erasing times table are used to store the erasing times of each block in the NAND chip, and the unavailable piece of table includes The bad block and their replacement block occurred during bad block, follow-up read-write use when dispatching from the factory in the NAND chip;
The write method using unavailable piece of table of the data storage device, includes the following steps:
(1) it receives and writes NAND page instruction;
(2) whether the NAND page, if in the write buffer or the read-write cache, is held in write buffer or read-write cache Row step (5);If not in the write buffer or the read-write cache, step (3) is executed;
(3) free page is selected from caching, and the content of the NAND page is written;
(4) if the write buffer or the free page of the read-write cache are less than the first warning value, the write buffer or institute are cleared up State read-write cache;
(5) data write in NAND page instruction are written in the corresponding page of write buffer or read-write cache.
7. the write method using unavailable piece of table of data storage device as claimed in claim 6, which is characterized in that it is described not Available block table further includes the dangerous block and their replacement block that erasing times are more than erasing warning value.
8. the write method using unavailable piece of table of data storage device as claimed in claim 6, which is characterized in that step (4) write buffer is cleared up in or the method for the read-write cache includes the following steps:
(41) selection needs the caching page cleared up;
(42) if corresponding piece of the corresponding NAND page of the caching page is in unavailable piece of table and has replacement block, step is executed (43);It is no to then follow the steps (44);
(43) address for obtaining replacement block, corresponding NAND page in the replacement block is directly corresponded to by the address of the NAND page Physical address;
(44) it according to the physical address of the NAND page, finds and all in the write buffer or the read-write cache belongs to same Block and newer caching page;
(45) data for reading corresponding piece of the NAND page all belong to same piece and newer caching page with what is found The data that corresponding piece of NAND page described in data update;
(46) data of corresponding piece of the NAND page are write back into NAND chip;
(47) if writing back NAND chip success, step (49) is executed;If writing back NAND chip failure, the NAND page corresponds to Block become bad block, execute step (48);
(48) according to erasing times table, according to the NAND block for writing the homeostatic principle distribution free time, as the replacement block of the bad block, more The new unavailable piece of table, executes step (43);
(49) erasing times of corresponding piece of NAND page described in erasing times table are updated;
(50) caching page is discharged;
(51) if the write buffer or the free page of the read-write cache are more than the second warning value, stop clearing up the write buffer Or the read-write cache;It is no to then follow the steps (41).
9. the write method using unavailable piece of table of data storage device as claimed in claim 8, which is characterized in that step (43) further comprising the steps of after the physical address of acquisition replacement page:
(431) according to the physical address, the erasing times of corresponding piece of the NAND page are obtained from erasing times table;If The erasing times of corresponding piece of the NAND page add 1 to be equal to or more than erasing warning value, and corresponding piece of the NAND page becomes danger Dangerous block executes step (48).
10. the write method using unavailable piece of table of data storage device as claimed in claim 6, which is characterized in that it is described not Available block table uploads to the file system in host, and the update letter of the unavailable piece of table in the process of running in booting Breath uploads the file system, and file is distributed to unavailable piece to avoid the file system.
CN201510288489.1A 2015-05-29 2015-05-29 Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table Active CN105630701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510288489.1A CN105630701B (en) 2015-05-29 2015-05-29 Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510288489.1A CN105630701B (en) 2015-05-29 2015-05-29 Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table

Publications (2)

Publication Number Publication Date
CN105630701A CN105630701A (en) 2016-06-01
CN105630701B true CN105630701B (en) 2018-09-14

Family

ID=56045670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510288489.1A Active CN105630701B (en) 2015-05-29 2015-05-29 Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table

Country Status (1)

Country Link
CN (1) CN105630701B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102565920B1 (en) * 2018-07-18 2023-08-11 에스케이하이닉스 주식회사 Storage device and operating method thereof
CN110174998A (en) * 2019-05-05 2019-08-27 上海威固信息技术股份有限公司 A method of improving high-speed signal acquisition system real time
CN110888596B (en) * 2019-06-25 2021-07-09 北京华弘集成电路设计有限责任公司 File erasing method and device for Flash storage area
CN110517719A (en) * 2019-08-27 2019-11-29 江苏华存电子科技有限公司 A kind of method of dynamic N andFlash danger block screening
CN110633056B (en) * 2019-09-20 2023-05-26 恒宝股份有限公司 Page management method and storage device of Flash chip at operating system level
CN111078136B (en) * 2019-10-22 2023-05-05 力高(山东)新能源技术股份有限公司 Method for preventing flash life reduction caused by BMS dynamic data storage

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8140739B2 (en) * 2008-08-08 2012-03-20 Imation Corp. Flash memory based storage devices utilizing magnetoresistive random access memory (MRAM) to store files having logical block addresses stored in a write frequency file buffer table
CN103488578A (en) * 2012-12-28 2014-01-01 晶天电子(深圳)有限公司 Vmd application/driver
CN103995578A (en) * 2013-03-15 2014-08-20 晶天电子(深圳)有限公司 Member driving device possessing green energy data persisting mode
WO2014132346A1 (en) * 2013-02-27 2014-09-04 株式会社日立製作所 Semiconductor storage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8140739B2 (en) * 2008-08-08 2012-03-20 Imation Corp. Flash memory based storage devices utilizing magnetoresistive random access memory (MRAM) to store files having logical block addresses stored in a write frequency file buffer table
CN103488578A (en) * 2012-12-28 2014-01-01 晶天电子(深圳)有限公司 Vmd application/driver
WO2014132346A1 (en) * 2013-02-27 2014-09-04 株式会社日立製作所 Semiconductor storage
CN103995578A (en) * 2013-03-15 2014-08-20 晶天电子(深圳)有限公司 Member driving device possessing green energy data persisting mode

Also Published As

Publication number Publication date
CN105630701A (en) 2016-06-01

Similar Documents

Publication Publication Date Title
CN105630701B (en) Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table
CN105630705B (en) Data storage device and the reading/writing method for using block substitution table
US10445231B2 (en) Method and system for storage device metadata management and processing
CN105630405B (en) A kind of storage system and the reading/writing method using the storage system
CN102841851B (en) Flash memory management method and flash memory device
CN105718530B (en) File storage system and file storage control method thereof
US20170139825A1 (en) Method of improving garbage collection efficiency of flash-oriented file systems using a journaling approach
CN105630700B (en) A kind of storage system and reading/writing method with secondary cache structure
CN105243025A (en) Mapping table forming and loading methods and electronic device
CN105608016B (en) Solid state hard disk of the DRAM in conjunction with MRAM and the storage card using MRAM
US10754785B2 (en) Checkpointing for DRAM-less SSD
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
CN103294607A (en) Memory management method
CN102981979B (en) A kind of method improving memory system data access speed
CN105630691A (en) MRAM-using solid state hard disk and physical address-using reading/writing method
CN105630408A (en) Solid-state drive control chip integrating MRAM (Magnetic Random Access Memory) and solid-state drive
CN105607862A (en) Solid state disk capable of combining DRAM (Dynamic Random Access Memory) with MRAM (Magnetic Random Access Memory) and being provided with backup power
US9727453B2 (en) Multi-level table deltas
US9218294B1 (en) Multi-level logical block address (LBA) mapping table for solid state
CN105630699B (en) A kind of solid state hard disk and read-write cache management method using MRAM
CN105630704A (en) Storage device and read-write method applying block-based logic physical address comparison table
Du et al. SSW: A strictly sequential writing method for open-channel SSD
CN105608014B (en) A kind of storage device using MRAM
CN108733575B (en) Method for reconstructing physical mapping table by logic after power-off restart and solid state disk
CN107765989B (en) Storage device control chip, storage device and storage device management 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
GR01 Patent grant
GR01 Patent grant