The present invention generally relates to a method for testing memory, and more specifically to a method using built-in controller with testing capability for testing memory.
Flash memory is the most popular storage media in the market, and is widely applied to embedded systems. Flash memory is a solid state, no volatile, rewritable memory, with the operation similar to a hybrid of RAM and harddisk. Like DRAM, flash memory stores the data bits in the memory units. However, the data remains in the memory even when the power is off. With the advantages of high speed, durability, and low voltage requirements, flash memory is suitable for a wide range of devices, such as digital camera, cell phone, printer, palm PC, pager and audio recorder.
The aforementioned test operation is the low level comparison in the taxonomy based on the test data, and relies heavily on the scanning testing program of the testing PC and the efficiency of the testing PC. This is because the testing PC will perform a large amount of computation when testing data, including generating testing data, reading and writing data and data comparison of reading. Therefore, finding a balance between the correctness of testing and the scanning efficiency is an important issue.
However, the disadvantage of using low-level comparison approach for memory scanning testing is that the CPU of the testing PC usually stays in the state of high load and frequent memory access.
Another testing method is high level comparison. Testing PC uses controller to write the testing file into the memory, and reads the stored file from the memory for comparison against the testing file. This method follows the system logic to test the memory access through specific files. By writing a large amount of file data in batches to the memory and then read for comparison, the high level method can test whether the memory is normal. Compared with the low level comparison method, the high level approach greatly reduces the access frequency.
However, while the high level comparison method relies entirely on the testing PC and is suitable for developing efficient testing programs, the high level approach cannot achieve the accuracy of the memory block state as the low level approach.
As the memory chip size decreases rapidly in recent years, the circuit is more complicated and requires operating at high frequency. The stability of the memory dice is a challenge to the semiconductor industry. If the memory characteristics are not known in advance, the quality of the memory dice may be challenged. It becomes an important issue to test the memory in a cost-effective and accurate manner. This is especially important as the complexity, capability and density of flash memory are increasing and the testing uncertainty may also increase as a result. With the manufacturing technology emphasizes on miniaturization, different parts of the same chip may exhibit different electrical characteristics. If the same testing process is applied, the yield ratio may also reduce.
Therefore, it is imperative to devise a memory testing method to meet the demands of fast, accurate and cost-effective testing.
The primary object of the present invention is to provide a memory testing method, by using an automated comparison testing process. The testing process uses the computation of the controller to generate random data or data of specific format after receiving test command of the testing PC, performs writing, reading and comparison directly to the memory, such as flash memory, and returns the testing result to the testing PC so as to reduce the I/O load to the memory by testing PC and accelerate the memory testing.
Another object of the present invention is to provide a memory testing method, where testing PC is only responsible for sending proprietary command and partial compiled data with low level comparison capability to the controller and then activate the testing process. The controller automatically erases all the memory blocks, and writes to all the pages of each block with data generated by an algorithm of the controller. When reading and comparing the data from the pages of each block, the controller uses an algorithm to compare the read data and the original data to determine whether the memory blocks are normal. Therefore, the major testing is performed by the controller so as to reduce the data load of the transmission interface and the computation load of testing PC to improve the testing efficiency.
It is worth noting that in the low level comparison process, an algorithm is used to generate different data for different memory addresses for writing, read and comparison. The present invention does not use fixed data for flash memory testing; instead, the present invention uses the comparison provided by the testing PC. Compared with the conventional testing mode, the present invention provides both the accuracy of the low level comparison and the efficiency of high level comparison. The advantage of the present invention is to accomplish the complicated scanning testing with minimum load of CPU, minimum data transmission and shorter testing time.
The foregoing and other objects, features, aspects and advantages of the present invention will become better understood from a careful reading of a detailed description provided herein below with appropriate reference to the accompanying drawings.
The present invention can be understood in more detail by reading the subsequent detailed description in conjunction with the examples and references made to the accompanying drawings, wherein:
The program code of step S110 may include the algorithm for generating testing data, such as the testing data of low level comparison, and the program code can also provide the low level comparison operation so as to accurately determine whether individual blocks are normal. Because the operation is executed by the logic circuit of the controller, the load on the testing PC is greatly reduced and the overall test efficiency is improved.
The program code of step S110 may further include the algorithm for generating the testing files for high level comparison, for writing to memory in batches to reduce the memory access frequency.
The memory testing files of step S190 includes marking the normal blocks when the comparison result is correct, and marking the damaged blocks when the comparison result is incorrect for generating the testing tables marking normal and damaged blocks.
In summary, the method of the present invention can greatly reduce the memory access and the load of the testing PC to improve the testing efficiency.
Although the present invention has been described with reference to the preferred embodiments, it will be understood that the invention is not limited to the details described thereof. Various substitutions and modifications have been suggested in the foregoing description, and others will occur to those of ordinary skill in the art. Therefore, all such substitutions and modifications are intended to be embraced within the scope of the invention as defined in the appended claims.