CN103995783A - Method and system for establishing mapping relation between logic block and physical block - Google Patents

Method and system for establishing mapping relation between logic block and physical block Download PDF

Info

Publication number
CN103995783A
CN103995783A CN201310054963.5A CN201310054963A CN103995783A CN 103995783 A CN103995783 A CN 103995783A CN 201310054963 A CN201310054963 A CN 201310054963A CN 103995783 A CN103995783 A CN 103995783A
Authority
CN
China
Prior art keywords
sector
physical
block
physical page
logical block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310054963.5A
Other languages
Chinese (zh)
Other versions
CN103995783B (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.)
Guangzhou Ankai Microelectronics Co.,Ltd.
Original Assignee
Anyka Guangzhou Microelectronics 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 Anyka Guangzhou Microelectronics Technology Co Ltd filed Critical Anyka Guangzhou Microelectronics Technology Co Ltd
Priority to CN201310054963.5A priority Critical patent/CN103995783B/en
Publication of CN103995783A publication Critical patent/CN103995783A/en
Application granted granted Critical
Publication of CN103995783B publication Critical patent/CN103995783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method and system for establishing a mapping relation between a logic block and a physical block. The physical block comprises a plurality of physical pages. The logic block comprises a plurality of sectors. The number of the physical pages contained in one physical block and the number of the sectors contained in one logic block are respectively a positive integer n. The method includes the following steps that the first non-blank sector in the logic block is found as the kth sector; the kth sector is made to correspond to the 0th physical page of the physical block; a mapping formula is obtained according to the value of the section serial number k of the kth sector in the logic block; all the sectors in the logic block except the kth sector are made to correspond to the corresponding physical pages in the physical block according to the mapping formula; k is a non-negative integer smaller than n.

Description

