CN109634534A - The capacity method for rapidly judging of storage chip - Google Patents
The capacity method for rapidly judging of storage chip Download PDFInfo
- Publication number
- CN109634534A CN109634534A CN201910002221.5A CN201910002221A CN109634534A CN 109634534 A CN109634534 A CN 109634534A CN 201910002221 A CN201910002221 A CN 201910002221A CN 109634534 A CN109634534 A CN 109634534A
- Authority
- CN
- China
- Prior art keywords
- storage chip
- capacity
- address
- byte
- storage
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
- G06F3/0623—Securing storage systems in relation to content
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Abstract
The invention discloses a kind of capacity method for rapidly judging of storage chip, the target capacity including storage chip required for determining;The special markup character of 1 byte is written to the byte of the memory capacity half position of storage chip when electronic equipment is powered on and initialized for the first time;The content of 0 address byte of storage chip is read to judge the capacity of storage chip.The capacity method for rapidly judging of this storage chip provided by the invention, by only needing to be implemented a read-write operation it is determined that whether the storage chip capacity of electronic equipment is correct out;Therefore, the method for the present invention can be extremely quick, accurate and be easily qualitatively judged to the capacity of the storage chip of electronic equipment, and method high reliablity, low in cost and convenient and efficient.
Description
Technical field
Present invention relates particularly to a kind of capacity method for rapidly judging of storage chip.
Background technique
Storage chip is widely used in all types of electronic equipments, carries the important of the operational data of storage electronic equipment
Effect.And with the rapid development of big data era and intelligent algorithm, data have become following most crucial resource.Cause
This, storage chip for storing data just becomes particularly important component.
Different manufacturers, different model, different capabilities storage chip, appearance is approximate, it is difficult to differentiation, substantially all
It is that PIN TO PIN is compatible with, that is, encapsulates compatibility;Simultaneously for the storage equipment of the same type, each producer's production
Storage chip be all to be executed according to international industry standard, that is, different manufacturers same type can be with the chip of amount of capacity
Any replacement, the producer of many electronic equipments is based on buying securely and reliably or the consideration of cost angle can introduce multiple storage cores simultaneously
Piece producer, these can all lead to occur the case where mixing in production process, that is, electronic equipment has used the storage core of mistake
Piece, so-called mistake are primarily referred to as having used the storage chip of the memory capacity for not meeting design requirement of mistake.For example, producing
In the process, in the storage chip for needing using low capacity storage chip to have used large capacity can the place met the requirements, this
The cost that kind situation will lead to electronic equipment sharply increases.And if needing to use using the occasion of massive store chip
The storage chip of low capacity then may cause equipment and occur various problem in user's operational process;It ought especially deposit
When storage chip is used to store the data of user during equipment is run, this problem will could generally be sent out after user delivers operation
Existing, until discovery, user data is had been tampered with, this is undoubtedly catastrophic for user data this kind core resource
's.
Currently, commonly determining that the method for storage chip capacity is by reading device id, i.e. Device Id is sentenced
It is disconnected.For the storage chip of different manufacturers different capabilities, Device Id is different, even same producer's different capabilities
Storage chip, Device Id are also different.Electronic equipment reads the Device Id of storage chip on startup, judges Device
Id whether be product setting Device Id, if it is determines successfully, if not then determining mistake occur, to report and store
Chip error.
The defect of such determination method is: when storage chip upgrades, product one uses new storage chip
Software will be modified to support the Device Id of new storage chip, otherwise original software can not identify new storage chip (because
For past program can not the Device ID to the storage chip being likely to occur later predicted and assumed), although new
Storage chip is completely consistent with old storage chip in memory capacity and Technique performance parameter (namely if do not considered
Device Id, then new storage chip and original storage chip, drive software is identical, and software does not need any repair
New storage chip can be supported by changing, and if software depends on Device ID, newly support a new Device ID just
Modify a software code);In today that electronic information technology development is with rapid changepl. never-ending changes and improvements, electronic equipment replaces its alloytype when producing
Number identical function electronic component as thing frequent occurrence, same electronic equipment producer also because different reason and
Ceaselessly introducing new storage chip, it is impossible to which one completely compatible electronic component of every replacement just carries out a software
Upgrading;Moreover, software upgrading involves multiple enterprises such as software development and design, coding, debugging, test and software publication update
Industry link, cost of human resources cost are high.
Talk about above be such method cost of human resources cost it is high, and this kind of method can also generate it is another at
This, is exactly that physical resource utilizes cost.For storage chip, drive software only needs to realize that storage chip is read interface, deposited
Storage chip writes interface, and the method by reading device id will realize an interface more, exactly read storage chip
The interface of Device ID realizes that this interface would take up certain MCU program space resource.
Summary of the invention
The purpose of the present invention is to provide a kind of high reliablity, capacity low in cost and conveniently storage chip are quick
Determination method.
The capacity method for rapidly judging of this storage chip provided by the invention, includes the following steps:
S1. the target capacity of storage chip required for determining is X byte;
S2. the special of 1 byte is written to the X/2byte byte of storage chip when electronic equipment is powered on and initialized for the first time
Markup character;
S3. the content of 0 address byte of storage chip is read;
S4. the content read according to step S3, judges the capacity of storage chip:
If the content read is the special markup character of step S2 write-in, the capacity mistake of storage chip is assert;Otherwise
Then assert that the capacity of storage chip is correct.
Special markup character described in step S2 is 0xAB.
The storage chip is EEPROM or FLASH storage chip.
The capacity method for rapidly judging of this storage chip provided by the invention, by only needing to be implemented a read-write operation just
Can be determined that out whether the storage chip capacity of electronic equipment is correct;Therefore, the method for the present invention can be extremely quick, accurate and square
Just the capacity of the storage chip to electronic equipment qualitatively judges, and method high reliablity, low in cost and convenient fast
It is prompt.
Detailed description of the invention
Fig. 1 is the method flow diagram of the method for the present invention.
Specific embodiment
As shown in Figure 1 be the method flow diagram of the method for the present invention: this storage chip provided by the invention (is suitable for
EEPROM or FLASH storage chip) capacity method for rapidly judging, include the following steps:
S1. the target capacity of storage chip required for determining is X byte;
S2. the special of 1 byte is written to the X/2byte byte of storage chip when electronic equipment is powered on and initialized for the first time
Markup character, such as 0xAB;
S3. the content of 0 address byte of storage chip is read;
S4. the content read according to step S3, judges the capacity of storage chip:
If the content read is the special markup character of step S2 write-in, the capacity mistake of storage chip is assert;Otherwise
Then assert that the capacity of storage chip is correct.
Hereinafter, being illustrated to the principle of the present invention:
Storage chip capacity characteristic are as follows: the capacity of storage chip always 2 Nth power byte, there is no capacity be odd number word
The storage chip of section.I.e. storage chip capacity be generally 1MB, 2MB, 4MB, 8MB, 16MB, and so on;Without store 3MB,
Storage chip capacity as 5MB, 6MB;N is address bit required for addressing all bytes of storage chip, for various appearances
Chip is measured, N value, i.e. required address bit are respectively as follows:
1 storage chip capacity of table schematic table corresponding with N value
Memory capacity | N value (required address bit) |
1MB | 20 |
2MB | 21 |
4MB | 22 |
8MB | 23 |
16MB | 24 |
Storage chip addressing characteristic is that storage chip addressable address range (holds 8MB for 0 to -1 byte of memory capacity
The storage chip of amount, addressable address range are 0-0x7FFFFF), storage chip can be ignored when storing access beyond address
The high address bit in space only considers that the address value of address bit needed for addressing carries out the read-write of storage chip as actual address
Access operation, that is, when carrying out storage read and write access storage chip can by user's request address with upper 2 Nth power subtract 1 into
The primary position of row and operation obtain actual access address, and formula is defined as follows:
Actual access address=user's request address & (2 Nth powers -1)
The present invention proposes a kind of storage chip capacity determination method of very simple general-purpose, that is, is setting according to above-mentioned characteristic
1 byte special identifier byte is written in the address location of standby target memory chip capacity half, then reads 0 address of storage chip,
If 0 address has been written to that special identifier byte, show that the storage chip capacity of equipment does not reach target storage core
Piece capacity, actual storage chip capacity are the half or smaller of device target storage chip capacity;If 0 address is not written to
That special identifier byte then shows that the storage chip capacity of electronic equipment is correct.
By taking 8MB Flash chip as an example, the address space of 8MB Flash is 0x00000000-0x7FFFFF, whole to address
A 8M Flash address space, required address bit are 23, i.e., only need address bit of 23bit, carry out when to 8M Flash
When read and write access, storage chip ignores high address only using the minimum 23bit of read/write address as effective address, that is,
Storage chip can carry out user's access address and 0x7FFFFF to obtain actual actual access address once with operation;When with
When family attempts to access that this address 8M, the corresponding address in this address 8M be 0x800000, when 0x800000 and 0x7FFFFF into
Row is once 0x00000 with the address after operation, and actual access is zero-address;
Similarly, when being pasted by mistake into 4M Flash in 8M flash production process, the address space of 4M Flash is
0x00000000-0x3FFFFF, to address entire 4M Flash address space, required address bit is 22, i.e., only needs 22bit
Address bit, i.e., its N value be 22.When to 4M, this address byte is (practical to visit when its address accesses for 0x400000)
Ask that address is 0 address, calculating process is as follows:
Actual access address=user's request address & (222-1)
=0x400000& (222-1)
=0x400000&0x3fffff
=0x0
Therefore, when a byte special identifier is written toward 8M Flash half address space 0x400000 in the method for the present invention, by
In 8M Flash by wrong patch at 4M flash, this practical special identifier is written into 0 address;So this patent method passes through reading
0 address byte of storage chip is taken it is determined that whether storage chip capacity is correct.
Claims (3)
1. a kind of capacity method for rapidly judging of storage chip, includes the following steps:
S1. the target capacity of storage chip required for determining is X byte;
S2. the special mark of 1 byte is written to the X/2byte byte of storage chip when electronic equipment is powered on and initialized for the first time
Character;
S3. the content of 0 address byte of storage chip is read;
S4. the content read according to step S3, judges the capacity of storage chip:
If the content read is the special markup character of step S2 write-in, the capacity mistake of storage chip is assert;Otherwise then recognize
The capacity for determining storage chip is correct.
2. the capacity method for rapidly judging of storage chip according to claim 1, it is characterised in that spy described in step S2
Different markup character is 0xAB.
3. the capacity method for rapidly judging of storage chip according to claim 1 or 2, it is characterised in that the storage core
Piece is EEPROM or FLASH storage chip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910002221.5A CN109634534B (en) | 2019-01-02 | 2019-01-02 | Method for quickly judging capacity of memory chip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910002221.5A CN109634534B (en) | 2019-01-02 | 2019-01-02 | Method for quickly judging capacity of memory chip |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109634534A true CN109634534A (en) | 2019-04-16 |
CN109634534B CN109634534B (en) | 2022-04-01 |
Family
ID=66056595
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910002221.5A Active CN109634534B (en) | 2019-01-02 | 2019-01-02 | Method for quickly judging capacity of memory chip |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109634534B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111061651A (en) * | 2019-12-06 | 2020-04-24 | 广州瑞普医疗科技有限公司 | Method and device for identifying serial EEPROM (electrically erasable programmable read-Only memory) model and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100217920A1 (en) * | 2009-02-26 | 2010-08-26 | Samsung Electronics Co., Ltd. | Memory system and address allocating method of flash translation layer thereof |
CN101950368A (en) * | 2010-09-20 | 2011-01-19 | 珠海天威技术开发有限公司 | Recognition method of storage capacity of 24C series chip |
CN102306503A (en) * | 2010-07-30 | 2012-01-04 | 深圳市江波龙电子有限公司 | Method and system for detecting false capacity memory |
US20120176849A1 (en) * | 2011-01-07 | 2012-07-12 | Hynix Semiconductor Inc. | Semiconductor apparatus and memory system including the same |
CN103116536A (en) * | 2013-02-25 | 2013-05-22 | 杭州华澜微科技有限公司 | Method for detecting capacity of storage device |
CN103777907A (en) * | 2014-02-25 | 2014-05-07 | 四川长虹空调有限公司 | Method for automatically obtaining EEPROM (Electrically Erasable Programmable Read-Only Memory) storage capacity |
US20140281148A1 (en) * | 2013-03-15 | 2014-09-18 | Kabushiki Kaisha Toshiba | Memory system |
US20150131397A1 (en) * | 2013-11-08 | 2015-05-14 | Kabushiki Kaisha Toshiba | Memory system and assembling method of memory system |
CN105280240A (en) * | 2015-11-18 | 2016-01-27 | 致象尔微电子科技(上海)有限公司 | Nand Flash parameter reading method |
CN105843749A (en) * | 2016-03-24 | 2016-08-10 | 浙江大学 | NAND Flash fault-tolerance method based on FPGA (Field Programmable Gate Array) |
CN106024067A (en) * | 2016-05-27 | 2016-10-12 | 上海贝岭股份有限公司 | EEPROM testing method |
CN107870736A (en) * | 2016-09-28 | 2018-04-03 | 龙芯中科技术有限公司 | Support the method and device more than 4GB nandflash |
-
2019
- 2019-01-02 CN CN201910002221.5A patent/CN109634534B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100217920A1 (en) * | 2009-02-26 | 2010-08-26 | Samsung Electronics Co., Ltd. | Memory system and address allocating method of flash translation layer thereof |
CN102306503A (en) * | 2010-07-30 | 2012-01-04 | 深圳市江波龙电子有限公司 | Method and system for detecting false capacity memory |
CN101950368A (en) * | 2010-09-20 | 2011-01-19 | 珠海天威技术开发有限公司 | Recognition method of storage capacity of 24C series chip |
US20120176849A1 (en) * | 2011-01-07 | 2012-07-12 | Hynix Semiconductor Inc. | Semiconductor apparatus and memory system including the same |
CN103116536A (en) * | 2013-02-25 | 2013-05-22 | 杭州华澜微科技有限公司 | Method for detecting capacity of storage device |
US20140281148A1 (en) * | 2013-03-15 | 2014-09-18 | Kabushiki Kaisha Toshiba | Memory system |
US20150131397A1 (en) * | 2013-11-08 | 2015-05-14 | Kabushiki Kaisha Toshiba | Memory system and assembling method of memory system |
CN103777907A (en) * | 2014-02-25 | 2014-05-07 | 四川长虹空调有限公司 | Method for automatically obtaining EEPROM (Electrically Erasable Programmable Read-Only Memory) storage capacity |
CN105280240A (en) * | 2015-11-18 | 2016-01-27 | 致象尔微电子科技(上海)有限公司 | Nand Flash parameter reading method |
CN105843749A (en) * | 2016-03-24 | 2016-08-10 | 浙江大学 | NAND Flash fault-tolerance method based on FPGA (Field Programmable Gate Array) |
CN106024067A (en) * | 2016-05-27 | 2016-10-12 | 上海贝岭股份有限公司 | EEPROM testing method |
CN107870736A (en) * | 2016-09-28 | 2018-04-03 | 龙芯中科技术有限公司 | Support the method and device more than 4GB nandflash |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111061651A (en) * | 2019-12-06 | 2020-04-24 | 广州瑞普医疗科技有限公司 | Method and device for identifying serial EEPROM (electrically erasable programmable read-Only memory) model and storage medium |
CN111061651B (en) * | 2019-12-06 | 2022-04-22 | 广州瑞普医疗科技有限公司 | Method and device for identifying serial EEPROM (electrically erasable programmable read-Only memory) model and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109634534B (en) | 2022-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106158047A (en) | A kind of NAND FLASH method of testing | |
CN106445398A (en) | Novel memory-based embedded file system and realization method thereof | |
CN102306127A (en) | Novel method for identifying and initializing DDRIII (double-data-rate III) memory | |
CN110502881B (en) | Method, system and storage medium for dynamically modifying read-only attribute of android system | |
CN109445691B (en) | Method and device for improving FTL algorithm development and verification efficiency | |
US20120166706A1 (en) | Data management method, memory controller and embedded memory storage apparatus using the same | |
CN110765032A (en) | Method for reading and writing I2C memory based on system management bus interface | |
CN109634534A (en) | The capacity method for rapidly judging of storage chip | |
US20110004719A1 (en) | Memory Element | |
CN112558868A (en) | Method, device and equipment for storing configuration data | |
CN112542209A (en) | Nonvolatile chip error injection verification method and device, storage medium and terminal | |
CN106920576A (en) | A kind of method and system of inspection Nand Flash mass | |
CN113094252A (en) | Test case generation method and device, computer equipment and storage medium | |
CN113345510B (en) | FLASH capacity identification method and capacity identification system | |
US10922023B2 (en) | Method for accessing code SRAM and electronic device | |
CN103150408B (en) | Real-time data base finds data base the System and method for accessed according to calling the roll | |
CN112331252A (en) | Method and device for automatically marking bad blocks of Nand flash memory, storage medium and terminal | |
CN112802530A (en) | NAND testing method and device, readable storage medium and electronic equipment | |
CN117312176B (en) | Chip verification test method and system based on UVM and electronic equipment | |
CN109814888A (en) | NandFlash controller EFUSE replaces method and device | |
CN112464499B (en) | Nonvolatile chip erasing data checking method and device, storage medium and terminal | |
CN101650688A (en) | Method for accessing VM_IO address space and user mode debugger | |
CN117420965B (en) | Memory and control method thereof | |
CN102609242B (en) | Electronic installation and internal memory control method thereof and related computer readable get Storage Media | |
CN112447256B (en) | True modeling error injection verification method and device of memory, storage medium and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |