Test methods, systems and flash memory devices

By writing a configuration table into the flash memory device and starting the self-test firmware for a second test, the problem of high cost and low efficiency in flash memory device testing is solved, achieving resource saving and efficiency improvement.

CN115547395BActive Publication Date: 2025-12-02DAPUSTOR CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211060860.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-12-02
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

Mass production testing of existing flash memory devices is costly and inefficient, mainly due to the need for multiple test hosts and manual writing of test scripts.

Method used

After the host completes the first test, it writes the configuration table to the non-volatile flash memory of the flash device. After disconnecting, it starts the self-test firmware and uses the power supply platform to perform the second test. The self-test firmware parses the configuration table and executes the test items.

Benefits of technology

It reduces the consumption of host resources, lowers testing costs, and improves testing efficiency, eliminating the need for manually writing test scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115547395B_ABST
    Figure CN115547395B_ABST
Patent Text Reader

Abstract

This application relates to the field of storage device applications and discloses a testing method, system, and flash memory device. The method includes: after the host completes a first test on the flash memory device, obtaining a write configuration table command sent by the host, wherein the write configuration table command includes a configuration table, and the configuration table includes test items; writing the obtained configuration table to the non-volatile flash memory of the flash memory device; after the flash memory device is disconnected from the host and powered on again, starting the self-test firmware and reading the configuration table from the non-volatile flash memory; parsing the read configuration table and obtaining the test items in the configuration table; and performing a second test on the flash memory device according to the obtained test items in the configuration table, wherein the test time of the second test is longer than the test time of the first test. Through the above method, this application embodiment enables the second test to be performed independently of the host, requiring only powering on the flash memory device, with the firmware completing the second test itself, thereby reducing testing costs and improving testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage device applications, and in particular to a testing method, system, and flash memory device. Background Technology

[0002] Flash memory devices, such as solid state drives (SSDs), are hard drives made using solid-state electronic storage chip arrays. They consist of a controller chip, NAND flash memory chips, DRAM flash memory chips, and other peripheral devices.

[0003] With the continuous development of flash memory devices, their demand is constantly expanding, and application scenarios and fields are also increasing, posing a significant challenge to the reliability and stability of flash memory devices. Each component has its unique failure rate during the lifecycle of an SSD, especially the controller chip, NAND, DRAM, and some key peripheral devices. In order to ensure the stable operation of shipped flash memory devices under various combined and harsh scenarios and guarantee their reliability, pre-production testing must cover as many basic usage scenarios as possible, such as: functional testing of components, reliability testing, and some routine testing items.

[0004] Currently, mass production testing is typically conducted by combining a test host with a flash memory device. This approach usually involves the flash memory device providing user interface commands, and testers writing corresponding test scripts or executing test tools through the interface provided by the firmware to perform mass production testing on the flash memory device.

[0005] However, this method is limited by the number of test hosts that can be installed. If multiple flash memory devices need to be mass-produced, multiple test hosts are required, resulting in high testing costs. Furthermore, firmware developers and testers need to write corresponding test scripts or execute test tools for testing, which leads to low testing efficiency. Summary of the Invention

[0006] This application provides a testing method, system, and flash memory device, which solves the current technical problems of high testing costs and low testing efficiency, reduces the testing cost of flash memory devices, and improves the testing efficiency of flash memory devices.

[0007] To address the aforementioned technical problems, the embodiments of this application provide the following technical solutions:

[0008] In a first aspect, embodiments of this application provide a testing method applied to a flash memory device, the method comprising:

[0009] After the host completes the first test on the flash memory device, the write configuration table command sent by the host is obtained. The write configuration table command includes a configuration table, which includes test items.

[0010] The obtained configuration table is written to the non-volatile flash memory of the flash device;

[0011] After the flash memory device is disconnected from the host and powered on again, the self-test firmware is started and the configuration table is read from the non-volatile flash memory.

[0012] Parse the read configuration table and obtain the test items from the configuration table;

[0013] Based on the test items in the obtained configuration table, a second test is performed on the flash memory device, wherein the test time of the second test is longer than that of the first test.

[0014] In some embodiments, after the flash memory device is disconnected from the host, the self-test firmware connects to the power supply platform, and the power supply platform powers on the flash memory device. The self-test firmware includes a first communication module, and the power supply platform includes a second communication module. The method further includes:

[0015] The first communication module receives communication commands sent by the second communication module in order to return test results and / or test status to the second communication module.

[0016] In some embodiments, after receiving the write configuration table command sent by the host, the method further includes:

[0017] The configuration table corresponding to the write configuration table command is validated, specifically including:

[0018] Perform a CRC check on the configuration table corresponding to the write configuration table command to determine the first check result.

[0019] In some embodiments, the method further includes:

[0020] Determine whether the first verification result matches the preset verification value;

[0021] If the first verification result matches the preset verification value, the configuration table is written to the non-volatile flash memory of the flash memory device, and a write success message is returned to the host.

[0022] If the first verification result does not match the preset verification value, a write failure message is returned to the host.

[0023] In some embodiments, after reading the configuration table from non-volatile flash memory, the method further includes:

[0024] The read configuration table is validated, specifically including:

[0025] Perform a CRC check on the read configuration table to determine the second check result.

[0026] In some embodiments, the method further includes:

[0027] Determine whether the second verification result matches the preset verification value;

[0028] If the second verification result matches the preset verification value, the self-test is confirmed to have started successfully, and the configuration table is parsed.

[0029] If the second verification result does not match the preset verification value, the self-test startup is determined to have failed, and the failure status code is updated.

[0030] In some embodiments, after starting the self-test firmware, the method further includes:

