WO2012013049A1 - Method and system for detecting mendacious capacity memory - Google Patents

Method and system for detecting mendacious capacity memory Download PDF

Info

Publication number
WO2012013049A1
WO2012013049A1 PCT/CN2011/072831 CN2011072831W WO2012013049A1 WO 2012013049 A1 WO2012013049 A1 WO 2012013049A1 CN 2011072831 W CN2011072831 W CN 2011072831W WO 2012013049 A1 WO2012013049 A1 WO 2012013049A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
data
sector
address
read
Prior art date
Application number
PCT/CN2011/072831
Other languages
French (fr)
Chinese (zh)
Inventor
覃敏
邓恩华
Original Assignee
深圳市江波龙电子有限公司
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 深圳市江波龙电子有限公司 filed Critical 深圳市江波龙电子有限公司
Publication of WO2012013049A1 publication Critical patent/WO2012013049A1/en

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/50Marginal testing, e.g. race, voltage or current testing
    • G11C2029/5002Characteristic

Abstract

A method and a system for detecting a mendacious capacity memory are provided. The method includes that: the pre-set test data is written into a high address data area of the memory; the data that corresponds to the high address data area of the memory is read, and when the read data that corresponds to the high address data area of the memory is different from the written test data, the memory is determined to be the mendacious capacity memory of mendacious written type, and the detection flow is ended; when the read data that corresponds to the high address data area of the memory is identical with the written test data, the pre-set test data is written into some sectors of the end area and middle area of the memory; for the read sector data a test mark is compared, starting from a 0 address sector of the memory, and the memory is judged whether it is the mendacious capacity memory of circular written type.

Description

