A method and system for detecting chip damage

By performing address-by-address copy and comparison operations on the DDR chip, the problem of long test time and incomplete testing of the DDR chip is solved, fast and accurate DDR chip damage detection is achieved, and the demand for large-capacity testing is met.

CN114420189BActive Publication Date: 2024-09-20ZHEJIANG XINMAI SILICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210055800.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-18
Publication Date
2024-09-20
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

The existing DDR chip testing method takes too long in the FT test phase and the nor flash speed is slow, making it impossible to perform full-speed and full-capacity testing. It is not suitable for large-capacity chips, the test results are inaccurate, and some damaged chips cannot be detected.

Method used

By generating test source data and writing it to the starting address of the DDR chip, using DMA copy operation to copy the data address by address to the ending address, only one read and write operation is performed, errors are accumulated to the ending address, and comparison is performed to determine whether the chip is damaged. , ensuring that each address undergoes only one operation, shortening test time and covering the entire DDR space.

Benefits of technology

The test time is shortened to the level of hundreds of milliseconds, which meets the testing requirements of large-capacity DDR chips, reduces the probability of missed tests, and improves the accuracy of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114420189B
    Figure CN114420189B
Patent Text Reader

Abstract

The invention relates to a method and system for detecting chip damage in the technical field of chip testing, comprising the following steps: generating test source data, and writing the test source data into the starting address of a DDR chip initialized to obtain intermediate source data; obtaining the address number of the DDR chip initialized, and according to the order of the address numbers, copying the intermediate source data in the storage address of the previous address number to the storage address of the next address number until the intermediate source data is copied to the termination address; obtaining the intermediate source data at the termination address to obtain target data; comparing the target data with the test source data to determine whether the DDR chip initialized is damaged. The method has the advantage of short test time and breaks through the bottleneck that DDR cannot be tested at full speed, full capacity and large capacity under the requirements of NOR flash speed, CPU main frequency and FT test time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip testing, and in particular to a method and system for detecting chip damage. Background Art

[0002] When the existing DDR chip starts the FT test, the CPU first jumps to the NOR flash and executes the relevant programs stored in the NOR flash. Then the CPU performs a read and write test on the DDR. After the DDR test passes, the program running environment is moved to the DDR for the next test.

[0003] However, since the test time is limited in the FT test phase and the speed of NOR flash is very slow, it takes a long time to fully test a DDR chip, which cannot meet the test time requirements. On the other hand, the existing test method is not applicable to large-capacity DDR chips. In order to meet the test time requirements, it generally does not perform full-capacity read and write tests on DDR chips. It only randomly selects part of the DDR address space for read and write tests, and does not cover the entire DDR space, resulting in inaccurate test results for DDR chips and some damaged DDR chips are not detected. Summary of the invention

[0004] The present invention aims at the shortcomings of the prior art and provides a method and system for detecting chip damage, which has the advantage of short test time and breaks through the bottleneck that DDR cannot be tested at full speed, full capacity and large capacity under the requirements of NOR flash speed, CPU main frequency and FT test time.

