Solid state disk PLN function verification method and device, equipment and storage medium

Through the test method of using the microcontroller unit MCU to control PLN function in SSD, the problem of the inability to perform PLN function testing of NVMe M.2 SSD products in the prior art is solved, and automated testing and precise control of PLN function are realized, and testing efficiency and compatibility are improved.

CN120340586APending Publication Date: 2025-07-18MEMORIGHT (WUHAN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510291038.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing technology cannot perform PLN function testing of NVMe M.2 SSD products. The test host cannot directly send PLN# signals, cannot perform precise control, and the test platform is limited, so it cannot simulate the SSD firmware behavior under normal and abnormal timing.

Method used

The test tool sends a write command to the SSD, and uses the microcontroller unit MCU to control the test of the PLN function. After the detection data is written, the verification command is sent, and the stored data is compared with the data to be written. The verification process is completed when the preset conditions are met, and the automated testing of the PLN function is realized.

Benefits of technology

It realizes the automated testing of PLN function of SSD, which is suitable for different test platforms, is compatible and versatile, and can accurately control the timing and timing of PLN# signals, which is convenient for debugging and analysis by firmware development engineers, shortens the R&D cycle, and improves verification speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120340586A_ABST
    Figure CN120340586A_ABST
Patent Text Reader

Abstract

The invention discloses a solid state disk PLN function verification method, device and equipment and a storage medium, and the method comprises the steps: sending a write command to a to-be-tested solid state disk SSD through a test tool, and writing to-be-written data into the SSD; when it is detected that data writing is finished, a verification command is sent to a microcontroller unit MCU, and the PLN function of the SSD is tested through the MCU; when the PLN function is normal, the current data stored in the SSD is compared with the to-be-written data, and when the to-be-written data is not lost and meets the preset test condition, the current verification process is ended, the PLN # signal can be conveniently and rapidly controlled, the automatic test of the PLN function of the SSD is realized, and the method is suitable for different test platforms, has compatibility and universality, and is suitable for popularization and application. Debugging analysis of firmware development engineers is facilitated, function development of SSD products is accelerated, the research and development period is shortened, and the PLN function verification speed and efficiency of the solid state disk are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power-off testing, and particularly to a method, device, equipment and storage medium for verifying the PLN function of a solid-state drive. Background Art

[0002] At present, due to its advantages such as high performance and low power consumption, solid-state drive (SSD) products have been widely used in fields such as data centers, enterprise storage, and personal computing devices, and the requirements for their data security and reliability are becoming increasingly stringent; external system power failures (such as sudden power outages, power fluctuations, etc.) are common problems, which may lead to data loss or damage, and have a serious impact on the performance and lifespan of SSDs.

[0003] The power-off protection function ensures that when the power supply is interrupted, the SSD can quickly and completely save critical data, avoid data loss or damage, and maintain the integrity of the data. In enterprise-level applications, such as key fields like data centers, finance, and databases, the integrity and reliability of data are crucial.

[0004] The power-off protection function helps to ensure that when a power failure occurs, the service can be quickly restored, reducing service interruptions caused by data loss or damage.

[0005] Therefore, the power-off protection function in SSDs is of great significance in dealing with power failures, protecting data security, maintaining business continuity, and enhancing user experience.

[0006] The existing power loss notification (PLN) test technical solutions for SSDs are as follows:

[0007] The test method for Power Loss Signals in NVMe M.2 mainly focuses on the data protection ability and stability of the SSD when the power supply is suddenly interrupted. NVMe (Non-Volatile Memory Express) is an SSD interface protocol based on data transmission of the high-speed Peripheral Component Interconnect Express (PCIe) standard.

[0008] And it mainly depends on the overall behavior of the native test system and whether it supports the function of this signal, thus unable to perform refined settings and controls; mainly uses the method of abnormal power-off for verification:

[0009] a) When the SSD is in a normal working state, simulate the situation of sudden power interruption, and cut off the power supply of the SSD through an external device (such as a power controller).

[0010] b) Check whether the SSD can correctly save data after power-off to avoid data loss or damage.

[0011] c) Repeat the test multiple times to verify the stability and reliability of the power-off protection mechanism of the SSD, and indirectly verify the functions and performance of the SSD products under this system.

[0012] In the existing test technologies, the existing problems and defects mainly include the following points:

[0013] 1. Most of the test hosts and servers purchased on the market do not support the setting and sending of the PLN# signal, so functional tests and verifications cannot be carried out. Therefore, the test platform is limited; if an in-house developed whole-machine test system and environment are used, it is not only time-consuming but also costly.

[0014] 2. The test host cannot directly send the PLN# signal and precisely control the sending timing. Moreover, after the host sends this signal, there will be interference from the operating system's behavior, and the firmware processing behavior of the SSD product cannot be directly analyzed; that is, the sending and processing of this signal are completely the behaviors of the host, and the test program cannot control them. The test program can only adapt to the functions and behaviors of the host. Its sending commands are inflexible and operationally limited, and it is not convenient for automated control.

[0015] 3. The sending timing and time interval between the PLN# and PLA_S3# pins cannot be precisely controlled, which is not convenient for analyzing the SSD firmware behavior under various normal and abnormal signal timings, and is not convenient for SSD firmware development engineers to debug and analyze signals. Summary of the Invention

[0016] The main purpose of the present invention is to provide a method, device, equipment and storage medium for verifying the PLN function of a solid-state drive, aiming to solve the technical problems in the prior art that the basic functions of the PLN of NVMe M.2 SSD products cannot be tested, the test host cannot directly send the PLN# signal, and precise control cannot be performed.

[0017] In a first aspect, the present invention provides a method for verifying the PLN function of a solid-state drive, and the method for verifying the PLN function of the solid-state drive includes the following steps:

[0018] Send a write command to the solid-state drive SSD to be tested according to the test tool, and write the data to be written into the SSD;

[0019] When it is detected that the data writing is completed, send a verification command to the microcontroller unit MCU, and test the PLN function of the SSD through the MCU;

[0020] When the PLN function is normal, compare the current data stored in the SSD with the data to be written. When the data to be written is not lost and meets the preset test conditions, end the current verification process.

[0021] Optionally, before the solid-state drive (SSD) to be tested receives a write command sent by a test tool and the data to be written is written into the SSD, the method for verifying the PLN function of the solid-state drive includes:

[0022] Check the connection status of the adapter board of the solid-state drive (SSD) to be tested. The adapter board includes a microcontroller unit (MCU), and the adapter board is correspondingly connected to the hardware pin of the SSD.

[0023] When the connection status is normal, allow the PLN function verification process of the solid-state drive to be started.

[0024] Optionally, when the test tool sends a write command to the solid-state drive (SSD) to be tested and the data to be written is written into the SSD, it includes:

[0025] Send a write command to the solid-state drive (SSD) to be tested according to the test tool.

[0026] Obtain a preset specified data format and a preset specified data volume, process preset input data according to the preset specified data format and the preset specified data volume to obtain the data to be written, and write the data to be written into the SSD.

[0027] Optionally, when it is detected that the data writing ends, send a verification command to the microcontroller unit (MCU), and test the PLN function of the SSD through the MCU, including:

[0028] When it is detected that the data writing ends, send a signal pull-down command to the microcontroller unit (MCU).

[0029] Pull down the PLN signal of the SSD through the MCU, and after any specified random event, control the SSD to power off.

[0030] After it is detected that the SSD has powered off, send a verification command to the MCU, and test the PLN function of the SSD through the MCU.

[0031] Optionally, after it is detected that the SSD has powered off, send a verification command to the MCU, and test the PLN function of the SSD through the MCU, including:

[0032] After it is detected that the SSD has powered off, send a verification command to the MCU.

[0033] Obtain a power-down confirmation signal through the MCU, determine whether the power-down confirmation signal is low, and generate a judgment result;

[0034] Test the PLN function of the SSD according to the judgment result.

[0035] Optionally, the testing of the PLN function of the SSD according to the judgment result includes:

[0036] When the judgment result is that the power-down confirmation signal is not low, obtain the time of the current power-down test of the SSD;

[0037] When the judgment result is that the power-down confirmation signal is low, send a pull-up command to the MCU, pull up the power-down confirmation signal through the MCU, and restore power supply to the SSD.

[0038] Optionally, when the PLN function is normal, compare the current data stored in the SSD with the data to be written. When the data to be written is not lost and meets the preset test conditions, end the current verification process, including:

[0039] When the PLN function is normal, compare the current data stored in the SSD with the data to be written;

[0040] Determine whether the data to be written is lost according to the comparison result;

[0041] When the data to be written is lost, obtain the current test times and the current cumulative test time;

[0042] When the current test times reach the preset test loop times of the preset test conditions and the current cumulative test time reaches the preset test time of the preset test conditions, end the current verification process.

[0043] In a second aspect, to achieve the above object, the present invention also proposes a solid-state drive PLN function verification device, and the solid-state drive PLN function verification device includes:

[0044] A data writing module, configured to send a write command to a solid-state drive SSD to be tested according to a test tool, and write data to be written into the SSD;

[0045] A function testing module, configured to send a verification command to a microcontroller unit MCU when detecting that the data writing ends, and test the PLN function of the SSD through the MCU;

[0046] A data comparison module, configured to compare the current data stored in the SSD with the data to be written when the PLN function is normal, and end the current verification process when the data to be written is not lost and meets the preset test conditions.

[0047] In a third aspect, to achieve the above object, the present invention further provides a solid-state drive PLN function verification device, which includes: a memory, a processor, and a solid-state drive PLN function verification program stored on the memory and executable on the processor. The solid-state drive PLN function verification program is configured to implement the steps of the solid-state drive PLN function verification method as described above.

[0048] In a fourth aspect, to achieve the above object, the present invention further provides a storage medium, on which a solid-state drive PLN function verification program is stored. When the solid-state drive PLN function verification program is executed by a processor, it implements the steps of the solid-state drive PLN function verification method as described above.

[0049] The solid-state drive PLN function verification method proposed by the present invention sends a write command to the solid-state drive SSD to be tested through a test tool, and writes the data to be written into the SSD; when it is detected that the data writing is completed, a verification command is sent to the microcontroller unit MCU, and the PLN function of the SSD is tested through the MCU; when the PLN function is normal, the current data stored in the SSD is compared with the data to be written. When the data to be written is not lost and meets the preset test conditions, the current verification process is ended. It can conveniently and quickly control the PLN# signal, realize the automatic test of the PLN function of the SSD, is applicable to different test platforms, has compatibility and universality. Through the control function of the MCU, the timing of sending the PLN# signal can be accurately controlled, and the sending of normal timing and abnormal timing can be simulated, which is convenient for firmware development engineers to debug and analyze. It can better evaluate and measure the functions implemented by the PLN of the SSD product, can conveniently and flexibly control and develop and verify various signals and functions, accelerate the function development of the SSD product, shorten the R & D cycle, and improve the speed and efficiency of the solid-state drive PLN function verification. Description of the Drawings

[0050] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment related to the solution of the embodiment of the present invention;

[0051] Figure 2 It is a schematic flowchart of the first embodiment of the solid-state drive PLN function verification method of the present invention;

[0052] Figure 3Schematic flowchart of the second embodiment of the method for verifying the PLN function of the solid-state drive of the present invention;

[0053] Figure 4 Schematic flowchart of the third embodiment of the method for verifying the PLN function of the solid-state drive of the present invention;

[0054] Figure 5 Schematic flowchart of the fourth embodiment of the method for verifying the PLN function of the solid-state drive of the present invention;

[0055] Figure 6 Schematic flowchart of the fifth embodiment of the method for verifying the PLN function of the solid-state drive of the present invention;

[0056] Figure 7 Schematic flowchart of the basic test process in the method for verifying the PLN function of the solid-state drive of the present invention;

[0057] Figure 8 Functional module diagram of the first embodiment of the device for verifying the PLN function of the solid-state drive of the present invention.

[0058] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners

[0059] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0060] The solution of the embodiment of the present invention is mainly: sending a write command to the solid-state drive SSD to be tested through a test tool, and writing the data to be written into the SSD; when it is detected that the data writing is completed, sending a verification command to the microcontroller unit MCU, and testing the PLN function of the SSD through the MCU; when the PLN function is normal, comparing the current data stored in the SSD with the data to be written, and when the data to be written is not lost and meets the preset test conditions, ending the current verification process, which can conveniently and quickly control the PLN# signal, realize the automatic test of the PLN function of the SSD, be applicable to different test platforms, have compatibility and universality, and can accurately control the timing and sequence of sending the PLN# signal through the control function of the MCU, simulate the sending of normal and abnormal sequences, facilitate the debugging and analysis of firmware development engineers, can better evaluate and measure the function realized by the PLN of the SSD product, can conveniently and flexibly control and develop and verify various signals and functions, accelerate the function development of the SSD product, shorten the R & D cycle, improve the speed and efficiency of verifying the PLN function of the solid-state drive, and solve the technical problems in the prior art that the basic function test of the PLN of the NVMe M.2 SSD product cannot be carried out, the test host cannot directly send the PLN# signal, and accurate control cannot be carried out.

[0061] Reference Figure 1 , Figure 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention.

[0062] As Figure 1 shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (Non-Volatile Memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0063] Those skilled in the art can understand that Figure 1 the device structure shown in

[0064] does not limit the device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 1 shown, as a storage medium, the memory 1005 may include an operating device, a network communication module, a user interface module, and a solid-state drive PLN function verification program.

[0065] The device of the present invention calls the solid-state drive PLN function verification program stored in the memory 1005 through the processor 1001 and performs the following operations:

[0066] According to the test tool, send a write command to the solid-state drive SSD to be tested, and write the data to be written into the SSD;

[0067] When it is detected that the data writing is completed, send a verification command to the microcontroller unit MCU, and test the PLN function of the SSD through the MCU;

[0068] When the PLN function is normal, compare the current data stored in the SSD with the data to be written. When the data to be written is not lost and meets the preset test conditions, end the current verification process.

[0069] The device of the present invention calls the solid-state drive PLN function verification program stored in the memory 1005 through the processor 1001 and also performs the following operations:

[0070] Check the connection status of the adapter board for the solid-state drive (SSD) to be tested. The adapter board includes a microcontroller unit (MCU), and the adapter board is correspondingly connected to the hardware pins of the SSD.

[0071] When the connection status is normal, allow the verification process of the power loss notification (PLN) function of the solid-state drive to be started.

[0072] The device of the present invention, through the processor 1001, calls the power loss notification (PLN) function verification program stored in the memory 1005, and also performs the following operations:

[0073] Send a write command to the solid-state drive (SSD) to be tested according to the test tool.

[0074] Obtain a preset specified data format and a preset specified data volume, process the preset input data according to the preset specified data format and the preset specified data volume to obtain the data to be written, and write the data to be written into the SSD.

[0075] The device of the present invention, through the processor 1001, calls the power loss notification (PLN) function verification program stored in the memory 1005, and also performs the following operations:

[0076] When it is detected that the data writing is completed, send a signal pull-down command to the microcontroller unit (MCU).

[0077] Pull down the PLN signal of the SSD through the MCU, and after any specified random event, control the SSD to power off.

[0078] After it is detected that the SSD has powered off, send a verification command to the MCU, and test the PLN function of the SSD through the MCU.

[0079] The device of the present invention, through the processor 1001, calls the power loss notification (PLN) function verification program stored in the memory 1005, and also performs the following operations:

[0080] After it is detected that the SSD has powered off, send a verification command to the MCU.

[0081] Obtain a power-off confirmation signal through the MCU, judge whether the power-off confirmation signal is low, and generate a judgment result.

[0082] Test the PLN function of the SSD according to the judgment result.

[0083] The device of the present invention, through the processor 1001, calls the power loss notification (PLN) function verification program stored in the memory 1005, and also performs the following operations:

[0084] When the judgment result is that the power-off confirmation signal is not low, obtain the time of the current power-off test of the SSD;

[0085] When the judgment result is that the power-off confirmation signal is low, send a pull-up command to the MCU, pull up the power-off confirmation signal through the MCU, and restore power supply to the SSD.

[0086] The device of the present invention calls the solid-state drive PLN function verification program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0087] When the PLN function is normal, compare the current data stored in the SSD with the data to be written;

[0088] Determine whether the data to be written is lost according to the comparison result;

[0089] When the data to be written is lost, obtain the current test times and the current cumulative test time;

[0090] When the current test times reach the preset test loop times of the preset test conditions, and the current cumulative test time reaches the preset test time of the preset test conditions, end the current verification process.

[0091] Through the above solution in this embodiment, a write command is sent to the solid-state drive SSD to be tested through a test tool, and the data to be written is written into the SSD; when it is detected that the data writing ends, a verification command is sent to the microcontroller unit MCU, and the PLN function of the SSD is tested through the MCU; when the PLN function is normal, the current data stored in the SSD is compared with the data to be written, and when the data to be written is not lost and meets the preset test conditions, the current verification process is ended, which can conveniently and quickly control the PLN# signal, realize the automatic test of the PLN function of the SSD, is applicable to different test platforms, has compatibility and universality, can accurately control the timing of sending the PLN# signal through the control function of the MCU, simulate the sending of normal timing and abnormal timing, facilitate the debugging and analysis of firmware development engineers, can better evaluate and measure the function realized by the PLN of the SSD product, can conveniently and flexibly control and develop and verify various signals and functions, accelerate the function development of the SSD product, shorten the R & D cycle, and improve the speed and efficiency of the solid-state drive PLN function verification.