一种假容量存储器的检测方法及系统 Method and system for detecting fake capacity memory
技术领域Technical field
本发明属于检测技术领域,尤其涉及一种假容量存储器的检测方法及系统。  The invention belongs to the technical field of detection, and in particular relates to a method and a system for detecting a dummy capacity memory.
背景技术 Background technique
随着 Nand Flash 在存储器领域的广泛应用,越来越多的电子类产品与存储器都在使用 Nand Flash 作为存储介质,例如 U 盘、存储卡、 SSD 等,它具有抗振动、低功耗、长效存储等优点。 With the widespread use of Nand Flash in the memory field, more and more electronic products and memories are using Nand. Flash is a storage medium, such as a USB flash drive, memory card, SSD, etc. It has the advantages of anti-vibration, low power consumption, long-term storage and so on.
Nand Flash 闪存是非易失存储器,可以对称为块的存储器单元块进行擦写和再编程。任何 Flash 器件的写入操作只能在空或已擦除的单元内进行,所以大多数情况下,在进行写入操作之前必须先执行擦除。在固件程序中,为了提供连续的逻辑操作空间,需要对 Flash 的块进行有效的管理,包括对坏块的标识,对区的管理,对块的使用频率进行平衡等。这些算法需要占用 Nand Flash 的块,同时固件程序也保存在 Nand Flash 当中,也会占用 Nand Flash 的块。所以,一片容量为 M 的 Nand Flash ,私有数据占用了 N 大小的空间,那么经过固件程序管理后,提供给客户使用的有效空间只有 M-N 剩下的容量。 Nand Flash Flash is a non-volatile memory that can be erased and reprogrammed for blocks of memory cells called blocks. Any Flash The device's write operations can only be performed in empty or erased cells, so in most cases, the erase must be performed before the write operation. In the firmware program, in order to provide a continuous logical operation space, you need to use Flash. The blocks are effectively managed, including the identification of bad blocks, the management of the zones, and the balancing of the frequency of use of the blocks. These algorithms require blocks that occupy Nand Flash, and the firmware is also saved in Nand In Flash, it also occupies blocks of Nand Flash. So, a piece of Nand Flash with a capacity of M, private data takes up N The size of the space, then after the firmware management, the effective space provided to the customer is only the remaining capacity of the M-N.
由于 Nand Flash 管理技术的普及,以及更多存储主控的出现,存储器领域的竞争日益激烈,在利益的驱使下,一些不法分子利用固件上的漏洞,或者不法主控商提供的虚假容量设置功能,使用 M 容量的 Nand Flash ,量产后,虚报容量为 X ( X>M )大小,然后以 X 容量的存储器进行销售,获取暴利。实际上, M 容量的 Nand Flash 生产出来的存储器,是不可能提供超过 M 容量的可用空间的,那个虚报容量为 X 的存储器,实际上只能保存 M 大小的数据,那些 X 减去 M 得到的空间,是无法保存数据的,并且假容量的存储器是不会汇报说无法保存的,用户存入到设备里的数据会出现丢失的情况,给用户造成无法挽回的损失,有时候甚至是无法用金钱来衡量的。 Thanks to Nand Flash With the popularity of management technology and the emergence of more storage masters, the competition in the memory field is becoming increasingly fierce. Under the influence of interests, some criminals exploit the vulnerabilities in the firmware or the false capacity setting function provided by the unscrupulous master, using M. The capacity of Nand Flash, after mass production, the false report capacity is X (X>M) size, and then sold in X-capacity memory to obtain huge profits. In fact, M capacity of Nand The memory produced by Flash is impossible to provide free space beyond M capacity. The memory with the false report capacity is X. In fact, only M size data can be saved. Those X minus M The space obtained cannot save the data, and the fake capacity memory will not report that it cannot be saved. The data stored by the user into the device will be lost, causing irreparable damage to the user, sometimes even Can't be measured by money.
由于假容量技术的不断改进和提高,已经从早期的逻辑分区虚拟假容量发展到了固件设置虚拟假容量,并且从以前的超出容量不保存发展到循环保存,也就是说X的假容量存储器,真实容量是M,那么循环使用M这部分空间,最后写入的M容量内容将被保存,最早写入的数据被覆盖掉,种种隐蔽的作假技术,使得假容量设备被检测出来需要更加费时费力,只有写入X容量的数据后再全盘读出进行匹配,才能发现存储器是否假容量,对于一个16GB的存储器,如果写入速度为5MB/s,读取速度为10MB/s,全盘写入和读取进行比较,需要耗时1小时20分钟,这是非常漫长的。 Due to the continuous improvement and improvement of the fake capacity technology, it has evolved from the early virtual partition virtual dummy capacity to the firmware setting virtual fake capacity, and has evolved from the previous excess capacity without saving to the cyclic storage, that is to say X's fake capacity storage, true The capacity is M, then the M space is recycled, the last written M capacity content will be saved, the earliest written data is overwritten, and various hidden falsification techniques make the fake capacity device detected more time-consuming and laborious. Only after writing the data of the X capacity and then reading the whole disk for matching, can the memory be found to have a false capacity. For a 16 GB memory, if the writing speed is 5 MB/s, the reading speed is 10 MB/s, the whole disk is written and read. It takes a long time to take a comparison and it takes 1 hour and 20 minutes.
发明内容 Summary of the invention
本发明实施例的目的在于提供一种假容量存储器的检测方法,旨在解决现有技术中随着 假容量技术的不断改进和提高, 对假容量存储器的检测方式不完善,检测速度慢的问题。 An object of the present invention is to provide a method for detecting a dummy capacity memory, which aims to solve the continuous improvement and improvement of the pseudo capacity technology in the prior art. The detection method of the fake capacity memory is not perfect, and the detection speed is slow.
本发明实施例是这样实现的,一种 假容量存储器的检测方法,所述方法包括下述步骤: The embodiment of the present invention is implemented by the method for detecting a dummy capacity memory, and the method includes the following steps:
在存储器的高地址数据区写入预先设置的测试数据; Writing pre-set test data in a high address data area of the memory;
读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程; Reading out data corresponding to the memory high address data area, when the data corresponding to the read memory high address data area is different from the written test data, determining that the memory is a dummy type dummy Capacity storage, ending the inspection process;
当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据; When the data corresponding to the read memory high address data area is the same as the written test data, the preset test data is written in a plurality of sectors in the tail area and the middle area of the memory;
从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。 0 from memory The address sector begins, and the read sector data is compared with the test flag to determine whether the memory is cyclically written to the dummy capacity memory.
本发明实施例的另一目的在于提供 一种假容量存储器的检测系统,所述系统包括: Another object of the embodiments of the present invention is to provide a detection system for a dummy capacity memory, the system comprising:
第一测试数据写入模块,用于在存储器的高地址数据区写入预先设置的测试数据; a first test data writing module, configured to write pre-set test data in a high address data area of the memory;
假写类型存储器判定模块,用于读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程; a dummy write type memory determining module, configured to read data corresponding to the memory high address data area, when the data corresponding to the read memory high address data area is different from the written test data, determine The memory is a dummy capacity type of a dummy write type, ending the detection process;
第二测试数据写入模块,用于当所述假写类型存储器判定模块读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据;以及 a second test data writing module, configured to: when the data corresponding to the memory high address data area read by the dummy type memory determining module is the same as the written test data, in the tail area and the middle area of the memory Writing a predetermined number of test data to a plurality of sectors;
循环写类型存储器判断模块,用于从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。 Cyclic write type memory judgment module for 0 from memory The address sector begins, and the read sector data is compared with the test flag to determine whether the memory is cyclically written to the dummy capacity memory.
在本发明实施例中,在存储器的高地址数据区写入预先设置的测试数据;读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的存储器;当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据;从存储器的0地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器,检测速度快,方便。 In the embodiment of the present invention, the test data set in advance is written in the high address data area of the memory; the data corresponding to the high address data area of the memory is read out, and the data corresponding to the high address data area of the read memory is When the written test data is different, it is determined that the memory is a dummy write type memory; when the data corresponding to the read memory high address data area is the same as the written test data, in the memory The sector of the tail region and the middle region writes the preset test data; starting from the 0 address sector of the memory, performing comparison of the test identifiers on the read sector data, and determining whether the memory is cyclically written Type of fake capacity memory, fast and convenient to detect.
附图说明 DRAWINGS
图 1 是本发明实施例提供的假容量存储器的检测方法的实现流程图; 1 is a flowchart of an implementation of a method for detecting a dummy capacity memory according to an embodiment of the present invention;
图 2 是本发明实施例提供的预先设置生成测试数据的实现流程图; 2 is a flowchart of implementing preset generation test data according to an embodiment of the present invention;
图 3 是本发明实施例提供的测试数据区的结构示意图; 3 is a schematic structural diagram of a test data area provided by an embodiment of the present invention;
图 4 是本发明实施例提供的从存储器的0地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器的实现流程图; Figure 4 It is a flowchart of implementing the comparison of the test identifiers of the read sector data from the 0 address sector of the memory provided by the embodiment of the present invention, and determining whether the memory is cyclically written to the dummy capacity memory;
图 5 是本发明实施例提供的假容量存储器的检测系统的结构框图; FIG. 5 is a structural block diagram of a detection system of a dummy capacity memory according to an embodiment of the present invention; FIG.
图 6 是本发明实施例提供的测试数据生成模块的结构框图; 6 is a structural block diagram of a test data generating module according to an embodiment of the present invention;
图 7 是本发明实施例提供的循环写类型假容量存储器判断模块的结构框图。 FIG. 7 is a structural block diagram of a loop write type dummy capacity memory judging module according to an embodiment of the present invention.
具体实施方式 detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。 The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
在本发明实施例中,在测试数据中加入了测试标识,将测试数据写入存储器,然后读取进行比较,判断存储器是否为假容量存储器。 In the embodiment of the present invention, a test identifier is added to the test data, the test data is written into the memory, and then read for comparison to determine whether the memory is a dummy capacity memory.
本发明实施例的目的在于提供一种 假容量存储器的检测方法,所述方法包括下述步骤: An object of the embodiments of the present invention is to provide a method for detecting a dummy capacity memory, the method comprising the following steps:
在存储器的高地址数据区写入预先设置的测试数据; Writing pre-set test data in a high address data area of the memory;
读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程; Reading out data corresponding to the memory high address data area, when the data corresponding to the read memory high address data area is different from the written test data, determining that the memory is a dummy type dummy Capacity storage, ending the inspection process;
当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据; When the data corresponding to the read memory high address data area is the same as the written test data, the preset test data is written in a plurality of sectors in the tail area and the middle area of the memory;
从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。 0 from memory The address sector begins, and the read sector data is compared with the test flag to determine whether the memory is cyclically written to the dummy capacity memory.
本发明实施例的另一目的在于提供 一种假容量存储器的检测系统,所述系统包括: Another object of the embodiments of the present invention is to provide a detection system for a dummy capacity memory, the system comprising:
第一测试数据写入模块,用于在存储器的高地址数据区写入预先设置的测试数据; a first test data writing module, configured to write pre-set test data in a high address data area of the memory;
假写类型存储器判定模块,用于读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程; a dummy write type memory determining module, configured to read data corresponding to the memory high address data area, when the data corresponding to the read memory high address data area is different from the written test data, determine The memory is a dummy capacity type of a dummy write type, ending the detection process;
第二测试数据写入模块,用于当所述假写类型存储器判定模块读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据;以及 a second test data writing module, configured to: when the data corresponding to the memory high address data area read by the dummy type memory determining module is the same as the written test data, in the tail area and the middle area of the memory Writing a predetermined number of test data to a plurality of sectors;
循环写类型存储器判断模块,用于从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。 Cyclic write type memory judgment module for 0 from memory The address sector begins, and the read sector data is compared with the test flag to determine whether the memory is cyclically written to the dummy capacity memory.
在本发明实施例中,在存储器的高地址数据区写入预先设置的测试数据;读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器;当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据;从存储器的0地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。 In the embodiment of the present invention, the test data set in advance is written in the high address data area of the memory; the data corresponding to the high address data area of the memory is read out, and the data corresponding to the high address data area of the read memory is When the written test data is different, it is determined that the memory is a dummy type memory of a dummy write type; when the data corresponding to the read high memory address data area is the same as the written test data, Writing the pre-set test data in a plurality of sectors in the tail region and the middle region of the memory; starting from the 0-address sector of the memory, performing comparison of the test flags on the read sector data, and determining whether the memory is A pseudo-type memory of the cyclic write type.
实施例一: Embodiment 1:
图 1 示出了本发明实施例提供的假容量存储器的检测方法的实现流程,其具体的步骤如下所述: FIG. 1 is a flowchart showing an implementation process of a method for detecting a dummy capacity memory according to an embodiment of the present invention, and the specific steps are as follows:
在步骤 S101 中,在存储器的高地址数据区写入预先设置的测试数据。 In step S101, pre-set test data is written in the high address data area of the memory.
在本发明实施例中,在执行该步骤之前需要预先设置生成测试数据,下述给出其具体的实施步骤,在此不再赘述,但不用以限制本发明。 In the embodiment of the present invention, the test data needs to be set in advance before the step is performed. The specific implementation steps are given below, and are not described herein again, but are not intended to limit the present invention.
其中,该存储器可以为 Nand Flash 闪存,下述以 Nand Flash 闪存为实施例进行说明。 Wherein, the memory can be a Nand Flash flash memory, and the following is Nand Flash The flash memory is described as an embodiment.
在步骤 S102 中,读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程。 At step S102 Reading the data corresponding to the high address data area of the memory. When the data corresponding to the read high address data area of the memory is different from the written test data, determining that the memory is of a dummy type The fake capacity memory ends the inspection process.
在本发明实施例中,当读取到存储器高地址数据区对应的数据与写入的测试数据不同时,表示该存储器为假写类型的假容量存储器。 In the embodiment of the present invention, when the data corresponding to the read high address data area of the memory is different from the written test data, it indicates that the memory is a dummy type memory of a dummy type.
在步骤 S103 中,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据。 In step S103 And, when the data corresponding to the read memory high address data area is the same as the written test data, the preset test data is written in a plurality of sectors in the tail area and the middle area of the memory.
在本发明实施例中,存储器中部区域所选择的扇区可以是随机选取的扇区,在此不用以限制本发明。 In the embodiment of the present invention, the sector selected in the middle area of the memory may be a randomly selected sector, and the present invention is not limited thereto.
在步骤 S104 中,从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。 In step S104, 0 from the memory The address sector begins, and the read sector data is compared with the test flag to determine whether the memory is cyclically written to the dummy capacity memory.
在本发明实施例中,从0扇区开始的扇区地址读取扇区数据,将读取的扇区数据所包含的指定位置的标识与写入的测试数据的测试标识进行比对,当两者不同时,继续读取下一个地址的扇区数据,并继续判断;当两者相同时,则判定该存储器为循环写类型的假容量存储器。 In the embodiment of the present invention, the sector data is read from the sector address starting from the 0 sector, and the identifier of the specified location included in the read sector data is compared with the test identifier of the written test data. When the two are different, the sector data of the next address is continuously read, and the judgment is continued; when the two are the same, it is determined that the memory is a pseudo-type memory of a cyclic write type.
实施例二: Embodiment 2:
图 2 示出了本发明实施例提供的预先设置生成测试数据的实现流程,其具体的步骤如下所述: FIG. 2 shows an implementation flow of pre-set generation test data provided by an embodiment of the present invention, and the specific steps are as follows:
在步骤 S201 中,随机生成一测试标识,所述测试数据包含用于检测存储器假容量的测试标识。 In step S201, a test identifier is randomly generated, and the test data includes a test identifier for detecting a false capacity of the memory.
在本发明实施例中,该测试标识保存在一个长度为 512 字节的缓冲区中,作为本发明的一个具体实施例,该测试标识可以采用 2 个 DWORD ( double word ),当采用 2 个 DWORD 时,其随机重复概率置有 2 的 64 次方分之一,即 1/18446744073709551616 。 In the embodiment of the present invention, the test identifier is saved in a length of 512. In a buffer of bytes, as a specific embodiment of the present invention, the test identifier can adopt 2 DWORDs (double word ) when using 2 DWORDs. The random repetition probability is set to one of 64's 64th power, which is 1/18446744073709551616.
在步骤 S202 中,将所述测试标识加入到扇区模板中。 In step S202, the test identifier is added to the sector template.
在步骤 S203 中,将扇区模板复制到 64K 区长的测试数据区,得到写入存储器尾部区域和中部区域的若干扇区的测试数据。 Copy the sector template to 64K in step S203 The test data area of the zone length obtains test data written to several sectors of the memory tail area and the middle area.
在本发明实施例中,以512字节作为缓冲区的一个单元,写满64KB的测试数据区,如图3所示,其中,64KB为存储器磁盘读写的SCSI命令最大传输单位。 In the embodiment of the present invention, a test data area of 64 KB is written with 512 bytes as a unit of the buffer, as shown in FIG. 3, wherein 64 KB is the maximum transmission unit of the SCSI command for reading and writing the memory disk.
实施例三: Embodiment 3:
图 4 示出了本发明实施例提供的从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器的实现流程,其具体的步骤如下所述: FIG. 4 shows a slave memory 0 provided by an embodiment of the present invention. The address sector begins, the comparison of the test identifiers is performed on the read sector data, and the implementation flow of determining whether the memory is cyclically written to the dummy capacity memory is as follows:
在步骤 S401 中,读取存储器的 0 地址的扇区数据。 In step S401, the sector data of the 0 address of the memory is read.
在本发明实施例中,从逻辑地址 0 扇区开始读取扇区数据。 In the embodiment of the present invention, sector data is read starting from a logical address 0 sector.
在步骤 S402 中,判断扇区数据指定位置的数据是否包含所述测试数据中所包含的测试标识,是则执行步骤 S403 ,否则执行步骤 S404 。 In step S402, it is determined whether the data of the location specified by the sector data includes the test identifier included in the test data, and the step is performed. S403, otherwise step S404 is performed.
在本发明实施例中,在读取的扇区数据的指定位置的标识位(扇区数据中必须携带有的数据),判断该标识位是否与测试数据中所包含的测试标识相同,若相同则表示该存储器是循环型的假容量存储器,其中,写入到指定扇区的测试数据被映射到其他扇区中。 In the embodiment of the present invention, the identifier bit (the data that must be carried in the sector data) of the specified position of the read sector data is determined whether the identifier bit is the same as the test identifier included in the test data, if the same It means that the memory is a cyclic type of dummy capacity memory in which test data written to a specified sector is mapped to other sectors.
在步骤 S403 中,当所述 0 地址扇区指定位置的数据包含所述测试数据中所包含的测试标识时,则判定所述存储器为循环型的假容量存储器,结束检测流程。 In step S403, when the 0 When the data of the address sector designation location includes the test identifier included in the test data, it is determined that the memory is a loop type dummy capacity memory, and the detection flow is ended.
在步骤 S404 中,当所述 0 地址扇区指定位置的数据不包含所述测试数据中所包含的测试标识时,以固定步长递增的方式,计算要读取的扇区地址。 In step S404, when the 0 When the data of the specified location of the address sector does not include the test identifier included in the test data, the sector address to be read is calculated in a fixed step increment manner.
在本发明实施例中,当检测到 0 地址扇区的指定位置不包含测试标识时,继续读取下一个扇区数据,其中,该读取的下一个扇区数据的扇区的选取可以采用跳跃方式,即采用固定步长递增的方式,在此固定步长可以选取 2MB ,当前步长是 2MB ,则下一个扇区数据的读取地址可以在现有基础上增加( 2+2 ) MB ,在此仅为本发明的一个实施例。 In the embodiment of the present invention, when 0 is detected When the specified location of the address sector does not include the test identifier, the next sector data is continuously read, wherein the sector of the next sector data to be read may be selected in a skip mode, that is, in a fixed step increment manner. , here you can choose a fixed step size 2MB, the current step size is 2MB, and the read address of the next sector data can be increased by (2+2) MB on the existing basis, which is merely an embodiment of the present invention.
在步骤 S405 中,判断计算的要读取的扇区地址是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址内,是则执行步骤 S406 ,否则执行 S407 。 At step S405 In the process of determining whether the calculated sector address to be read is located in the address of the sector in the tail region and the middle region of the memory in which the test data is written, if yes, step S406 is performed; otherwise, S407 is performed.
在本发明实施例中,当计算得到要进行数据读取的扇区地址时,判断该扇区是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址内,即当读取的扇区是写入测试数据的扇区,则跳过该地址扇区数据的读取,读取下一个扇区数据。 In the embodiment of the present invention, when the sector address to be read by the data is calculated, it is determined whether the sector is located in the address of the sector in the tail region and the middle region of the memory in which the test data is written, that is, when reading The sector to be fetched is the sector in which the test data is written, and the reading of the sector data of the address is skipped, and the next sector data is read.
在步骤 S406 中,当计算的要读取的扇区地址位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址时,控制跳过对所述扇区数据的读取,计算下一要读取的扇区数据的地址,并继续执行判断计算的要读取的扇区地址是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址的步骤。 At step S406 When the calculated sector address to be read is located in the tail region of the memory in which the test data is written and the addresses of the sectors in the middle region, the control skips reading the sector data, and calculates the next The address of the read sector data is continued, and the step of judging whether the calculated sector address to be read is located in the tail region of the memory in which the test data is written and the addresses of the plurality of sectors in the middle region are performed.
在本发明实施例中,该计算下一要读取的扇区数据的地址的方式也是固定步长递增的方式,在此不再赘述。 In the embodiment of the present invention, the manner of calculating the address of the sector data to be read next is also a fixed step increment manner, and details are not described herein again.
在步骤 S407 中,判断计算的要读取的扇区地址是否大于存储器的容量,是则执行步骤 S409 ,否则执行步骤 S408 。 In step S407, it is determined whether the calculated sector address to be read is greater than the capacity of the memory, and if yes, step S409 is performed. Otherwise, go to step S408.
在步骤 S408 中,当计算的要读取的扇区地址小于等于存储器的容量时,读取该扇区地址所对应的扇区数据,并返回执行步骤 S402 ,即判断扇区数据指定位置的数据是否包含所述测试数据中所包含的测试标识。 At step S408 When the calculated sector address to be read is less than or equal to the capacity of the memory, the sector data corresponding to the sector address is read, and the process returns to step S402. That is, it is judged whether the data of the specified position of the sector data contains the test identifier included in the test data.
在本发明实施例中,当计算的要读取的扇区地址不位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址时,其判断的过程如上述步骤 S402 所述,在此不再赘述。 In the embodiment of the present invention, when the calculated sector address to be read is not located in the tail region of the memory in which the test data is written and the addresses of the plurality of sectors in the middle region, the process of determining is as described above in step S402. The details are not described herein.
在步骤 S409 中,当计算的要读取的扇区地址大于存储器的容量时,控制结束检测流程,并确定所述存储器为真实存储器。 At step S409 When the calculated sector address to be read is greater than the capacity of the memory, the control ends the detection flow and determines that the memory is a real memory.
在本发明实施例中,该实施例提供的判断所述存储器是否循环写类型的假容量存储器是一个循环的递进式的检测过程,即对整个存储器的扇区数据进行遍历,当遍历完整个扇区数据后,读取的扇区数据没有发现包含测试标识,则标识该检测的存储器为正常的存储器,当读取的扇区数据发现包含测试标识时,则表示该存储器为假容量存储器(循环写类型的假容量存储器)。 In the embodiment of the present invention, the pseudo-capacity memory provided by the embodiment for determining whether the memory is of a cyclic write type is a cyclic progressive detection process, that is, traversing the sector data of the entire memory, when traversing the complete After the sector data, the read sector data is not found to contain the test identifier, the memory identifying the detection is a normal memory, and when the read sector data is found to contain the test identifier, it indicates that the memory is a dummy capacity memory ( Loop-write type of dummy capacity storage).
实施例四: Embodiment 4:
在本发明实施例中,将测试数据写入到存储器的尾部区域以及随机选择的中部区域的若干扇区时,该测试数据将不应该出现在存储器的其他位置。 In the embodiment of the present invention, when test data is written to the tail region of the memory and a plurality of sectors of the randomly selected middle region, the test data should not appear at other locations in the memory.
但是由于假容量存储设备循环使用有限的 Nand Flash 存储空间,该测试数据会被映射到其他逻辑地址,一旦在写入区域外的地址读到了测试数据,则该存储器为假容量存储器。 However, due to the limited use of fake capacity storage devices, Nand Flash The storage space, the test data will be mapped to other logical addresses, and once the test data is read at an address outside the write area, the memory is a dummy capacity memory.
由于在写入测试数据时,长度为 10 倍的 Nand Flash 块大小,将采用连续写入的方式进行保存,因此,在读取时可以按照 Nand Flash 块大小进行递增读取,而不用担心错过被循环映射的测试数据。基于这个条件,理论上只需 1/10 的全盘读取时间可以完成检测,而每次读取只需要 1 个扇区,所以不需要访问过多的 Nand Flash 块,使得检测速度可以得到进一步的提高。 Nand Flash 10 times longer when writing test data The block size will be saved in a continuous write mode, so you can follow Nand Flash when reading The block size is read incrementally without worrying about missing test data that is cyclically mapped. Based on this condition, it is theoretically only 1/10 of the total read time to complete the test, and only 1 for each read. Sectors, so there is no need to access too many Nand Flash blocks, so the detection speed can be further improved.
在数据对比上,只需判断读取到的扇区数据中,指定的某个位置是否与随机生成的测试标识相同,无需比较扇区的全部数据,检测速度得到再次提高,并且有利于在资源缺乏的嵌入式设备上实现该算法。 In the data comparison, it is only necessary to judge whether the specified position in the read sector data is the same as the randomly generated test identifier, and it is not necessary to compare all the data of the sector, the detection speed is improved again, and it is beneficial in the resource. The algorithm is implemented on a lack of embedded devices.
实施例五: Embodiment 5:
图 5 示出了本发明实施例提供的假容量存储器的检测系统的结构框图,为了便于说明,图中仅给出了与本发明实施例相关的部分。 Figure 5 A block diagram of a structure of a detection system for a dummy capacity memory according to an embodiment of the present invention is shown. For the convenience of description, only parts related to the embodiment of the present invention are shown.
第一测试数据写入模块 11 在存储器的高地址数据区写入预先设置的测试数据;假写类型存储器判定模块 12 读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程;当所述假写类型存储器判定模块 12 读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,第二测试数据写入模块 13 在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据;循环写类型存储器判断模块 14 从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。 The first test data writing module 11 writes the preset test data in the high address data area of the memory; the dummy type memory determining module 12 Reading out data corresponding to the memory high address data area, when the data corresponding to the read memory high address data area is different from the written test data, determining that the memory is a dummy type dummy Capacity storage, ending the detection process; when the dummy type memory decision module 12 When the data corresponding to the read memory high address data area is the same as the written test data, the second test data is written to the module 13 The pre-set test data is written in a plurality of sectors of the tail region and the middle region of the memory; the cyclic write type memory judging module 14 is 0 from the memory The address sector begins, and the read sector data is compared with the test flag to determine whether the memory is cyclically written to the dummy capacity memory.
在本发明实施例中,测试数据生成模块 15 预先设置生成测试数据,所述测试数据包含用于检测存储器假容量的测试标识。 In the embodiment of the present invention, the test data generating module 15 The test data is generated in advance, and the test data includes a test identifier for detecting a false capacity of the memory.
在本发明实施例中,下述给出具体的实施例进行说明,在此不再赘述,但不用以限制本发明。 In the embodiments of the present invention, the specific embodiments are described below, and the detailed description is omitted here, but the present invention is not limited thereto.
实施例六: Example 6:
图 6 示出了本发明实施例提供的测试数据生成模块的结构框图,为了便于说明,图中仅给出了与本发明实施例相关的部分。 Figure 6 The structural block diagram of the test data generating module provided by the embodiment of the present invention is shown. For the convenience of description, only parts related to the embodiment of the present invention are given in the figure.
测试标识生成模块 151 随机生成一测试标识;测试标识加入模块 152 将所述测试标识加入到扇区模板中;测试数据获取模块 153 将扇区模板复制到 64K 区长的测试数据区,得到写入存储器尾部区域和中部区域的若干扇区的测试数据。 The test identifier generation module 151 randomly generates a test identifier; the test identifier joins the module 152 Adding the test identifier to the sector template; the test data acquisition module 153 copies the sector template to the 64K The test data area of the zone length obtains test data written to several sectors of the memory tail area and the middle area.
实施例七: Example 7:
图 7 示出了本发明实施例提供的循环写类型存储器判断模块的结构框图,为了便于说明,图中仅给出了与本发明实施例相关的部分。 Figure 7 The block diagram of the loop write type memory judging module provided by the embodiment of the present invention is shown. For the convenience of description, only parts related to the embodiment of the present invention are shown in the figure.
扇区数据读取模块 141 读取存储器的 0 地址的扇区数据;第一判断模块 142 判断扇区数据指定位置的数据是否包含所述测试数据中所包含的测试标识;当所述第一判断模块 142 判断所述 0 地址扇区指定位置的数据包含所述测试数据中所包含的测试标识时,第一循环写类型存储器判定模块 143 判定所述存储器为循环型的假容量存储器,结束检测流程;当所述第一判断模块 142 判断所述 0 地址扇区指定位置的数据不包含所述测试数据中所包含的测试标识时,扇区地址计算模块 144 以固定步长递增的方式,计算要读取的扇区地址;第二判断模块 145 判断所述扇区地址计算模块 144 计算的要读取的扇区地址是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址;当所述第二判断模块 145 判断计算的要读取的扇区地址位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址时,控制跳过模块 146 控制跳过对所述扇区数据的读取,执行扇区地址计算模块 144 计算下一要读取的扇区数据的地址,并继续执行所述第二判断模块 145 判断计算的要读取的扇区地址是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址的步骤; 当所述第二判断模块 145 判断计算的要读取的扇区地址不位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址时,则第三判断模块 147 判断计算的要读取的扇区地址是否大于存储器的容量。 The sector data reading module 141 reads the sector data of the 0 address of the memory; the first judging module 142 Determining whether the data of the specified location of the sector data includes the test identifier included in the test data; when the first determining module 142 determines the 0 When the data of the address sector specified location contains the test identifier included in the test data, the first loop write type memory decision module 143 Determining that the memory is a loop type dummy capacity memory, ending the detection process; when the first determining module 142 determines the 0 When the data of the location specified by the address sector does not include the test identifier included in the test data, the sector address calculation module 144 calculates the sector address to be read in a fixed step increment manner; the second determination module 145 Determining whether the sector address to be read calculated by the sector address calculation module 144 is located in the tail region of the memory in which the test data is written and the addresses of the sectors in the middle region; when the second judging module 145 The control skip module 146 is determined to determine that the calculated sector address to be read is located at the end region of the memory in which the test data is written and the addresses of the sectors in the middle region. The control skips the reading of the sector data, and the execution sector address calculation module 144 calculates the address of the sector data to be read next, and continues to execute the second determination module 145. Determining whether the calculated sector address to be read is located in the tail region of the memory in which the test data is written and the addresses of the plurality of sectors in the middle region; when the second judging module 145 When it is judged that the calculated sector address to be read is not located in the tail region of the memory in which the test data is written and the addresses of the plurality of sectors in the middle region, the third judging module 147 It is judged whether the calculated sector address to be read is greater than the capacity of the memory.
其中,当所述第三判断模块 147 计算的要读取的扇区地址大于存储器的容量时,结束控制模块 148 控制结束检测流程,并确定所述存储器为真实存储器;当所述第三判断模块 147 计算的要读取的扇区地址小于等于存储器的容量时,则执行所述扇区数据读取模块 141 读取所述扇区地址所对应的扇区数据,并继续执行所述第一判断模块 142 判断扇区数据指定位置的数据是否包含所述测试数据中所包含的测试标识的步骤。 Wherein, when the sector address to be read calculated by the third determining module 147 is greater than the capacity of the memory, the control module 148 ends. Controlling the end of the detection process, and determining that the memory is a real memory; when the sector address to be read calculated by the third determining module 147 is less than or equal to the capacity of the memory, the sector data reading module 141 is executed. And reading the sector data corresponding to the sector address, and continuing to perform the step of the first determining module 142 determining whether the data of the location specified by the sector data includes the test identifier included in the test data.
上述仅为本发明的一个实施例,其各模块的功能如上述方法实施例所述,在此不再赘述。 The foregoing is only one embodiment of the present invention, and the functions of the modules are as described in the foregoing method embodiments, and details are not described herein again.
在本发明实施例中, 在存储器的高地址数据区写入预先设置的测试数据;读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程;当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据;从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器,检测速度快,方便。 In the embodiment of the present invention, Writing pre-set test data in a high address data area of the memory; reading data corresponding to the memory high address data area, when the read data of the memory high address data area corresponds to the written test data If the difference is not the same, determining that the memory is a dummy-type dummy memory, ending the detection process; when the data corresponding to the read high address data area is the same as the written test data, in the memory Several sectors of the tail region and the middle region are written to the preset test data; from the memory The address sector starts with a comparison of the test flags of the read sector data, and determines whether the memory is cyclically written to the dummy capacity memory, and the detection speed is fast and convenient.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。 The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims (10)

  1. 一种假容量存储器的检测方法,其特征在于,所述方法包括下述步骤:A method for detecting a dummy capacity memory, characterized in that the method comprises the following steps:
    在存储器的高地址数据区写入预先设置的测试数据;Writing pre-set test data in a high address data area of the memory;
    读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程;Reading out data corresponding to the memory high address data area, when the data corresponding to the read memory high address data area is different from the written test data, determining that the memory is a dummy type dummy Capacity storage, ending the inspection process;
    当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据;When the data corresponding to the read memory high address data area is the same as the written test data, the preset test data is written in a plurality of sectors in the tail area and the middle area of the memory;
    从存储器的0地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。Starting from the 0 address sector of the memory, a comparison of the test flags is performed on the read sector data, and it is judged whether the memory is cyclically written to the dummy capacity memory.
  2. 如权利要求 1 所述的假容量存储器的检测方法,其特征在于,所述在存储器的高地址数据区写入预先设置的测试数据的步骤之前还包括下述步骤:Claims 1 The method for detecting a dummy capacity memory is characterized in that the step of writing the pre-set test data in the high address data area of the memory further comprises the following steps:
    预先设置生成测试数据,所述测试数据包含用于检测存储器假容量的测试标识。The test data is generated in advance, and the test data includes a test identifier for detecting a false capacity of the memory.
  3. 如权利要求 2 所述的假容量存储器的检测方法,其特征在于,所述预先设置生成测试数据的步骤包括下述步骤:Claims 2 The method for detecting a dummy capacity memory is characterized in that the step of setting the test data in advance includes the following steps:
    随机生成一测试标识;Randomly generate a test identifier;
    将所述测试标识加入到扇区模板中;Adding the test identifier to the sector template;
    将扇区模板复制到64K区长的测试数据区,得到写入存储器尾部区域和中部区域的若干扇区的测试数据。The sector template is copied to the test data area of the 64K zone length to obtain test data written to several sectors of the memory tail area and the middle area.
  4. 如权利要求 2 所述的假容量存储器的检测方法,其特征在于,所述从存储器的 0 地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器的步骤具体包括下述步骤:A method of detecting a dummy capacity memory according to claim 2, wherein said slave memory 0 The step of starting the address sector, performing a comparison of the test identifiers on the read sector data, and determining whether the memory is cyclically written to the dummy capacity memory includes the following steps:
    读取存储器的 0 地址的扇区数据;Reading the sector data of the 0 address of the memory;
    判断扇区数据指定位置的数据是否包含所述测试数据中所包含的测试标识;Determining whether the data of the specified location of the sector data includes the test identifier included in the test data;
    当所述 0 地址扇区指定位置的数据包含所述测试数据中所包含的测试标识时,则判定所述存储器为循环型的假容量存储器,结束检测流程;When the 0 When the data of the location specified by the address sector includes the test identifier included in the test data, it is determined that the memory is a loop type pseudo capacity memory, and the detection process ends;
    当所述 0 地址扇区指定位置的数据不包含所述测试数据中所包含的测试标识时,以固定步长递增的方式,计算要读取的扇区地址;When the 0 When the data of the specified location of the address sector does not include the test identifier included in the test data, the sector address to be read is calculated in a fixed step increment manner;
    判断计算的要读取的扇区地址是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址;Determining whether the calculated sector address to be read is located in the tail region of the memory in which the test data is written and the addresses of the plurality of sectors in the middle region;
    当计算的要读取的扇区地址位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址时,控制跳过对所述扇区数据的读取,计算下一要读取的扇区数据的地址,并继续执行判断计算的要读取的扇区地址是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址的步骤;When the calculated sector address to be read is located at the end region of the memory in which the test data is written and the addresses of the plurality of sectors in the middle region, the control skips reading of the sector data, and calculates the next read. Address of the sector data, and continue to perform the step of determining whether the calculated sector address to be read is located in the tail region of the memory in which the test data is written and the addresses of the plurality of sectors in the middle region;
    当计算的要读取的扇区地址不位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址时,判断计算的要读取的扇区地址是否大于存储器的容量。When the calculated sector address to be read is not located in the tail area of the memory in which the test data is written and the addresses of the sectors in the middle area, it is judged whether or not the calculated sector address to be read is larger than the capacity of the memory.
  5. 如权利要求 4 所述的假容量存储器的检测方法,其特征在于,所述判断计算的要读取的扇区地址是否大于存储器的容量的步骤之后还包括:Claims 4 The method for detecting a pseudo-capacity memory is characterized in that: the step of determining whether the calculated sector address to be read is greater than the capacity of the memory further comprises:
    当计算的要读取的扇区地址大于存储器的容量时,控制结束检测流程,并确定所述存储器为真实存储器;When the calculated sector address to be read is greater than the capacity of the memory, the control ends the detection process and determines that the memory is a real memory;
    当计算的要读取的扇区地址小于等于存储器的容量时,则执行读取所述扇区地址所对应的扇区数据,并继续执行判断扇区数据指定位置的数据是否包含所述测试数据中所包含的测试标识的步骤。When the calculated sector address to be read is less than or equal to the capacity of the memory, performing reading of the sector data corresponding to the sector address, and continuing to perform determining whether the data of the specified location of the sector data includes the test data The steps for the test ID included in .
  6. 一种假容量存储器的检测系统,其特征在于,所述系统包括:A detection system for a dummy capacity memory, characterized in that the system comprises:
    第一测试数据写入模块,用于在存储器的高地址数据区写入预先设置的测试数据;a first test data writing module, configured to write pre-set test data in a high address data area of the memory;
    假写类型存储器判定模块,用于读出所述存储器高地址数据区对应的数据,当所述读出的存储器高地址数据区对应的数据与写入的所述测试数据不相同时,则判定所述存储器为假写类型的假容量存储器,结束检测流程;a dummy write type memory determining module, configured to read data corresponding to the memory high address data area, when the data corresponding to the read memory high address data area is different from the written test data, determine The memory is a dummy capacity type of a dummy write type, ending the detection process;
    第二测试数据写入模块,用于当所述假写类型存储器判定模块读出的存储器高地址数据区对应的数据与写入的所述测试数据相同时,在存储器的尾部区域和中部区域的若干扇区写入所述预先设置的测试数据;以及a second test data writing module, configured to: when the data corresponding to the memory high address data area read by the dummy type memory determining module is the same as the written test data, in the tail area and the middle area of the memory Writing a predetermined number of test data to a plurality of sectors;
    循环写类型存储器判断模块,用于从存储器的0地址扇区开始,对读取到的扇区数据进行测试标识的比较,判断所述存储器是否循环写类型的假容量存储器。The cyclic write type memory judging module is configured to compare the test identifiers of the read sector data from the 0 address sector of the memory, and determine whether the memory is cyclically written to the dummy capacity memory.
  7. 如权利要求 6 所述的假容量存储器的检测系统,其特征在于,所述系统还包括:The detection system of the pseudo-capacity memory of claim 6, wherein the system further comprises:
    测试数据生成模块,用于预先设置生成测试数据,所述测试数据包含用于检测存储器假容量的测试标识。And a test data generating module, configured to preset generating test data, where the test data includes a test identifier for detecting a false capacity of the memory.
  8. 如权利要求 7 所述的假容量存储器的检测系统,其特征在于,所述测试数据生成模块具体包括:The detection system of the pseudo-capacity memory according to claim 7, wherein the test data generating module specifically comprises:
    测试标识生成模块,用于随机生成一测试标识;a test identifier generating module, configured to randomly generate a test identifier;
    测试标识加入模块,用于将所述测试标识加入到扇区模板中;以及a test identifier adding module for adding the test identifier to a sector template;
    测试数据获取模块,用于将扇区模板复制到64K区长的测试数据区,得到写入存储器尾部区域和中部区域的若干扇区的测试数据。The test data acquisition module is configured to copy the sector template to the test data area of the 64K area length, and obtain test data of several sectors written in the tail area of the memory and the middle area.
  9. 如权利要求 7 所述的假容量存储器的检测系统,其特征在于,所述循环写类型存储器判断模块具体包括:The detection system of the pseudo-capacity memory of claim 7, wherein the cyclic write type memory judging module comprises:
    扇区数据读取模块,用于读取存储器的 0 地址的扇区数据;a sector data reading module for reading sector data of a 0 address of the memory;
    第一判断模块,用于判断扇区数据指定位置的数据是否包含所述测试数据中所包含的测试标识;a first determining module, configured to determine whether the data of the specified location of the sector data includes the test identifier included in the test data;
    第一循环写类型存储器判定模块,用于当所述第一判断模块判断所述 0 地址扇区指定位置的数据包含所述测试数据中所包含的测试标识时,则判定所述存储器为循环型的假容量存储器,结束检测流程;a first loop write type memory determining module, configured to: when the first determining module determines the 0 When the data of the location specified by the address sector includes the test identifier included in the test data, it is determined that the memory is a loop type pseudo capacity memory, and the detection process ends;
    扇区地址计算模块,用于当所述第一判断模块判断所述 0 地址扇区指定位置的数据不包含所述测试数据中所包含的测试标识时,以固定步长递增的方式,计算要读取的扇区地址;a sector address calculation module, configured to: when the first determining module determines the 0 When the data of the specified location of the address sector does not include the test identifier included in the test data, the sector address to be read is calculated in a fixed step increment manner;
    第二判断模块,用于判断所述扇区地址计算模块计算的要读取的扇区地址是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址;a second judging module, configured to determine whether the sector address to be read calculated by the sector address calculation module is located in an address of a sector in a tail region and a middle region of the memory in which the test data is written;
    控制跳过模块,用于当所述第二判断模块判断计算的要读取的扇区地址位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址时,控制跳过对所述扇区数据的读取,执行扇区地址计算模块计算下一要读取的扇区数据的地址,并继续执行所述第二判断模块判断计算的要读取的扇区地址是否位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址的步骤;以及Controlling the skip module, when the second judging module judges that the calculated sector address to be read is located in the tail region of the memory in which the test data is written and the addresses of the plurality of sectors in the middle region, the control skips the Reading the sector data, the execution sector address calculation module calculates the address of the sector data to be read next, and continues to execute whether the sector address to be read calculated by the second judgment module determines whether the sector address to be read is in the write a step of testing a tail region of the memory of the data and an address of a plurality of sectors of the middle region;
    第三判断模块,用于当所述第二判断模块判断计算的要读取的扇区地址不位于写入测试数据的存储器的尾部区域和中部区域的若干扇区的地址时,则判断计算的要读取的扇区地址是否大于存储器的容量。a third determining module, configured to: when the second determining module determines that the calculated sector address to be read is not located in a tail region of the memory in which the test data is written and an address of a plurality of sectors in the middle region, determining the calculated Whether the sector address to be read is greater than the capacity of the memory.
  10. 如权利要求 9 所述的假容量存储器的检测系统,其特征在于,所述循环写类型存储器判断模块还包括:The detection system of the pseudo-capacity memory of claim 9, wherein the cyclic write type memory judging module further comprises:
    结束控制模块,用于当所述第三判断模块计算的要读取的扇区地址大于存储器的容量时,控制结束检测流程,并确定所述存储器为真实存储器;End control module, configured to: when the sector address to be read calculated by the third determining module is greater than a capacity of the memory, control end the detection process, and determine that the memory is a real memory;
    当所述第三判断模块计算的要读取的扇区地址小于等于存储器的容量时,则执行所述扇区数据读取模块读取所述扇区地址所对应的扇区数据,并继续执行所述第一判断模块判断扇区数据指定位置的数据是否包含所述测试数据中所包含的测试标识的步骤。When the sector address to be read calculated by the third determining module is less than or equal to the capacity of the memory, executing the sector data reading module to read the sector data corresponding to the sector address, and continuing to execute The first determining module determines whether the data of the location specified by the sector data includes the test identifier included in the test data.