A kind of method and system of setting up logical block and physical block mapping relations
Technical field
The present invention relates to technical field of data storage, particularly a kind of method and system of setting up logical block and physical block mapping relations.
Background technology
NAND is a kind of flash memory scheme that current stage performance is outstanding, is characterized in low in energy consumption, lightweight, readwrite performance is good; Be widely used at present flash disk and storage card.NAND chip has comprised multiple physical blocks as storage medium, and each physical block comprises again multiple Physical Page.Because the erasable number of times of the physical block of NAND chip and Physical Page is all limited, the derivative balanced algorithm of writing becomes the prolongation NAND chip important technical in serviceable life therefrom.And write balanced algorithm, all the logical block based on virtual aspect in file system or sector and the physical block of NAND chip reality or the mapping relations of Physical Page are launched conventionally.
In the patent that is 201010229936.3 at application number, disclose a kind of NAND and write Balance Treatment method; General idea is as follows: corresponding two physical blocks of logical block in the method; In described physical block, one shines upon one by one with logical block, another and logical block Random Maps.The physical block shining upon one by one with logical block is called as data block, is called as buffer stopper with the physical block of logical block Random Maps; Data, writing fashionable being first written in buffer stopper, are written to a new data block by each page data of Random Maps in each page data and buffer stopper in old data block according to the rules integration of mapping one by one by certain mechanism after having write.
Described physical block comprises multiple Physical Page, and described logical block comprises multiple sectors, and generally speaking the Physical Page quantity in a physical block equals a number of sectors in logical block, and each Physical Page is corresponding a sector all.The data that in data block, each Physical Page is preserved are the data that the each sector of logical block presents, and data block can be described as with the mapping relations one by one between logical block: each Physical Page is the mapping of a corresponding sector in order.Mapping generally means that certain ablation process finishes one by one, also can think that mapping is one by one a kind of mapping relations under logical block steady state (SS).
Generally speaking for for the physical block of map record data one by one, the first sector of the inevitable counterlogic piece of its first Physical Page.But in fact,, in file system, logical block may not all have data to present in each sector, may occur the situation of some sector blank.If a sector blank, its corresponding Physical Page must be also blank so.But contradiction is, the first sector blank of logical block will cause the first Physical Page blank of physical block, in the middle of NAND chip, be all as the criterion with the first Physical Page of physical block for the management of physical block, the first Physical Page blank of physical block belongs to unusual condition in NAND.So set up and shine upon one by one and in presenting data, if its first sector blank will produce an invalid physical block as data block at logical block first passage and physical block.
In the prior art, solve this unusual condition and mainly contain two kinds of modes:
One is, the artificial first Physical Page of filling up physical block, and make the first sector of its counterlogic piece.Another is, additionally chooses a blank physical block as new physical block, and by the first sector of the first Physical Page counterlogic piece of new physical block, then by the data preparation in other Physical Page of invalid data block that produce before to new physical block.
But above-mentioned two kinds of methods have all increased extra write operation, make logical block and physical block set up the process of shining upon one by one relative loaded down with trivial details, and the serviceable life of NAND chip is shortened in unnecessary write operation.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method and system of setting up logical block and physical block mapping relations, the in the situation that of the blank of the first sector of logical block, realize completion logic piece and effectively mapping one by one of physical block when not carrying out extra write operation.
For achieving the above object, there is following technical scheme:
A method of setting up logical block and physical block mapping relations, physical block comprises multiple Physical Page, described logical block comprises multiple sectors, and the quantity of the sector that comprises of the quantity of the Physical Page that comprises of physical block and logical block is positive integer n; Said method comprising the steps of:
The sector that finds out first non-blank-white in logical block is k sector; By the 0th Physical Page of the corresponding physical block in k sector;
Obtain shining upon formula according to the numerical value of sector number k in the logical block of k sector;
According to described mapping formula, other the each sectors beyond k sector in logical block are corresponded in physical block on corresponding Physical Page;
K is the nonnegative integer that is less than n.
The described numerical value according to sector number k in the logical block of k sector obtains shining upon formula and is specially:
Set mapping formula according to the rule of linear mapping.
Described mapping formula is specially:
When corresponding the 0th Physical Page and k ≠ 0, k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
As k < x < n, y=x-k;
As 0≤x < k, y=x+n-k;
X, y are the nonnegative integer that is less than n.
Described mapping formula is specially:
As corresponding the 0th Physical Page and the k=0 in k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
y=x;
X, y are the nonnegative integer that is less than n.
Describedly according to described mapping formula, other the each sectors beyond k sector in logical block are corresponded in physical block and are specially on corresponding Physical Page:
By sector number substitution mapping formula in the logical block of any sector beyond k sector, calculate the numbering of Physical Page corresponding to this sector in physical block;
Numbering by Physical Page corresponding to any sector beyond k sector in physical block, finds corresponding Physical Page;
Any sector beyond k sector is corresponded to corresponding Physical Page.
A system of setting up logical block and physical block mapping relations, physical block comprises multiple Physical Page, described logical block comprises multiple sectors, and the quantity of the sector that comprises of the quantity of the Physical Page that comprises of physical block and logical block is positive integer n; Described system specifically comprises:
Mapping block is k sector for finding out the sector of the first non-blank-white of logical block; By the 0th Physical Page of the corresponding physical block in k sector; And according to mapping formula, other the each sectors beyond k sector in logical block are corresponded in physical block on corresponding Physical Page;
Computing module, for obtaining shining upon formula according to the numerical value of sector number k in the logical block of k sector;
K is the nonnegative integer that is less than n.
The described numerical value according to sector number k in the logical block of k sector obtains shining upon formula and is specially:
Set mapping formula according to the rule of linear mapping.
Described mapping formula is specially:
When corresponding the 0th Physical Page and k ≠ 0, k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
As k < x < n, y=x-k;
As 0≤x < k, y=x+n-k;
X, y are the nonnegative integer that is less than n.
Described mapping formula is specially:
As corresponding the 0th Physical Page and the k=0 in k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
y=x;
X, y are the nonnegative integer that is less than n.
Described mapping block specifically comprises:
Searching unit, is k sector for finding out the sector of the first non-blank-white of logical block;
Numbering substitution unit, for by sector number substitution mapping formula in the logical block of any sector beyond k sector, calculates the numbering of Physical Page corresponding to this sector in physical block;
Physical Page unit, for the numbering at physical block by Physical Page corresponding to any sector beyond k sector, finds corresponding Physical Page;
Correspondence establishing unit, for by the 0th Physical Page of corresponding k sector physical block; And any sector beyond k sector is corresponded to corresponding Physical Page.
As seen through the above technical solutions, the beneficial effect that the present invention exists is: by the first Physical Page of the corresponding physical block in the first non-blank-white sector with logical block, and shine upon formula and calculate the corresponding relation of other sectors and Physical Page by formulation, in the situation that being not limited to the corresponding first Physical Page in first sector, realize the mapping one by one of logical block and physical block; Thereby under the prerequisite that does not increase extra write operation, avoid the blank of the first Physical Page of physical block; Not only perfect logical block first passage and physical block are set up and are shone upon one by one and present the process of data, have also farthest reduced the write operation of NAND chip, have extended the serviceable life of NAND chip.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic diagram shining upon one by one in prior art;
Fig. 2 is method flow diagram described in the embodiment of the present invention;
Fig. 3 is the schematic diagram of linear mapping described in the embodiment of the present invention;
Fig. 4 is system architecture schematic diagram described in the embodiment of the present invention.
Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, 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 embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The method of logical block provided by the invention and physical block mapping relations, is mainly used in the middle of NAND chip.Described logical block and sector are the logically storage unit of virtual structure of file system; And described physical block and Physical Page are actual storage medium, the data of preserving in storage medium are reflected on virtual logical block or sector by mapping relations, and set up the mapping relations of logical block and physical block, namely the Physical Page in physical block is corresponded to the sector in logical block.Described logical block presents data must, by setting up the relation of linear mapping with physical block, be called as data block with the physical block of logical block linear mapping, and the data that in data block, each Physical Page is preserved are the data that the each sector of logical block presents.And namely each Physical Page each sector in counterlogic piece in order in data block of described linear mapping.
For the ease of the method for the invention is explained and illustrated, first carry out concise and to the point explanation and explanation for linear mapping mode of the prior art herein.In prior art, the mapping relations between logical block and physical block belong to a kind of special form of linear mapping, are called as mapping one by one.Mapping namely meets sector and in logical block, numbers and equal the mapping relations that this Physical Page is numbered in physical block one by one.Shown in Figure 1, be the schematic diagram shining upon one by one.In Fig. 1, suppose that a physical block comprises 4 Physical Page, a logical block comprises 4 sectors.In Fig. 1,4 Physical Page in four square frame difference represents physical pieces, are respectively the 0th page, the 1st page, the 2nd page and the 3rd page according to order from left to right.Label in figure on each Physical Page represents the sector that this Physical Page is corresponding, is the 0th page of correspondence the 0th sector in Fig. 1, the 1st page of correspondence the 1st sector, and the rest may be inferred.
Shown in Figure 2, be a specific embodiment of the method for setting up logical block and physical block mapping relations of the present invention.In the present embodiment, when setting up linear mapping and present data for logical block first passage and physical block, the first sector blank of logical block will cause the abnormal conditions of first Physical Page blank of physical block, the technical scheme of having taked the first Physical Page (i.e. the 0th Physical Page) of the direct sector by first non-blank-white in logical block correspondence physical block, described method is specific as follows:
Described in the present embodiment, in method, physical block comprises multiple Physical Page, and described logical block comprises multiple sectors, and the quantity of the sector that comprises of the quantity of the Physical Page that comprises of physical block and logical block is positive integer n; Said method comprising the steps of;
Step 201, the sector that finds out first non-blank-white in logical block are k sector; By the 0th Physical Page of the corresponding physical block in k sector;
In the prior art, if set up the relation of linear mapping between logical block and physical block, first Physical Page in the inevitable corresponding physical block in first sector in logical block.To such an extent as to between arbitrarily a pair of corresponding sector and Physical Page, all meet this sector and in logical block, number and equal this Physical Page and number in physical block.
But the situation for fear of the first Physical Page blank of physical block occurs, the first Physical Page of the no longer fixing corresponding physical block in first sector with logical block in the present embodiment, but with the first Physical Page of the corresponding physical block in the sector of first non-blank-white in logical block, i.e. the 0th Physical Page.So just, the first Physical Page that has ensured physical block must not be blank, has avoided invalid physical block to occur as the situation of data block.In logical block, the sector of first non-blank-white may be the first sector of logical block, i.e. the 0th sector may be also other sectors.In the present embodiment, be referred to as k sector, k is the nonnegative integer that is less than n.
It should be noted that, according to traditional rule for Physical Page or sector number, the numbering of first sector or Physical Page is numeral 0, and in the situation that sector or Physical Page quantity are n, the Serial Number Range of sector or Physical Page is the arbitrary integer in 0 to n-1 interval so; That is to say last sector or being numbered n-1 of Physical Page and be not n.
Step 202, obtain shining upon formula according to the numerical value of sector number k in the logical block of k sector;
Owing to having changed the setting of the first Physical Page of the corresponding physical block in the first sector of logical block in the present embodiment, so in the present embodiment between corresponding sector and Physical Page, not necessarily always meet sector and number in logical block and equal this Physical Page and number in physical block.In order to set up in this case the relation of linear mapping between logical block and physical block, must reformulate the rule of correspondence of other sectors and Physical Page except k sector, to ensure in physical block each Physical Page each sector in counterlogic piece in order all the time.
In the present embodiment, formulate the rule of correspondence of other sectors and Physical Page except k sector and comprise k=0 and k ≠ 0 two kind of concrete condition.
First, be specifically described for the situation of k ≠ 0.According to the rule of linear mapping, the Physical Page quantity in number of sectors and physical block in logical block is under the prerequisite of n; When corresponding the 0th Physical Page in k sector, inevitable k+1 sector should corresponding the 1st Physical Page, and k+2 sector should corresponding the 2nd Physical Page, and the rest may be inferred, and can obtain n-1 sector should corresponding n-k-1 Physical Page.So far, the Physical Page that it should be corresponding has all been found in each sector k sector after of order, and each sector and also definite corresponding relation each other of order each Physical Page after n-k-1 Physical Page before order k sector.
Under regular situation, n-1 sector has been originally last sector of logical block, but in the present embodiment this by the first sector of logical block the 0th sector be placed on n-1 sector after with carry out corresponding with Physical Page.That is to say, when the corresponding n-k-1 Physical Page in n-1 sector, the 0th sector should corresponding n-k Physical Page.If also there are a series of other sectors between the 0th sector and k sector in order, after being still sequentially arranged in the 0th sector, and carry out equally in order corresponding each follow-up Physical Page.Namely, the 1st sector should corresponding n-k+1 Physical Page, and the 2nd sector should corresponding n-k+2 Physical Page, and the rest may be inferred, and can obtain k-1 sector should corresponding n-1 Physical Page.
So far, in logical block, each sector has all been found the Physical Page that it should be corresponding in order, between the each sector of logical block and the each Physical Page of physical block, has formed complete mutual corresponding rule.All there is Physical Page that in theory should be corresponding with it in each sector, only need be by each sector the corresponding relation of setting up with described Physical Page reality that in theory should be corresponding with it, completed the linear mapping of logical block and physical block.For more easy above-mentioned corresponding rule, the mapping formula of formulating in the present embodiment of explaining intuitively.Described mapping formula is specially:
When corresponding the 0th Physical Page and k ≠ 0, k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
As k < x < n, y=x-k;
As 0≤x < k, y=x+n-k;
X, y are the nonnegative integer that is less than n.
According to above-mentioned mapping formula, only need the sector number of any one sector in known logical block, can extrapolate the numbering of Physical Page corresponding to this sector in physical block, thereby learn that it in theory should be corresponding with that Physical Page.
The situation of k=0 belongs to the special circumstances in the present embodiment, and the first sector that shows logical block is that the 0th sector is exactly non-blank-white sector, so can be directly by the first Physical Page of the corresponding physical block in first sector in logical block.In this situation, the concrete mode of linear mapping and of the prior art shine upon one by one in full accord.Namely arbitrarily between a pair of corresponding sector and Physical Page, all meet this sector and in logical block, number and equal this Physical Page and number in physical block.Mapping formula in k=0 situation can be expressed as:
As corresponding the 0th Physical Page and the k=0 in k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
y=x;
X, y are the nonnegative integer that is less than n.
Step 203, according to described mapping formula, other the each sectors beyond k sector in logical block are corresponded to corresponding Physical Page in physical block;
This step is actual sector and the physical block corresponding relation set up, the process of completion logic piece and physical block linear mapping.Known from step 202, can learn by mapping formula the Physical Page that each sector should be corresponding in theory.So the result that only need calculate according to mapping formula corresponds to each Physical Page on corresponding sector, has also just realized the linear mapping of logical block and physical block.In the present embodiment, linear mapping is no longer limited to the first Physical Page of the inevitable corresponding physical block in first sector of logical block, has avoided first Physical Page to occur blank situation, and has not increased extra write operation.
Concrete, described according to described mapping formula, other the each sectors beyond k sector in logical block are corresponded in physical block to the step on corresponding Physical Page can be detailed be described as following:
Step 231, by sector number substitution mapping formula in the logical block of any sector beyond k sector, calculate the numbering of Physical Page corresponding to this sector in physical block;
Step 232, numbering by Physical Page corresponding to any sector beyond k sector in physical block, find corresponding Physical Page;
Step 233, any sector beyond k sector is corresponded to corresponding Physical Page.
Shown in Figure 3, be the schematic diagram of linear mapping described in the present embodiment.In Fig. 3, be in n=4 and k=2 situation, the concrete condition of linear mapping.In Fig. 3,4 Physical Page in four square frame difference represents physical pieces, are respectively the 0th page, the 1st page, the 2nd page and the 3rd page according to order from left to right.Label in figure on each Physical Page represents the sector that this Physical Page is corresponding.In the present embodiment, k equals 2, and namely first non-blank-white sector is the 2nd sector in logical block, the 2nd sector is corresponded to the 0th Physical Page of physical block.
By n=4 and the above-mentioned mapping formula of k=2 substitution, calculate corresponding the 2nd Physical Page in the 0th sector again, corresponding the 3rd Physical Page in the 1st sector, corresponding the 1st Physical Page in the 3rd sector.Set up the linear mapping relation of logical block and physical block according to above-mentioned result of calculation, as shown in Figure 3.
The beneficial effect that the present embodiment exists is, by the first Physical Page of the corresponding physical block in the first non-blank-white sector with logical block, and shine upon formula and calculate the corresponding relation of other sectors and Physical Page by formulation, in the situation that being not limited to the corresponding first Physical Page in first sector, realize the mapping one by one of logical block and physical block; Thereby under the prerequisite that does not increase extra write operation, avoid the blank of the first Physical Page of physical block; Not only perfect logical block first passage and physical block are set up and are shone upon one by one and present the process of data, have also farthest reduced the write operation of NAND chip, have extended the serviceable life of NAND chip.
Shown in Figure 4, be a specific embodiment of the system of setting up logical block and physical block mapping relations of the present invention.In the present embodiment, described system be corresponding embodiment illustrated in fig. 2 described in the virtual system that exists of method, the two technical scheme is in full accord in essence.Concrete, in the present embodiment, physical block comprises multiple Physical Page, and described logical block comprises multiple sectors, and the quantity of the sector that comprises of the quantity of the Physical Page that comprises of physical block and logical block is positive integer n; Described system specifically comprises:
Mapping block is k sector for finding out the sector of the first non-blank-white of logical block; By the 0th Physical Page of the corresponding physical block in k sector; And according to mapping formula, other the each sectors beyond k sector in logical block are corresponded in physical block on corresponding Physical Page;
Computing module, for obtaining shining upon formula according to the numerical value of sector number k in the logical block of k sector;
K is the nonnegative integer that is less than n.
The described numerical value according to sector number k in the logical block of k sector obtains shining upon formula and is specially:
Set mapping formula according to the rule of linear mapping.
Described mapping formula is specially:
When corresponding the 0th Physical Page and k ≠ 0, k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
As k < x < n, y=x-k;
As 0≤x < k, y=x+n-k;
X, y are the nonnegative integer that is less than n.
As corresponding the 0th Physical Page and the k=0 in k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
y=x;
X, y are the nonnegative integer that is less than n.
Described mapping block specifically comprises:
Searching unit, is k sector for finding out the sector of the first non-blank-white of logical block;
Numbering substitution unit, for by sector number substitution mapping formula in the logical block of any sector beyond k sector, calculates the numbering of Physical Page corresponding to this sector in physical block;
Physical Page unit, for the numbering at physical block by Physical Page corresponding to any sector beyond k sector, finds corresponding Physical Page;
Correspondence establishing unit, for by the 0th Physical Page of corresponding k sector physical block; And any sector beyond k sector is corresponded to corresponding Physical Page.
Accordingly, the beneficial effect that described in the present embodiment, system realizes is: by the first Physical Page of the corresponding physical block in the first non-blank-white sector with logical block, and shine upon formula and calculate the corresponding relation of other sectors and Physical Page by formulation, in the situation that being not limited to the corresponding first Physical Page in first sector, realize the mapping one by one of logical block and physical block; Thereby under the prerequisite that does not increase extra write operation, avoid the blank of the first Physical Page of physical block; Not only perfect logical block first passage and physical block are set up and are shone upon one by one and present the process of data, have also farthest reduced the write operation of NAND chip, have extended the serviceable life of NAND chip.
The above is only the preferred embodiment of the present invention; 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 make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. set up the method for logical block and physical block mapping relations for one kind, it is characterized in that, physical block comprises multiple Physical Page, and described logical block comprises multiple sectors, and the quantity of the sector that comprises of the quantity of the Physical Page that comprises of physical block and logical block is positive integer n; Said method comprising the steps of:
The sector that finds out first non-blank-white in logical block is k sector; By the 0th Physical Page of the corresponding physical block in k sector;
Obtain shining upon formula according to the numerical value of sector number k in the logical block of k sector;
According to described mapping formula, other the each sectors beyond k sector in logical block are corresponded in physical block on corresponding Physical Page;
K is the nonnegative integer that is less than n.
2. method according to claim 1, is characterized in that, the described numerical value according to sector number k in the logical block of k sector obtains shining upon formula and is specially:
Set mapping formula according to the rule of linear mapping.
3. method according to claim 2, is characterized in that, described mapping formula is specially:
When corresponding the 0th Physical Page and k ≠ 0, k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
As k < x < n, y=x-k;
As 0≤x < k, y=x+n-k;
X, y are the nonnegative integer that is less than n.
4. method according to claim 2, is characterized in that, described mapping formula is specially:
As corresponding the 0th Physical Page and the k=0 in k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
y=x;
X, y are the nonnegative integer that is less than n.
5. method according to claim 1, is characterized in that, describedly according to described mapping formula, other the each sectors beyond k sector in logical block is corresponded in physical block and is specially on corresponding Physical Page:
By sector number substitution mapping formula in the logical block of any sector beyond k sector, calculate the numbering of Physical Page corresponding to this sector in physical block;
Numbering by Physical Page corresponding to any sector beyond k sector in physical block, finds corresponding Physical Page;
Any sector beyond k sector is corresponded to corresponding Physical Page.
6. set up the system of logical block and physical block mapping relations for one kind, it is characterized in that, physical block comprises multiple Physical Page, and described logical block comprises multiple sectors, and the quantity of the sector that comprises of the quantity of the Physical Page that comprises of physical block and logical block is positive integer n; Described system specifically comprises:
Mapping block is k sector for finding out the sector of the first non-blank-white of logical block; By the 0th Physical Page of the corresponding physical block in k sector; And according to mapping formula, other the each sectors beyond k sector in logical block are corresponded in physical block on corresponding Physical Page;
Computing module, for obtaining shining upon formula according to the numerical value of sector number k in the logical block of k sector;
K is the nonnegative integer that is less than n.
7. system according to claim 5, is characterized in that, the described numerical value according to sector number k in the logical block of k sector obtains shining upon formula and is specially:
Set mapping formula according to the rule of linear mapping.
8. system according to claim 6, is characterized in that, described mapping formula is specially:
When corresponding the 0th Physical Page and k ≠ 0, k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
As k < x < n, y=x-k;
As 0≤x < k, y=x+n-k;
X, y are the nonnegative integer that is less than n.
9. system according to claim 5, is characterized in that, described mapping formula is specially:
As corresponding the 0th Physical Page and the k=0 in k sector, for the x sector beyond k sector, the numbering y of corresponding Physical Page in physical block calculates according to following formula;
y=x;
X, y are the nonnegative integer that is less than n.
10. system according to claim 5, is characterized in that, described mapping block specifically comprises:
Searching unit, is k sector for finding out the sector of the first non-blank-white of logical block;
Numbering substitution unit, for by sector number substitution mapping formula in the logical block of any sector beyond k sector, calculates the numbering of Physical Page corresponding to this sector in physical block;
Physical Page unit, for the numbering at physical block by Physical Page corresponding to any sector beyond k sector, finds corresponding Physical Page;
Correspondence establishing unit, for by the 0th Physical Page of corresponding k sector physical block; And any sector beyond k sector is corresponded to corresponding Physical Page.
CN201310054963.5A 2013-02-20 2013-02-20 A kind of method and system for setting up logical block and physical block mapping relations Active CN103995783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310054963.5A CN103995783B (en) 2013-02-20 2013-02-20 A kind of method and system for setting up logical block and physical block mapping relations

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310054963.5A CN103995783B (en) 2013-02-20 2013-02-20 A kind of method and system for setting up logical block and physical block mapping relations

