Movatterモバイル変換


[0]ホーム

URL:


CN104317732A - Large-capacity Flash chip space management method - Google Patents

Large-capacity Flash chip space management method
Download PDF

Info

Publication number
CN104317732A
CN104317732ACN201410581763.XACN201410581763ACN104317732ACN 104317732 ACN104317732 ACN 104317732ACN 201410581763 ACN201410581763 ACN 201410581763ACN 104317732 ACN104317732 ACN 104317732A
Authority
CN
China
Prior art keywords
page
address
management
physical
logical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410581763.XA
Other languages
Chinese (zh)
Inventor
王翔平
沈勇坚
胡永刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dynamicode Co Ltd
Original Assignee
Dynamicode 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 Dynamicode Co LtdfiledCriticalDynamicode Co Ltd
Priority to CN201410581763.XApriorityCriticalpatent/CN104317732A/en
Publication of CN104317732ApublicationCriticalpatent/CN104317732A/en
Pendinglegal-statusCriticalCurrent

Links

Landscapes

Abstract

The invention discloses a large-capacity Flash chip space management method. A space of a Flash chip is divided into a system management zone and a user zone; the system management comprises two management pages, and each management page is divided into two portions, namely a configuration information zone and a logical address mapping information zone; the user zone comprises file blocks and free blocks; when content of the file blocks is rectified, one free block is found with data removed before written in, and the management pages are updated finally. With the method, storage space of a user can be effectively managed, incontinuity of the physical space of files can be realized, and efficiency and security of the system can are improved; a separate power-off protection module is arranged, difficulty in development of the system is lowered, and maintenance cost is reduced.

Description