PCT/CN2011/072831 2010-07-30 2011-04-15 Method and system for detecting mendacious capacity memory WO2012013049A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010241976.XA CN102306503B (en) 2010-07-30 2010-07-30 Method and system for detecting false capacity memory
CN201010241976.X 2010-07-30

Publications (1)

Publication Number Publication Date
WO2012013049A1 true WO2012013049A1 (en) 2012-02-02

Family

ID=45380348

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/072831 WO2012013049A1 (en) 2010-07-30 2011-04-15 Method and system for detecting mendacious capacity memory

Country Status (2)

Country Link
CN (1) CN102306503B (en)
WO (1) WO2012013049A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102956270B (en) * 2012-10-25 2015-11-25 北京奇虎科技有限公司 Movable storage device detection method and device
CN103116536B (en) * 2013-02-25 2016-02-24 杭州华澜微电子股份有限公司 The capacity check method of memory storage
CN103500586B (en) * 2013-09-26 2016-04-13 北京奇虎科技有限公司 Detect the method and apparatus of flash memory device capacity
CN104331061A (en) * 2014-08-28 2015-02-04 航天科工深圳(集团)有限公司 Test method and test device of core board of distribution network terminal device
WO2017024459A1 (en) * 2015-08-10 2017-02-16 华为技术有限公司 Memory card authentication method and mobile terminal thereof, and terminal device
CN106558348A (en) * 2016-11-11 2017-04-05 北京京存技术有限公司 A kind of eMMC readwrite tests method and apparatus
CN108335721B (en) * 2018-03-14 2021-04-20 烽火通信科技股份有限公司 Method and system for detecting random access memory address line fault in real time
CN111273852A (en) * 2018-12-04 2020-06-12 智微科技股份有限公司 Memory block size determination method
CN109634534B (en) * 2019-01-02 2022-04-01 威胜集团有限公司 Method for quickly judging capacity of memory chip
CN110109785B (en) * 2019-04-16 2023-03-31 晶晨半导体(上海)股份有限公司 Memory capacity obtaining method and device, computer equipment and readable storage medium
CN110598473B (en) * 2019-09-18 2022-08-16 深圳市网心科技有限公司 Mobile storage medium management method, device and equipment and storage medium
CN113345510B (en) * 2021-06-29 2022-06-10 珠海一微半导体股份有限公司 FLASH capacity identification method and capacity identification system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5640286A (en) * 1995-05-08 1997-06-17 Western Digital Corporation Disk drive with error code embedded sector identification
CN101477837A (en) * 2009-01-21 2009-07-08 炬力集成电路设计有限公司 Detection method and apparatus for memory capacity
CN101527172A (en) * 2008-03-07 2009-09-09 佛山市顺德区顺达电脑厂有限公司 Detection system and method for dynamic random access memory capacity

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008217936A (en) * 2007-03-06 2008-09-18 Elpida Memory Inc Semiconductor memory device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5640286A (en) * 1995-05-08 1997-06-17 Western Digital Corporation Disk drive with error code embedded sector identification
CN101527172A (en) * 2008-03-07 2009-09-09 佛山市顺德区顺达电脑厂有限公司 Detection system and method for dynamic random access memory capacity
CN101477837A (en) * 2009-01-21 2009-07-08 炬力集成电路设计有限公司 Detection method and apparatus for memory capacity