[0031] Obtain the test process log file and determine if there are any test items that need to be continued.

[0032] If there are test items that need to be continued, read the process record information, obtain the breakpoint task, and further determine whether the breakpoint task is a power failure test.

[0033] If the breakpoint task is a power-down test and the power-down test is a simulation test, then mark the breakpoint task as a simulation power-down task and execute the simulation power-down task.

[0034] If the breakpoint task is not a power-down test, then execute the breakpoint task;

[0035] If no test items are available on the next side, the configuration table is read from non-volatile memory.

[0036] In some embodiments, the first test includes a functional test of the flash memory device, and the second test includes a flash memory chip screening and aging test.

[0037] Secondly, embodiments of this application provide a testing system, the system comprising:

[0038] The self-start process control module is used to initiate self-start after the flash memory device is disconnected from the host and powered on again, and to call the configuration table processing module.

[0039] The configuration table processing module is used to parse the configuration table and obtain the test items in the configuration table;

[0040] The test module is used to test the test items in the configuration table, where each test item corresponds to one test module;

[0041] The communication module is used to connect to the communication module of the power supply platform to receive communication commands sent by the communication module of the power supply platform, or to return test results and / or test status to the communication module of the power supply platform.

[0042] The logging module is used to record test logs for the testing module.

[0043] Thirdly, a flash memory device includes:

[0044] At least one processor; and

[0045] A memory that is communicatively connected to at least one processor; wherein,

[0046] The memory stores instructions that can be executed by at least one processor, such that the at least one processor is able to perform the test method as described in the first aspect.

[0047] Fourthly, embodiments of this application also provide a non-volatile computer-readable storage medium storing computer-executable instructions for enabling a flash memory device to perform the test method as described in the first aspect.

[0048] The beneficial effects of this application embodiment are as follows: Unlike the prior art, this application embodiment provides a testing method applied to a flash memory device. The method includes: after the host completes a first test on the flash memory device, obtaining a write configuration table command sent by the host, wherein the write configuration table command includes a configuration table, and the configuration table includes test items; writing the obtained configuration table to the non-volatile flash memory of the flash memory device; after the flash memory device is disconnected from the host and powered on again, starting the self-test firmware and reading the configuration table from the non-volatile flash memory; parsing the read configuration table and obtaining the test items in the configuration table; and performing a second test on the flash memory device according to the obtained test items in the configuration table, wherein the test time of the second test is longer than the test time of the first test.

[0049] After the host completes the first test, the configuration table is written to the flash memory device. This allows the flash memory device to start the self-test firmware to complete the second test after connecting to the host port and being powered on again. Since the test time for the second test is longer than that for the first test, the second test is independent of the host. Only the flash memory device needs to be powered on, and the firmware completes the second test itself. This reduces the host's resource consumption and thus lowers the testing cost. Furthermore, the test can be performed without the need for testers to write test scripts, thereby improving testing efficiency. Attached Figure Description

[0050] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0051] Figure 1 This is a schematic diagram illustrating a host testing an SSD, as provided in an embodiment of this application.

[0052] Figure 2 This is a schematic diagram of the structure of a flash memory device provided in an embodiment of this application;

[0053] Figure 3 This is a flowchart illustrating a testing method provided in an embodiment of this application;

[0054] Figure 4 This is a schematic diagram illustrating a staged test of a flash memory device provided in an embodiment of this application;

[0055] Figure 5 This is a schematic diagram of a process for writing to a configuration table provided in an embodiment of this application;

[0056] Figure 6 This is a schematic diagram of a second test provided in an embodiment of this application;

[0057] Figure 7 This is a schematic diagram illustrating the interaction between a power supply platform and self-test firmware provided in an embodiment of this application;

[0058] Figure 8 This is a schematic diagram of the overall process of a testing method provided in an embodiment of this application;

[0059] Figure 9 This is a schematic diagram of a log processing flow provided in an embodiment of this application;

[0060] Figure 10 This is a schematic diagram of the structure of a testing system provided in an embodiment of this application;

[0061] Figure 11 This is a schematic diagram illustrating the interaction between a self-test firmware and a power supply platform provided in an embodiment of this application;

[0062] Figure 12 This is a schematic diagram of another flash memory device provided in an embodiment of this application. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0064] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.

[0065] The technical solution of this application will be described in detail below with reference to the accompanying drawings:

[0066] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating a host testing an SSD, as provided in an embodiment of this application.

[0067] like Figure 1 As shown, the test host tests multiple SSDs by generating mass production scripts. That is, multiple SSDs are tested by writing corresponding test scripts. However, this method is limited by the number of test hosts that can be installed. If multiple SSDs need to be mass-produced, multiple test hosts are required, resulting in high testing costs. Furthermore, firmware developers and testers need to write corresponding test scripts or execute test tools for testing, resulting in low testing efficiency.

[0068] Based on this, embodiments of this application provide a testing method to reduce testing costs and improve testing efficiency.

[0069] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of a flash memory device provided in an embodiment of this application;

[0070] like Figure 2 As shown, the flash memory device 100 includes a flash memory medium 110 and a controller 120 connected to the flash memory medium 110. The flash memory device 100 communicates with the host 200 via wired or wireless means to enable data exchange.

[0071] Flash memory medium 110, as the storage medium of flash memory device 100, is also called flash memory, Flash, Flash memory or Flash chip. It is a type of storage device and is a non-volatile memory that can retain data for a long time even without a current supply. Its storage characteristics are equivalent to hard disk, which makes flash memory medium 110 the basis for the storage medium of various portable digital devices.