A kind of space management of high capability flash chip
Technical field
The present invention relates to chip-stored technology, be specifically related to the space management technology of high capability flash chip.
Background technology
Chip technology development is advanced by leaps and bounds, and the application scenario of chip is more and more abundanter, needs the function of chip support to get more and more, and corresponding is constantly increase the requirement of chip space with it.Due to technique, it is many that the chip price of EEPROM always exceeds FLASH chip, and jumbo chip is all the more so.Current jumbo FLASH chip is lower because of cost, progressively becomes the market mainstream.
Thus, need to configure corresponding space management mechanism for jumbo FLASH.But the space management scheme of existing jumbo FLASH; cannot the memory space of leading subscriber efficiently; its file system space has continuity; its inner structure of easy analysis; circuit breaking protective system takies independent space and solution; the operational efficiency of reduction system, increases development difficulty and maintenance cost.
Summary of the invention
For existing jumbo FLASH chip space management mechanism existing for problem, the object of the present invention is to provide a kind of space management of high capability flash chip of optimization, to solve the problem existing for prior art.
In order to achieve the above object, the present invention adopts following technical scheme:
A space management for high capability flash chip, the space of Flash chip is divided into system directorial area and user area by this management method;
Described system directorial area comprises two management page, and each management page is divided into two parts: configuration information district and logical address map information district;
Described user area comprises blocks of files and free block;
When revising blocks of files content, first finding a free block to wipe its data, then writing this free block, final updating management page.
In such scheme, mutually alternately upgrade between described two management page.
Further, the configuration information district in described management page is 32 bytes, comprises the physical block using state information of the serial number of 4 bytes, the mapping block counts of 2 bytes, the file block counts of 2 bytes, reserved 8 byte RFU and 16 bytes.
Further, described logical address map information district 112 byte.
Further, the logical page (LPAGE) first address in file district of logical address map information district and the mapping equation of Physical Page first address as follows:
Logical page (LPAGE) first addressphysical Page first address
Specific as follows:
LogAddress [i](physical base address+MAParray [i] * page unit) (0=<i<111),
Wherein:
I presentation logic page number, value [0,111], obtains logical page (LPAGE) first address by logic number * page unit.
LogAddress [i]=logical page number (LPN) (i) * page unit.
correspond to or be mapped in;
Physical base address: the first address in FLASH space can be used in user area;
MAParray: logical mappings array, totally 112 bytes.MAParray [i] gets unique value in 0 ~ 127;
Page unit: the size representing page.
Further, the blocks of files in described user area is 112, and free block is 16.
Further, the detailed process of described amendment blocks of files content is as follows:
(1) first according to physical block using state information, a free block is found;
(2) legacy data of this free block is wiped clean;
(3) according to the offset content of internal memory logical mappings array, the free block of write Physical Page;
(4) offset content of internal memory logical mappings array is upgraded;
(5) internal memory serial number is upgraded;
(6) physical block using state information in internal memory is upgraded;
(7) management page is upgraded.
Further, the detailed process of described step (3) is as follows:
First, mapping value corresponding to address, respective logic beginning of the page is read from physical mappings table district;
Then, the mapping value corresponding according to logical page (LPAGE) first address, calculates corresponding Physical Page first address;
Again then, the number of physical pages of its correspondence is read according to the Physical Page first address calculated according to putting into buffer memory;
Finally, tissue is for the new data of amendment in the buffer, writes the Physical Page calculated.
Scheme provided by the invention can not only the memory space of effective leading subscriber, but also can improve efficiency and the security of system, reduces the development difficulty of system, reduces maintenance cost.The effect specifically reached is as follows:
(1) the mode management document block adopting logical address to map, file system does not have continuity in physical space, not easily its file content analyzed, improves efficiency and the security of system.
(2) there is no independent power down protection system, reduce development difficulty, improve running efficiency of system; The alternately amendment of management page simultaneously, the large person of serial number is effective, can prevent the destruction that power down brings.
(3) can according to the size of different chip space, flexible configuration management page structure, project of being convenient to is transplanted and is safeguarded.
Accompanying drawing explanation
The present invention is further illustrated below in conjunction with the drawings and specific embodiments.
Fig. 1 is the schematic diagram of management page in example of the present invention;
Fig. 2 is the schematic diagram of management threshold page in example of the present invention;
Fig. 3 is initial mapping relation schematic diagram in example of the present invention;
Fig. 4 is the schematic diagram of management page 2 update content in example of the present invention.
Embodiment
The technological means realized to make the present invention, creation characteristic, reaching object and effect is easy to understand, below in conjunction with concrete diagram, setting forth the present invention further.
For high capability flash chip, the space of Flash chip is divided into system directorial area and user area two parts by the space management mechanism that this programme provides.Wherein, system directorial area comprises two management page, mutually alternately upgrades between these two management page; Each management page is divided into two parts successively simultaneously: configuration information district and logical address map information district.
For user area, it comprises blocks of files and free block.
Based on above-mentioned administrative mechanism, when revising blocks of files content, first finding a free block to wipe its data, then writing this free block, final updating management page.
Based on above-mentioned principle scheme, further illustrate this programme below by way of an embody rule example:
In this example, the space of Flash chip is divided into system directorial area and user area two parts.Wherein directorial area comprises two management page, management page 1 and management page 2.Management page is divided into two parts: 32 byte configuration informations and 112 byte logical address map informations, and amounting to 144 bytes is an administrative unit, as shown in Figure 1.
This example illustrates with management page 1, and as shown in Figure 2, this management page comprises 32 byte configuration information districts and 112 byte logical address map information districts successively to initial configuration from start address.
Wherein, 32 byte configuration information districts comprise the physical block using state of the serial number of 4 bytes, the mapping block counts of 2 bytes, the file block counts of 2 bytes, reserved 8 byte RFU, 16 bytes successively.
Serial number: the amendment number of times of management page, initial value is 0, and often amendment adds 11 time.Management page has two, and each management page size is 2K, alternately amendment, and the management page that serial number is large is effective.
Map block counts: the available FLASH block number representing user area.Block number is also number of pages, and this programme is general, totally 128 pieces.
File block counts: represent that file system can use FLASH block number.
Free block number: map the difference that block counts deducts file block counts, as the intermediate data of file modification.
Physical block using state: the service condition in recording user district.Suppose that the physics first address 30000H of user area starts, totally 128 pages, user area, 112 pages, file area, 16 pages, free area.The physical block using state 128bit position altogether of 16 bytes, represents the user area service condition of 128 pages from 30000H.Bit=1, represents that this block is taken by file area; Bit=0, represents that this block is idle.In any moment, 1 takies 112bit, and 0 takies 16bit.Initial value is FFFFFFFFFFFFFFFF FFFFFFFFFFFF0000, and represent that 112 pages from 30000H are blocks of files, afterwards 16 pieces is free block.
Physical mappings table district: 112 byte spaces in this region, represent the logical address space of 112 pages from address 0000.The Physical Page first address that every logical page (LPAGE) first address is corresponding, shown in following formula
Logical page (LPAGE) first addressphysical Page first address.Its initial value as shown in Figure 2, the corresponding physical address space of 112 pages from 30000 of the logical address space of 112 pages from address 0000.
The size of mapping block counts, file block counts, physical block using state can according to the space size flexible configuration of concrete chip.
Thus, management threshold page content is as shown in Figure 2 formed.
For the mapping relations of logical page (LPAGE) first address and Physical Page first address, the space of 112 bytes in this example, address 0x20020 started is considered as spatial mappings data, MAParray [112].
Thus, the logical page (LPAGE) first address of file area and the mapping equation of Physical Page first address as follows:
LogAddress [i](physical base address+MAParray [i] * page unit) (0=<i<111), wherein:
LogAddress [i]=logic number (i) * page unit;
represent " correspond to or be mapped in ";
Physical base address: the first address in FLASH space can be used in user area, as 30000H;
MAParray: logical mappings array, totally 112 bytes, get unique value in 0 ~ 127;
Page unit: the size (page size of herein illustrating is 2K) representing page;
I presentation logic page number, value [0,111], obtains logical page (LPAGE) first address by logic number * page size.
As i=0,
Logical page (LPAGE) first address LogAddress [0]=0*800H=0000H
Corresponding physical address=30000H+MAParray [0] * 800H (MAParray [0] initial value is 0)
=30000H。
The initial mapping relation determined according to this above-mentioned formula as shown in Figure 3.
Below illustrate this example approach and carry out the process of file area amendment:
In order to coordinate above-mentioned directorial area, totally 128 pieces, user area in this example, 112 blocks of files, 16 free blocks.
In conjunction with above-mentioned administrative mechanism, the high capability flash chip-stored space performance determined is as follows:
The exercisable minimum unit of Flash is 2K (in units of page/block), whole page erasing, whole page write;
Flash mapping space is 256K, i.e. 128 pages/block;
The physical start address of Flash mapping space is 0x30000 (physical base address), and end address is 0x6FFFF;
The physical space of Flash directorial area is 0x20000 (management page 1) and 0x20800 (management page 2);
For preventing power-off from destroying, require that management page 1 and management page 2 need alternately upgrade;
As long as the content of amendment blocks of files, must upgrade the relevant configuration of management page afterwards immediately;
The block number of file area 112, the i.e. file space of 224K;
The block number of free area 16, i.e. the backup space of 32K.
First wipe the characteristic write afterwards for Flash chip, this example utilizes free block to realize the amendment of file data, if need the content of an amendment blocks of files, first must find a free block erasing, write this free block afterwards, final updating management page.
For this high capability flash chip-stored space, if desired revise homepage (the i.e. logical address 00000) content of file area, its detailed process is as follows.
1., according to 16 byte physical block using state information: FF FF FF FF FF FF FF FF FF FF FF FF FF FF 0000, find a free block.Find that the 112 to 127 piece for continuous print free block, Stochastic choice one piece (as the 112nd piece is the 0x70 of 16 systems).This randomness is the random number num by producing 0 ~ 15, selects the n-th um free block to be used.
2. wipe clean the free block i.e. legacy data (free block legacy data is unpredictable, nonsensical) of the 112nd piece.
3. according to the offset content of internal memory MAParray [0], write Physical Page 112 pieces.
The data of this MAParray are 112 byte datas read from physical mappings table district, i=0 herein, read the mapping value of logical page (LPAGE) first address 00000 correspondence, then the Physical Page first address corresponding according to above-mentioned " logical address of file area and the mapping equation of Physical Page first address " computational logic address 00000 is 00*800+30000 and 0x30000; Then read this number of physical pages and put into buffer memory according to (namely calculating address 0x30000 page data).Tissue is for the new data of amendment in the buffer afterwards, and write Physical Page (namely calculating address 0x30000 page), this stylish file data has write free page that is 112 pages; Next need the information revising management page, make new data come into force (namely the 112nd page becomes blocks of files, and blocks of files originally becomes free block)
4. the offset content upgrading internal memory MAParray [0] is 0x70 (namely the 112nd piece is the 0x70 of 16 systems, and content is the block number of new blocks of files).
5. upgrade internal memory serial number and add 1 for 0x00000001.
6. upgrade internal memory 16 byte physical block using state FEFFFFFFFFFFFFFFFFFFFFFFFFFF0100 (namely the 112nd page becomes blocks of files, and blocks of files originally becomes free block).
7. upgrading management page 2 is new content, and concrete data as shown in Figure 4.
The Physical Page first address that now logical page (LPAGE) first address 0x00000 is corresponding is:
MAParray[0]*0x800+0x30000=0x68000。(MAParray[0]=0x70)。
Now according to 16 byte physical block using state information:
FEFFFFFFFFFFFFFFFFFFFFFFFFFF0100 can know that current free block is the 0th piece and the 113 to 127 continuous print 15 pieces, amounts to 16 pieces.0th piece is recovered as free block, and 0x70 block is used as blocks of files.The sum of free block is 16 pieces all the time.
Also just achieve the amendment of blocks of files by upgrading management page, the object of renewal management page is remap (the changing location) in order to achieve blocks of files, realizes the object of amendment blocks of files content.
More than show and describe ultimate principle of the present invention, principal character and advantage of the present invention.The technician of the industry should understand; the present invention is not restricted to the described embodiments; what describe in above-described embodiment and instructions just illustrates principle of the present invention; without departing from the spirit and scope of the present invention; the present invention also has various changes and modifications, and these changes and improvements all fall in the claimed scope of the invention.Application claims protection domain is defined by appending claims and equivalent thereof.