Also Published As

Publication number Publication date
CN102306503A (en) 2012-01-04
CN102306503B (en) 2014-03-12

Similar Documents

Publication Publication Date Title
WO2012013049A1 (en) Method and system for detecting mendacious capacity memory
WO2010076966A2 (en) Memory controller and memory management method
US5956473A (en) Method and system for managing a flash memory mass storage system
KR101425957B1 (en) Ecc control circuit and multi channel memory system icluding the same
WO2014157817A1 (en) Method for mapping page address based on flash memory and system therefor
JP2007018499A (en) Memory
TW201907287A (en) Data reading method and storage controller
JP2010020756A (en) Storage device for updating data pages of flash memory based on ecc and method for updating the same
TW201419292A (en) Systems and methods for testing memory
WO2013176376A1 (en) Method and device for identifying information for chip-level parallel flash memory
TW201800932A (en) Data storage method and corresponding apparatus
TWI490869B (en) Method and associated controller for flash memory
JP5183662B2 (en) Memory control device and memory control method
JP2012517068A (en) Memory device, memory management device, and memory management method
JP2010211888A (en) Disk storage device
US20080059693A1 (en) Method for improving lifespan of flash memory
US10811070B2 (en) Memory system and control method to perform patrol read operation
JPH0652694A (en) System for detecting life of flash memory
JP4661369B2 (en) Memory controller
KR100871703B1 (en) Non-volatile Memory Device and Driving Method for the same
JP5617873B2 (en) Storage device
KR20100041313A (en) Data storage method, data storage device and system thereof
JPH08190510A (en) Information processor capable of mounting semiconductor memory including defective part
JP2014206905A (en) Writing device
WO2011019216A9 (en) Hybrid storage device, and control method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11811751

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11811751

Country of ref document: EP

Kind code of ref document: A1