CN105630701A - Data storage apparatus and read/write method using unavailable page table or unavailable block table - Google Patents

Data storage apparatus and read/write method using unavailable page table or unavailable block table Download PDF

Info

Publication number
CN105630701A
CN105630701A CN201510288489.1A CN201510288489A CN105630701A CN 105630701 A CN105630701 A CN 105630701A CN 201510288489 A CN201510288489 A CN 201510288489A CN 105630701 A CN105630701 A CN 105630701A
Authority
CN
China
Prior art keywords
page
nand
write
block
unavailable
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.)
Granted
Application number
CN201510288489.1A
Other languages
Chinese (zh)
Other versions
CN105630701B (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

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The present invention provides a data storage apparatus. The data storage apparatus comprises a host interface, a main control chip, one or more NAND chip used for storing data and an MRAM. The NAND chip and the MRAM are separately connected to the main control chip. The MRAM comprises a write cache or a read/write cache, and the MRAM further comprises an erasure time table and an unavailable page table, wherein the erasure time table is used for storing the number of times of erasing each block in the NAND chip, and the unavailable page table comprises a page in a bad block that appears when the NAND chip leaves a factory, a page in a bad block that appears in a subsequent read/write usage process and alternative pages of the foregoing pages. According to the data storage apparatus and the read/write method using the unavailable page table/unavailable block table, which is provided by the present invention, the MRAM comprises the write cache or the read/write cache, which not only ensures read/write performance, but also reduces the number of times of erasing the NAND and prolonging the service life of the data storage apparatus; the erasure time table and unavailable page table/unavailable block table of each block are maintained, and an NAND management technology of remote writing will not be adopted any more, and a logic address and physical address contrast table that occupies a large amount of space does not need to be stored, so that not only storage space is saved, but also complex processing is not required, thereby further improving read/write performance.

Description

Data storage device and use unavailable page table or the reading/writing method of unavailable piece of table
Technical field
The present invention relates to field of data storage, particularly relate to a kind of data storage device and the reading/writing method of unavailable page table or unavailable piece of table.
Background technology
Currently, the development of nand flash memory technology has promoted SSD industry.
As it is shown in figure 1, use the technology such as HSSI High-Speed Serial Interface such as SATA, PICe between SSD and main frame. Internal by being used for storing one group of NAND chip of data, for supporting to calculate and data cached DDRDRAM (internal memory), and main control chip (SSDController) composition, NAND also stores logical address and physical address synopsis. Sometimes also need to circuit breaking protective system.
NAND is the storage device of a kind of monoblock read-write, and the unit that minimum readable takes is page, and minimum erasable unit is block, and a block is often made up of a lot of page, and after block erasing, the page of the inside can carry out independent write operation. Write operation is very slow, more more slowly than reading, and it is more more slowly than write to wipe operation.
As in figure 2 it is shown, mobile phone is as follows with the file operation mode of computer:
(1) application software send to operating system open, close, reading and writing file instruction;
(2) file system portion in operating system is the instruction morphing instruction for reading and writing memory block of reading and writing file;
(3) NAND drives and manages software and accepts the instruction in read-write memory block district, carries out buffer memory, writes the optimizations such as equilibrium, sends to chip and read page, write the instructions such as block.
In mobile phone, NAND drives with management software usually used as the software module being closely related with operating system, runs on host chip; In a computer, NAND drives and generally runs on the main control chip of solid state hard disc with management software.
One problem of nand flash memory is that NAND has the limited life-span. The inside each page through certain number of times erasable after, will permanent failure can not be continuing with. The current trend of industry development is the capacity of NAND and packing density increases very fast, but to reduce the life-span for cost. Erasable number of times is reduced to about current 3000 time from initial 100,000 times.
Just having the block of some damages when nand flash memory is typically in dispatching from the factory, in use procedure, bad block is likely to also constantly to occur, therefore all of nand flash memory is all along with a bad block table, generally can be stored in the appointment region of nand flash memory or make marks on bad block.
Because the above characteristic of nand flash memory, it is complicated that the NAND within SSD manages comparison. In order to not make some that the block premature deterioration of write operation often occurs, it is necessary to carry out writing equilibrium treatment. Logical address and physical address that file system software identifies are different, it is necessary to a table is mapped the two. Owing to NAND erasing is too slow, not updating in original block district, but new content is write a Ge Xinkuai district during general amendment one content, it is invalid that Jiu Kuai district is labeled as, and waits the CPU free time to get off to wipe it again. So, the synopsis of logical address physical address is constantly dynamically to update. This table is proportional to the total capacity of SSD, exists in DDRDRAM, additionally also has corresponding labelling inside NAND. Along with the increasing sharply of SSD capacity on market, this telogenesis is the consumer that DRAM is maximum.
Owing to the read or write speed of NAND is more more slowly than DRAM, it is also possible to utilize a part of dram space to make the buffer memory (Cache) of reading and writing, improve the performance of whole SSD. But introducing is write buffer memory and is created new problem: once there is power-off, the content not yet writing NAND in DRAM cache can be lost, and causes the damage of the even whole file system of system loss data. So costliness, bulky circuit breaking protective system (being generally made up of battery or substantial amounts of capacitor) must be used simultaneously. And logical-physical address synopsis, after there is power-off, the data being available with in NAND re-construct, although time consuming.
From described above it can be seen that the design of SSD encounters awkward: writing buffer memory if do not used, the write performance of product is had a greatly reduced quality; If using and writing buffer memory, it is necessary to use costliness to account for again the power-off protection equipment of volume, cause cost effectiveness very poor simultaneously.
A kind of solid state hard disc mixing use MRAM and DRAM; MRAM is used for writing buffer memory and logical address and physical address synopsis buffer memory; as shown in Figure 3; owing to MRAM can forever retain data after a loss of power as Flash flash memory; not in use by expensive, bulky circuit breaking protective system; reduce the cost of solid state hard disc, thus improve the cost effectiveness of solid state hard disc. But this method with slightly sacrifice random reading performance for cost.
A kind of solid state hard disc using MRAM; use physical address is read and write; MRAM is used for writing buffer memory; Installed System Memory DRAM is used for preserving logical address and physical address synopsis; as shown in Figure 4; owing to not in use by expensive, bulky circuit breaking protective system, reducing the cost of solid state hard disc, thus improve the cost effectiveness of solid state hard disc. But this method needs to consume more Installed System Memory.
Therefore, those skilled in the art is devoted to develop the data storage device that a kind of cost effectiveness is high and low in energy consumption, can either ensure write performance, can reduce again data storage device cost, and power consumption is relatively low simultaneously.
Summary of the invention
Because the drawbacks described above of prior art, the technical problem to be solved is to provide a kind of data storage device, can either ensure write performance, can reduce again data storage device cost, and power consumption is relatively low simultaneously. Solid state hard disc provided by the invention not with slightly sacrifice random reading performance for cost, and without consuming more Installed System Memory.
The present invention also provides for the reading/writing method using unavailable page table or unavailable piece of table.
Nand flash memory management technique commonly used in solid state hard disc shown in Fig. 1, the method employing strange land write, namely during one NAND page of amendment, is not revise on original position, but one new NAND page of distribution, write new data; And old NAND page is designated as invalid, reclaim later.
The reason of do so has two:
(1) cycle of erasable NAND page is oversize, if not adopting strange land to write, data certainly will preserve for a long time in DRAM, causes the probability of loss of data to strengthen because of power-off.
(2) writing the consideration of equilibrium, if the content of certain one page is often modified, it is likely to premature deterioration, and therefore address is all changed in amendment every time is the good method that equilibrium is write in a realization.
In the present invention, buffer memory is write owing to have employed MRAM. The content of all writes can retain the time long as far as possible in the buffer, and reason (1) substantially eliminates; Moreover using after writing buffer memory, relative to amendment data with existing, distribute new NAND page write new data, be small probability event, the pressure that therefore buffer memory is caused by the time of erasable NAND is little.
It addition, the principle writing cache management in the present invention is often to be written of NAND page to stay the writing in buffer memory of MRAM. Realization is write equilibrium and is very helpful by this, and reason (2) also substantially eliminates.
Based on above 2 points, the present invention no longer adopts the NAND management technique that strange land writes.
No longer adopting strange land write, logical address and physical address synopsis will be substantially stationary, so there is no the necessary logical address and physical address synopsis using and consuming a large amount of memory headrooms.
Present invention, it is desirable to safeguard the erasing times table of each piece (block), a block includes up to 512 pages (page), and relative to the logical address of each page and physical address synopsis, erasing times table is much smaller. Additionally the present invention also safeguards a unavailable page table/unavailable piece of table, when buffer memory is write in use, forms dangerous page/danger block small probability event especially.
Thus solid state hard disc provided by the invention, it is possible to use the MRAM that capacity is less, both ensure write performance, reduce again solid state hard disc cost, power consumption is relatively low simultaneously; And not to sacrifice the random performance read for cost, it is not necessary to consume more Installed System Memory.
The present invention provides a kind of data storage device, including HPI, main control chip, for storing one or more NAND chip and the MRAM of data, NAND chip, MRAM are connected with main control chip respectively, MRAM includes writing buffer memory or read-write cache, MRAM also includes erasing times table and unavailable page table, erasing times table is for storing the erasing times of each piece in NAND chip, and unavailable page table includes the page in the bad block occurred in the page in bad block when dispatching from the factory in NAND chip, follow-up read-write use procedure and their replacement page.
Further, unavailable page table also includes dangerous page and the replacement page of dangerous page, dangerous page be in NAND chip erasing times more than the page in the block of erasing warning value. When some page is often erasable, cause when number of times exceedes warning value, select one to replace page and in the data transfer past. Not in use by the page having write risk, it is ensured that the safety write of data.
The present invention also provides for the write method using unavailable page table of a kind of data storage device, comprises the following steps:
(1) receive and write NAND page instruction;
(2) whether NAND page is in writing buffer memory or read-write cache, if in writing buffer memory or read-write cache, performs step (5); If not in writing buffer memory or read-write cache, perform step (3);
(3) from buffer memory, a free page is selected, the content of write NAND page;
(4) if writing the free page of buffer memory or read-write cache less than the first warning value, buffer memory or read-write cache are write in cleaning;
(5) data write in NAND page instruction are written in the corresponding page of buffer memory or read-write cache.
Further, step (4) is cleared up the method writing buffer memory or read-write cache to comprise the following steps:
(41) select to need the caching page of cleaning;
(42) if NAND page corresponding to caching page and has replacement page in unavailable page table, step (43) is performed; Otherwise perform step (44);
(43) address replacing page is obtained;
(44) address of NAND page is directly corresponded to physical address, find and write all caching pages belonging to same piece and renewal in buffer memory or read-write cache;
(45) read the data of block corresponding to NAND page, all belong to same piece and the data of caching page that update update the data of block corresponding to NAND page with what find;
(46) data of block corresponding for NAND page are write back NAND chip;
(47) if writing back NAND chip success, step (49) is performed; If writing back NAND chip failure, block corresponding for NAND becomes bad block, performs step (48);
(48) according to erasing times table, the NAND block idle according to writing homeostatic principle distribution, as the replacement block of block corresponding for NAND, update unavailable page table, perform step (43);
(49) updating the erasing times of the block that the physical address of NAND page is corresponding in erasing times table, if the erasable number of times of NAND page is more than warning value, NAND page becomes dangerous page, finds replacement page for NAND page, updates unavailable page table;
(50) release caching page;
(51) if writing the free page of buffer memory or read-write cache more than the second warning value, stopping cleaning and writing buffer memory or read-write cache; Otherwise perform step (41).
Further, step (43) is further comprising the steps of after obtaining the physical address replacing page:
(431) according to physical address, from erasing times table, the erasing times of block corresponding to NAND page is obtained; If the erasing times of the block that NAND page is corresponding adds 1 equal to or more than erasing warning value, the page in the block that NAND page is corresponding becomes dangerous page, performs step (48); Otherwise perform step (42).
Further, unavailable page table uploads to the file system in main frame when start, and the more fresh information of unavailable page table uploads file system in running, to avoid file system that unavailable page is distributed to file.
The present invention also provides for a kind of data storage device, including main control chip, for storing one group of NAND chip and the MRAM of data, NAND chip, MRAM are connected with main control chip respectively, MRAM includes writing buffer memory or read-write cache, it is characterized in that, MRAM also includes erasing times table and unavailable piece of table, erasing times table is for storing the erasing times of each piece in NAND chip, and unavailable piece of table includes the bad block and their replacement block that occur in bad block when dispatching from the factory in NAND chip, follow-up read-write use procedure.
Adopt unavailable piece of table to replace unavailable page table, reduce memory consumption further.
Further, unavailable piece of table also includes erasing times more than dangerous block and their replacement block of wiping warning value. When some block is often erasable, cause when number of times exceedes warning value, select a replacement block and in the data transfer past. Not in use by the block having write risk, it is ensured that the safety write of data.
The present invention also provides for the write method using unavailable piece of table of a kind of data storage device, comprises the following steps:
(1) receive and write NAND page instruction;
(2) whether NAND page is in writing buffer memory or read-write cache, if in writing buffer memory or read-write cache, performs step (5); If not in writing buffer memory or read-write cache, perform step (3);
(3) from buffer memory, a free page is selected, the content of write NAND page;
(4) if writing the free page of buffer memory or read-write cache less than the first warning value, buffer memory or read-write cache are write in cleaning;
(5) data write in NAND page instruction are written in the corresponding page of buffer memory or read-write cache.
Further, step (4) is cleared up the method writing buffer memory or read-write cache to comprise the following steps:
(41) select to need the caching page of cleaning;
(42) if block corresponding to NAND page corresponding to caching page and has replacement block in unavailable piece of table, step (43) is performed; Otherwise perform step (44);
(43) obtain the address of replacement block, the address of NAND page is directly corresponded to the physical address of corresponding NAND page in replacement block;
(44) physical address according to NAND page, finds and writes all caching pages belonging to same piece and renewal in buffer memory or read-write cache;
(45) read the data of block corresponding to NAND page, all belong to same piece and the data of caching page that update update the data of block corresponding to NAND page with what find;
(46) data of block corresponding for NAND page are write back NAND chip;
(47) if writing back NAND chip success, step (49) is performed; If writing back NAND chip failure, the block that NAND page is corresponding becomes bad block, performs step (48);
(48) according to erasing times table, the NAND block idle according to writing homeostatic principle distribution, as the replacement block of bad block, update unavailable piece of table, perform step (43);
(49) updating the erasing times of the block that NAND page is corresponding in erasing times table, if the erasing times of block corresponding to NAND page is more than warning value, the block that NAND page is corresponding becomes dangerous block, and the block corresponding for NAND page finds replacement block, updates unavailable piece of table;
(50) release caching page;
(51) if writing the free page of buffer memory or read-write cache more than the second warning value, stopping cleaning and writing buffer memory or read-write cache; Otherwise perform step (41).
Further, step (43) is further comprising the steps of after obtaining the physical address replacing page:
(431) according to physical address, from erasing times table, the erasing times of block corresponding to NAND page is obtained; If the erasing times of the block that NAND page is corresponding adds 1 equal to or more than erasing warning value, the block that NAND page is corresponding becomes dangerous block, performs step (48).
Further, unavailable piece of table uploads to the file system in main frame when start, and the more fresh information of unavailable piece of table uploads file system in running, to avoid file system to distribute to file unavailable piece.
Compared with prior art, data storage device provided by the invention and use the reading/writing method of unavailable page table/unavailable piece of table to have the advantages that
(1) MRAM includes writing buffer memory or read-write cache, it is possible to ensure readwrite performance, can reduce again the number of times of erasing NAND, extends the life-span of solid state hard disc;
(2) owing to not using DDRDRAM, it is not necessary to use costliness to account for again the power-off protection equipment of volume, reduce the cost of solid state hard disc, reduce the power consumption of solid state hard disc simultaneously;
(3) the erasing times table of each piece (block) and unavailable page table are safeguarded, no longer adopt the NAND management technique of strange land write, without preserving the logical address and physical address synopsis taking big quantity space, not only save memory space, and without complicated process, further increase readwrite performance;
(4) not to sacrifice the random performance read for cost, and without consuming more Installed System Memory;
(5) adopt unavailable piece of table to replace unavailable page table, reduce memory consumption further.
Below with reference to accompanying drawing, the technique effect of the design of the present invention, concrete structure and generation is described further, to be fully understood from the purpose of the present invention, feature and effect.
Accompanying drawing explanation
Fig. 1 is the structural representation of solid state hard disc in prior art;
Fig. 2 is prior art file operational flowchart;
Fig. 3 is the structural representation that mixing uses the solid state hard disc of DRAM and MRAM;
Fig. 4 is the structural representation of the solid state hard disc using MRAM;
Fig. 5 is the structural representation of the solid state hard disc of one embodiment of the present of invention;
Fig. 6 is the flow chart of the write method using unavailable page table of the solid state hard disc shown in Fig. 5;
Fig. 7 is the flow chart that buffer memory is write in the cleaning of the solid state hard disc shown in Fig. 5;
Fig. 8 is that the another kind of of the solid state hard disc shown in Fig. 5 clears up the flow chart writing buffer memory;
Fig. 9 is the structural representation of the solid state hard disc of an alternative embodiment of the invention.
Detailed description of the invention
The present invention is usable in multiple data storage device, for instance solid state hard disc (SSD), eMMC, SD card, microSD card (being also called T-Flash card), illustrates for solid state hard disc below.
As shown in Figure 5, the solid state hard disc of one embodiment of the present of invention, including HPI, main control chip, for storing one or more NAND chip and the MRAM of data, NAND chip, MRAM are connected with main control chip respectively, MRAM includes writing buffer memory, MRAM also includes erasing times table and unavailable page table, erasing times table is for storing the erasing times of each piece in NAND chip, and unavailable page table includes the page in the bad block occurred in the page in bad block when dispatching from the factory in NAND chip, follow-up read-write use procedure and their replacement page.
MRAM is connected with the main control chip of solid state hard disc by DDRDRAM interface.
MRAM can also include read-write cache.
Unavailable page table also includes dangerous page and the replacement page of dangerous page, dangerous page be in NAND chip erasing times more than the page in the block of erasing warning value. Not in use by the block having write risk, it is ensured that the safety write of data.
The write method using unavailable page table of the solid state hard disc of the present embodiment, as shown in Figure 6, comprises the following steps:
(1) receive and write NAND page instruction;
(2) whether NAND page is in writing buffer memory or read-write cache, if in writing buffer memory or read-write cache, performs step (5); If not in writing buffer memory or read-write cache, perform step (3);
(3) from buffer memory, a free page is selected, the content of write NAND page;
(4) if writing the free page of buffer memory or read-write cache less than the first warning value, buffer memory or read-write cache are write in cleaning;
(5) data write in NAND page instruction are written in the corresponding page of buffer memory or read-write cache.
The method that in step (4), buffer memory is write in cleaning, if unavailable page table only includes the page in NAND block failed during write in NAND chip, as it is shown in fig. 7, comprises following steps:
(41) select to need the caching page of cleaning;
(42) if NAND page corresponding to caching page and has replacement page in unavailable page table, step (43) is performed; Otherwise perform step (44);
(43) address replacing page is obtained;
(44) address of NAND page is directly corresponded to physical address, find and write all caching pages belonging to same piece and renewal in buffer memory or read-write cache;
(45) read the data of block corresponding to NAND page, all belong to same piece and the data of caching page that update update the data of block corresponding to NAND page with what find;
(46) data of block corresponding for NAND page are write back NAND chip;
(47) if writing back NAND chip success, step (49) is performed; If writing back NAND chip failure, block corresponding for NAND becomes bad block, performs step (48);
(48) according to erasing times table, the NAND block idle according to writing homeostatic principle distribution, as the replacement block of block corresponding for NAND, update unavailable page table, perform step (43);
(49) updating the erasing times of the block that the physical address of NAND page is corresponding in erasing times table, if the erasable number of times of NAND page is more than warning value, NAND page becomes dangerous page, finds replacement page for NAND page, updates unavailable page table;
(50) release caching page;
(51) if writing the free page of buffer memory or read-write cache more than the second warning value, stopping cleaning and writing buffer memory or read-write cache; Otherwise perform step (41).
Step (41) selects to need the caching page of cleaning, various ways can be adopted, such as: select to need the caching page of cleaning in order, or select according to the last write operation time, namely last write operation caching page more early is first cleared up, or according to last write operation time and selections of whether more newly arriving, namely last write operation more morning and the caching page that updated first are cleared up.
In the present embodiment, the first warning value is set to write the 10% of the total page number of buffer memory or read-write cache, and the second warning value is set to the 30% of the total page number writing buffer memory or read-write cache, do not wait until to write buffer memory or read-write cache is finished just cleaning, therefore, it is possible to ensure that always available free page can distribute.
If unavailable page also includes erasing times more than the page in the NAND block of erasing warning value, as shown in Figure 8, step (43) is further comprising the steps of after obtaining the physical address replacing page:
(431) according to physical address, from erasing times table, the erasing times of block corresponding to NAND page is obtained; If the erasing times of the block that NAND page is corresponding adds 1 equal to or more than erasing warning value, the page in the block that NAND page is corresponding becomes dangerous page, performs step (48); Otherwise perform step (42).
Unavailable page table uploads to the file system in main frame when start, and the more fresh information of unavailable page table uploads file system in running, to avoid file system that unavailable page is distributed to file.
As shown in Figure 9, the solid state hard disc of an alternative embodiment of the invention, including main control chip, for storing one group of NAND chip and the MRAM of data, NAND chip, MRAM are connected with main control chip respectively, MRAM includes writing buffer memory or read-write cache, it is characterized in that, MRAM also includes erasing times table and unavailable piece of table, erasing times table is for storing the erasing times of each piece in NAND chip, and unavailable piece of table includes the bad block and their replacement block that occur in bad block when dispatching from the factory in NAND chip, follow-up read-write use procedure.
MRAM is integrated in the main control chip of solid state hard disc.
In another embodiment of the present invention, it is distinctive in that with the solid state hard disc shown in Fig. 5: adopt unavailable piece of table to instead of unavailable page table, adopts unavailable piece of table table to replace unavailable page table, reduce memory consumption further.
Unavailable piece of table also includes the erasing times NAND block more than erasing warning value.
MRAM also includes unavailable NAND block table, considers unavailable NAND block table, it is to avoid use the block in unavailable NAND block table when distributing idle NAND block.
Adopt unavailable NAND block table to replace unavailable NAND page table, reduce memory consumption further.
In the present embodiment, use the write method of unavailable piece of table, comprise the following steps:
(1) receive and write NAND page instruction;
(2) whether NAND page is in writing buffer memory or read-write cache, if in writing buffer memory or read-write cache, performs step (5); If not in writing buffer memory or read-write cache, perform step (3);
(3) from buffer memory, a free page is selected, the content of write NAND page;
(4) if writing the free page of buffer memory or read-write cache less than the first warning value, buffer memory or read-write cache are write in cleaning;
(5) data write in NAND page instruction are written in the corresponding page of buffer memory or read-write cache.
If unavailable piece of table only includes NAND block failed during write in NAND chip, step (4) is cleared up the method writing buffer memory or read-write cache and comprises the following steps:
(41) select to need the caching page of cleaning;
(42) if block corresponding to NAND page corresponding to caching page and has replacement block in unavailable piece of table, step (43) is performed; Otherwise perform step (44);
(43) obtain the address of replacement block, the address of NAND page is directly corresponded to the physical address of corresponding NAND page in replacement block;
(44) physical address according to NAND page, finds and writes all caching pages belonging to same piece and renewal in buffer memory or read-write cache;
(45) read the data of block corresponding to NAND page, all belong to same piece and the data of caching page that update update the data of block corresponding to NAND page with what find;
(46) data of block corresponding for NAND page are write back NAND chip;
(47) if writing back NAND chip success, step (49) is performed; If writing back NAND chip failure, the block that NAND page is corresponding becomes bad block, performs step (48);
(48) according to erasing times table, the NAND block idle according to writing homeostatic principle distribution, as the replacement block of bad block, update unavailable piece of table, perform step (43);
(49) updating the erasing times of the block that NAND page is corresponding in erasing times table, if the erasing times of block corresponding to NAND page is more than warning value, the block that NAND page is corresponding becomes dangerous block, and the block corresponding for NAND page finds replacement block, updates unavailable piece of table;
(50) release caching page;
(51) if writing the free page of buffer memory or read-write cache more than the second warning value, stopping cleaning and writing buffer memory or read-write cache; Otherwise perform step (41).
If unavailable piece of table also includes the erasing times NAND block more than erasing warning value, step (43) is further comprising the steps of after obtaining the physical address replacing page:
(431) according to physical address, from erasing times table, the erasing times of block corresponding to NAND page is obtained; If the erasing times of the block that NAND page is corresponding adds 1 equal to or more than erasing warning value, the block that NAND page is corresponding becomes dangerous block, performs step (48).
Unavailable piece of table uploads to the file system in main frame when start, and the more fresh information of unavailable piece of table uploads file system in running, to avoid file system to distribute to file unavailable piece.
When file is deleted or reduction causes that a page/block is released, if it is a bad page/block or dangerous page/block, its replacement page just discharges in never available. Bad page or bad block will for good and all be stayed in unavailable page/block table. Dangerous page/block then can be as the case may be, it is possible to allows its early retirement for good and all stay in unavailable page/block table as bad, it is also possible to reclaims and is continuing with. Being possibly due to store a file being often modified because becoming dangerous page/block, storing new file possible just no problem.
The present invention may be also used in other storage devices, such as eMMC, SD card, microSD card, eMMC (EmbeddedMultiMediaCard) ordered by MMC association, the embedded memory standard specifications that is primarily directed to the product such as mobile phone or panel computer, eMMC is single flash chip, main control chip composition, and provides standard host interface. SD card (SecureDigitalMemoryCard) is the storage card of a kind of based semiconductor flash technology, it is based on MultimediaCard (MMC) form to develop, MicroSDCard, original name Trans-flashCard (TF card), within 2004, formally rename MicroSDCard as, SanDisk (sudden strain of a muscle enlightening) company invent.
Data storage device provided by the invention and use the reading/writing method of unavailable page table/unavailable piece of table, MRAM includes writing buffer memory or read-write cache, it is possible to ensure readwrite performance, can reduce again the number of times of erasing NAND, extends the life-span of solid state hard disc; Owing to not using DDRDRAM, it is not necessary to use costliness to account for again the power-off protection equipment of volume, reduce the cost of solid state hard disc, reduce the power consumption of solid state hard disc simultaneously; Safeguard the erasing times table of each piece (block) and unavailable page table, no longer adopt the NAND management technique of strange land write, without preserving the logical address and physical address synopsis taking big quantity space, not only save memory space, and without complicated process, further increase readwrite performance; Not to sacrifice the random performance read for cost, and without consuming more Installed System Memory; Adopt unavailable piece of table to replace unavailable page table, reduce memory consumption further.
The preferred embodiment of the present invention described in detail above. Should be appreciated that those of ordinary skill in the art just can make many modifications and variations according to the design of the present invention without creative work. Therefore, all technical staff in the art, all should in the protection domain being defined in the patent claims under this invention's idea on the basis of existing technology by the available technical scheme of logical analysis, reasoning, or a limited experiment.

Claims (12)

1. a data storage device, including HPI, main control chip, for storing one or more NAND chip and the MRAM of data, described NAND chip, described MRAM is connected with described main control chip respectively, described MRAM includes writing buffer memory or read-write cache, it is characterized in that, described MRAM also includes erasing times table and unavailable page table, erasing times table is for storing the erasing times of each piece in described NAND chip, described unavailable page table includes the page in bad block when dispatching from the factory in described NAND chip, page in the bad block of appearance and their replacement page in follow-up read-write use procedure.
2. data storage device as claimed in claim 1, it is characterised in that described unavailable page table also includes dangerous page and the replacement page of described dangerous page, described dangerous page be in described NAND chip erasing times more than the page in the block of erasing warning value.
3. the write method using unavailable page table of the data storage device as described in claim 1-2, comprises the following steps:
(1) receive and write NAND page instruction;
(2) whether described NAND page is in writing buffer memory or read-write cache, if writing in buffer memory or described read-write cache described, performs step (5); If not writing in buffer memory or described read-write cache described, perform step (3);
(3) from buffer memory, select a free page, write the content of described NAND page;
(4) if described in write the free page of buffer memory or described read-write cache less than the first warning value, write buffer memory or described read-write cache described in cleaning;
(5) data write in NAND page instruction are written in the corresponding page of buffer memory or read-write cache.
4. the write method using unavailable page table of data storage device as claimed in claim 3, it is characterised in that the method writing buffer memory or described read-write cache in step (4) described in cleaning comprises the following steps:
(41) select to need the caching page of cleaning;
(42) if NAND page corresponding to described caching page and has replacement page in unavailable page table, step (43) is performed; Otherwise perform step (44);
(43) address replacing page is obtained;
(44) address of described NAND page is directly corresponded to physical address, described in finding, write all caching pages belonging to same piece and renewal in buffer memory or described read-write cache;
(45) read the data of block corresponding to described NAND page, all belong to same piece and the data of caching page that update update the data of block corresponding to described NAND page with what find;
(46) data of block corresponding for described NAND page are write back NAND chip;
(47) if writing back NAND chip success, step (49) is performed; If writing back NAND chip failure, block corresponding for described NAND becomes bad block, performs step (48);
(48) according to erasing times table, the NAND block idle according to writing homeostatic principle distribution, as the replacement block of block corresponding for described NAND, update described unavailable page table, perform step (43);
(49) erasing times of the corresponding block of NAND page described in erasing times table is updated;
(50) described caching page is discharged;
(51) if described in write the free page of buffer memory or described read-write cache more than the second warning value, stop writing buffer memory or described read-write cache described in cleaning; Otherwise perform step (41).
5. the write method using unavailable page table of data storage device as claimed in claim 4, it is characterised in that step (43) is further comprising the steps of after obtaining the physical address replacing page:
(431) according to described physical address, from erasing times table, the erasing times of block corresponding to described NAND page is obtained; If the erasing times of the block that described NAND page is corresponding adds 1 equal to or more than erasing warning value, the page in the block that described NAND page is corresponding becomes dangerous page, performs step (48); Otherwise perform step (42).
6. the write method using unavailable page table of data storage device as claimed in claim 3, it is characterized in that, described unavailable page table uploads to the file system in main frame when start, and the more fresh information of unavailable page table described in running uploads described file system, to avoid described file system that unavailable page is distributed to file.
7. a data storage device, including main control chip, for storing one group of NAND chip and the MRAM of data, described NAND chip, described MRAM are connected with described main control chip respectively, described MRAM includes writing buffer memory or read-write cache, it is characterized in that, described MRAM also includes erasing times table and unavailable piece of table, erasing times table is for storing the erasing times of each piece in described NAND chip, and described unavailable piece of table includes the bad block and their replacement block that occur in bad block when dispatching from the factory in described NAND chip, follow-up read-write use procedure.
8. data storage device as claimed in claim 7, it is characterised in that described unavailable piece of table also includes erasing times more than dangerous block and their replacement block wiping warning value.
9. the write method using unavailable piece of table of data storage device as claimed in claim 7 or 8, comprises the following steps:
(1) receive and write NAND page instruction;
(2) whether described NAND page is in writing buffer memory or read-write cache, if writing in buffer memory or described read-write cache described, performs step (5); If not writing in buffer memory or described read-write cache described, perform step (3);
(3) from buffer memory, select a free page, write the content of described NAND page;
(4) if described in write the free page of buffer memory or described read-write cache less than the first warning value, write buffer memory or described read-write cache described in cleaning;
(5) data write in NAND page instruction are written in the corresponding page of buffer memory or read-write cache.
10. the write method using unavailable piece of table of data storage device as claimed in claim 9, it is characterised in that the method writing buffer memory or described read-write cache in step (4) described in cleaning comprises the following steps:
(41) select to need the caching page of cleaning;
(42) if block corresponding to NAND page corresponding to described caching page and has replacement block in unavailable piece of table, step (43) is performed; Otherwise perform step (44);
(43) obtain the address of replacement block, the address of described NAND page is directly corresponded to the physical address of corresponding NAND page in described replacement block;
(44) physical address according to described NAND page, writes all caching pages belonging to same piece and renewal in buffer memory or described read-write cache described in finding;
(45) read the data of block corresponding to described NAND page, all belong to same piece and the data of caching page that update update the data of block corresponding to described NAND page with what find;
(46) data of block corresponding for described NAND page are write back NAND chip;
(47) if writing back NAND chip success, step (49) is performed; If writing back NAND chip failure, the block that described NAND page is corresponding becomes bad block, performs step (48);
(48) according to erasing times table, the NAND block idle according to writing homeostatic principle distribution, as the replacement block of described bad block, update described unavailable piece of table, perform step (43);
(49) erasing times of block corresponding to NAND page described in erasing times table is updated;
(50) described caching page is discharged;
(51) if described in write the free page of buffer memory or described read-write cache more than the second warning value, stop writing buffer memory or described read-write cache described in cleaning; Otherwise perform step (41).
11. the write method using unavailable piece of table of data storage device as claimed in claim 10, it is characterised in that step (43) is further comprising the steps of after obtaining the physical address replacing page:
(431) according to described physical address, from erasing times table, the erasing times of block corresponding to described NAND page is obtained; If the erasing times of the block that described NAND page is corresponding adds 1 equal to or more than erasing warning value, the block that described NAND page is corresponding becomes dangerous block, performs step (48).
12. the write method using unavailable piece of table of data storage device as claimed in claim 9, it is characterized in that, described unavailable piece of table uploads to the file system in main frame when start, and the more fresh information of unavailable piece of table described in running uploads described file system, to avoid described file system to distribute to file unavailable piece.
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 true CN105630701A (en) 2016-06-01
CN105630701B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110174998A (en) * 2019-05-05 2019-08-27 上海威固信息技术股份有限公司 A method of improving high-speed signal acquisition system real time
CN110633056A (en) * 2019-09-20 2019-12-31 恒宝股份有限公司 Page management method and storage device of Flash chip on operating system level
CN110737403A (en) * 2018-07-18 2020-01-31 爱思开海力士有限公司 Memory device and method of operating the same
CN110888596A (en) * 2019-06-25 2020-03-17 北京华虹集成电路设计有限责任公司 File erasing method and device for Flash storage area
CN111078136A (en) * 2019-10-22 2020-04-28 安徽力高新能源技术有限公司 Method for preventing flash service life reduction caused by BMS dynamic data storage
WO2021035803A1 (en) * 2019-08-27 2021-03-04 江苏华存电子科技有限公司 Dynamic dangerous block screening method for nand flash

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

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737403A (en) * 2018-07-18 2020-01-31 爱思开海力士有限公司 Memory device and method of operating the same
CN110174998A (en) * 2019-05-05 2019-08-27 上海威固信息技术股份有限公司 A method of improving high-speed signal acquisition system real time
CN110888596A (en) * 2019-06-25 2020-03-17 北京华虹集成电路设计有限责任公司 File erasing method and device for Flash storage area
CN110888596B (en) * 2019-06-25 2021-07-09 北京华弘集成电路设计有限责任公司 File erasing method and device for Flash storage area
WO2021035803A1 (en) * 2019-08-27 2021-03-04 江苏华存电子科技有限公司 Dynamic dangerous block screening method for nand flash
CN110633056A (en) * 2019-09-20 2019-12-31 恒宝股份有限公司 Page management method and storage device of Flash chip on operating system level
CN110633056B (en) * 2019-09-20 2023-05-26 恒宝股份有限公司 Page management method and storage device of Flash chip at operating system level
CN111078136A (en) * 2019-10-22 2020-04-28 安徽力高新能源技术有限公司 Method for preventing flash service life reduction caused by BMS dynamic data storage
CN111078136B (en) * 2019-10-22 2023-05-05 力高(山东)新能源技术股份有限公司 Method for preventing flash life reduction caused by BMS dynamic data storage

Also Published As

Publication number Publication date
CN105630701B (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN105630705A (en) Data storage device and read-write method applying block replacement table
CN105630701A (en) Data storage apparatus and read/write method using unavailable page table or unavailable block table
CN102576333B (en) Data cache in nonvolatile memory
CN105630405B (en) A kind of storage system and the reading/writing method using the storage system
US8612666B2 (en) Method and system for managing a NAND flash memory by paging segments of a logical to physical address map to a non-volatile memory
EP2920700B1 (en) Memory segment remapping to address fragmentation
US9128847B2 (en) Cache control apparatus and cache control method
US20170139825A1 (en) Method of improving garbage collection efficiency of flash-oriented file systems using a journaling approach
CN105718530A (en) File storage system and file storage control method thereof
CN105608016B (en) Solid state hard disk of the DRAM in conjunction with MRAM and the storage card using MRAM
CN105630691A (en) MRAM-using solid state hard disk and physical address-using reading/writing method
CN100533408C (en) Flashmemory safety read-write method
US20100235568A1 (en) Storage device using non-volatile memory
CN104166634A (en) Management method of mapping table caches in solid-state disk system
US10754785B2 (en) Checkpointing for DRAM-less SSD
CN102768645A (en) Solid state disk (SSD) prefetching method for mixed caching and SSD
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
CN105632534A (en) Solid-state drive with mixed use of DRAM (Dynamic Random Access Memory) and MRAM (Magnetic Random Access Memory)
CN105630704A (en) Storage device and read-write method applying block-based logic physical address comparison table
CN105630404A (en) Solid-state drive using MRAM and read-write method
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
CN105608013A (en) MRAM-integrated memory card control chip and memory card
WO2009048707A1 (en) Managing flash memory in computer systems

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