[0092] Based on the above hardware structure, an embodiment of the solid-state drive PLN function verification method of the present invention is proposed.

[0093] Refer to Figure 2 , Figure 2This is a schematic flowchart of the first embodiment of the method for verifying the PLN function of the solid-state drive of the present invention.

[0094] In the first embodiment, the method for verifying the PLN function of the solid-state drive includes the following steps:

[0095] Step S10: Send a write command to the solid-state drive SSD to be tested according to the test tool, and write the data to be written into the SSD.

[0096] It should be noted that according to the test tool, a write command can be sent to the solid-state drive SSD to be tested, and then the data to be written can be written into the SSD to be tested.

[0097] In a specific implementation, the host can send a write command through the test tool to write data in a specified format into the SSD to be tested.

[0098] Step S20: When it is detected that the data writing is completed, send a verification command to the microcontroller unit MCU, and test the PLN function of the SSD through the MCU.

[0099] It should be understood that when it is detected that the data writing is completed, a verification command can be sent to the microcontroller unit (Micro Controller Unit, MCU), and the PLN function of the SSD can be tested through the MCU.

[0100] Step S30: When the PLN function is normal, compare the current data stored in the SSD with the data to be written. When the data to be written is not lost and meets the preset test conditions, end the current verification process.

[0101] It can be understood that when the PLN function is normal, the current data stored in the SSD can be compared with the data to be written, and then when the data to be written is not lost and meets the preset test conditions, the current verification process can be ended.

[0102] In this embodiment, through the above solution, a write command is sent to the solid-state drive (SSD) to be tested by a test tool, and the data to be written is written into the SSD; when it is detected that the data writing is completed, a verification command is sent to the microcontroller unit (MCU), and the MCU tests the PLN function of the SSD; when the PLN function is normal, the current data stored in the SSD is compared with the data to be written, and when the data to be written is not lost and meets the preset test conditions, the current verification process is ended. It can conveniently and quickly control the PLN# signal, realize the automatic test of the PLN function of the SSD, be applicable to different test platforms, have compatibility and universality. Through the control function of the MCU, the timing of sending the PLN# signal can be accurately controlled, and the sending of normal timing and abnormal timing can be simulated, which is convenient for firmware development engineers to debug and analyze. It can better evaluate and measure the PLN function implemented by the SSD product, can conveniently and flexibly control and develop and verify various signals and functions, accelerate the function development of the SSD product, shorten the R & D cycle, and improve the speed and efficiency of the PLN function verification of the solid-state drive.

[0103] Further, Figure 3 is a schematic flowchart of the second embodiment of the method for verifying the PLN function of the solid-state drive of the present invention. As Figure 3 shown, based on the first embodiment, the second embodiment of the method for verifying the PLN function of the solid-state drive of the present invention is proposed. In this embodiment, before the step S10, the method for verifying the PLN function of the solid-state drive further includes the following steps:

[0104] Step S01: Check the connection status of the adapter board of the solid-state drive (SSD) to be tested. The adapter board includes a microcontroller unit (MCU), and the adapter board is correspondingly connected to the hardware pin feet of the SSD.

[0105] It should be noted that before performing the verification test of the PLN function of the solid-state drive, the basic hardware can be connected and checked, that is, the connection status of the adapter board of the solid-state drive (SSD) to be tested is checked. The adapter board includes a microcontroller unit (MCU), and the adapter board is correspondingly connected to the hardware pin feet of the SSD.

[0106] In a specific implementation, the connection and inspection of the basic hardware can be carried out as required: connect the NVMe M.2 SSD to the adapter board and connect the corresponding control wires, etc.; provide an NVMe M.2 SSD adapter board, which is equipped with an MCU control chip and is correspondingly connected to the hardware pin of the NVMe M.2 SSD; the adapter board can be conveniently connected to the PCIe slot of each test platform; through the control pin of the MCU, the pin controlled by the MCU itself is connected to the pin on the NVMe M.2 SSD adapter board that controls the PLN# and PLA_S3# signals; at the same time, the designated pin of the NVMe M.2 SSD adapter board is connected to the PLN# and PLA_S3# signals on the M.2 SSD; in this way, by controlling the level of the corresponding pin of the MCU, the PLN# pin of the M.2 SSD can be directly controlled and affected, and the level signal of PLA_S3# can be monitored.

[0107] It should be understood that the PLN# signal: The PLN# (Power Loss Notification) signal is an optional signal used to notify the controller of an expected main power loss event; if PLN# is activated and then released before power-off, the SSD is allowed to resume normal operation; The PLA_S3# signal: The PLA_S3# (Power Loss Acknowledge) signal is an optional signal used by the controller to notify the host controller of the current power loss signal processing situation.

[0108] Step S02, when the connection status is normal, allow the opening of the SSD PLN function verification process.

[0109] It can be understood that when the connection status is normal, that is, when the basic hardware connection and inspection are passed, the SSD PLN function verification process can be allowed to start.

[0110] Through the above solution, in this embodiment, by checking the connection status of the adapter board of the solid-state drive SSD to be tested, the adapter board includes a microcontroller unit MCU, and the adapter board is correspondingly connected to the hardware pin of the SSD; when the connection status is normal, the SSD PLN function verification process is allowed to start, which can conveniently and quickly control the PLN# signal, realize the automatic test of the SSD PLN function, and improve the speed and efficiency of the SSD PLN function verification.

