CN104881249A - eMMC reading/writing method and device - Google Patents
eMMC reading/writing method and device Download PDFInfo
- Publication number
- CN104881249A CN104881249A CN201510242356.0A CN201510242356A CN104881249A CN 104881249 A CN104881249 A CN 104881249A CN 201510242356 A CN201510242356 A CN 201510242356A CN 104881249 A CN104881249 A CN 104881249A
- Authority
- CN
- China
- Prior art keywords
- emmc
- less
- voltage
- monitoring
- mapping table
- 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
Links
Abstract
The invention discloses an eMMC reading/writing method. An on-chip capacitor serving as a back-up power source is added to eMMC main control; the method comprises the steps of recovering a mapping table in a specific block or a special page during power on, assigning new specific block or specific page to the mapping table, when writing data into the eMMC, monitoring whether the voltage of the eMMC is smaller than a threshold, and when the voltage of the eMMC is smaller than the threshold, saving the mapping table to the new special block or special page; the method is capable of improving the properties of the eMMC, reducing write enlargement of the eMMC and prolonging the service life of the eMMC; the invention also discloses an eMMC reading/writing device.
Description
Technical field
The present invention relates to electronic technology field, particularly relate to reading/writing method and the device of a kind of eMMC.
Background technology
In the actual use procedure of eMMC, for ensureing the security of data, usually to constantly upgrade and preserve current mapping table in NAND FLASH; And in eMMC, mostly adopt method that is regular or cycle write-back mapping table to ensure the security of eMMC data, so just inevitably cause writing in eMMC to amplify and rise, reduce life-span and the performance of eMMC.How reducing eMMC and write amplification, is those skilled in the art's technical issues that need to address.
Summary of the invention
The object of this invention is to provide the reading/writing method of a kind of eMMC, the method can avoid cycle or regular mapping table write-back, thus reaches raising eMMC performance, reduces eMMC and writes amplification, improve the life-span of eMMC.The present invention also provides the read-write equipment of a kind of eMMC.
For solving the problems of the technologies described above, the invention provides the reading/writing method of a kind of eMMC, electric capacity on the sheet increasing power supply in support in eMMC master control, comprising:
Upon power-up, from special blocks or special page, mapping table is recovered;
New special blocks or special page is distributed to described mapping table;
When writing data in eMMC, whether monitoring eMMC voltage is less than threshold value;
When eMMC voltage is less than threshold value, then preserve described mapping table to described new special blocks or special page.
Wherein, whether described monitoring eMMC voltage is less than threshold value and comprises:
Arrange in eMMC master control and be less than threshold voltage and interrupt monitoring eMMC voltage and whether being less than threshold value.
Wherein, whether described monitoring eMMC voltage is less than threshold value and comprises:
Whether monitoring eMMC voltage is less than first threshold and described threshold value, when being less than first threshold, carries out early warning; When being less than described threshold value, then preserve described mapping table to described new special blocks or special page.
Wherein, described early warning comprises:
Early warning is carried out by pilot lamp or voice.
The present invention also provides the read-write equipment of a kind of eMMC, comprising:
Capacitance module on sheet, arranges electric capacity on sheet in eMMC master control, for the power supply in support when power-off;
Recover module, for upon power-up, from special blocks or special page, recover mapping table;
Distribution module, distributes new special blocks or special page for giving described mapping table;
Monitoring modular, during for writing data in eMMC, whether monitoring eMMC voltage is less than threshold value;
Preserve module, for when eMMC voltage is less than threshold value, then preserve described mapping table to described new special blocks or special page.
Wherein, described monitoring modular comprises:
Be less than threshold voltage interrupt location, be less than threshold voltage interrupt monitoring eMMC voltage and whether being less than threshold value for arranging in eMMC master control.
Wherein, described monitoring modular comprises:
Whether the first monitoring means, being less than first threshold for monitoring eMMC voltage, when being less than first threshold, carrying out early warning;
Whether the second monitoring means, be less than described threshold value when being less than described threshold value for monitoring eMMC voltage, then preserve described mapping table to described new special blocks or special page.
Wherein, described first monitoring means comprises:
Pilot lamp subelement or subunits of speech, for early warning.
The reading/writing method of a kind of eMMC provided by the present invention, electric capacity on the sheet increasing power supply in support in eMMC master control, when power on and power down time, from special blocks or special page, recover mapping table; New special blocks or special page is distributed to described mapping table; When writing data in eMMC, whether monitoring eMMC voltage is less than threshold value; When eMMC voltage is less than threshold value, then preserve described mapping table to described new special blocks or special page; Owing to adding electric capacity on sheet, it can also provide power supply when power-off, can accomplish only to carry out write-back mapping table when power-off; The method can only when power-off and the mode of carrying out write back data mapping table when voltage is less than threshold value to ensure the security of eMMC data, reduce eMMC and write amplification, the method can improve eMMC performance, improves the life-span of eMMC.
Accompanying drawing explanation
In order to the technical scheme of the clearer explanation embodiment of the present invention or prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The process flow diagram of the reading/writing method of the eMMC that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of the reading/writing method of the eMMC that Fig. 2 provides for the embodiment of the present invention;
The structured flowchart of the read-write equipment of the eMMC that Fig. 3 provides for the embodiment of the present invention;
The structured flowchart of the monitoring modular that Fig. 4 provides for the embodiment of the present invention;
The structured flowchart of another monitoring modular that Fig. 5 provides for the embodiment of the present invention.
Embodiment
Core of the present invention is to provide the reading/writing method of a kind of eMMC, and the method can avoid cycle or regular mapping table write-back, thus reaches raising eMMC performance, reduces eMMC and writes amplification, improve the life-span of eMMC.The present invention also provides the read-write equipment of a kind of eMMC.
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
EMMC is the embedded memory standard specification of Embedded MultiMediaCard ordered by MMC association, is mainly main for mobile phone products.A clear superiority of eMMC is integrated with a controller in a package, and it provides standard interface and manages flash memory, makes cell phone manufacturer just can be absorbed in the other parts of product development, and shorten the time releasing product to market.
Enable nand gate can provide high cell density, can reach high storage density, and the speed of write and erasing is also very fast.The difficulty of application NAND is the system interface that the managerial demand of flash is special.
Please refer to Fig. 1, the process flow diagram of the reading/writing method of the eMMC that Fig. 1 provides for the embodiment of the present invention; The method can comprise:
Step s100, upon power-up, from special blocks or special page, recover mapping table;
Wherein, carry out write-back mapping table if only need when power down, so need to ensure the voltage support having enough time when power down, electric capacity on the sheet therefore needing to increase power supply in support here in eMMC master control; Wherein, on sheet, the power supply capacity of electric capacity is as the criterion can write whole mapping table, and namely on sheet, electric capacity provides the time of power supply at least will equal to write the time of whole mapping table, in order to ensure the security of data, generally, this time can be greater than the time writing whole mapping table.
Wherein, special blocks or special page can be found by the mode of scanning here, and recover mapping table from special blocks or special page.
Step s110, distribute new special blocks or special page to described mapping table;
Wherein, after powering on, need the special blocks of distributing to described mapping table or special page recovering mapping table, so that when power down, new mapping table can be written back into new special blocks or special page.
Step s120, when writing data in eMMC, whether monitoring eMMC voltage is less than threshold value;
Wherein, in eMMC, write data, wherein, software is in advance for write mapping table is ready in empty NAND FLASH block; Because the present invention does not carry out regular or periodic mapping table write-back, therefore, need to detect the voltage of eMMC voltage, when unexpected power down, write-back mapping table can be carried out in time.
Here monitoring preferably Real-Time Monitoring, can avoid the mapping table write-back that the power-on time of electric capacity on sheet is new not complete like this.Therefore Real-Time Monitoring is a preferred version; But because the power supply capacity of electric capacity on sheet can be selected, therefore, here monitoring is Real-Time Monitoring, or periodic monitoring or other forms monitoring can limit according to actual conditions, as long as eMMC can be made can to carry out complete mapping table write-back when power down.
Step s130, when eMMC voltage is less than threshold value, then preserve described mapping table to described new special blocks or special page.
Wherein, when eMMC voltage is less than threshold value, can be understood as power-down state, then preserve described mapping table in described new special blocks or special page, namely carry out mapping table write-back.
So, then the write mapping table of cycle or periodicity can be avoided in the practical application of eMMC.The mapping table of preservation in a flash only before power-off is in FLASH.
Based on technique scheme, the reading/writing method of the eMMC that the embodiment of the present invention provides, owing to adding electric capacity on sheet, it can also provide power supply when power-off, can accomplish only to carry out write-back mapping table when power-off; The method can only when power-off and the mode of carrying out write back data mapping table when voltage is less than threshold value to ensure the security of eMMC data, reduce eMMC and write amplification, the method can improve eMMC performance, improves the life-span of eMMC.
Optionally, whether described monitoring eMMC voltage is less than threshold value and comprises:
Arrange in eMMC master control and be less than threshold voltage and interrupt monitoring eMMC voltage and whether being less than threshold value.
Wherein, voltage interruption can increased in eMMC master control, when external voltage reduces and when being less than threshold value, can Timeliness coverage responding.Namely utilize interruption to monitor.
Optionally, whether described monitoring eMMC voltage is less than threshold value and comprises:
Whether monitoring eMMC voltage is less than first threshold and described threshold value, when being less than first threshold, carries out early warning; When being less than described threshold value, then preserve described mapping table to described new special blocks or special page.
Wherein, because spread of voltage is likely that other reasons causes, not necessarily power-off is wanted, therefore, in order to avoid error in judgement, therefore can a first threshold be set, during to this first threshold, whether can carry out mapping table write-back according to actual conditions by reminding user.But, when being less than described threshold value, then automatically preserve described mapping table to described new special blocks or special page.
While guaranteeing data security, reduce mapping table write-back number of times as far as possible.
Optionally, described early warning comprises:
Early warning is carried out by pilot lamp or voice.
Such as Fig. 2 gives the schematic flow sheet of the reading/writing method of the eMMC that the embodiment of the present invention provides; Whole read-write flow process specifically can be seen from this schematic diagram.
Based on technique scheme, the reading/writing method of the eMMC that the embodiment of the present invention provides, owing to adding electric capacity on sheet, it can also provide power supply when power-off, can accomplish only to carry out write-back mapping table when power-off; The method can only when power-off and the mode of carrying out write back data mapping table when voltage is less than threshold value to ensure the security of eMMC data, reduce eMMC and write amplification, namely by increasing electric capacity on sheet, avoiding regular or periodic mapping table write-back, improving performance and the serviceable life of eMMC.
Embodiments provide the reading/writing method of eMMC, can improve eMMC performance by said method, reduce eMMC and write amplification, improve the life-span of eMMC.
Be introduced the read-write equipment of the eMMC that the embodiment of the present invention provides below, the read-write equipment of eMMC described below can mutual corresponding reference with the reading/writing method of above-described eMMC.
Please refer to Fig. 3, the structured flowchart of the read-write equipment of the eMMC that Fig. 3 provides for the embodiment of the present invention; This device can comprise:
Capacitance module 100 on sheet, arranges electric capacity on sheet in eMMC master control, for the power supply in support when power-off;
Recover module 200, for when power on and power down time, from special blocks or special page, recover mapping table;
Distribution module 300, distributes new special blocks or special page for giving described mapping table;
Monitoring modular 400, during for writing data in eMMC, whether monitoring eMMC voltage is less than threshold value;
Preserve module 500, for when eMMC voltage is less than threshold value, then preserve described mapping table to described new special blocks or special page.
Optionally, the structured flowchart of monitoring modular that provides for the embodiment of the present invention of Fig. 4; Described monitoring modular 400 can comprise:
Be less than threshold voltage interrupt location 410, be less than threshold voltage interrupt monitoring eMMC voltage and whether being less than threshold value for arranging in eMMC master control.
Optionally, the structured flowchart of another monitoring modular that provides for the embodiment of the present invention of Fig. 5; Described monitoring modular 400 can comprise:
Whether the first monitoring means 420, being less than first threshold for monitoring eMMC voltage, when being less than first threshold, carrying out early warning;
Whether the second monitoring means 430, be less than described threshold value when being less than described threshold value for monitoring eMMC voltage, then preserve described mapping table to described new special blocks or special page.
Optionally, described first monitoring means 420 comprises:
Pilot lamp subelement or subunits of speech, for early warning.
In instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For device disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
Professional can also recognize further, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with electronic hardware, computer software or the combination of the two, in order to the interchangeability of hardware and software is clearly described, generally describe composition and the step of each example in the above description according to function.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
The software module that the method described in conjunction with embodiment disclosed herein or the step of algorithm can directly use hardware, processor to perform, or the combination of the two is implemented.Software module can be placed in the storage medium of other form any known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above the reading/writing method of eMMC provided by the present invention and device are described in detail.Apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping.It should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention, can also carry out some improvement and modification to the present invention, these improve and modify and also fall in the protection domain of the claims in the present invention.
Claims (8)
1. a reading/writing method of eMMC, is characterized in that, electric capacity on the sheet increasing power supply in support in eMMC master control, comprising:
Upon power-up, from special blocks or special page, mapping table is recovered;
New special blocks or special page is distributed to described mapping table;
When writing data in eMMC, whether monitoring eMMC voltage is less than threshold value;
When eMMC voltage is less than threshold value, then preserve described mapping table to described new special blocks or special page.
2. reading/writing method as claimed in claim 1, it is characterized in that, whether described monitoring eMMC voltage is less than threshold value comprises:
Arrange in eMMC master control and be less than threshold voltage and interrupt monitoring eMMC voltage and whether being less than threshold value.
3. reading/writing method as claimed in claim 1, it is characterized in that, whether described monitoring eMMC voltage is less than threshold value comprises:
Whether monitoring eMMC voltage is less than first threshold and described threshold value, when being less than first threshold, carries out early warning; When being less than described threshold value, then preserve described mapping table to described new special blocks or special page.
4. reading/writing method as claimed in claim 3, it is characterized in that, described early warning comprises:
Early warning is carried out by pilot lamp or voice.
5. a read-write equipment of eMMC, is characterized in that, comprising:
Capacitance module on sheet, arranges electric capacity on sheet in eMMC master control, for the power supply in support when power-off;
Recover module, for upon power-up, from special blocks or special page, recover mapping table;
Distribution module, distributes new special blocks or special page for giving described mapping table;
Monitoring modular, during for writing data in eMMC, whether monitoring eMMC voltage is less than threshold value;
Preserve module, for when eMMC voltage is less than threshold value, then preserve described mapping table to described new special blocks or special page.
6. read-write equipment as claimed in claim 5, it is characterized in that, described monitoring modular comprises:
Be less than threshold voltage interrupt location, be less than threshold voltage interrupt monitoring eMMC voltage and whether being less than threshold value for arranging in eMMC master control.
7. read-write equipment as claimed in claim 1, it is characterized in that, described monitoring modular comprises:
Whether the first monitoring means, being less than first threshold for monitoring eMMC voltage, when being less than first threshold, carrying out early warning;
Whether the second monitoring means, be less than described threshold value when being less than described threshold value for monitoring eMMC voltage, then preserve described mapping table to described new special blocks or special page.
8. read-write equipment as claimed in claim 7, it is characterized in that, described first monitoring means comprises:
Pilot lamp subelement or subunits of speech, for early warning.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510242356.0A CN104881249B (en) | 2015-05-13 | 2015-05-13 | A kind of reading/writing method and device of eMMC |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510242356.0A CN104881249B (en) | 2015-05-13 | 2015-05-13 | A kind of reading/writing method and device of eMMC |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104881249A true CN104881249A (en) | 2015-09-02 |
CN104881249B CN104881249B (en) | 2018-07-31 |
Family
ID=53948759
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510242356.0A Active CN104881249B (en) | 2015-05-13 | 2015-05-13 | A kind of reading/writing method and device of eMMC |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104881249B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113050877A (en) * | 2019-12-27 | 2021-06-29 | 北京兆易创新科技股份有限公司 | Mapping table storage method and device, electronic equipment and storage medium |
US11157207B2 (en) | 2018-07-31 | 2021-10-26 | SK Hynix Inc. | Apparatus and method for engaging plural memory system with each other to store data |
US11249919B2 (en) | 2018-07-31 | 2022-02-15 | SK Hynix Inc. | Apparatus and method for managing meta data for engagement of plural memory system to store data |
US11442628B2 (en) * | 2018-07-31 | 2022-09-13 | SK Hynix Inc. | Apparatus and method for engaging a plurality of memory systems with each other |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103399520A (en) * | 2013-07-22 | 2013-11-20 | 深圳市汇川控制技术有限公司 | Method and device for accessing power-failure data of PLC (Programmable Logic Controller) system |
JP2014049172A (en) * | 2012-09-04 | 2014-03-17 | Toshiba Corp | Semiconductor memory and memory system |
CN103761197A (en) * | 2014-01-16 | 2014-04-30 | 深圳市亿维自动化技术有限公司 | Method and system for storing data by using Flash and RAM (random-access memory) |
US20140204680A1 (en) * | 2013-01-18 | 2014-07-24 | Samsung Electronics Co., Ltd. | Nonvolatile memory device, memory system having the same, external power controlling method thereof |
CN104021093A (en) * | 2014-06-24 | 2014-09-03 | 浪潮集团有限公司 | Power-down protection method for memory device based on NVDIMM (non-volatile dual in-line memory module) |
CN104317671A (en) * | 2014-10-24 | 2015-01-28 | 杭州帅锐电子科技有限公司 | Power-down data storage and recovery algorithm prolonging service life of non-volatile memory |
-
2015
- 2015-05-13 CN CN201510242356.0A patent/CN104881249B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014049172A (en) * | 2012-09-04 | 2014-03-17 | Toshiba Corp | Semiconductor memory and memory system |
US20140204680A1 (en) * | 2013-01-18 | 2014-07-24 | Samsung Electronics Co., Ltd. | Nonvolatile memory device, memory system having the same, external power controlling method thereof |
CN103399520A (en) * | 2013-07-22 | 2013-11-20 | 深圳市汇川控制技术有限公司 | Method and device for accessing power-failure data of PLC (Programmable Logic Controller) system |
CN103761197A (en) * | 2014-01-16 | 2014-04-30 | 深圳市亿维自动化技术有限公司 | Method and system for storing data by using Flash and RAM (random-access memory) |
CN104021093A (en) * | 2014-06-24 | 2014-09-03 | 浪潮集团有限公司 | Power-down protection method for memory device based on NVDIMM (non-volatile dual in-line memory module) |
CN104317671A (en) * | 2014-10-24 | 2015-01-28 | 杭州帅锐电子科技有限公司 | Power-down data storage and recovery algorithm prolonging service life of non-volatile memory |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11157207B2 (en) | 2018-07-31 | 2021-10-26 | SK Hynix Inc. | Apparatus and method for engaging plural memory system with each other to store data |
US11249919B2 (en) | 2018-07-31 | 2022-02-15 | SK Hynix Inc. | Apparatus and method for managing meta data for engagement of plural memory system to store data |
US11442628B2 (en) * | 2018-07-31 | 2022-09-13 | SK Hynix Inc. | Apparatus and method for engaging a plurality of memory systems with each other |
CN113050877A (en) * | 2019-12-27 | 2021-06-29 | 北京兆易创新科技股份有限公司 | Mapping table storage method and device, electronic equipment and storage medium |
CN113050877B (en) * | 2019-12-27 | 2024-03-01 | 兆易创新科技集团股份有限公司 | Mapping table storage method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104881249B (en) | 2018-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11099760B2 (en) | Background data refresh using a system timestamp in storage devices | |
US9465553B2 (en) | Non-volatile memory systems and methods of managing power of the same | |
JP5048741B2 (en) | Method, device and system for storing data in cache in case of power failure | |
US20160070474A1 (en) | Data-Retention Controller/Driver for Stand-Alone or Hosted Card Reader, Solid-State-Drive (SSD), or Super-Enhanced-Endurance SSD (SEED) | |
US20150331624A1 (en) | Host-controlled flash translation layer snapshot | |
CN104881249A (en) | eMMC reading/writing method and device | |
WO2019120133A1 (en) | Log file reading and writing method based on solid state disk, and solid state disk | |
CN102902628A (en) | Flash memory and method and system for automatically separating cold and hot data based on same | |
US9047172B2 (en) | Adaptive power control of memory map storage devices | |
CN107515827B (en) | PCIE SSD custom log storage method and device and SSD | |
CN108614744B (en) | Power-down protection method and device based on NAND flash | |
US20210223979A1 (en) | On-ssd-copy techniques using copy-on-write | |
US20170060436A1 (en) | Technologies for managing a reserved high-performance memory region of a solid state drive | |
US9965400B2 (en) | Memory management method, memory control circuit unit and memory storage device | |
CN104898982A (en) | Data transmission method, memory control circuit unit and memory storage apparatus | |
CN111324290A (en) | Memory device | |
US20130179715A1 (en) | Systems and methods for reducing energy consumption in sensor networks | |
JP2017527877A (en) | Method and apparatus for reading / writing data from / to flash memory and user equipment | |
CN105630701A (en) | Data storage apparatus and read/write method using unavailable page table or unavailable block table | |
CN102789422B (en) | The method for writing data of solid state hard disc | |
US20130332662A1 (en) | Information processing apparatus and method and program | |
CN112115515A (en) | Data protection method and device, electronic equipment and storage medium | |
CN107765989B (en) | Storage device control chip, storage device and storage device management method | |
TWI653636B (en) | Data storage device and method of operating same | |
CN104809037A (en) | Rapid starting method and device for eMMC based on special page |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |