CN104881249B - A kind of reading/writing method and device of eMMC - Google Patents

A kind of reading/writing method and device of eMMC Download PDF

Info

Publication number
CN104881249B
CN104881249B CN201510242356.0A CN201510242356A CN104881249B CN 104881249 B CN104881249 B CN 104881249B CN 201510242356 A CN201510242356 A CN 201510242356A CN 104881249 B CN104881249 B CN 104881249B
Authority
CN
China
Prior art keywords
emmc
less
mapping table
threshold value
voltages
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
CN201510242356.0A
Other languages
Chinese (zh)
Other versions
CN104881249A (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.)
SHENZHEN CHIPSBANK TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN CHIPSBANK TECHNOLOGY 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 SHENZHEN CHIPSBANK TECHNOLOGY Co Ltd filed Critical SHENZHEN CHIPSBANK TECHNOLOGY Co Ltd
Priority to CN201510242356.0A priority Critical patent/CN104881249B/en
Publication of CN104881249A publication Critical patent/CN104881249A/en
Application granted granted Critical
Publication of CN104881249B publication Critical patent/CN104881249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of reading/writing methods of eMMC, increase the on-chip capacitance as backup power supply in eMMC master controls, including:Upon power-up, restore mapping table from special blocks or special page;New special blocks or special page are distributed to the mapping table;When data being written in eMMC, whether monitoring eMMC voltages are less than threshold value;When eMMC voltages are less than threshold value, then the mapping table is preserved to the new special blocks or special page;This method can improve eMMC performances, reduce eMMC and write amplification, improve the service life of eMMC;Invention additionally discloses a kind of read-write equipments of eMMC.

Description

A kind of reading/writing method and device of eMMC
Technical field
The present invention relates to electronic technology fields, more particularly to the reading/writing method and device of a kind of eMMC.
Background technology
EMMC in actual use, for ensure data safety, usually constantly to update and preserves currently Mapping table to NAND FLASH in;And regular or period write-back mapping table method is mostly used in eMMC greatly to ensure eMMC The safety of data thus inevitably causes the amplification of writing in eMMC to rise, reduces service life and the performance of eMMC.Such as What reduces eMMC and writes amplification, is those skilled in the art's technical issues that need to address.
Invention content
The object of the present invention is to provide a kind of reading/writing method of eMMC, this method can avoid period or regularly mapping table Write-back improves eMMC performances to reach, and reduces eMMC and writes amplification, improves the service life of eMMC.The present invention also provides a kind of eMMC Read-write equipment.
In order to solve the above technical problems, the present invention provides a kind of reading/writing method of eMMC, increase conduct in eMMC master controls The on-chip capacitance of backup power supply, including:
Upon power-up, restore mapping table from special blocks or special page;
New special blocks or special page are distributed to the mapping table;
When data being written in eMMC, whether monitoring eMMC voltages are less than threshold value;
When eMMC voltages are less than threshold value, then the mapping table is preserved to the new special blocks or special page.
Wherein, the monitoring eMMC voltages whether less than threshold value include:
Setting monitors whether eMMC voltages are less than threshold value less than threshold voltage interruption in eMMC master controls.
Wherein, the monitoring eMMC voltages whether less than threshold value include:
It monitors whether eMMC voltages are less than first threshold and the threshold value, when less than first threshold, carries out early warning;When small When the threshold value, then the mapping table is preserved to the new special blocks or special page.
Wherein, the early warning includes:
Early warning is carried out by indicator light or voice.
The present invention also provides a kind of read-write equipments of eMMC, including:
On-chip capacitance is arranged in eMMC master controls in on-chip capacitance module, for being used as backup power supply when power is off;
Recovery module, for upon power-up, restoring mapping table from special blocks or special page;
Distribution module, for distributing new special blocks or special page to the mapping table;
Monitoring modular, when for data to be written in eMMC, whether monitoring eMMC voltages are less than threshold value;
Preserving module, for when eMMC voltages are less than threshold value, then preserve the mapping table to the new special blocks or Special page.
Wherein, the monitoring modular includes:
Less than threshold voltage interrupt location, eMMC electricity is monitored less than threshold voltage interruption for being arranged in eMMC master controls Whether pressure is less than threshold value.
Wherein, the monitoring modular includes:
First monitoring unit when less than first threshold, carries out pre- for monitoring whether eMMC voltages are less than first threshold It is alert;
Second monitoring unit is then preserved for monitoring whether eMMC voltages are less than the threshold value when less than the threshold value The mapping table is to the new special blocks or special page.
Wherein, first monitoring unit includes:
Indicator light subelement or subunits of speech are used for early warning.
The reading/writing method of eMMC provided by the present invention a kind of increases in eMMC master controls and is powered on as the piece of backup power supply Hold, when powering on and when power down, restore mapping table from special blocks or special page;New special blocks or spy are distributed to the mapping table Different page;When data being written in eMMC, whether monitoring eMMC voltages are less than threshold value;When eMMC voltages are less than threshold value, then preserve The mapping table is to the new special blocks or special page;Due to increasing on-chip capacitance, electricity can also be provided when power is off Source can accomplish only to carry out write-back mapping table when power is off;This method can only when power is off be voltage be less than threshold value when into The mode of row write back data mapping table ensures the safety of eMMC data, reduces eMMC and writes amplification, this method can improve EMMC performances improve the service life of eMMC.
Description of the drawings
It, below will be to embodiment or existing for the clearer technical solution for illustrating the embodiment of the present invention or the prior art Attached drawing is briefly described needed in technology description, it should be apparent that, the accompanying drawings in the following description is only this hair Some bright embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart of the reading/writing method of eMMC provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of the reading/writing method of eMMC provided in an embodiment of the present invention;
Fig. 3 is the structure diagram of the read-write equipment of eMMC provided in an embodiment of the present invention;
Fig. 4 is the structure diagram of monitoring modular provided in an embodiment of the present invention;
Fig. 5 is the structure diagram of another monitoring modular provided in an embodiment of the present invention.
Specific implementation mode
Core of the invention is to provide a kind of reading/writing method of eMMC, and this method can avoid period or regularly mapping table Write-back improves eMMC performances to reach, and reduces eMMC and writes amplification, improves the service life of eMMC.The present invention also provides a kind of eMMC Read-write equipment.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art The every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
EMMC is that Embedded MultiMediaCard are embedded memory standard specification ordered by MMC associations, main If based on mobile phone products.A clear superiority of eMMC is to be integrated with a controller in a package, it provides standard Interface simultaneously manages flash memory so that cell phone manufacturer can be absorbed in the other parts of product development, and shorten to market and release product Time.
NAND structures can provide high cell density, can reach high storage density, and the speed for being written and wiping Also quickly.It is that the management of flash needs special system interface using the difficulty of NAND.
Referring to FIG. 1, Fig. 1 is the flow chart of the reading/writing method of eMMC provided in an embodiment of the present invention;This method can wrap It includes:
Step s100, upon power-up, restore mapping table from special blocks or special page;
Wherein, if only needing to carry out write-back mapping table in power down, then with regard to needing to ensure there is enough time in power down Voltage support, therefore need exist for increasing on-chip capacitance as backup power supply in eMMC master controls;Wherein, on-chip capacitance Power supply capacity, which is subject to, can write entire mapping table, i.e. the time of on-chip capacitance offer power supply at least will be equal to write and entirely reflect The time of firing table, in order to ensure the safety of data, under normal circumstances, which can be more than the time for writing entire mapping table.
Wherein, special blocks or special page can be found by way of scanning here, and extensive from special blocks or special page It reruns a movie firing table.
Step s110, new special blocks or special page are distributed to the mapping table;
Wherein, after the power is turned on, the special blocks or special page distributed to the mapping table are needed in recovery mapping table, to fall When electric, new mapping table can be written back into new special blocks or special page.
When data being written step s120, in eMMC, whether monitoring eMMC voltages are less than threshold value;
Wherein, data are written in eMMC, wherein software is that write-in mapping table gets out empty NAND FLASH blocks in advance In;Since the present invention is without regular or periodic mapping table write-back, therefore, it is necessary to the voltages to eMMC voltages to examine It surveys, when unexpected power down, write-back mapping table can be carried out in time.
Here monitoring preferably monitoring in real time, in this way can be to avoid not new enough the mapping table of the power-on time of on-chip capacitance Write-back is complete.Therefore monitoring is a preferred embodiment in real time;But due to the power supply capacity of on-chip capacitance it can be selected that therefore, Here monitoring be monitor in real time or periodic monitoring or other forms monitoring can be defined according to actual conditions, as long as EMMC can be allow to carry out complete mapping table write-back in power down.
Step s130, when eMMC voltages are less than threshold value, then the mapping table is preserved to new special blocks or special Page.
Wherein, when eMMC voltages be less than threshold value when, it can be understood as power-down state, then preserve the mapping table to it is described newly Special blocks or special page in, that is, carry out mapping table write-back.
In this way, then can avoid the write-in mapping table of period or periodicity in the practical application of eMMC.Only before power-off The mapping table to FLASH of preservation in a flash in.
Based on the above-mentioned technical proposal, the reading/writing method of eMMC provided in an embodiment of the present invention, due to increasing on-chip capacitance, It can also provide power supply when power is off, can accomplish only to carry out write-back mapping table when power is off;This method can be only disconnected When electric, that is, voltage less than threshold value when carry out the mode of write back data mapping table to ensure the safety of eMMC data, reduce eMMC and write Amplification, this method can improve eMMC performances, improve the service life of eMMC.
Optionally, the monitoring eMMC voltages whether less than threshold value include:
Setting monitors whether eMMC voltages are less than threshold value less than threshold voltage interruption in eMMC master controls.
Wherein it is possible to increasing voltage interruption in eMMC master controls, when external voltage reduces and is less than threshold value, Neng Gouji Shi Faxian simultaneously makes a response.It uses interrupts to be monitored.
Optionally, the monitoring eMMC voltages whether less than threshold value include:
It monitors whether eMMC voltages are less than first threshold and the threshold value, when less than first threshold, carries out early warning;When small When the threshold value, then the mapping table is preserved to the new special blocks or special page.
Wherein, it is caused since spread of voltage is likely to be other reasons, being not necessarily will power off, therefore, in order to avoid Error in judgement, therefore can a first threshold be set, when arriving the first threshold, may remind the user that is according to actual conditions No progress mapping table write-back.But when less than the threshold value, then automatically save the mapping table to the new special blocks or Special page.
While ensuring Information Security, mapping table write-back number is reduced to the greatest extent.
Optionally, the early warning includes:
Early warning is carried out by indicator light or voice.
Such as Fig. 2 gives the flow diagram of the reading/writing method of eMMC provided in an embodiment of the present invention;From the schematic diagram Entire read-write flow can be particularly seen.
Based on the above-mentioned technical proposal, the reading/writing method of eMMC provided in an embodiment of the present invention, due to increasing on-chip capacitance, It can also provide power supply when power is off, can accomplish only to carry out write-back mapping table when power is off;This method can be only disconnected When electric, that is, voltage less than threshold value when carry out the mode of write back data mapping table to ensure the safety of eMMC data, reduce eMMC and write Amplification avoids regular or periodic mapping table write-back, improves the performance of eMMC and use the longevity that is, by increasing on-chip capacitance Life.
An embodiment of the present invention provides the reading/writing methods of eMMC, and eMMC performances can be improved by the above method, drop Low eMMC writes amplification, improves the service life of eMMC.
The read-write equipment of eMMC provided in an embodiment of the present invention is introduced below, the read-write dress of eMMC described below Reference can be corresponded with the reading/writing method of above-described eMMC by setting.
Referring to FIG. 3, Fig. 3 is the structure diagram of the read-write equipment of eMMC provided in an embodiment of the present invention;The device can be with Including:
On-chip capacitance is arranged in eMMC master controls in on-chip capacitance module 100, for being used as backup power supply when power is off;
Recovery module 200, for when powering on and when power down, restore mapping table from special blocks or special page;
Distribution module 300, for distributing new special blocks or special page to the mapping table;
Monitoring modular 400, when for data to be written in eMMC, whether monitoring eMMC voltages are less than threshold value;
Preserving module 500, for when eMMC voltages are less than threshold value, then preserving the mapping table to the new special blocks Or special page.
Optionally, Fig. 4 is the structure diagram of monitoring modular provided in an embodiment of the present invention;The monitoring modular 400 can be with Including:
Less than threshold voltage interrupt location 410, monitored less than threshold voltage interruption for being arranged in eMMC master controls Whether eMMC voltages are less than threshold value.
Optionally, Fig. 5 is the structure diagram of another monitoring modular provided in an embodiment of the present invention;The monitoring modular 400 May include:
First monitoring unit 420, for monitoring whether eMMC voltages are less than first threshold, when less than first threshold, into Row early warning;
Second monitoring unit 430 is then protected for monitoring whether eMMC voltages are less than the threshold value when less than the threshold value The mapping table is deposited to the new special blocks or special page.
Optionally, first monitoring unit 420 includes:
Indicator light subelement or subunits of speech are used for early warning.
Each embodiment is described by the way of progressive in specification, the highlights of each of the examples are with other realities Apply the difference of example, just to refer each other for identical similar portion between each embodiment.For device disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related place is referring to method part illustration .
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, depends on the specific application and design constraint of technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
The reading/writing method and device of eMMC provided by the present invention are described in detail above.Tool used herein Principle and implementation of the present invention are described for body example, and the explanation of above example is only intended to help to understand this hair Bright method and its core concept.It should be pointed out that for those skilled in the art, not departing from the present invention , can be with several improvements and modifications are made to the present invention under the premise of principle, these improvement and modification also fall into right of the present invention It is required that protection domain in.