[0111] Furthermore, Figure 4 It is a schematic flowchart of the third embodiment of the method for verifying the PLN function of the solid-state drive of the present invention, as Figure 4As shown, based on the first embodiment, the third embodiment of the method for verifying the PLN function of the solid-state drive of the present invention is proposed. In this embodiment, step S10 specifically includes the following steps:

[0112] Step S11: Send a write command to the solid-state drive SSD to be tested according to the test tool.

[0113] It should be noted that when sending a write command to the solid-state drive SSD to be tested according to the test tool, the host can send a write command to the SSD through the test tool.

[0114] Step S12: Obtain a preset specified data format and a preset specified data volume, process the preset input data according to the preset specified data format and the preset specified data volume to obtain the data to be written, and write the data to be written into the SSD.

[0115] It can be understood that after obtaining the preset specified data format and the preset specified data volume, the preset input data can be processed according to the preset specified data format and the preset specified data volume to obtain the data to be written, and then the data to be written is written into the SSD.

[0116] In a specific implementation, the host sends a write command to the SSD through the test tool, specifying the data format to be written (for example, random data format) and the data volume (for example, ranging from 1GB to 10GB); different types and data formats that increase the pressure can be specified for evaluation.

[0117] Through the above solution in this embodiment, a write command is sent to the solid-state drive SSD to be tested through the test tool; a preset specified data format and a preset specified data volume are obtained, the preset input data is processed according to the preset specified data format and the preset specified data volume to obtain the data to be written, and the data to be written is written into the SSD, which can conveniently and quickly control the PLN# signal, realize the automated test of the PLN function of the SSD, and improve the speed and efficiency of verifying the PLN function of the solid-state drive.

[0118] Furthermore, Figure 5 is a schematic flowchart of the fourth embodiment of the method for verifying the PLN function of the solid-state drive of the present invention. As Figure 5 shown, based on the first embodiment, the fourth embodiment of the method for verifying the PLN function of the solid-state drive of the present invention is proposed. In this embodiment, step S20 specifically includes the following steps:

[0119] Step S21: When it is detected that the data writing ends, send a signal pull-down command to the microcontroller unit MCU.

[0120] It should be noted that when it is detected that the data writing is completed, a signal pull-down command can be sent to the microcontroller unit (MCU).

[0121] In a specific implementation, after the writing is completed, a command can be immediately sent to the MCU to make the MCU pull down the PLN# signal.

[0122] Step S22: Pull down the PLN signal of the SSD through the MCU, and after a specified arbitrary random event, control the SSD to power off.

[0123] It can be understood that the PLN signal of the SSD is pulled down through the MCU, and after a specified arbitrary random event, the SSD can be controlled to power off.

[0124] It should be understood that after a specified arbitrary random time (for example, 15 ms, denoted as Timer A), the SSD is controlled to power off; this specified time can be flexibly set according to the actual test platform and customer requirements and used as a test index for evaluating the secure writing of data; here it is different from directly powering off the SSD. Directly powering off the SSD is an insecure power-off, which may cause data loss in some cases. While first pulling down the PLN# signal by the MCU and then powering off after the specified time, the SSD will be regarded as a secure power-off, and no loss of the previously written data can occur.

[0125] Step S23: After it is detected that the SSD has powered off, send a verification command to the MCU, and test the PLN function of the SSD through the MCU.

[0126] It should be understood that after it is detected that the SSD has powered off, a verification command can be sent to the MCU, and then the PLN function of the SSD can be tested through the MCU.

[0127] In a specific implementation, the host detects that the SSD has powered off: Since a command was sent to the MCU in the previous step and it was required to power off the SSD after a specified time, in this step, a power-off detection is performed to confirm that the SSD has truly powered off.

[0128] Further, step S23 specifically includes the following steps:

[0129] After it is detected that the SSD has powered off, send a verification command to the MCU;

[0130] Obtain a power-off confirmation signal through the MCU, judge whether the power-off confirmation signal is low, and generate a judgment result;

[0131] Test the PLN function of the SSD according to the judgment result.

[0132] It should be noted that after detecting that the SSD has lost power, the host can send a command to the MCU to detect and obtain whether the signal of PLA_S3# is low, and then test the PLN function of the SSD according to the judgment result.

[0133] Further, the step of testing the PLN function of the SSD according to the judgment result specifically includes the following steps:

[0134] When the judgment result is that the power-off confirmation signal is not low, obtain the time of the current power-off test of the SSD;

[0135] When the judgment result is that the power-off confirmation signal is low, send a pull-up command to the MCU, and the MCU pulls up the power-off confirmation signal and restores power to the SSD.

[0136] In a specific implementation, after the SSD firmware completes internal data storage, it will pull this signal low. If the low signal is not detected, it means that within the specified Timer A, the SSD fails to complete the internal established data saving process. Use this to measure the length of time for the SSD to complete the internal processing process and record the time of this test; the host sends a command to the MCU to pull up PLA_S3# and restore power to the SSD: reset the PLA_S3# signal and restore power to the SSD to complete steps such as power-off initialization of the SSD; through the mutual cooperation and control of the MCU and the adapter board, it is possible to send and control the timing of the PLN# signal on any mainstream test platform, making it possible to verify this function and making it more flexible and convenient, so as to better evaluate and measure the PLN function implemented by the SSD product and perform rapid iterative verification.

[0137] In this embodiment, through the above solution, when detecting the end of data writing, a signal pull-down command is sent to the microcontroller unit MCU; the MCU pulls down the PLN signal of the SSD, and after a specified random event, controls the SSD to lose power; after detecting that the SSD has lost power, a verification command is sent to the MCU, and the MCU tests the PLN function of the SSD; it can conveniently and quickly control the PLN# signal, realize the automated test of the PLN function of the SSD, is applicable to different test platforms, has compatibility and universality, and can accurately control the timing of sending the PLN# signal through the control function of the MCU, simulate the sending of normal timing and abnormal timing, facilitate the debugging and analysis of firmware development engineers, can better evaluate and measure the PLN function implemented by the SSD product, and improve the speed and efficiency of verifying the PLN function of the solid-state drive.

[0138] Furthermore, Figure 6This is a schematic flowchart of the fifth embodiment of the method for verifying the PLN function of the solid-state drive of the present invention. As Figure 6 shown, based on the first embodiment, the fifth embodiment of the method for verifying the PLN function of the solid-state drive of the present invention is proposed. In this embodiment, the step S30 specifically includes the following steps:

[0139] Step S31: When the PLN function is normal, compare the current data stored in the SSD with the data to be written.

[0140] It should be noted that when the PLN function is normal, the current data stored in the SSD can be compared with the data to be written, that is, the integrity of the data to be written is verified.

[0141] Step S32: Determine whether the data to be written is lost according to the comparison result.

[0142] It can be understood that according to the comparison result of the current data and the data to be written, it can be determined whether the data to be written is lost, that is, when the data is consistent, the data to be written is complete, otherwise there is a situation of data loss.

[0143] Step S33: When the data to be written is lost, obtain the current test times and the current cumulative test time.

[0144] It should be understood that when the data to be written is lost, the current test times and the current cumulative test time can be obtained.

[0145] In specific implementation, refer to Figure 7 , Figure 7 This is a schematic flowchart of the basic test process in the method for verifying the PLN function of the solid-state drive of the present invention. As Figure 7 shown, when implementing the technical solution, the following hardware connection prerequisite conditions and MCU function supports may be required:

[0146] 1) Provide an NVMe M.2 SSD adapter board, which has an MCU control chip on it and is correspondingly connected to the hardware pin feet of the NVMe M.2 SSD; the adapter board can be conveniently connected to the PCIe slots of each test platform;

[0147] 2) Define the control pins of the MCU, so that the pins controlled by the MCU itself are connected to the pins on the NVMe M.2 SSD adapter board that control the PLN# and PLA_S3# signals; at the same time, the specified pins of the NVMe M.2 SSD adapter board are connected to the PLN# and PLA_S3# signals on the M.2 SSD; in this way, by controlling the level of the corresponding pins of the MCU, the PLN# pin of the M.2 SSD can be directly controlled and acted on, and the level signal of PLA_S3# can be monitored.

[0148] 3) Control firmware of the MCU; the MCU code needs to be written and burned into the MCU. The following command functions need to be provided and satisfied in the MCU control firmware:

[0149] a) The MCU is capable of receiving commands, pulling down the PLN# signal, and supporting power-off within a specified time;

[0150] b) The MCU is capable of detecting the high or low level of the PLA_S3# signal and can control the PLA_S3# signal to be pulled high through commands;

[0151] c) The MCU is capable of receiving commands to control the NVMe M.2 SSD daughter board to power on and off the SSD;

[0152] Connect and check the basic hardware as required: Connect the NVMe M.2 SSD to the daughter board and connect the corresponding control wires, etc.;

[0153] The host sends write commands to the SSD through the test tool, specifying the data format to be written (e.g., random data format) and the data volume (e.g., ranging from 1GB to 10GB); different types and increased-pressure data formats can be specified and sent for evaluation;

[0154] After the writing is completed, immediately send a command to the MCU to make the MCU pull down the PLN# signal, and after a specified random time (e.g., 15ms, denoted as Timer A), control the SSD to power off. This specified time can be flexibly set according to the actual test platform and customer requirements and used as a test index for evaluating secure data writing. Here, it should be noted that this is different from directly powering off the SSD. Directly powering off the SSD is an insecure power-off and may cause data loss in some cases. However, by first pulling down the PLN# signal by the MCU and then powering off after the specified time, the SSD will be considered a secure power-off, and no data written previously should be lost.

[0155] The host detects that the SSD has powered off: Since a command was sent to the MCU in the previous step and it was required to power off the SSD after the specified time, in this step, power-off detection is performed to confirm that the SSD has truly powered off;

[0156] The host sends a command to the MCU to detect and obtain whether the signal of PLA_S3# is low. When the SSD firmware completes the internal data storage, it will pull down this signal. If this signal is not detected as low, it means that within the specified Timer A above, the SSD failed to complete the internal established data saving process. Use this to measure the length of time for the SSD to complete the internal processing process and record the test time;

[0157] The host sends a command to the MCU to pull up PLA_S3# and restore power to the SSD: reset the PLA_S3# signal and restore power to the SSD to complete steps such as power-off initialization of the SSD;

[0158] The host sends a command to the SSD to read the previously written data and compare it. In this step, the previously written data must not be lost. If data loss occurs, the test fails and the number of attempts is counted. At the same time, if the SSD firmware internally records the completion of corresponding tasks, etc., it can also be detected in this step.

[0159] Step S34: When the current test count reaches the preset number of test cycles of the preset test condition and the current cumulative test time reaches the preset test time of the preset test condition, end the current verification process.

[0160] It can be understood that when the current test count reaches the preset number of test cycles of the preset test condition and the current cumulative test time reaches the preset test time of the preset test condition, the current verification process can be ended.

[0161] In a specific implementation, the test program detects whether the test time or the number of test cycles in the test plan has been completed. If not, the above steps are repeated until completion. If completed, the results are statistically analyzed and the data is summarized, and a test log or report is output. Based on this basic process, various combinations and extensions of test parameters and Timer A can be carried out to comprehensively evaluate and measure the data protection behavior of the SSD after PLN# is pulled low, and provide objective and accurate test data.