[0072] The controller 120 includes a data converter 121, a processor 122, a cache 123, a flash memory controller 124, and an interface 125.

[0073] Data converter 121, connected to processor 122 and flash memory controller 124 respectively, is used to convert binary data to hexadecimal data and vice versa. Specifically, when flash memory controller 124 writes data to flash memory medium 110, data converter 121 converts the binary data to be written into hexadecimal data before writing it to flash memory medium 110. When flash memory controller 124 reads data from flash memory medium 110, data converter 121 converts the hexadecimal data stored in flash memory medium 110 into binary data, and then reads the converted data from the binary data page register. Data converter 121 may include a binary data register and a hexadecimal data register. The binary data register can be used to store data converted from hexadecimal to binary, and the hexadecimal data register can be used to store data converted from binary to hexadecimal.

[0074] The processor 122 is connected to the data converter 121, the cache 123, the flash memory controller 124, and the interface 125, respectively. The processor 122 can be connected to the data converter 121, the cache 123, the flash memory controller 124, and the interface 125 via a bus or other means. The processor is used to run non-volatile software programs, instructions, and modules stored in the cache 123, thereby implementing any method embodiment of this application.

[0075] The buffer 123 is mainly used to buffer the read / write commands sent by the host 200 and the read or write data obtained from the flash memory medium 110 according to the read / write commands sent by the host 200.

[0076] The flash controller 124 is connected to the flash media 110, the data converter 121, the processor 122, and the cache 123. It is used to access the back-end flash media 110 and manage various parameters and data I / O of the flash media 110; or, it is used to provide access interfaces and protocols, implement the corresponding SAS / SATA target protocol or NVMe protocol, obtain I / O instructions issued by the host 200, decode and generate internal private data results for execution; or, it is used to be responsible for the core processing of the flash translation layer (FTL).

[0077] Interface 125 connects host 200, data converter 121, processor 122, and buffer 123. It is used to receive data sent by host 200 or data sent by processor 122, so as to realize data transmission between host 200 and processor 122. Interface 125 can be SATA-2 interface, SATA-3 interface, SAS interface, MSATA interface, PCI-E interface, NGFF interface, CFast interface, SFF-8639 interface, and M.2 NVME / SATA protocol.

[0078] Please see Figure 3 , Figure 3 This is a flowchart illustrating a testing method provided in an embodiment of this application;

[0079] This test method is applied to flash memory devices, and specifically, the test method is executed by one or at least two processors of the flash memory device.

[0080] like Figure 3 As shown, the test method includes:

[0081] Step S301: After the host completes the first test on the flash memory device, obtain the write configuration table command sent by the host, wherein the write configuration table command includes a configuration table, and the configuration table includes test items;

[0082] Specifically, the first test includes functional testing of the flash memory device, such as testing the functionality of each peripheral device of the flash memory device, hardware connectivity testing, and other tests.

[0083] Understandably, since the first test takes less time and has a smaller impact on the overall test process, the first test is completed by the host in conjunction with the flash memory device.

[0084] After the host completes the first test on the flash memory device, the host sends a write configuration table command to the flash memory device. The write configuration table command is used to write the configuration table to the flash memory device. The configuration table includes test items, which are executed by the firmware of the flash memory device to perform the corresponding test on the flash memory device.

[0085] Please refer to the following: Figure 4 , Figure 4 This is a schematic diagram illustrating a staged test of a flash memory device provided in an embodiment of this application;

[0086] like Figure 4As shown, the phased testing of flash memory devices includes two phases: a first test and a second test. After the first test is completed, the host sends a write configuration table command to the flash memory device under test. The write configuration table command includes the configuration table. That is, after the first test is completed, the configuration table is written to the flash memory device under test.

[0087] It is understood that the flash memory device to be tested in this application embodiment can be one or at least two. After multiple flash memory devices to be tested are written into the configuration table, mass production testing can be achieved.

[0088] Step S302: Write the obtained configuration table to the non-volatile flash memory of the flash memory device;

[0089] Specifically, the flash memory device receives a write configuration table command sent by the host, parses the write configuration table command to obtain the configuration table corresponding to the write configuration table command, and writes the obtained configuration table to the non-volatile flash memory of the flash memory device. The non-volatile flash memory includes NOR Flash, such as Parallel NOR Flash and Serial (SPI) NOR Flash. Preferably, the non-volatile flash memory in this embodiment is SPI NOR Flash.

[0090] In this embodiment of the application, after obtaining the write configuration table command sent by the host, the method further includes:

[0091] The configuration table corresponding to the write configuration table command is validated, specifically including:

[0092] Perform a CRC check on the configuration table corresponding to the write configuration table command to determine the first check result.

[0093] Specifically, CRC, or Cyclic Redundancy Check, is an error-checking code in which the lengths of the information field and the check field can be arbitrarily selected. CRC check is used to calculate this cyclic redundancy check code.

[0094] In the application embodiment, assuming that the information field of the configuration table corresponding to the write configuration table command is K bits, that is, the information code is K bits, then the CRC check of the configuration table corresponding to the write configuration table command includes: concatenating an R-bit check code after the K-bit information code of the configuration table, so that the length of the concatenated code is N bits, the information field is K bits, and the check field is R bits.

[0095] For the concatenated code corresponding to the configuration table, there exists a polynomial G(x) with a highest power of NK = R. A checksum of K bits can be generated based on G(x), and G(x) is called the generator polynomial of the concatenated code. The specific generation process of the cyclic redundancy check (CRC) code includes: assuming the concatenated code is represented by the polynomial C(X), shifting C(x) left by R bits results in C(x) * x raised to the power of R. This leaves R empty bits on the right side of C(x), which are the positions of the CRC checksum. The remainder obtained by dividing C(x) * x raised to the power of R by the generator polynomial G(x) is the CRC checksum, i.e., the first check result, which is the CRC check value.

[0096] In some embodiments, the method further includes:

[0097] Determine whether the first verification result matches the preset verification value;

[0098] If the first verification result matches the preset verification value, the configuration table is written to the non-volatile flash memory of the flash memory device, and a write success message is returned to the host.

[0099] If the first verification result does not match the preset verification value, a write failure message is returned to the host.

[0100] It is understandable that the preset check value is stored in the configuration table. The preset check value is also obtained by performing a CRC check on the configuration table. The calculation process is the same as the calculation process described above, and will not be repeated here.

[0101] Specifically, after the self-test firmware reads the configuration table, it performs a CRC check on the configuration table to obtain a first check result. The first check result is compared with a preset check value. If the first check result is the same as the preset check value, the configuration table is written to the non-volatile flash memory of the flash memory device, and a write success message is returned to the host. If the first check result is different from the preset check value, a write failure message is returned to the host.

[0102] Please refer to the following: Figure 5 , Figure 5 This is a schematic diagram of a process for writing to a configuration table provided in an embodiment of this application;

[0103] like Figure 5 As shown, the process of writing to the configuration table includes:

[0104] Step S501: Generate the configuration table;

[0105] Specifically, the configuration table includes test items, which are stored in the form of binary files. A predefined configuration protocol is used to convert the test item into a binary file. At least one test item is converted into a binary file and stored in the configuration table. The configuration table uses a fixed-size space to store each binary file. For example, the configuration table consists of a header file space and a test item file space. The header file space is used to store header files, and the test item file space is used to store the corresponding binary files of the test items. For example, the size of the header file space of the configuration table is 16 bytes, and the binary file corresponding to each test item is stored in a space of 64 bytes.

[0106] In this embodiment of the application, since a predefined configuration protocol is used, testers can flexibly configure test items according to the configuration protocol, which is beneficial for performing targeted module testing or retesting, thereby improving testing efficiency.

[0107] Step S502: Send the command to write the configuration table;

[0108] Specifically, the host sends the write configuration table command to the self-test firmware of the flash memory device.

[0109] Step S503: Receive the command to write the configuration table and obtain the configuration table;

[0110] Specifically, the self-test firmware of the flash memory device receives the write configuration table command, parses the write configuration table command, and obtains the configuration table corresponding to the write configuration table command.

[0111] Step S504: Verify the configuration table to obtain the first verification result;

[0112] Specifically, the verification method includes CRC verification, which verifies the configuration table. This includes performing CRC verification on the configuration table to obtain a first verification result, where the first verification result includes the CRC verification value.

[0113] Step S505: Does the first verification result match the preset verification value?

[0114] It is understandable that the configuration table includes preset checksums, that is, the preset checksums are stored in the configuration table, for example, in the header file of the configuration table.

[0115] After performing a CRC check on the configuration table and obtaining the first check result, the first check result is compared with a preset check value. That is, the CRC check value is compared with the preset check value. If the first check result is the same as the preset check value, it is determined that the first check result matches the preset check value, and then proceed to step S506; if the first check result is different from the preset check value, it is determined that the first check result does not match the preset check value, and then proceed to step S508.

[0116] Step S506: Write the configuration table to non-volatile flash memory;

[0117] Specifically, the firmware of the flash memory device writes this configuration table to the non-volatile flash memory of the flash memory device, such as Spinor Flash.

[0118] Step S507: Return a write success message to the host;

[0119] Specifically, after successfully writing the configuration table to the non-volatile flash memory of the flash device, a write success message is returned to the host to confirm that the write configuration table command was executed successfully.

[0120] Step S508: Return a write failure message to the host;

[0121] Specifically, if the verification result does not match the preset verification value, a write failure message is returned to the host so that the host can confirm that the write configuration table command has failed.

[0122] Step S303: After the flash memory device is disconnected from the host and powered on again, start the self-test firmware and read the configuration table from the non-volatile flash memory;

[0123] Specifically, after the flash memory device is disconnected from the host, the self-test firmware connects to the power supply platform, which then powers on the flash memory device. After the flash memory device is powered on again, the self-test firmware is started and reads the configuration table from the non-volatile flash memory.

[0124] In some embodiments, after reading the configuration table from non-volatile flash memory, the method further includes:

[0125] The read configuration table is validated, specifically including:

[0126] Perform a CRC check on the read configuration table to determine the second check result.

[0127] In some embodiments, the method further includes:

[0128] Determine whether the second verification result matches the preset verification value;

[0129] If the second verification result matches the preset verification value, the self-test is confirmed to have started successfully, and the configuration table is parsed.

[0130] If the second verification result does not match the preset verification value, the self-test startup is determined to have failed, and the failure status code is updated.

[0131] Please refer to the following: Figure 6 , Figure 6 This is a schematic diagram of a second test provided in an embodiment of this application;

[0132] like Figure 6 As shown, the procedure for the second test includes:

[0133] Step S601: Power on the flash memory device;

[0134] Specifically, after the flash memory device is disconnected from the host, the self-test firmware connects to the power supply platform, which then powers on the flash memory device. The power supply platform can be any platform, such as a power source that matches the flash memory device, like a battery or power bank.

[0135] Step S602: Read the configuration table in the non-volatile flash memory;

[0136] Specifically, the self-test firmware reads the configuration table from the non-volatile flash memory of the flash memory device.

[0137] Step S603: Verify the configuration table and determine the second verification result;

[0138] Specifically, the self-test firmware verifies the read configuration table, including:

[0139] Perform a CRC check on the read configuration table to determine the second check result, which includes the CRC check value.

[0140] Step S604: Does the second verification result match the preset verification value?

[0141] It is understandable that the configuration table includes preset checksums, that is, the preset checksums are stored in the configuration table, for example, in the header file of the configuration table.

[0142] After performing a CRC check on the configuration table and obtaining the second check result, the second check result is compared with a preset check value. That is, the CRC check value is compared with the preset check value. If the second check result is the same as the preset check value, it is determined that the second check result matches the preset check value, and then proceed to step S605; if the second check result is different from the preset check value, it is determined that the second check result does not match the preset check value, and then proceed to step S608.

[0143] Step S605: Self-test startup successful;

[0144] Specifically, a successful self-test startup includes: the self-test firmware successfully starting, and the configuration table successfully being retrieved.

[0145] Step S606: Parse the configuration table;

[0146] Specifically, if the self-test starts successfully, the self-test firmware parses the obtained configuration table to obtain the test items included in the configuration table, that is, to obtain the self-test items included in the configuration table.

[0147] Step S607: Execute subsequent test items;

[0148] Specifically, the self-test firmware executes the test items included in the configuration table, i.e., the self-test items.

[0149] Step S608: Self-test startup failed;

[0150] Specifically, self-test startup failure includes: self-test firmware startup failure, and / or, configuration table retrieval failure.

[0151] Step S609: Update the failure status code.

[0152] Specifically, if the self-test startup fails, the failure status code is updated and saved to the non-volatile flash memory of the flash device.

[0153] It is understandable that after the flash memory device writes the obtained configuration table to the non-volatile flash memory, it is equivalent to loading the test items into the flash memory device. At this time, in order to reduce the resource consumption of the flash memory device on the host, this embodiment disconnects the flash memory device from the host and switches to any power supply platform, which supplies power to the flash memory device. This enables the second test of the flash memory device, thereby reducing the test cost. Furthermore, the second test can be performed without the testers writing test scripts, thereby improving the test efficiency.

[0154] Please refer to the following: Figure 4 ,like Figure 4 As shown, the flash memory device is powered by a power supply platform, which enables the second test of the flash memory device. It is understood that the power supply platform in this embodiment can be one or multiple; for example, one flash memory device may correspond to one power supply platform, or multiple flash memory devices may correspond to one power supply platform. This is not limited here, and all are within the scope of protection of this application.

[0155] Step S304: Parse the read configuration table and obtain the test items in the configuration table;

[0156] Specifically, the configuration table is parsed and read from the self-test firmware, and the test items in the test item file space of the configuration table are obtained.

[0157] Step S305: Perform a second test on the flash memory device according to the test items in the obtained configuration table, wherein the test time of the second test is longer than that of the first test.

[0158] Specifically, the test items in the test item file space of the configuration table are executed sequentially, one by one. The second test ends after all test items have been executed.

[0159] In this embodiment, the first test includes a functional test of the flash memory device, and the second test includes a flash memory chip selection and aging test. It is understood that the chip selection and aging test requires a longer testing time than the functional test. Therefore, after performing the first test on the flash memory device using the host computer, the second test is performed on the power supply platform, thereby freeing up more host resources and reducing testing costs. Furthermore, after the power supply platform supplies power to the flash memory device, the flash memory device's self-test firmware can perform self-testing, which improves testing efficiency.

[0160] In this embodiment of the application, after performing a second test on the flash memory device, the method further includes:

[0161] A third test is performed on the flash memory device, which includes business testing.

[0162] Specifically, after the flash memory device is disconnected from the host, the self-test firmware connects to the power supply platform, which then powers on the flash memory device. The self-test firmware includes a first communication module, and the power supply platform includes a second communication module. The method also includes:

[0163] The first communication module receives communication commands sent by the second communication module in order to return test results and / or test status to the second communication module.

[0164] For details, please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram illustrating the interaction between a power supply platform and self-test firmware provided in an embodiment of this application;

[0165] like Figure 7 As shown, the interaction between the power supply platform and the self-test firmware includes:

[0166] Step S701: Send command;

[0167] Specifically, the power supply platform sends a communication command to the self-test firmware, which is used to make the self-test firmware return to the test state.

[0168] Step S702: Receive command;

[0169] Specifically, the self-test firmware receives communication commands sent by the power supply platform.

[0170] Step S703: Parse the command;

[0171] Specifically, the self-test firmware parses the communication command.

[0172] Step S704: Execute the command;

[0173] Specifically, the self-test firmware executes the communication command and generates a command status, which includes the test status of the test item.

[0174] Step S705: Return to command status.

[0175] Specifically, the self-test firmware returns a command status to the power supply platform, which includes the test status of the test items.

[0176] In some embodiments, after starting the self-test firmware, the method further includes:

[0177] Obtain the test process log file and determine if there are any test items that need to be continued.

[0178] If there are test items that need to be continued, read the process record information, obtain the breakpoint task, and further determine whether the breakpoint task is a power failure test.

[0179] If the breakpoint task is a power-down test and the power-down test is a simulation test, then mark the breakpoint task as a simulation power-down task and execute the simulation power-down task.

[0180] If the breakpoint task is not a power-down test, then execute the breakpoint task;

[0181] If no test items are available on the next side, the configuration table is read from non-volatile memory.

[0182] For details, please refer to [link / reference]. Figure 8 , Figure 8 This is a schematic diagram of the overall process of a testing method provided in an embodiment of this application;

[0183] like Figure 8 As shown, the overall process of this testing method includes:

[0184] Step S801: Self-test firmware startup;