[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions:

[0006] A method for detecting chip damage comprises the following steps:

[0007] Generate test source data, and write the test source data to the starting address of the initialized DDR chip to obtain intermediate source data;

[0008] Obtaining the address number of the DDR chip initialized, and copying the intermediate source data in the storage address of the previous address number to the storage address of the next address number according to the order of the address numbers, until the intermediate source data is copied to the end address;

[0009] Acquire the intermediate source data at the termination address to obtain the target data;

[0010] Compare the target data with the test source data to determine whether the DDR chip initialized is damaged.

[0011] Optionally, the following steps are also included:

[0012] Generate a control instruction according to the configuration information of the DDR chip, and send the control instruction to the DDR chip;

[0013] It is determined whether the DDR chip responds to the control instruction. If so, the DDR chip is an initialized DDR chip. If not, the DDR chip is a damaged DDR chip.

[0014] Optionally, generating test source data includes the following steps:

[0015] Generate a random number of a fixed size, and modify part of the byte data of the random number to obtain test source data.

[0016] Optionally, modifying part of the byte data of the random number comprises the following steps:

[0017] Acquire all byte data of the random number, set an extraction interval, and extract a group of byte data every other extraction interval to obtain extracted data;

[0018] The extracted data is modified to 0×ff or 0×00.

[0019] Optionally, comparing the target data with the test source data to determine whether the DDR chip is damaged comprises the following steps:

[0020] Compare the target data with the test source data to determine whether the target data is consistent with the test source data;

[0021] If yes, the DDR chip initialized is an undamaged DDR chip;

[0022] If not, the DDR chip initialized is a damaged DDR chip.

[0023] A system for detecting chip damage, comprising:

[0024] A test source data generation module is used to generate test source data;

[0025] A read / write module is used to write the test source data to the starting address of the initialized DDR chip to obtain intermediate source data;

[0026] The intermediate data copy module is used to obtain the address number initialized by the DDR chip, and copy the intermediate source data in the storage address of the previous address number to the storage address of the next address number according to the order of the address number, until the intermediate source data is copied to the end address;

[0027] A target data acquisition module is used to acquire the intermediate source data at the termination address to obtain the target data;

[0028] The analysis and judgment module is used to compare the target data with the test source data to determine whether the DDR chip initialized is damaged.

[0029] Optionally, an initialization detection module is further included, and the initialization detection module includes an instruction generation module and a response analysis module;

[0030] The instruction generation module is used to generate control instructions according to the configuration information of the DDR chip, and send the control instructions to the DDR chip;

[0031] The response analysis module is used to determine whether the DDR chip responds to the control instruction. If so, the DDR chip is an initialized DDR chip. If not, the DDR chip is a damaged DDR chip.

[0032] Optionally, the test source data generation module is configured to:

[0033] Generate a random number of a fixed size, and modify part of the byte data of the random number to obtain test source data.

[0034] Optionally, the test source data generation module is further configured to:

[0035] Acquire all byte data of the random number, set an extraction interval, and extract a group of byte data every other extraction interval to obtain extracted data;

[0036] The extracted data is modified to 0×ff or 0×00.

[0037] Optionally, the analysis and judgment module is configured to:

[0038] Compare the target data with the test source data to determine whether the target data is consistent with the test data;

[0039] If yes, the DDR chip initialized is an undamaged DDR chip;

[0040] If not, the DDR chip initialized is a damaged DDR chip.

[0041] Compared with the prior art, the technical solution provided by the present invention has the following beneficial effects:

[0042] By setting up and generating test source data, and using the test source data to write the initialization to the starting address of the DDR chip, the initialization can be carried out inside the DDR chip, and the intermediate source data in the storage address of the previous address number is copied to the storage address of the next address number. At the same time, through such a copying method, data errors will be accumulated to the last Dn address, so that each address only undergoes one read operation and one write operation, which greatly shortens the test time to hundreds of milliseconds and meets the test of large-capacity DDR chips. On the other hand, through such a copying method, the entire DDR space is completely covered, reducing the probability of missed tests and improving the accuracy of test results. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 This is a flow chart of a method for detecting chip damage proposed in the first embodiment;

[0045] Figure 2 This is the address data distribution diagram of the DDR chip to be re-detected proposed in the first embodiment. DETAILED DESCRIPTION

[0046] The present invention is further described in detail below in conjunction with embodiments. The following embodiments are for explanation of the present invention but the present invention is not limited to the following embodiments.

[0047] Embodiment 1

[0048] like Figure 1 As shown, a method for detecting chip damage includes the following steps: performing initialization detection on a DDR chip to obtain an initialization-passed DDR chip that passes the initialization detection. Specifically, the method includes the following steps: generating a control instruction according to configuration information of the DDR chip, and sending the control instruction to the DDR chip; judging whether the DDR chip responds to the control instruction, if so, the DDR chip is an initialization-passed DDR chip, if not, the DDR chip is a damaged DDR chip.

[0049] There are two situations in which a DDR chip may be damaged. One is that the initialization of the DDR chip related program fails, that is, the initialization test fails in this embodiment, and the read and write operations cannot be performed. In this case, the DDR chip is directly determined to be damaged. The other is that the DDR chip passes the initialization test and can perform read and write operations, and further testing is required.

[0050] Specifically, the initialization detection of the DDR chip needs to be carried out with the help of control instructions, wherein the control instruction can be to set ConControl. At this time, if the DDR chip responds that the automatic refresh counter cannot be enabled, the DDR chip is initialized. The control instruction can also set MemControl. At this time, if the DDR chip responds that all power down modes are turned off, the DDR chip is initialized. Otherwise, the initialization fails and is determined to be a damaged DDR chip. It should be noted that the standard initialization process is used for the initialization detection of the DDR chip, and the control instruction is not limited to the above example.

[0051] Generate test source data and store the test source data in a non-volatile flash memory, wherein generating the test source data includes the following steps: generating a random number of a fixed size and modifying part of the byte data of the random number to obtain the test source data; modifying part of the byte data of the random number includes the following steps: obtaining all the byte data of the random number, setting an extraction interval, and extracting a group of byte data every other extraction interval to obtain extracted data; and modifying the extracted data to 0×ff or 0×00.

[0052] Specifically, the size of the random number can be 128KB, 256KB, 516KB, etc., wherein, since the larger the size of the random number is, the closer it is to the actual working condition, and since the FT test phase gives the DDR chip a single test time of only about 100 milliseconds, and the read speed of the NOR flash is slow, and only 1MB of data can be read in 100ms, therefore, the best effect is to generate a 256KB random number so that the random number can best meet the FT test time requirement during the test. Since the probability of all 0×00 or all 0xff appearing in the random number is very low, and since 0×00 and 0xff are the largest jump edges, some 0×00 and 0xff need to be inserted into the random number. It should be noted that the random number can be any data, and in this embodiment, it is only used for read and write tests, and there is no restriction on the data of the random number itself.

[0053] Therefore, this embodiment takes the generation of a 256KB random number and the extraction interval being set to 10 bytes of data as an example. On the basis of the 256KB random number, every 10 characters of data are modified to 0×ff or 0×00. For example, if the first byte of data is assigned to 0×00, the 10th byte of data is assigned to 0×ff, the 20th byte of data is assigned to 0x00, and the 30th byte of data is assigned to 0xff, until the byte data of the 256KB random number is completed and stored in the non-volatile flash memory to form 256KB of test source data, wherein the setting of the extraction interval includes but is not limited to the 10 bytes of data mentioned in this embodiment, and can also be 5 bytes of data, 15 bytes of data, etc.

[0054] Read the test source data in the non-volatile flash memory, and write the test source data to the starting address of the DDR chip initialized to obtain intermediate source data, that is, read 256KB of test source data from the non-volatile flash memory, and then copy and write the 256KB of test source data to the starting address of the DDR chip initialized.

[0055] like Figure 2 As shown, in order to shorten the test time as much as possible, the number of copies of the DMA controller also needs to be reduced as much as possible. Therefore, the address number of the DDR chip initialized is obtained, and according to the order of the address numbers, the intermediate source data in the storage address of the previous address number is copied to the storage address of the next address number; until the intermediate source data is copied to the termination address of the DDR chip initialized, the intermediate source data at the termination address is obtained to obtain the target data.

[0056] Specifically, 256KB of test source data is first copied to the starting address D0 of the initialized DDR chip. During this process, 256KB of test source data is read from the non-volatile flash memory and then copied and written to the D0 space. The total time consumed is about 25ms. Then the DMA controller copies the 256KB of test source data at the D0 address to the D1 address, and the 256KB of test source data at the D1 address is copied to the D2 address again. The copying operation is repeated in this way until the initialized DDR chip is filled. The address of the last operation is Dn. In this copying mode, each address is only read and written once. At the same time, data errors will be accumulated at the last Dn address, which serves as the basis for the next comparison. During the DMA controller copying process, if the capacity of the initialized DDR chip is 1GB, the copying process takes about 50ms.

[0057] After completing the copying of 256KB of test source data to Dn, compare the target data with the test source data to determine whether the DDR chip initialized is damaged, thereby dividing the DDR chip initialized into a damaged DDR chip and an undamaged DDR chip. Specifically, the following steps are included: compare the target data with the test source data to determine whether the target data is consistent with the test source data; if so, the DDR chip initialized is an undamaged DDR chip; if not, the DDR chip initialized is a damaged DDR chip.

[0058] Specifically, 256KB of test source data at address Dn is obtained as target data, and then the target data is compared with 256KB of test source data in the non-volatile flash memory to determine whether they are consistent. If data errors occur, they will accumulate to the last address Dn. For example, if a byte of data in D0 is wrong, the test source data at address D0 is copied to D1, and the test source data at address D1 will also have the same error. Therefore, it is only necessary to compare the test source data at address Dn as the target data. If they are consistent, it means that the DDR chip initialized is not damaged. Among them, the time spent on comparing the target data with the 256KB of test source data in the non-volatile flash memory is about 30ms. Therefore, it can be concluded that the time spent in the entire test process of the DDR chip initialized is about 105ms, which fully meets the requirements of FT test time. Compared with the existing scheme, the test time is also improved.

[0059] Embodiment 2

[0060] A system for detecting chip damage comprises: an initialization detection module, which is used for performing initialization detection on a DDR chip to obtain an initialization-passed DDR chip that passes the initialization detection, wherein the initialization detection module comprises an instruction generation module and a response analysis module; the instruction generation module is used for generating control instructions according to configuration information of the DDR chip, and sending the control instructions to the DDR chip; the response analysis module is used for judging whether the DDR chip responds to the control instruction, if so, the DDR chip is an initialization-passed DDR chip, if not, the DDR chip is a damaged DDR chip.

[0061] There are two situations in which a DDR chip may be damaged. One is that the initialization of the DDR chip related program fails, that is, the initialization test fails in this embodiment, and the read and write operations cannot be performed. In this case, the DDR chip is directly determined to be damaged. The other is that the DDR chip passes the initialization test and can perform read and write operations, and further testing is required.

[0062] Specifically, the initialization detection of the DDR chip needs to be carried out with the help of control instructions, wherein the control instruction can be to set ConControl. At this time, if the DDR chip responds that the automatic refresh counter cannot be enabled, the DDR chip is initialized. The control instruction can also set MemControl. At this time, if the DDR chip responds that all power down modes are turned off, the DDR chip is initialized. Otherwise, the initialization fails and is determined to be a damaged DDR chip. It should be noted that the standard initialization process is used for the initialization detection of the DDR chip, and the control instruction is not limited to the above example.

[0063] The test source data generation module generates test source data and stores the test source data in a non-volatile flash memory, wherein the test source data generation module is configured to: generate a random number of a fixed size, and modify part of the byte data of the random number to obtain the test source data, and the test source data generation module is further configured to: obtain all byte data of the random number, set an extraction interval, and extract a group of byte data every extraction interval to obtain extracted data; and modify the extracted data to 0×ff or 0×00.

[0064] Specifically, the size of the random number can be 128KB, 256KB, 516KB, etc., among which, the larger the size of the random number, the closer it is to the actual working situation, and because the FT test phase gives the DDR chip a single test time of only about 100 milliseconds, and the read speed of the NOR flash is slow, 100ms can only read 1MB of data, therefore, the best effect is to generate 256KB of random numbers so that the random numbers can best meet the FT test time requirements during the test. Since the probability of all 0×00 or all 0xff in the random number is very low, and because 0×00 and 0xff are the largest jump edges, it is necessary to insert some 0×00 and 0xff into the random number.

[0065] Therefore, this embodiment takes the generation of a 256KB random number and the extraction interval being set to 10 bytes of data as an example. On the basis of the 256KB random number, every 10 characters of data are modified to 0×ff or 0×00. For example, if the first byte of data is assigned to 0×00, the 10th byte of data is assigned to 0×ff, the 20th byte of data is assigned to 0x00, and the 30th byte of data is assigned to 0xff, until the byte data of the 256KB random number is completed and stored in the non-volatile flash memory to form 256KB of test source data, wherein the setting of the extraction interval includes but is not limited to the 10 bytes of data mentioned in this embodiment, and can also be 5 bytes of data, 15 bytes of data, etc.

[0066] The read / write module reads the test source data in the non-volatile flash memory and writes the test source data to the starting address of the DDR chip initialized to obtain the intermediate source data, that is, reads 256KB of test source data from the non-volatile flash memory, and then copies and writes the 256KB of test source data to the starting address of the DDR chip initialized.

[0067] In order to shorten the test time as much as possible, the number of copies of the DMA controller also needs to be reduced as much as possible. Therefore, the intermediate data copy module is used to obtain the address number initialized by the DDR chip, and according to the order of the address numbers, the intermediate source data in the storage address of the previous address number is copied to the storage address of the next address number; until the intermediate source data is copied to the termination address, the target data acquisition module is used to obtain the intermediate source data at the termination address to obtain the target data.

[0068] Specifically, 256KB of test source data is first copied to the starting address D0 of the initialized DDR chip. During this process, 256KB of test source data is read from the non-volatile flash memory and then copied and written to the D0 space. The total time consumed is about 25ms. Then the DMA controller copies the 256KB of test source data at the D0 address to the D1 address, and the 256KB of test source data at the D1 address is copied to the D2 address again. The copying operation is repeated in this way until the initialized DDR chip is filled. The address of the last operation is Dn. In this copying mode, each address is only read and written once. At the same time, data errors will be accumulated at the last Dn address, which serves as the basis for the next comparison. During the DMA controller copying process, if the capacity of the initialized DDR chip is 1GB, the copying process takes about 50ms.

[0069] After completing the copying of 256KB of test source data to Dn, the analysis and judgment module compares the target data with the test source data to determine whether the DDR chip initialized is damaged, thereby dividing the DDR chip initialized into a damaged DDR chip and an undamaged DDR chip, wherein the analysis and judgment module is set to: compare the target data with the test source data to determine whether the target data is consistent with the test data; if so, the DDR chip initialized is an undamaged DDR chip; if not, the DDR chip initialized is a damaged DDR chip.

[0070] Specifically, 256KB of test source data at address Dn is obtained as target data, and then the target data is compared with 256KB of test source data in the non-volatile flash memory to determine whether they are consistent. If data errors occur, they will accumulate to the last address Dn. For example, if a byte of data in D0 is wrong, the test source data at address D0 is copied to D1, and the test source data at address D1 will also have the same error. Therefore, it is only necessary to compare the test source data at address Dn as the target data. If they are consistent, it means that the DDR chip initialized is not damaged. Among them, the time spent on comparing the target data with the 256KB of test source data in the non-volatile flash memory is about 30ms. Therefore, it can be concluded that the time spent in the entire test process of the DDR chip initialized is about 105ms, which fully meets the requirements of FT test time. Compared with the existing scheme, the test time is also improved.

[0071] In addition, it should be noted that the shapes and names of the parts and components of the specific embodiments described in this specification may be different. Any equivalent or simple changes made based on the structure, features and principles described in the patent concept of the present invention are included in the protection scope of the patent of the present invention. The technicians in the technical field of the present invention can make various modifications or supplements to the specific embodiments described or replace them in a similar manner, as long as they do not deviate from the structure of the present invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

Claims

1. A method for detecting chip damage, characterized in that: The following steps are involved: Generate test source data, and write the test source data to the starting address of the DDR chip initialized to obtain intermediate source data, wherein generating the test source data includes the following steps: generating a random number of a fixed size, and modifying part of the byte data of the random number to obtain the test source data, and modifying part of the byte data of the random number includes the following steps: obtaining all the byte data of the random number, setting an extraction interval, and extracting a group of byte data every other extraction interval to obtain extracted data; modifying the extracted data to 0×ff or 0×00; Obtaining the address number of the DDR chip initialized, and copying the intermediate source data in the storage address of the previous address number to the storage address of the next address number according to the order of the address numbers, until the intermediate source data is copied to the end address; Acquire the intermediate source data at the termination address to obtain the target data; Compare the target data with the test source data to determine whether the DDR chip initialized is damaged.

2. A method for detecting chip damage according to claim 1, characterized in that: The following steps are also included: Generate a control instruction according to the configuration information of the DDR chip, and send the control instruction to the DDR chip; It is determined whether the DDR chip responds to the control instruction. If so, the DDR chip is an initialized DDR chip. If not, the DDR chip is a damaged DDR chip.

3. A method for detecting chip damage according to claim 1, characterized in that: Comparing the target data with the test source data to determine whether the DDR chip is damaged includes the following steps: Compare the target data with the test source data to determine whether the target data is consistent with the test source data; If yes, the DDR chip initialized is an undamaged DDR chip; If not, the DDR chip initialized is a damaged DDR chip.

4. A system for detecting chip damage, characterized in that: include: A test source data generation module is used to generate test source data, wherein the test source data generation module is configured to: generate a random number of a fixed size, and modify part of the byte data of the random number to obtain the test source data; the test source data generation module is further configured to: obtain all the byte data of the random number, set an extraction interval, and extract a group of byte data every other extraction interval to obtain extracted data; modify the extracted data to 0×ff or 0×00; A read / write module is used to write the test source data to the starting address of the initialized DDR chip to obtain intermediate source data; The intermediate data copy module is used to obtain the address number initialized by the DDR chip, and copy the intermediate source data in the storage address of the previous address number to the storage address of the next address number according to the order of the address number, until the intermediate source data is copied to the end address; A target data acquisition module is used to acquire the intermediate source data at the termination address to obtain the target data; The analysis and judgment module is used to compare the target data with the test source data to determine whether the DDR chip initialized is damaged.

5. A chip damage detection system according to claim 4, characterized in that: It also includes an initialization detection module, and the initialization detection module includes an instruction generation module and a response analysis module; The instruction generation module is used to generate control instructions according to the configuration information of the DDR chip, and send the control instructions to the DDR chip; The response analysis module is used to determine whether the DDR chip responds to the control instruction. If so, the DDR chip is an initialized DDR chip. If not, the DDR chip is a damaged DDR chip.

6. A chip damage detection system according to claim 4, characterized in that: The analysis and judgment module is configured as follows: Compare the target data with the test source data to determine whether the target data is consistent with the test data; If yes, the DDR chip initialized is an undamaged DDR chip; If not, the DDR chip initialized is a damaged DDR chip.