Claims (8)

CN201410581763.XA2014-10-272014-10-27Large-capacity Flash chip space management methodPendingCN104317732A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410581763.XACN104317732A (en)2014-10-272014-10-27Large-capacity Flash chip space management method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410581763.XACN104317732A (en)2014-10-272014-10-27Large-capacity Flash chip space management method

Publications (1)

Publication NumberPublication Date
CN104317732Atrue CN104317732A (en)2015-01-28

Family

ID=52372967

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410581763.XAPendingCN104317732A (en)2014-10-272014-10-27Large-capacity Flash chip space management method

Country Status (1)

CountryLink
CN (1)CN104317732A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105760313A (en)*2015-08-072016-07-13深圳市证通金信科技有限公司Data processing method and device for SPI-Flash-based (Serial Peripheral Interface-Flash-based) file system
CN106610904A (en)*2015-10-152017-05-03爱思开海力士有限公司Memory system and operation method thereof
CN107818269A (en)*2017-11-272018-03-20杭州中天微系统有限公司A kind of file saving method and system based on Flash
CN108255433A (en)*2018-01-122018-07-06纳思达股份有限公司 Flash memory, file management method and device for flash memory
CN108664578A (en)*2018-05-032018-10-16中北大学A kind of file cycle storage method and system
CN109325005A (en)*2018-12-032019-02-12联想(北京)有限公司A kind of data processing method and electronic equipment
CN109343887A (en)*2018-09-202019-02-15深圳市零点智联科技有限公司A method of optimization STM32 chip DFU upgrading
CN112116942A (en)*2019-06-212020-12-22北京自动化控制设备研究所 A circuit for segmental protection of FLASH using FPGA
CN113051191A (en)*2021-03-052021-06-29深圳三地一芯电子有限责任公司Method for increasing Flash chip capacity
CN119828966A (en)*2024-12-202025-04-15华中科技大学Storage system, read-write method and controller for reducing file fragments

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101526927A (en)*2008-03-072009-09-09北京华虹集成电路设计有限责任公司Data processing method and data processing device of Flash file system
KR20100016987A (en)*2008-08-052010-02-16삼성전자주식회사Computing system including phase change memory device
CN101980177A (en)*2010-10-212011-02-23北京握奇数据系统有限公司Method and device for operating Flash

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101526927A (en)*2008-03-072009-09-09北京华虹集成电路设计有限责任公司Data processing method and data processing device of Flash file system
KR20100016987A (en)*2008-08-052010-02-16삼성전자주식회사Computing system including phase change memory device
CN101980177A (en)*2010-10-212011-02-23北京握奇数据系统有限公司Method and device for operating Flash

Cited By (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105760313A (en)*2015-08-072016-07-13深圳市证通金信科技有限公司Data processing method and device for SPI-Flash-based (Serial Peripheral Interface-Flash-based) file system
CN106610904B (en)*2015-10-152021-05-28爱思开海力士有限公司 Storage system and method of operation
CN106610904A (en)*2015-10-152017-05-03爱思开海力士有限公司Memory system and operation method thereof
CN107818269A (en)*2017-11-272018-03-20杭州中天微系统有限公司A kind of file saving method and system based on Flash
CN108255433A (en)*2018-01-122018-07-06纳思达股份有限公司 Flash memory, file management method and device for flash memory
CN108255433B (en)*2018-01-122021-12-07珠海极海半导体有限公司Flash memory, file management method and device of Flash memory
CN108664578B (en)*2018-05-032020-10-20中北大学File circulating storage method and system
CN108664578A (en)*2018-05-032018-10-16中北大学A kind of file cycle storage method and system
CN109343887A (en)*2018-09-202019-02-15深圳市零点智联科技有限公司A method of optimization STM32 chip DFU upgrading
CN109325005A (en)*2018-12-032019-02-12联想(北京)有限公司A kind of data processing method and electronic equipment
CN112116942A (en)*2019-06-212020-12-22北京自动化控制设备研究所 A circuit for segmental protection of FLASH using FPGA
CN112116942B (en)*2019-06-212023-04-07北京自动化控制设备研究所Circuit for performing segmented protection on FLASH by utilizing FPGA
CN113051191A (en)*2021-03-052021-06-29深圳三地一芯电子有限责任公司Method for increasing Flash chip capacity
CN113051191B (en)*2021-03-052024-09-13深圳三地一芯电子股份有限公司Method for improving capacity of Flash chip
CN119828966A (en)*2024-12-202025-04-15华中科技大学Storage system, read-write method and controller for reducing file fragments

Similar Documents

PublicationPublication DateTitle
CN104317732A (en)Large-capacity Flash chip space management method
CN107168647B (en)FLASH data read-write method and system
US7461198B2 (en)System and method for configuration and management of flash memory
US10915475B2 (en)Methods and apparatus for variable size logical page management based on hot and cold data
CN104423894B (en)Data storage device and flash memory control method
EP2115595B1 (en)Memory device performance enhancement through pre-erase mechanism
EP2519880B1 (en)Micro-update architecture for address tables
EP2715510B1 (en)Method for storage devices to achieve low write amplification with low over provision
CN102054533B (en)Isolation order, Stochastic sum system data with reduce garbage reclamation for the nonvolatile semiconductor memory mapped based on page
CN109783017B (en) Method, device and storage device for processing bad block of storage device
US9823878B2 (en)Method and apparatus for erasing data in flash memory
CN105373486B (en)Remapping dynamic memory addresses in a computing system
CN104750616A (en)Data storage device and flash memory control method
US20180373643A1 (en)Data storage device
CN104008061A (en)Internal memory recovery method and device
CN102866955A (en)Flash data management method and system
US20110004720A1 (en)Method and apparatus for performing full range random writing on a non-volatile memory
US7849253B2 (en)Method for fast access to flash-memory media
CN103455437A (en)Data storage device and data storage device operation method
CN103996412A (en)Power-fail protection method applied to intelligent-card nonvolatile memories
CN103744614A (en)Method for accessing solid state disc and solid state disc thereof
CN104077235A (en) Method and memory system for dividing physical blocks
CN104978148A (en)Data writing method and device and data reading method and device
US11218164B2 (en)Data storage device and non-volatile memory control method
CN103885889A (en)Data storage method and system based on NOR FLASH

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
WD01Invention patent application deemed withdrawn after publication
WD01Invention patent application deemed withdrawn after publication

Application publication date:20150128


[8]ページ先頭

©2009-2025 Movatter.jp