[0162] Through the above solution in this embodiment, when the PLN function is normal, the current data stored in the SSD is compared with the data to be written; according to the comparison result, it is determined whether the data to be written is lost; when the data to be written is lost, the current test count and the current cumulative test time are obtained; when the current test count reaches the preset number of test cycles of the preset test condition and the current cumulative test time reaches the preset test time of the preset test condition, the current verification process is ended; it can conveniently and quickly control the PLN# signal, realize the automated test of the PLN function of the SSD, be applicable to different test platforms, have compatibility and universality, and can accurately control the timing of sending the PLN# signal through the control function of the MCU, simulate the sending of normal and abnormal timings, facilitate the debugging and analysis of firmware development engineers, can better evaluate and measure the functions implemented by the PLN of the SSD product, can conveniently and flexibly control and develop and verify various signals and functions, accelerate the function development of the SSD product, shorten the R & D cycle, and improve the speed and efficiency of the PLN function verification of the solid-state drive.

[0163] Accordingly, the present invention further provides a solid-state drive PLN function verification device.

[0164] Referring to Figure 8 , Figure 8 is a functional block diagram of the first embodiment of the solid-state drive PLN function verification device of the present invention.

[0165] In the first embodiment of the solid-state drive PLN function verification device of the present invention, the solid-state drive PLN function verification device includes:

[0166] A data writing module 10, configured to send a write command to a solid-state drive SSD to be tested according to a test tool, and write data to be written into the SSD.

[0167] A function test module 20, configured to send a verification command to a microcontroller unit MCU when detecting that the data writing ends, and test the PLN function of the SSD through the MCU.

[0168] A data comparison module 30, configured to compare the current data stored in the SSD with the data to be written when the PLN function is normal, and end the current verification process when the data to be written is not lost and meets a preset test condition.

[0169] The data writing module 10 is further configured to check the connection status of an adapter board of the solid-state drive SSD to be tested, where the adapter board includes a microcontroller unit MCU, and the adapter board is correspondingly connected to the hardware pin of the SSD; when the connection status is normal, allow the solid-state drive PLN function verification process to be started.

[0170] The data writing module 10 is further configured to send a write command to the solid-state drive SSD to be tested according to a test tool; obtain a preset specified data format and a preset specified data volume, process preset input data according to the preset specified data format and the preset specified data volume to obtain data to be written, and write the data to be written into the SSD.

[0171] The function test module 20 is further configured to send a signal pull-down command to the microcontroller unit MCU when detecting that the data writing ends; pull down the PLN signal of the SSD through the MCU, and after any specified random event, control the SSD to power off; after detecting that the SSD has powered off, send a verification command to the MCU, and test the PLN function of the SSD through the MCU.

[0172] The function test module 20 is further configured to send a verification command to the MCU after detecting that the SSD has powered off; obtain a power-off confirmation signal through the MCU, determine whether the power-off confirmation signal is low, and generate a judgment result; and test the PLN function of the SSD according to the judgment result.

[0173] The function test module 20 is further configured to obtain the time of the current power-off test of the SSD when the judgment result is that the power-off confirmation signal is not low; and send a pull-up command to the MCU when the judgment result is that the power-off confirmation signal is low, pull up the power-off confirmation signal through the MCU, and restore power supply to the SSD.

[0174] The data comparison module 30 is further configured to compare the current data stored in the SSD with the data to be written when the PLN function is normal; determine whether the data to be written is lost according to the comparison result; obtain the current test times and the current cumulative test time when the data to be written is lost; and end the current verification process when the current test times reach the preset test loop times of the preset test conditions and the current cumulative test time reaches the preset test time of the preset test conditions.

[0175] Wherein, the steps implemented by each functional module of the solid-state drive PLN function verification device can refer to each embodiment of the solid-state drive PLN function verification method of the present invention, which will not be elaborated here.

[0176] In addition, an embodiment of the present invention further provides a storage medium, on which a solid-state drive PLN function verification program is stored. When the solid-state drive PLN function verification program is executed by a processor, the following operations are implemented:

[0177] Send a write command to the solid-state drive SSD to be tested according to the test tool, and write the data to be written into the SSD;

[0178] When detecting that the data writing is completed, send a verification command to the microcontroller unit MCU, and test the PLN function of the SSD through the MCU;

[0179] When the PLN function is normal, compare the current data stored in the SSD with the data to be written, and end the current verification process when the data to be written is not lost and meets the preset test conditions.

[0180] Further, when the solid-state drive PLN function verification program is executed by a processor, the following operations are further implemented:

[0181] Check the connection status of the adapter board for the solid-state drive (SSD) to be tested. The adapter board includes a microcontroller unit (MCU), and the adapter board is correspondingly connected to the hardware pins of the SSD.

[0182] When the connection status is normal, allow the verification process of the power loss notification (PLN) function of the solid-state drive to be started.

[0183] Furthermore, when the PLN function verification program of the solid-state drive is executed by a processor, the following operations are also implemented:

[0184] Send a write command to the SSD to be tested according to the test tool.

[0185] Obtain a preset specified data format and a preset specified data volume, process the preset input data according to the preset specified data format and the preset specified data volume to obtain the data to be written, and write the data to be written into the SSD.

[0186] Furthermore, when the PLN function verification program of the solid-state drive is executed by a processor, the following operations are also implemented:

[0187] When it is detected that the data writing is completed, send a signal pull-down command to the microcontroller unit MCU.

[0188] Pull down the PLN signal of the SSD through the MCU, and after an arbitrary random event is specified, control the SSD to power off.

[0189] After it is detected that the SSD has powered off, send a verification command to the MCU, and test the PLN function of the SSD through the MCU.

[0190] Furthermore, when the PLN function verification program of the solid-state drive is executed by a processor, the following operations are also implemented:

[0191] After it is detected that the SSD has powered off, send a verification command to the MCU.

[0192] Obtain a power-off confirmation signal through the MCU, judge whether the power-off confirmation signal is low, and generate a judgment result.

[0193] Test the PLN function of the SSD according to the judgment result.