Publications (2)

Publication Number Publication Date
CN103995783A true CN103995783A (en) 2014-08-20
CN103995783B CN103995783B (en) 2017-08-25

Family

ID=51309955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310054963.5A Active CN103995783B (en) 2013-02-20 2013-02-20 A kind of method and system for setting up logical block and physical block mapping relations

Country Status (1)

Country Link
CN (1) CN103995783B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329656A (en) * 2008-05-06 2008-12-24 无锡紫芯集成电路系统有限公司 Management method of Nand-Flash memory system
CN101383190A (en) * 2008-08-11 2009-03-11 湖南源科创新科技股份有限公司 Flash memory loss equalizing algorithm applied in solid hard disk
CN102339255A (en) * 2010-07-16 2012-02-01 安凯(广州)微电子技术有限公司 Nand writing balance processing method
CN102831072A (en) * 2012-08-10 2012-12-19 深圳市江波龙电子有限公司 Flash memory device, and management method, data read-write method and data read-write device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329656A (en) * 2008-05-06 2008-12-24 无锡紫芯集成电路系统有限公司 Management method of Nand-Flash memory system
CN101383190A (en) * 2008-08-11 2009-03-11 湖南源科创新科技股份有限公司 Flash memory loss equalizing algorithm applied in solid hard disk
CN102339255A (en) * 2010-07-16 2012-02-01 安凯(广州)微电子技术有限公司 Nand writing balance processing method
CN102831072A (en) * 2012-08-10 2012-12-19 深圳市江波龙电子有限公司 Flash memory device, and management method, data read-write method and data read-write device thereof