Claims (6)

1. a kind of reading/writing method of eMMC, which is characterized in that increase the on-chip capacitance as backup power supply, packet in eMMC master controls It includes:
Upon power-up, restore mapping table from special blocks or special page;
New special blocks or special page are distributed to the mapping table;
When data being written in eMMC, it is arranged in eMMC master controls and monitors whether eMMC voltages are less than less than threshold voltage interruption Threshold value;
When eMMC voltages are less than threshold value, the mapping table is preserved to the new special blocks or special page, to ensure eMMC The safety of data.
2. reading/writing method as described in claim 1, which is characterized in that the monitoring eMMC voltages whether less than threshold value include:
It monitors whether eMMC voltages are less than first threshold and the threshold value, when less than first threshold, carries out early warning;When less than institute When stating threshold value, then the mapping table is preserved to the new special blocks or special page.
3. reading/writing method as claimed in claim 2, which is characterized in that the early warning includes:
Early warning is carried out by indicator light or voice.
4. a kind of read-write equipment of eMMC, which is characterized in that including:
On-chip capacitance is arranged in eMMC master controls in on-chip capacitance module, for being used as backup power supply when power is off;
Recovery module, for upon power-up, restoring mapping table from special blocks or special page;
Distribution module, for distributing new special blocks or special page to the mapping table;
Monitoring modular when for data to be written in eMMC, is arranged in eMMC master controls and is monitored less than threshold voltage interruption Whether eMMC voltages are less than threshold value;
Preserving module, for when eMMC voltages are less than threshold value, then preserving the mapping table to new special blocks or special Page.
5. read-write equipment as claimed in claim 4, which is characterized in that the monitoring modular includes:
First monitoring unit when less than first threshold, carries out early warning for monitoring whether eMMC voltages are less than first threshold;
Second monitoring unit, for monitoring whether eMMC voltages are less than the threshold value, when less than the threshold value, then described in preservation Mapping table is to the new special blocks or special page.
6. read-write equipment as claimed in claim 5, which is characterized in that first monitoring unit includes:
Indicator light subelement or subunits of speech are used for early warning.
CN201510242356.0A 2015-05-13 2015-05-13 A kind of reading/writing method and device of eMMC Active CN104881249B (en)

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 CN104881249A (en) 2015-09-02
CN104881249B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110780810B (en) 2018-07-31 2023-06-27 爱思开海力士有限公司 Apparatus and method for interfacing a plurality of memory systems 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
CN110781098B (en) * 2018-07-31 2023-03-28 爱思开海力士有限公司 Apparatus and method for interfacing a plurality of memory systems with each other
CN113050877B (en) * 2019-12-27 2024-03-01 兆易创新科技集团股份有限公司 Mapping table storage method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014049172A (en) * 2012-09-04 2014-03-17 Toshiba Corp Semiconductor memory and memory system
KR102084547B1 (en) * 2013-01-18 2020-03-05 삼성전자주식회사 Nonvolatile memory device, memory system having the same, external power controlling method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
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

Also Published As

Publication number Publication date
CN104881249A (en) 2015-09-02

Similar Documents

Publication Publication Date Title
CN104881249B (en) A kind of reading/writing method and device of eMMC
ES2371089T3 (en) RESEARCH OF THE SYSTEM CONTEXT IN CASE OF LOSS OF POWER.
TWI480724B (en) Method and computing device for indicating battery power, and storage medium storing related instructions
EP2889773B1 (en) Method for backing up data during memory system power-down, and memory system controller
JP5048741B2 (en) Method, device and system for storing data in cache in case of power failure
US20200393504A1 (en) Techniques for testing plp capacitors
WO2015149577A1 (en) Storage system, storage device and data storage method
US20170277603A1 (en) Data saving method, device and terminal
US9465426B2 (en) Method for backing up data in a case of power failure of storage system, and storage system controller
US20060181949A1 (en) Operating system-independent memory power management
JP2009503724A (en) Memory controller supercapacitor dynamic voltage throttling
JP2013539132A5 (en)
KR20140139113A (en) Memory module virtualizaton
US20110161298A1 (en) System and method for opportunistic re-imaging using cannibalistic storage techniques on sparse storage devices
US20220334733A1 (en) Data restoration method and related device
CN101609435A (en) A kind of method of power failure of equipment, electronic equipment and network system
US11921588B2 (en) System and method for data protection during power loss of a storage system
CN105739982A (en) System hibernation method and apparatus
CN103399520A (en) Method and device for accessing power-failure data of PLC (Programmable Logic Controller) system
CN115617581A (en) Memory fault processing method and device
CN105404468B (en) Green and non-solid state disk applications and drives therefor
CN111880636B (en) Power-off protection method and related device for storage array
CN108762987A (en) Data reconstruction method and device for double copies microcontroller flash memory
CN113711189A (en) System and method for managing reduced power failure energy requirements on solid state drives
CN105205015B (en) A kind of date storage method and storage equipment

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