Through the method for information sequence realization flash controller management data storage with reduction
Technical field
The present invention relates to the memory technology of flash memory, be specifically related to a kind of through the method for information sequence realization flash controller management data storage with reduction.
Background technology
Serializing is the process that Obj State is converted into the form that can keep or transmit.Relative with serializing is unserializing, and it is changed to object with circulation.These two processes combine, and just make data to be stored like a cork and to transmit.Present most of flash controller is to write NandFlash preliminary data district to carry out storage administration for the information of NandFlash; Want the spare area data of the corresponding sector of continuous access when the existence of doing is like this operated, frequent accessing operation has influenced the speed of read-write; Because space, preliminary data district is less, the structure of flash controller is more complicated a little, and just no longer suitable.
Summary of the invention
The object of the present invention is to provide a kind of through information sequence realization flash controller management data storage method with reduction, its solved in the background technology to the management information read or write speed of the piece among the NandFlash and sector slow and management information separately storage just receive the problem of the big or small restriction in preliminary data district.
Technical solution of the present invention is:
A kind of method through the storage of information sequence realization flash controller management data is characterized in that this method may further comprise the steps:
A). enumerate the identifier constant according to corresponding one of each information, set up the enumerated table that comprises all identifier constants;
B). generate one with enumerated list corresponding address map index table, the start sector number that the concrete data structure of map addresses concordance list comprises information is big or small with information, enumerates in the identifier constant manipulative indexing table in each enumerated list;
C). the information in enumerated list and the map addresses concordance list is carried out the initialization assign operation;
D). the initialization information of managing is carried out storage administration;
E). the information of storage administration is set up scheduler map index table;
F). the information in the scheduler map index table is stored, the final whole process of accomplishing storage.
Storage administration in the above-mentioned steps (d) also comprises:
At first initialization information is stored, then obtained the start sector number of information, obtain the information size that to preserve according to initialization information according to the block address of information stores; Then the information size is judged, is specifically judged as follows:
If the size of information surpasses the size of a piece, then canned data start sector number and total size are striden the piece storage, then sector number in the map index table of address and information size are upgraded; If the size of information does not have to surpass the size of a piece, directly sector number in the map index table of address and information size are upgraded, upgraded back memory address map index table.
Above-mentionedly stride piece storage and at first obtain sector number, realize storage through calculating the remaining information size again the piece that is used for storing the information that lastblock do not stored.
A kind of method through the reduction of information sequence realization flash controller management data is characterized in that the reduction of said flash controller management information comprises step:
A). the information to address map index table reads;
B). to enumerate identifier is start sector number and the size that index obtains information;
C). read the information content to sector number that obtains and size by the sector;
D). will recombinate with the reduction of the pointed of restore information after the information content, thereby accomplish whole reduction process.
Above-mentioned steps (c) also comprises: whether reading of information finished judges,
Specifically judge as follows:
If the information that will read finish after, directly to the memory information reduction of recombinating;
If reading of information do not finish, whether the entering next procedure strides the piece storage to information is judged;
If information is not striden the piece storage, directly return a step and the information content is read by the sector;
If information reads and finishes, directly to the memory information reduction of recombinating;
If information is striden the piece storage; Get into next step, obtain start sector number and the size of remaining information, return again by the sector after having obtained and read information content step at other pieces; Continue again information is read; Read until information and to finish, again the information in the internal memory is recombinated after information reads and finishes and reduce, finally accomplish whole reduction process.
The present invention has the following advantages:
1. because the management information of sector can directly be obtained, and from the spare area, sector, to obtain information many soon so speed is compared at every turn, can significantly improve the efficient of sector read-write in internal memory.
2. the independent storage of management information can not receive the restriction of preliminary data district size.
3. flash controller applying flexible.
Description of drawings:
Fig. 1 is the composition frame chart of management information serializing of the present invention;
Fig. 2 is a management information operational block diagram of the present invention;
Fig. 3 is a restore management information operating block diagram of the present invention;
Fig. 4 is an information stores program flow diagram of the present invention;
Fig. 5 is an information reverting program flow diagram of the present invention.
Embodiment
Referring to Fig. 1-Fig. 5, a kind of method through the storage of information sequence realization flash controller management data is characterized in that this method may further comprise the steps:
A). enumerate the identifier constant according to corresponding one of each information, set up the enumerated table that comprises all identifier constants;
B). generate one with enumerated list corresponding address map index table, the start sector number that the concrete data structure of map addresses concordance list comprises information is big or small with information, enumerates in the identifier constant manipulative indexing table in each enumerated list;
C). the information in enumerated list and the map addresses concordance list is carried out the initialization assign operation;
D). the initialization information of managing is carried out storage administration;
E). the information of storage administration is set up scheduler map index table;
F). the information in the scheduler map index table is stored, the final whole process of accomplishing storage.
Storage administration in the above-mentioned steps (d) also comprises:
At first initialization information is stored, then obtained the start sector number of information, obtain the information size that to preserve according to initialization information according to the block address of information stores; Then the information size is judged, is specifically judged as follows:
If the size of information surpasses the size of a piece, then canned data start sector number and total size are striden the piece storage, then sector number in the map index table of address and information size are upgraded; If the size of information does not have to surpass the size of a piece, directly sector number in the map index table of address and information size are upgraded, upgraded back memory address map index table.
Stride piece storage and at first obtain sector number, realize storage through calculating the remaining information size again the piece that is used for storing the information that lastblock do not stored.
A kind of method through the reduction of management information serializing realization flash controller management data is characterized in that the reduction of said flash controller management information comprises step:
A). the information to address map index table reads;
B). to enumerate identifier is start sector number and the size that index obtains information;
C). read the information content to sector number that obtains and size by the sector;
D). will recombinate with the reduction of the pointed of restore information after the information content, thereby accomplish whole reduction process.
Above-mentioned steps (c) also comprises: whether reading of information finished judges,
Concrete judge as follows: as if the information that will read finish after, directly to the memory information reduction of recombinating; If reading of information do not finish, whether the entering next procedure strides the piece storage to information is judged; If information is not striden the piece storage, directly return a step and the information content is read by the sector; If information reads and finishes, directly to the memory information reduction of recombinating; If information is striden the piece storage; Get into next step, obtain start sector number and the size of remaining information, return again by the sector after having obtained and read information content step at other pieces; Continue again information is read; Read until information and to finish, again the information in the internal memory is recombinated after information reads and finishes and reduce, finally accomplish whole reduction process.
The present invention extracts independent storage administration to some common informations commonly used in the NandFlash management, has so just overcome the little shortcoming in space, preliminary data district.Each powering up in the initialization procedure of flash controller corresponding management information is read in the internal memory; Until all are all accomplished in internal memory the operation of NandFlash management information before the flash controller outage, ability is disposable in the time of outage writes back NandFlash to all management information.So just improved read or write speed to a great extent.The method of use flash controller management information serializing makes up, access management information, being mapped with corresponding piece and sector after canned data reads out before, has also increased the flash controller application flexibility.