Also Published As

Publication number Publication date
CN103995783B (en) 2017-08-25

Similar Documents

Publication Publication Date Title
CN104662518B (en) Data migration method, data migration device and memory device
CN102629258B (en) Repeating data deleting method and device
US10120751B2 (en) Techniques to recover data using exclusive OR (XOR) parity information
TWI506430B (en) Method of recording mapping information method, and memory controller and memory storage apparatus using the same
TWI436370B (en) Memory storage device, memory controller thereof, and method for generating log likelihood ratio thereof
TWI446350B (en) Method for reducing uncorrectable errors, and associated memory device and controller thereof
TWI506422B (en) Method for managing a memory device having multiple channels and multiple ways, and associated memory device and controller thereof
CN102831072B (en) Flash memory device and management method, data read-write method and read-write equipment
TWI527040B (en) Data writing method, memory storage device and memory controller
CN103955430A (en) Data management method and apparatus in flash memory storage device
CN102880567B (en) data read-write system
US9733861B2 (en) Data temperature profiling by smart counter
CN104699413A (en) Data management method, memorizer saving device and memorizer control circuit unit
US20160110116A1 (en) Method to shorten hash chains in lempel-ziv compression of data with repetitive symbols
TWI720246B (en) Data storage device and operating method therefor
CN103309626A (en) Method for realizing multi-read-write port memorizer of network chip and corresponding memorizer
CN103473266A (en) Solid state disk and method for deleting repeating data thereof
CN104299637A (en) Flash memory device and operation method thereof
CN103984506A (en) Method and system for data writing of flash memory storage equipment
CN104361907A (en) Counting method of FLASH memory
CN105205012A (en) Method and device for reading data
TW202044046A (en) A data storage device and a data processing method
CN103226977B (en) Quick NAND FLASH controller based on FPGA and control method thereof
CN103914391A (en) Data reading method, memory controller and memory storage device
CN111813709A (en) High-speed parallel storage method based on FPGA (field programmable Gate array) storage and calculation integrated framework

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
CP01 Change in the name or title of a patent holder

Address after: 510663 3rd floor, area C1, innovation building, 182 science Avenue, Guangzhou Science City, Luogang District, Guangzhou City, Guangdong Province

Patentee after: Guangzhou Ankai Microelectronics Co.,Ltd.

Address before: 510663 3rd floor, area C1, innovation building, 182 science Avenue, Guangzhou Science City, Luogang District, Guangzhou City, Guangdong Province

Patentee before: ANYKA (GUANGZHOU) MICROELECTRONICS TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP02 Change in the address of a patent holder

Address after: 510555 No. 107 Bowen Road, Huangpu District, Guangzhou, Guangdong

Patentee after: Guangzhou Ankai Microelectronics Co., Ltd

Address before: 510663 3rd floor, area C1, innovation building, 182 science Avenue, Guangzhou Science City, Luogang District, Guangzhou City, Guangdong Province

Patentee before: Guangzhou Ankai Microelectronics Co., Ltd

CP02 Change in the address of a patent holder