[0185] Specifically, the self-test firmware automatically boots up after the flash memory device is powered on.

[0186] Step S802: Review the test process record;

[0187] Specifically, the test process record can be checked in the self-test firmware. This test process record is used to record the completion status of test items, such as whether there are any test items that need to be continued.

[0188] Step S803: Are there any test items to be continued?

[0189] Specifically, the self-test firmware determines whether there are any test items for continued testing. If yes, proceed to step S814; otherwise, proceed to step S804.

[0190] Step S804: Read the configuration table;

[0191] Specifically, if there are no test items to continue testing, the configuration table in the non-volatile flash memory is read.

[0192] Step S805: Does the configuration table contain any test items?

[0193] Specifically, it determines whether there are test items in the configuration table. The configuration table may include one or more test items, or there may be no test items in the configuration table.

[0194] If there are no test items in the configuration table, proceed to step S812;

[0195] If at least one test item exists in the configuration table, proceed to step S806;

[0196] Step S806: Verify whether the verification result matches the preset verification value;

[0197] Specifically, a CRC check is performed on the configuration table to determine the check result. The check result includes a CRC check value. If the CRC check value matches a preset check value that is stored in the configuration table, then proceed to step S807; if the CRC check value does not match a preset check value that is stored in the configuration table, then proceed to step S812.

[0198] Step S807: Execute the current test project;

[0199] Specifically, the current test item is the first test item in the configuration table, or, based on the process record information, the current test item is the first incomplete test item in the process record information.

[0200] In this embodiment of the application, the execution of the test project is completed by the test module. The test module is used to execute the mass production test involved in the configuration protocol. Each test module can independently develop the required tests and then allocate the corresponding command code in the configuration protocol. After the command code is parsed, it jumps to the corresponding test module to perform the test of the corresponding test project.

[0201] In this embodiment, the testing module is used to centralize long-term aging tests into the self-test firmware, thereby eliminating the need for host software control while still achieving the desired testing results. It is understood that the testing module can be specifically designed according to specific needs; for example, one testing module may correspond to one test item, or one testing module may correspond to at least two test items, thus improving its flexibility and portability.

[0202] Step S808: Record the test process;

[0203] Specifically, record the testing process of the current test project, such as the parameters during the test, and record the test results after the current test project is completed.

[0204] Step S809: Is the test result normal?

[0205] Specifically, determine whether the test result of the current test item is normal. If yes, proceed to step S810; otherwise, proceed to step S813.

[0206] Step S810: Update the test status;

[0207] Specifically, if the test result of the current test item is abnormal, the test status is updated, that is, the test status is updated to test abnormal, and after updating the test status, the process proceeds to step S812.

[0208] Step S811: Is the test project complete?

[0209] Specifically, determine whether all test items in the configuration table have been tested. If yes, proceed to step S811; otherwise, return to step S807, that is, execute the next test item and use the next test item as the current test item.

[0210] Step S812: End the second test and wait for the third test;

[0211] Specifically, if all test items in the configuration table have been completed, the second test ends, and the system awaits the third test. The third test includes business tests, such as tests of basic read and write tasks.

[0212] Step S813: Update test status;

[0213] Specifically, if the test result of the current test item is normal, then the test status is updated, that is, the test status is updated to test normal.

[0214] Step S814: Read the process log information and find the breakpoint task;

[0215] Specifically, if there are test items that need to be continued, the process log information is read to find the breakpoint task.

[0216] Step S815: Is the breakpoint task a power-down test?

[0217] Specifically, determine whether the breakpoint task is a power failure test; if yes, proceed to step S817; if no, proceed to step S816.

[0218] Step S816: Start the breakpoint task;

[0219] Specifically, if the breakpoint task is a power-down test, then the breakpoint task is started, and further proceed to step S806: determine whether the verification result matches the preset verification value.

[0220] Step S817: Is the breakpoint task a simulated power failure?

[0221] Specifically, determine the breakpoint task, i.e. whether the power failure test is a simulated power failure, such as a power failure simulated by a hardware dongle. If yes, proceed to step S818; otherwise, proceed to step S819.

[0222] Step S818: Mark the current task as a simulated power failure task;

[0223] Step S819: Identify abnormal power failure;

[0224] Specifically, if the breakpoint task is determined to be due to an abnormal power outage.

[0225] In this embodiment of the application, by determining whether the power supply platform has lost power, functions such as power-on breakpoint continuation testing are realized, which can better achieve self-testing.

[0226] Understandably, logs are crucial analytical data for firmware developers during debugging or data analysis. Since NAND flash memory undergoes continuous read, write, and erase operations during testing, it cannot persistently store logs. Therefore, this application saves the logs to non-volatile flash memory to achieve log persistence.

[0227] For details, please refer to [link / reference]. Figure 9 , Figure 9 This is a schematic diagram of a log processing flow provided in an embodiment of this application;

[0228] like Figure 9 As shown, the log processing flow includes:

[0229] Step S901: Log initialization;

[0230] Specifically, initialize the flash memory device's logs, for example, by clearing them.

[0231] Step S902: Generate a log;

[0232] Specifically, test logs are continuously generated during the operation of the flash memory device.

[0233] Step S903: Update the log;

[0234] Step S904: Update log management information;

[0235] Step S905: Check if the down-scrolling threshold has been reached;

[0236] Specifically, determine whether the amount of log data has reached the refresh threshold; if yes, proceed to step S906; if no, proceed to step S907.

[0237] Step S906: Flush to non-volatile flash memory;

[0238] Specifically, the logs are flushed to the non-volatile flash memory of the flash storage device.