[0194] Furthermore, when the PLN function verification program of the solid-state drive is executed by a processor, the following operations are also implemented:

[0195] When the judgment result is that the power-off confirmation signal is not low, obtain the time of the current power-off test of the SSD.

[0196] When the judgment result is that the power-off confirmation signal is low, send a pull-up command to the MCU, pull up the power-off confirmation signal through the MCU, and restore power supply to the SSD.

[0197] Further, when the solid-state drive PLN function verification program is executed by a processor, the following operations are further implemented:

[0198] When the PLN function is normal, compare the current data stored in the SSD with the data to be written;

[0199] Determine whether the data to be written is lost according to the comparison result;

[0200] When the data to be written is lost, obtain the current test times and the current cumulative test time;

[0201] When the current test times reach the preset test loop times of the preset test conditions and the current cumulative test time reaches the preset test time of the preset test conditions, end the current verification process.

[0202] Those skilled in the art can understand that all or part of the steps in the above implementation methods can be completed by instructing relevant hardware through a program. This program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application; and the foregoing storage medium is a computer-readable storage medium, including but not limited to: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs and other media that can store program codes.

[0203] It should be noted that in this article, the terms "including", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0204] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

[0205] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall similarly be included within the patent protection scope of the present invention.

Claims

1. A method for verifying the PLN function of a solid-state drive, characterized in that, The method for verifying the PLN function of the solid-state drive includes: Sending a write command to the solid-state drive (SSD) to be tested by a test tool, and writing the data to be written into the SSD; When it is detected that the data writing is completed, sending a verification command to the microcontroller unit (MCU), and testing the PLN function of the SSD through the MCU; When the PLN function is normal, comparing the current data stored in the SSD with the data to be written. When the data to be written is not lost and meets the preset test conditions, the current verification process ends.

2. The method for verifying the PLN function of the solid-state drive according to claim 1, wherein, Before the step of sending a write command to the solid-state drive (SSD) to be tested by a test tool and writing the data to be written into the SSD, the method for verifying the PLN function of the solid-state drive includes: Checking the connection status of the adapter board of the solid-state drive (SSD) to be tested. The adapter board includes a microcontroller unit (MCU), and the adapter board is correspondingly connected to the hardware pin of the SSD; When the connection status is normal, allowing the verification process of the PLN function of the solid-state drive to be started.

3. The method for verifying the PLN function of the solid-state drive according to claim 1, characterized in that, The step of sending a write command to the solid-state drive (SSD) to be tested by a test tool and writing the data to be written into the SSD includes: Sending a write command to the solid-state drive (SSD) to be tested by a test tool; Obtaining a preset specified data format and a preset specified data volume, processing the preset input data according to the preset specified data format and the preset specified data volume to obtain the data to be written, and writing the data to be written into the SSD.

4. The method for verifying the PLN function of the solid-state drive according to claim 1, wherein The step of, when it is detected that the data writing is completed, sending a verification command to the microcontroller unit (MCU) and testing the PLN function of the SSD through the MCU includes: When it is detected that the data writing is completed, sending a signal pull-down command to the microcontroller unit (MCU); Pulling down the PLN signal of the SSD through the MCU, and after any specified random event, controlling the SSD to power off; After it is detected that the SSD has powered off, sending a verification command to the MCU, and testing the PLN function of the SSD through the MCU.

5. The method for verifying the PLN function of a solid-state drive according to claim 4, wherein The step of, after it is detected that the SSD has powered off, sending a verification command to the MCU and testing the PLN function of the SSD through the MCU includes: After it is detected that the SSD has powered off, sending a verification command to the MCU; Obtaining a power-off confirmation signal through the MCU, judging whether the power-off confirmation signal is low, and generating a judgment result; Testing the PLN function of the SSD according to the judgment result.

6. The method for verifying the PLN function of a solid-state drive according to claim 5, wherein The step of testing the PLN function of the SSD according to the judgment result includes: When the judgment result is that the power-off confirmation signal is not low, obtaining the time of the current power-off test of the SSD; When the judgment result is that the power-off confirmation signal is low, sending a pull-up command to the MCU, pulling up the power-off confirmation signal through the MCU, and restoring power supply to the SSD.

7. The method for verifying the PLN function of the solid-state drive according to claim 1, wherein, When the PLN function is normal, compare the current data stored in the SSD with the data to be written. When the data to be written is not lost and meets the preset test conditions, end the current verification process, including: When the PLN function is normal, compare the current data stored in the SSD with the data to be written; Determine whether the data to be written is lost according to the comparison result; When the data to be written is lost, obtain the current test times and the current cumulative test time; When the current test times reach the preset test loop times of the preset test conditions and the current cumulative test time reaches the preset test time of the preset test conditions, end the current verification process.

8. A solid-state drive PLN function verification device, characterized in that, The solid-state drive PLN function verification device includes: A data writing module, configured to send a write command to a solid-state drive SSD to be tested according to a test tool, and write the data to be written into the SSD; A function test module, configured to send a verification command to a microcontroller unit MCU when detecting the end of data writing, and test the PLN function of the SSD through the MCU; A data comparison module, configured to compare the current data stored in the SSD with the data to be written when the PLN function is normal, and end the current verification process when the data to be written is not lost and meets the preset test conditions.

9. A solid-state drive PLN function verification device, characterized in that, The solid-state drive PLN function verification device includes: a memory, a processor, and a solid-state drive PLN function verification program stored on the memory and executable on the processor. The solid-state drive PLN function verification program is configured to implement the steps of the solid-state drive PLN function verification method according to any one of claims 1 to 7.

10. A storage medium, characterized in that, The solid-state drive PLN function verification program is stored on a storage medium. When the solid-state drive PLN function verification program is executed by a processor, it implements the steps of the solid-state drive PLN function verification method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Automatic simulation test method and system for abnormal power failure

    CN121029450A