CN101000580A - NAND flash information extraction method and NAND flash automatic identification method - Google Patents
NAND flash information extraction method and NAND flash automatic identification method Download PDFInfo
- Publication number
- CN101000580A CN101000580A CN 200610130765 CN200610130765A CN101000580A CN 101000580 A CN101000580 A CN 101000580A CN 200610130765 CN200610130765 CN 200610130765 CN 200610130765 A CN200610130765 A CN 200610130765A CN 101000580 A CN101000580 A CN 101000580A
- Authority
- CN
- China
- Prior art keywords
- nand
- address
- information table
- information
- page
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000000605 extraction Methods 0.000 title 1
- 230000015654 memory Effects 0.000 claims description 27
- 230000008676 import Effects 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 claims description 3
- 230000008859 change Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000010295 mobile communication Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Landscapes
- Memory System (AREA)
Abstract
A method for picking up NAND flash information includes defining a data structure, describing NAND necessary information, storing multiple types of NAND necessary information in said data structure to form multiple sheets of NAND information table, setting multiple pointer to point said table, fetching CHIP ID of NAND to find out corresponding information table and to obtain NAND necessary information when NAND is initialized, carrying out data read/write on correct physical address by calculating address. The method for automatically identifying NAND flash is also disclosed.
Description
Technical field
The present invention relates to the control of nand flash memory, particularly nand flash memory information extracting method and nand flash memory automatic identifying method.
Technical background
Because nand flash memory is that unit reads and writes data with the page or leaf, thus be suitable for storing continuous data, as picture, audio frequency or other file data; The advantage that cost is low, capacity is big and writing speed is fast because of having simultaneously, the erasing time is short is so obtained using widely in the field of storage of device for mobile communication and portable multimedia device.
Nand flash memory is that block forms by a plurality of all, and each block is that page forms by a plurality of page or leaf, comprises the byte of some in every page.As shown in Figure 1, in this nand flash memory, each block comprises 32 page, and each page comprises (512+16) bytes, and wherein every page preceding 512bytes is the data field, is used to store data; Back 16bytes is the free area.This nand flash memory data bit is 8, and the 512bytes in every page is divided into two and half pages, i.e. the first half pages of 1st half page and the second half pages of 2nd half page, and each half page comprises 256bytes.
The nand flash memory of different capabilities, its structure type are also different, and promptly the page size all can be different with the block sum.Because nand flash memory generally is fixed on the hardware, so in the ordinary course of things, driver only need support that a kind of nand flash memory of fixed type is just passable, revises corresponding program when dissimilar nand flash memory again.
But under many circumstances, driver is more fixing, revises comparatively loaded down with trivial details.The multimedia process chip in the mobile phone for example, the program of its file system is in chip internal operation, if nand flash memory structure type difference at this moment, then the driver of chip internal also needs to upgrade, promptly, provide different drivers at each different N AND flash memory structure type.This just uses to chip program design, manufacturing and user and has brought a lot of troubles.
Summary of the invention
In view of this, the technical issues that need to address of the present invention are exactly the problem that comparatively fixing driver can't be supported the nand flash memory of different types of structure.
In order to solve the problems of the technologies described above, the invention provides a kind of nand flash memory information extracting method, comprising:
Data structure of 100 definition is used to describe the essential information of NAND;
200 all preserve the essential information of a plurality of dissimilar NAND get off with above-mentioned data structure, and the essential information of each NAND forms a NAND information table, thereby obtain a plurality of information tables of different N AND;
300 form a pointer gauge, wherein the space, a NAND information table place described in the corresponding respectively sensing step 200 of each pointer.
Further, the essential information of NAND in the described step 100, comprise ID, NAND title, the block sum of NAND, the page number of each block the inside, actual page size, NAND chip code nand_id, this NAND which position of nand_id effectively, line number order, the column number of NAND and the sequential that some are necessary etc.
Further, during the NAND that do not have in using the NAND tabulation, the information table that increases this original NAND upgrades pointer gauge simultaneously in the NAND tabulation.
The present invention also provides a kind of nand flash memory automatic identifying method, comprising:
400 when the NAND initialization, reads the ID of NAND with same order, utilizes pointer gauge to obtain the information table of corresponding NAND, in store NAND information necessary in the information table;
500 when reading and writing data, and according to block address of importing into and page offset address, calculates read/write address in conjunction with the relevant information in the described NAND information table;
600 according to the row and column address in the transmission of the relevant information in the NAND information table read/write address.
Further, step 400 is specially, and reads the CHIP ID of NAND, utilizes pointer gauge to point to the space of each NAND information table, utilizes described ID to search in each NAND information table, finds the corresponding NAND information table that identical CHIP ID is arranged in the information table.
Further, the calculating formula of described calculating read/write address is:
Row address=(actual page size/528) * (the block address of importing into) * (what page each block has)+(the page offset address that imports into/(actual page size/528));
Column address=(the page offset address % that imports into (actual page size/528)) * 528, column address need be removed high 4;
Wherein " % " is the operational symbol of getting remainder after being divided by, and the actual page size in the formula is by obtaining in the NAND information table.
Further, when sending the address, pass through I/O
0~I/O
7Send, each cycle sends the address of one group of 8bit, sends column address earlier, and the back sends row address; At first by the row and column number that obtains this NAND in the NAND information table, when sending the row, column address, send with the row address of line number order equal amount and with the column address of column number equal amount.
The present invention has defined a data structure in the driver of NAND, described the essential information of NAND, comprising the CHIP ID of NAND; The essential information of polytype NAND is preserved with described data structure, form many NAND information tables; And the described information table of pointed is set; When the NAND initialization, read the CHIP ID of NAND, find the corresponding NAND information table that identical CHIP ID is arranged, can obtain the essential information of NAND; When reading and writing data, must information carry out the calculating of address, can carry out reading and writing data correct physical address according to described.The inventive method is simple, only with a cover bottom layer driving, can support multiple nand flash memory; Thereby realize identification automatically.Further, the present invention can use the mode of upgrading the NAND information table, and more the NAND type of being supported in the newer driver that is to say, does not need to revise the driver of chip internal, can support the nand flash memory of all structure types.
Description of drawings
Fig. 1 is the physical arrangement synoptic diagram of a nand flash memory;
Fig. 2 generates the method flow diagram of nand flash memory information table for the present invention;
Fig. 3 is pointer gauge and NAND information table corresponding relation among the present invention;
Fig. 4 the present invention is directed to the synoptic diagram of dissimilar nand flash memories with multi-form transmission row, column address;
Fig. 5 discerns the method flow diagram of nand flash memory information table automatically for the present invention.
Embodiment
Below in conjunction with accompanying drawing, method of the present invention is described, may further comprise the steps.
Described information comprises the NAND title; The block sum; The page number of each block the inside; The actual size of NAND physics page is a unit with Byte; The chip code nand_id of NAND; Which position of the nand_id of this NAND effectively; The line number order of NAND, column number and sequential that some are necessary etc.
Provide the example of a described data structure definition below:
typedef?struct_struct_NANDdetail
{
Unsigned char name[17]; //NAND title
Unsigned long dwNANDBlockNum; The block sum of //NAND
Unsigned char bNANDPagePerBlock; Each block the inside number of pages of //NAND
Unsigned long dwPageRealSize; The actual size of //NAND thing physics page is a unit with Byte
Unsigned long dwNANDId; The nand_id of //NAND
Unsigned long dwNANDIdAnd; Which position of the nand_id of //NAND effectively
Unsigned long dwRowNum; The line number order of //NAND
Unsigned long dwColNum; The column number of //NAND
//timing
Unsigned char racc; Some necessary sequential of //trea max
The sequential that some are necessary
}NAND_DETAIL,*PNAND_DETAIL。
Provide the example of the essential information of a NAND at this, note, content given herein is not the unsigned character of actual preservations or unsigned long data etc., but so that reading and the letter symbol form discerned provide:
The NAND-3 of XX company; //NAND title
1024; The block sum of //NAND
32; Each block the inside number of pages of //NAND
528; The actual size of //NAND physics page is a unit with Byte
XY3; The nand_id of //NAND
512; Which position of the nand_id of //NAND effectively
2; The line number order of //NAND
2; The column number of //NAND
//timing ... the sequential that some are necessary
As shown in Figure 3, be a form of having preserved a plurality of NAND information, each pointer 1,2 and 3 in the pointer gauge then points to NAND information table 1,2 and 3 respectively.
When reality is used NAND, just can discern NAND so with following step:
Use same order to read the CHIP ID of NAND.In pointer gauge, utilize pointer to point to the space of each NAND information table one by one, utilize CHIP ID in each NAND information table, to search for, find a NAND information table, nand_id wherein should be identical with CHIP ID, and this information table is the NAND information table of being sought so.
Step 500 is when reading and writing data, according to finding the information in the NAND information table to calculate read/write address in the step 400.
At this, no matter be actual physical structure has the big page of 2112byte greatly to a page NAND, still be the NAND that a page only has the little page of 528byte, when calculated address, all will be divided into 528 1 page.
When calculated address, need according to block address that receives and (the bottom generation that these two addresses are file system of page offset address, the present invention will pass to file system with a kind of fixing form with multi-form address), calculate its actual physical address in NAND.Calculate row address and column address respectively, provide the address translation formula below, wherein " % " operational symbol for getting remainder after being divided by.
Row address=(actual page size/528) * (the block address of importing into) * (what page each block has)+(the page offset address that imports into/(actual page size/528));
Column address=(the page offset address % that imports into (actual page size/528)) * 528, column address need be removed high 4.
Actual page size in the formula is by obtaining in the NAND information table.
For example, for the example of a NAND who provides in the step 200, its block adds up to 1024, in each block the inside number of pages 32 page is arranged, and among each page 528Bytes is arranged.If its block address of importing into is 800 so, and the page offset address that imports into is 20, then can obtain:
Row address=(528/528) * (800) * 32+ (20/ (528/528))=800*32+20=25620;
Column address=(20% (528/528)) * 528=0, column address need be removed high 4.
Other lifts an example, and the out of Memory of establishing a NAND is all the same with last example, just among each page 2112Bytes is arranged.The block address that it imports into is 400, and the page offset address that imports into is 30.Then when calculated address, its result of calculation is:
Row address=(2112/528) * (400) * 32+ (30/ (2112/528))=4 * 400 * 32+7=51207;
Column address=(30% (2112/528)) * 528=1056, column address need be removed high 4, and final column address is 056.
Step 600 sends row and column address in the read/write address according to the difference of the ranks number of each NAND.
After read/write address calculating finishes, need send it to come among the NAND data read-write operation is carried out in the respective physical address.When sending the address, all be to pass through I/O
0~I/O
7Send, each cycle sends the address of one group of 8bit.When sending,, send out column address earlier according to the ranks number, period 1 normally sends, if column address more than 8, then moves to left 8 the 1st column address that all after dates will be good at every turn sends then, send row address again after sending column address, send mode is identical with the column address sending method.
Because the ranks number difference of each NAND also has difference so send the mode of rank addresses.The ranks number of described NAND is obtained by the NAND information table.As shown in Figure 4, wherein Fig. 4 a represents that the address that a row, column number is respectively 3 and 1 NAND sends form, needs to send 1 column address, and then sends 3 row addresses.The always total A0~A26 of this NAND is 27 bit address data altogether.As for A8, when sending the address need not, be to distinguish a8, so in above-mentioned address, do not have A8 with different control commands.Shared four bus cycles send an address in Fig. 4 a, have only in the data that sent in the 4th cycle low 2 effectively, high 6 invalid representation be "
*L ".Fig. 4 b represents that then a ranks number all is that the address of 2 NAND sends form, and this NAND need send 2 column addresss at every turn, 2 row addresses.The always total A0~A27 of this NAND is 28 bit address data altogether.Shared four bus cycles send an address, in the data that sent in the 2nd cycle high 4 invalid, be expressed as "
*L ".
In the prior art, when the NAND type change, need change corresponding driving program, to support dissimilar NAND.Therefore the present invention when the NAND type change, can change driver because used the NAND information table to discern NAND automatically, but supports the NAND of newtype by the mode of increase or renewal NAND information table.Cellphone subscriber's NAND information table that can use mobile communication to download to obtain upgrading for example.Provide the commercial city that very big convenience is provided for like this user, mobile-phone manufacturers or program.
Use method of the present invention, can discern polytype NAND automatically, therefore can support polytype NAND, make driver to need change because of the type difference of NAND with the program of a version.And can be so that the user can be by upgrading the mode of NAND information table, the more NAND tabulation supported of newer driver.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement etc., all should be included within protection scope of the present invention.
Claims (7)
1, the nand flash memory information extracting method is characterized in that, comprising:
Data structure of 100 definition is used to describe the essential information of NAND;
200 all preserve the essential information of a plurality of dissimilar NAND get off with above-mentioned data structure, and the essential information of each NAND forms a NAND information table, thereby obtain a plurality of information tables of different N AND;
300 form a pointer gauge, wherein the space, a NAND information table place described in the corresponding respectively sensing step 200 of each pointer.
2, method according to claim 1, it is characterized in that, the essential information of NAND in the described step 100, comprise ID, NAND title, the block sum of NAND, the page number of each block the inside, actual page size, NAND chip code nand_id, this NAND which position of nand_id effectively, line number order, the column number of NAND and the sequential that some are necessary etc.
3, method according to claim 1 is characterized in that, during the NAND that do not have in using the NAND tabulation, the information table that increases this original NAND upgrades pointer gauge simultaneously in the NAND tabulation.
4, the nand flash memory automatic identifying method is characterized in that, comprising:
400 when the NAND initialization, reads the ID of NAND with same order, utilizes pointer gauge to obtain the information table of corresponding NAND, in store NAND information necessary in the information table;
500 when reading and writing data, and according to block address of importing into and page offset address, calculates read/write address in conjunction with the relevant information in the described NAND information table;
600 according to the row and column address in the transmission of the relevant information in the NAND information table read/write address.
5, method according to claim 4, it is characterized in that, step 400 is specially, read the CHIP ID of NAND, utilize pointer gauge to point to the space of each NAND information table, utilize described ID in each NAND information table, to search for, find the corresponding NAND information table that identical CHIP ID is arranged in the information table.
6, method according to claim 4 is characterized in that, the calculating formula of described calculating read/write address is:
Row address=(actual page size/528) * (the block address of importing into) * (what page each block has)+(the page offset address that imports into/(actual page size/528));
Column address=(the page offset address % that imports into (actual page size/528)) * 528, column address need be removed high 4;
Wherein " % " is the operational symbol of getting remainder after being divided by, and the actual page size in the formula is by obtaining in the NAND information table.
7, method according to claim 4 is characterized in that, when sending the address, passes through I/O
0~I/O
7Send, each cycle sends the address of one group of 8bit, sends column address earlier, and the back sends row address; At first by the row and column number that obtains this NAND in the NAND information table, when sending the row, column address, send with the row address of line number order equal amount and with the column address of column number equal amount.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101307652A CN100458736C (en) | 2006-12-30 | 2006-12-30 | NAND flash information extraction method and NAND flash automatic identification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101307652A CN100458736C (en) | 2006-12-30 | 2006-12-30 | NAND flash information extraction method and NAND flash automatic identification method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101000580A true CN101000580A (en) | 2007-07-18 |
CN100458736C CN100458736C (en) | 2009-02-04 |
Family
ID=38692560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006101307652A Expired - Fee Related CN100458736C (en) | 2006-12-30 | 2006-12-30 | NAND flash information extraction method and NAND flash automatic identification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100458736C (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101533663A (en) * | 2008-03-11 | 2009-09-16 | 深圳市朗科科技股份有限公司 | Method for improving flash memory medium data access speed |
CN101430936B (en) * | 2008-10-23 | 2011-09-07 | 深圳市硅格半导体有限公司 | Method for acquiring physical parameters of flash memory |
CN101751338B (en) * | 2008-12-15 | 2012-03-07 | 中芯国际集成电路制造(上海)有限公司 | Data access control device and data access method |
CN102622305A (en) * | 2012-01-19 | 2012-08-01 | 苏州希图视鼎微电子有限公司 | Method for processing width parameters of hardware access addresses in NAND flash memory |
CN102622243A (en) * | 2012-01-19 | 2012-08-01 | 苏州希图视鼎微电子有限公司 | Method for executing solidified codes supporting various NAND flash memories |
CN102662878A (en) * | 2012-02-27 | 2012-09-12 | 深圳市硅格半导体有限公司 | Identifying-driving method and device for software layer of storage device |
TWI381384B (en) * | 2008-03-11 | 2013-01-01 | Netac Technology Co Ltd | A method for improving accessing speed of flash memory medium |
CN102110055B (en) * | 2009-12-25 | 2013-04-10 | 比亚迪股份有限公司 | Memory layout method and memory layout device of flash chip |
CN105955667A (en) * | 2016-05-03 | 2016-09-21 | 深圳芯邦科技股份有限公司 | Underlying driver and NandFlash identification method |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100577380B1 (en) * | 1999-09-29 | 2006-05-09 | 삼성전자주식회사 | A flash-memory and a it's controling method |
JP4233213B2 (en) * | 2000-12-27 | 2009-03-04 | Tdk株式会社 | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD |
US20060143365A1 (en) * | 2002-06-19 | 2006-06-29 | Tokyo Electron Device Limited | Memory device, memory managing method and program |
KR100626391B1 (en) * | 2005-04-01 | 2006-09-20 | 삼성전자주식회사 | Onenand flash memory and data processing system including the same |
TWI275101B (en) * | 2005-05-24 | 2007-03-01 | Prolific Technology Inc | Flash memory storage system |
-
2006
- 2006-12-30 CN CNB2006101307652A patent/CN100458736C/en not_active Expired - Fee Related
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI381384B (en) * | 2008-03-11 | 2013-01-01 | Netac Technology Co Ltd | A method for improving accessing speed of flash memory medium |
WO2009111981A1 (en) * | 2008-03-11 | 2009-09-17 | 深圳市朗科科技股份有限公司 | Method for improving data access speed of flash media and apparatus employing this method |
CN101533663A (en) * | 2008-03-11 | 2009-09-16 | 深圳市朗科科技股份有限公司 | Method for improving flash memory medium data access speed |
CN101533663B (en) * | 2008-03-11 | 2014-07-16 | 深圳市朗科科技股份有限公司 | Method for improving flash memory medium data access speed |
CN101430936B (en) * | 2008-10-23 | 2011-09-07 | 深圳市硅格半导体有限公司 | Method for acquiring physical parameters of flash memory |
CN101751338B (en) * | 2008-12-15 | 2012-03-07 | 中芯国际集成电路制造(上海)有限公司 | Data access control device and data access method |
CN102110055B (en) * | 2009-12-25 | 2013-04-10 | 比亚迪股份有限公司 | Memory layout method and memory layout device of flash chip |
CN102622243A (en) * | 2012-01-19 | 2012-08-01 | 苏州希图视鼎微电子有限公司 | Method for executing solidified codes supporting various NAND flash memories |
CN102622305A (en) * | 2012-01-19 | 2012-08-01 | 苏州希图视鼎微电子有限公司 | Method for processing width parameters of hardware access addresses in NAND flash memory |
CN102662878A (en) * | 2012-02-27 | 2012-09-12 | 深圳市硅格半导体有限公司 | Identifying-driving method and device for software layer of storage device |
CN102662878B (en) * | 2012-02-27 | 2015-01-21 | 深圳市硅格半导体有限公司 | Identifying-driving method and device for software layer of storage device |
CN105955667A (en) * | 2016-05-03 | 2016-09-21 | 深圳芯邦科技股份有限公司 | Underlying driver and NandFlash identification method |
CN105955667B (en) * | 2016-05-03 | 2019-04-26 | 深圳芯邦科技股份有限公司 | A kind of bottom layer driving and NandFlash recognition methods |
Also Published As
Publication number | Publication date |
---|---|
CN100458736C (en) | 2009-02-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100458736C (en) | NAND flash information extraction method and NAND flash automatic identification method | |
US7516296B2 (en) | Flash memory storage device and read/write method | |
CN101099125B (en) | Cluster auto-alignment method and storage system | |
US9529709B2 (en) | Apparatuses for managing and accessing flash memory module | |
US8144515B2 (en) | Interleaved flash storage system and method | |
US8230160B2 (en) | Flash memory storage system and flash memory controller and data processing method thereof | |
US8539174B2 (en) | Use by a host device having a first file system of a portable storage device having a second file system and supporting file segmentation | |
CN102414666A (en) | Low latency read operation for managed non-volatile memory | |
US20080016267A1 (en) | Memory controller, flash memory system having memory controller, and method for controlling flash memory | |
CN102054533A (en) | Non-volatile semiconductor memory segregating sequential, random, and system data to reduce garbage collection for page based mapping | |
CN102422271A (en) | Multipage preparation commands for non-volatile memory systems | |
CN103279406B (en) | A kind of partition method of internal memory and device | |
CN111897743B (en) | Data storage device and loading method of logical-to-physical address mapping table | |
US10802750B2 (en) | Universal flash storage memory module, controller and electronic device with advanced turbo write buffer and method for operating the memory module | |
CN1936866A (en) | Flash memory body storing mechanism with data restoring function | |
CN109284252B (en) | Lightweight file system management method in communication equipment | |
CN106528441B (en) | Data processing method and device for simulating EEPROM (electrically erasable programmable read-Only memory) and electronic equipment | |
CN103309619A (en) | NAND Flash memory data storage method | |
CN101002274A (en) | Method and device to improve USB flash write performance | |
US8966159B2 (en) | Flash storage device and data writing method thereof | |
CN102541753A (en) | Reading and writing optimization method of embedded memory | |
JP2008084184A (en) | Memory controller | |
CN101719101B (en) | Method and device for reading data of memory | |
US20080147966A1 (en) | Flash memory device, update method and program search method thereof | |
US8544424B2 (en) | System, controller and method thereof for transmitting and distributing data stream |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090204 Termination date: 20111230 |