[0239] Step S907: Is the power off?

[0240] Specifically, determine whether the flash memory device has lost power. If yes, proceed to step S908; otherwise, proceed to step S902.

[0241] Step S908: Force refresh.

[0242] Specifically, if the flash memory device loses power, the logs will be forcibly flushed to the non-volatile flash memory of the flash memory device.

[0243] Please refer to the following: Figure 10 , Figure 10 This is a schematic diagram of the structure of a testing system provided in an embodiment of this application;

[0244] The testing system is subordinate to the self-test firmware of the flash memory device, such as the SSD firmware, and is used to perform self-tests on the flash memory device.

[0245] like Figure 10 As shown, the test system 1000 includes:

[0246] The self-start process control module 1001 is connected to the configuration table processing module 1002, which is used to perform self-start after the flash device is disconnected from the host and powered on again, and to call the configuration table processing module 1002.

[0247] The configuration table processing module 1002 is connected to the self-starting process control module 1001 and the test module 1003, and is used to parse the configuration table and obtain the test items in the configuration table.

[0248] Specifically, the configuration table processing module 1002 is used to obtain the configuration table in the non-volatile flash memory of the flash memory device and parse the configuration table to obtain at least one test item contained in the configuration table.

[0249] Test module 1003 is connected to configuration table processing module 1002 and is used to test the test items in the configuration table. Each test item corresponds to one test module.

[0250] Specifically, after the configuration table processing module 1002 parses the test items in the configuration table, it controls the test module to test at least one test item, wherein each test item corresponds to one test module, or multiple test items correspond to one test module.

[0251] The communication module 1004 connects to the test module 1003 and is used to communicate with the communication module of the power supply platform to receive communication commands sent by the communication module of the power supply platform, or to return test results and / or test status to the communication module of the power supply platform.

[0252] Specifically, the communication module 1004 is used to connect to the communication module of the power supply platform to receive communication commands sent by the communication module of the power supply platform, or to return test results and / or test status to the communication module of the power supply platform; or, the communication module 1004 is also connected to the log module 1005 to return test logs to the power supply platform.

[0253] Log module 1005 is connected to test module 1003 and is used to record test logs of test module 1003.

[0254] In this embodiment of the application, the log module 1005 is also used to record log information of other operations, such as: test log of the first test, test log of the third test, and logs of basic operations such as reading, writing, and erasing.

[0255] For details, please refer to [link / reference]. Figure 11 , Figure 11 This is a schematic diagram illustrating the interaction between a self-test firmware and a power supply platform provided in an embodiment of this application;

[0256] like Figure 11 The self-test firmware includes: a self-starting process control module, a configuration table processing module, a test module, a log module, and a first communication module; the power supply platform includes a second communication module.

[0257] Upon power-up, the self-starting process control module initiates a self-starting process. Within a loop, this module calls the configuration table processing module. This module retrieves the configuration table from the non-volatile flash memory of the flash device, parses it to obtain the test items, and then calls the corresponding test items from the test module to perform the tests. Each test item is tested in a preset order, and this process continues until all test items are completed or a failed test item is encountered.

[0258] During testing, generated logs are stored in non-volatile flash memory, such as Spinor Flash, via a logging module. This allows for log retrieval and analysis of self-test results after the second test and before the third test. Simultaneously, each test generates test results and / or test status upon completion, including test progress.

[0259] When the power supply platform needs to know the test results and / or test status of at least one test item, it can send a communication command to the first communication module of the self-test firmware through the second communication module. Upon receiving the communication command, the communication module of the self-test firmware will return the test results and / or test status corresponding to at least one test item to the power supply platform. It is understood that the power supply platform may include a display screen, allowing the tester to see the test results and / or test status in real time.

[0260] In this embodiment, the first communication module and the second communication module communicate via PCIe protocol, SATA standard protocol, System Management Bus (SMBUS), or serial port mode. Preferably, the first communication module and the second communication module in this application communicate via System Management Bus or serial port mode, so that the power supply platform only needs to meet the requirements of SMBUS or serial port communication, thereby reducing the cost of flash memory devices.

[0261] Understandably, during the third test, the log module will also store the test log analysis results of the third test.

[0262] In this embodiment, since the second test does not require communication between the flash memory device and the host, but is integrated into the self-test firmware of the flash memory device, mass production testing can be performed independently of the host, making the flash memory device autonomously controllable throughout the mass production process. Therefore, the host's functions can be realized through the power supply platform, thereby reducing host resource consumption and testing costs. Furthermore, the method of loading test items through a configuration table provides firmware developers and testers with greater flexibility; for example, different tests can be performed for different flash memory devices. Simultaneously, since no modification to test scripts is required, developers can reduce the amount of code, making repetitive and multiple tests more convenient.

[0263] In this embodiment of the application, a testing method is provided for a flash memory device. The method includes: after the host completes a first test on the flash memory device, obtaining a write configuration table command sent by the host, wherein the write configuration table command includes a configuration table, and the configuration table includes test items; writing the obtained configuration table to the non-volatile flash memory of the flash memory device; after the flash memory device is disconnected from the host and powered on again, starting the self-test firmware and reading the configuration table from the non-volatile flash memory; parsing the read configuration table and obtaining the test items in the configuration table; and performing a second test on the flash memory device according to the obtained test items in the configuration table, wherein the test time of the second test is longer than the test time of the first test.

[0264] After the host completes the first test, the configuration table is written to the flash memory device. This allows the flash memory device to start the self-test firmware to complete the second test after connecting to the host port and being powered on again. Since the test time for the second test is longer than that for the first test, the second test is independent of the host. Only the flash memory device needs to be powered on, and the firmware completes the second test itself. This reduces the host's resource consumption and thus lowers the testing cost. Furthermore, the test can be performed without the need for testers to write test scripts, thereby improving testing efficiency.

[0265] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of a flash memory device provided in an embodiment of this application;

[0266] like Figure 12 As shown, the flash memory device 1200 includes one or more processors 1201 and memory 1202. Wherein, Figure 12 Take a processor 1201 as an example.

[0267] Processor 1201 and memory 1202 can be connected via a bus or other means. Figure 12 Taking the example of a connection between China and Israel via a bus.

[0268] The memory 1202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 1201 executes various functional applications and data processing of the test method by running the non-volatile software programs, instructions, and modules stored in the memory 1202, thereby implementing the test method of the above-described embodiment. This test method can be executed by various electronic devices with certain logic processing capabilities, such as control chips.

[0269] Memory 1202 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 1202 may optionally include memory remotely located relative to processor 1201, and these remote memories may be connected to processor 1201 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0270] The module is stored in memory 1202 and, when executed by one or more processors 1201, performs the test method in any of the above method embodiments, including:

[0271] After the host completes the first test on the flash memory device, the system receives a write configuration table command sent by the host. The write configuration table command includes a configuration table, which includes test items. The system writes the obtained configuration table to the non-volatile flash memory of the flash memory device. After the flash memory device is disconnected from the host and powered on again, the system starts the self-test firmware and reads the configuration table from the non-volatile flash memory. The system parses the read configuration table and obtains the test items in the configuration table. Based on the obtained test items in the configuration table, the system performs a second test on the flash memory device, wherein the test time of the second test is longer than that of the first test.

[0272] After the host completes the first test, the configuration table is written to the flash memory device. This allows the flash memory device to start the self-test firmware to complete the second test after connecting to the host port and being powered on again. Since the test time for the second test is longer than that for the first test, the second test is independent of the host. Only the flash memory device needs to be powered on, and the firmware completes the second test itself. This reduces the host's resource consumption and thus lowers the testing cost. Furthermore, the test can be performed without the need for testers to write test scripts, thereby improving testing efficiency.

[0273] This application also provides a non-volatile computer storage medium storing computer-executable instructions that are executed by one or more processors. For example, the one or more processors can execute the test method in any of the above method embodiments, such as executing the test method in any of the above method embodiments, or executing the steps described above.

[0274] The apparatus or device embodiments described above are merely illustrative. The unit modules described as separate components may or may not be physically separate, and the components shown as module units may or may not be physical units; that is, they may be located in one place or distributed across multiple network module units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0275] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions for a computer device (which may be a personal computer, server, or network device, etc.) to execute the various embodiments or some parts of the embodiments.

[0276] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of this application as described above. For the sake of brevity, they are not provided in detail; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A testing method, characterized in that, Applied to a flash memory device, the method includes: After the host completes the first test on the flash memory device, a write configuration table command sent by the host is obtained, wherein the write configuration table command includes a configuration table, and the configuration table includes test items; The obtained configuration table is written to the non-volatile flash memory of the flash memory device; After the flash memory device is disconnected from the host and powered on again, the self-test firmware is started and the configuration table is read from the non-volatile flash memory; Parse the read configuration table to obtain the test items in the configuration table; According to the test items in the obtained configuration table, a second test is performed on the flash memory device, wherein the test time of the second test is longer than the test time of the first test; After receiving the write configuration table command sent by the host, the method further includes: The configuration table corresponding to the write configuration table command is validated, specifically including: Perform a CRC check on the configuration table corresponding to the write configuration table command to determine the first check result; The method further includes: Determine whether the first verification result matches the preset verification value; If the first verification result matches the preset verification value, the configuration table is written to the non-volatile flash memory of the flash memory device, and a write success message is returned to the host. If the first verification result does not match the preset verification value, a write failure message is returned to the host.

2. The method according to claim 1, characterized in that, After the flash memory device is disconnected from the host, the self-test firmware connects to the power supply platform, which then powers on the flash memory device. The self-test firmware includes a first communication module, and the power supply platform includes a second communication module. The method further includes: The first communication module receives communication commands sent by the second communication module to return test results and / or test status to the second communication module.

3. The method according to claim 1 or 2, characterized in that, After reading the configuration table from the non-volatile flash memory, the method further includes: The read configuration table is validated, specifically including: Perform a CRC check on the read configuration table to determine the second check result.

4. The method according to claim 3, characterized in that, The method further includes: Determine whether the second verification result matches the preset verification value; If the second verification result matches the preset verification value, then the self-test is determined to have started successfully, and the configuration table is parsed. If the second verification result does not match the preset verification value, the self-test startup is determined to have failed, and the failure status code is updated.

5. The method according to claim 1 or 2, characterized in that, After the self-test firmware is started, the method further includes: Obtain the test process log file and determine if there are any test items that need to be continued. If there are test items that need to be continued, read the process record information, obtain the breakpoint task, and further determine whether the breakpoint task is a power failure test. If the breakpoint task is a power-down test and the power-down test is a simulation test, then mark the breakpoint task as a simulated power-down task and execute the simulated power-down task. If the breakpoint task is not a power-down test, then execute the breakpoint task; If there are no subsequent test items, the configuration table is read from the non-volatile flash memory.

6. The method according to claim 1 or 2, characterized in that, The first test includes functional testing of the flash memory device, and the second test includes aging and screening testing of the flash memory device.

7. A flash memory device, characterized in that, include: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the test method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Storage equipment testing method and device, television and storage medium

    CN113077834A

  • Test configuration method and device

    WO2017162210A1