[go: up one dir, main page]

CN120199314B - System testing method for UFS devices and test host, equipment and media - Google Patents

System testing method for UFS devices and test host, equipment and media

Info

Publication number
CN120199314B
CN120199314B CN202510623667.5A CN202510623667A CN120199314B CN 120199314 B CN120199314 B CN 120199314B CN 202510623667 A CN202510623667 A CN 202510623667A CN 120199314 B CN120199314 B CN 120199314B
Authority
CN
China
Prior art keywords
command
ufs
depth
queue
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202510623667.5A
Other languages
Chinese (zh)
Other versions
CN120199314A (en
Inventor
陈华桃
田磊
宋魏杰
赖鼐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Miaocun Technology Co ltd
Original Assignee
Zhuhai Miaocun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Miaocun Technology Co ltd filed Critical Zhuhai Miaocun Technology Co ltd
Priority to CN202510623667.5A priority Critical patent/CN120199314B/en
Publication of CN120199314A publication Critical patent/CN120199314A/en
Application granted granted Critical
Publication of CN120199314B publication Critical patent/CN120199314B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/56External testing equipment for static stores, e.g. automatic test equipment [ATE]; Interfaces therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application discloses a system testing method for UFS equipment, a testing host, equipment and a medium, and relates to the technical field of UFS testing. The method comprises the steps of generating a plurality of operation commands of different types, determining a first queue depth according to a preset command sending mode, asynchronously sending the operation commands of the first queue depth to the UFS equipment, enabling the UFS equipment to process the operation commands according to a queue sequence, returning a response after each operation command is completed, receiving the response returned by the UFS equipment, determining a second queue depth according to the preset command sending mode and the number of statistic response, sending the operation commands of the second queue depth to the UFS equipment, and continuing to enable the UFS equipment to process the operation commands according to the queue sequence until all the operation commands are sent and executed, and completing system testing of the UFS equipment. The test period of system test on the UFS equipment can be shortened, and the test efficiency is improved.

Description

System test method for UFS equipment, test host, equipment and medium
Technical Field
The application relates to the technical field of UFS test, in particular to a system test method for UFS equipment, a test host, equipment and a medium.
Background
The universal flash memory (Universal Flash Storage, UFS) is used as a common storage device and is widely applied to various electronic devices, and system test is a key link for ensuring the reliability and stability of the UFS device. When the system test is carried out on the UFS equipment, the test host sends various operations and commands to the UFS equipment so that the UFS equipment can execute the various operations and commands to carry out the test, and defects in the UFS equipment can be quickly identified and positioned according to the test result.
UFS devices typically support a command queue mechanism, with the maximum queue depth that UFS devices have referring to the maximum number of commands that UFS devices can simultaneously receive and process. Under the command queue mechanism, the test host may place multiple asynchronous commands into the queue and the UFS device may process the commands in the order of the queue. In the system test process, test hosts of different hardware have different test behaviors on the UFS equipment, the supported command queue depths are different, and the rhythm of some test hosts sending commands is possibly not matched with the processing capacity of the UFS equipment. If the depth of the command queue supported by the test host is far less than the maximum queue depth of the UFS device, the processing capacity of the UFS device cannot be fully utilized, resulting in the idle of the UFS device and prolonging the test period, while if the depth of the command queue supported by the test host is far more than the command queue depth of the UFS device, the command queue of the UFS device is filled, and the redundant commands need to wait for the idle queue, resulting in the accumulation of commands and also prolonging the test period. Therefore, how to shorten the period of system testing for UFS devices is a technical problem to be solved.
Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the application provides a system testing method, a testing host, equipment and a medium for the UFS equipment, which can adjust the queue depth of the operation command sent next time according to the command processing condition of the UFS equipment, thereby fully utilizing the command processing capability of the UFS equipment, shortening the testing period for carrying out the system test on the UFS equipment and improving the testing efficiency.
In a first aspect, an embodiment of the present application provides a system testing method for a UFS device, applied to a test host, where the test host is electrically connected to the UFS device, where the system testing method includes:
Generating a plurality of different types of operation commands;
Determining a first queue depth according to a preset command sending mode, and asynchronously sending the operation commands of the first queue depth to UFS equipment so that the UFS equipment stores the operation commands in a command queue form, processes the operation commands according to a queue sequence, and returns a response after completing one operation command, wherein the preset command sending mode comprises a fixed depth mode and a random depth mode;
receiving a response returned by the UFS equipment;
Determining a second queue depth of the operation command transmitted next time according to the preset command transmission mode and the counted number of received response responses;
And sending the operation command with the second queue depth to the UFS equipment, continuously enabling the UFS equipment to store the operation command in a command queue form and process the operation command according to a queue sequence until all the operation commands are sent and executed, and completing the system test of the UFS equipment.
According to some embodiments of the application, when the preset command transmission mode is a random depth mode, the determining the first queue depth according to the preset command transmission mode includes:
obtaining the maximum command queue depth of the UFS equipment according to the random depth mode;
the maximum command queue depth is determined as the first queue depth.
According to some embodiments of the application, when the preset command sending mode is a random depth mode, the determining the second queue depth of the operation command to be sent next according to the preset command sending mode and the counted number of received response responses includes:
According to the random depth mode, randomly generating delay time in a preset time range;
counting the number of the response responses returned by the UFS equipment received in the delay time;
and determining the number of response responses received in the delay time as the second queue depth.
According to some embodiments of the application, when the preset command transmission mode is a fixed depth mode, the determining the first queue depth according to the preset command transmission mode includes:
acquiring a preset fixed depth according to the fixed depth mode, wherein the fixed depth is smaller than or equal to the maximum command queue depth of the UFS equipment;
The fixed depth is determined as the first queue depth.
According to some embodiments of the application, when the preset command sending mode is a fixed depth mode, the determining the second queue depth of the operation command to be sent next according to the preset command sending mode and the counted number of received response responses includes:
According to the fixed depth mode, counting the number of response responses returned by the UFS equipment each time in real time;
and determining the number of the response responses returned by the UFS equipment obtained through immediate statistics as a second queue depth, wherein the second queue depth is smaller than or equal to the fixed depth in the fixed depth mode.
According to some embodiments of the application, the generating a plurality of different types of operation commands includes:
generating a random number with a logic address, a block size and a value in the range of 0 to 100%;
Determining a corresponding operation type according to a numerical value interval where the random number is located, wherein the operation type comprises a read operation, a write operation and an erase operation;
Performing command generation processing according to the logical address, the block size and the operation type to obtain the operation command, wherein the type of the operation command is determined by the operation type;
And repeating the command generating process for a plurality of times to obtain a plurality of operation commands, wherein the operation commands comprise a read command, a write command and an erase command.
According to some embodiments of the application, the determining the corresponding operation type according to the numerical interval in which the random number is located includes:
When the random number is greater than or equal to 0 and less than a first threshold, determining that the operation type is a read operation;
When the random number is larger than or equal to the first threshold value and smaller than a second threshold value, determining that the operation type is write operation, wherein the second threshold value is larger than the first threshold value;
When the random number is greater than or equal to the second threshold value and less than or equal to 100%, the operation type is determined to be an erase operation.
In a second aspect, an embodiment of the present application provides a system testing apparatus for UFS devices, including:
the command generation module is used for generating a plurality of operation commands of different types;
The first command sending module is used for determining a first queue depth according to a preset command sending mode, and asynchronously sending the operation commands of the first queue depth to the UFS equipment so that the UFS equipment stores the operation commands in a command queue form, processes the operation commands according to a queue sequence and returns a response when one operation command is completed;
the response receiving module is used for receiving a response returned by the UFS equipment;
the depth adjustment module is used for determining the depth of a second queue of the operation command to be transmitted next according to the preset command transmission mode and the counted number of received response responses;
And the second command sending module is used for sending the operation commands with the second queue depth to the UFS equipment, continuously enabling the UFS equipment to store the operation commands in a command queue form and process the operation commands according to a queue sequence until all the operation commands are sent and executed, and completing the system test of the UFS equipment.
In a third aspect, an embodiment of the present application provides an electronic device, including at least one processor and a memory communicatively coupled to the at least one processor, where the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the system testing method for UFS devices according to any one of the embodiments of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing a system testing method for UFS devices as described in the first aspect when executed by a processor.
The UFS device testing method includes the steps of firstly, generating a plurality of operation commands of different types in a system testing process of the UFS device by using a testing host, secondly, determining a first queue depth according to a preset command sending mode, asynchronously sending the operation commands of the first queue depth to the UFS device so that the UFS device stores the operation commands in a command queue mode, processes the operation commands according to a queue sequence, and returns a response after each operation command is completed, wherein the preset command sending mode comprises a fixed depth mode and a random depth mode, then, receives response responses returned by the UFS device, then, determines a second queue depth of the operation commands sent next according to the preset command sending mode and the counted number of the received response responses reflects the command processing condition of the current UFS device, provides a reliable reference for determining the second queue depth, and finally, sends the operation commands of the second queue depth to the UFS device, continues to store the operation commands in the command queue mode and processes the operation commands according to the queue sequence, all the operation commands are sent and executed, testing efficiency of the system is improved, and the testing efficiency of the system is fully tested by the UFS device is improved. That is, the embodiment of the application can adjust the queue depth of the operation command sent next time according to the command processing condition of the UFS device, thereby fully utilizing the command processing capability of the UFS device, shortening the test period for carrying out system test on the UFS device and improving the test efficiency.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
FIG. 1 is a schematic diagram of a functional module of a test host according to an embodiment of the present application;
fig. 2 is a schematic diagram of connection between a test host and a UFS device according to an embodiment of the present application;
fig. 3 is a flow chart of a system testing method for UFS devices according to an embodiment of the present application;
Fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent.
It should be understood that in the description of the present application, references to orientation descriptions such as upper, lower, front, rear, left, right, etc. are based on the orientation or positional relationship shown in the drawings, only for convenience of description and simplification of the description, and do not indicate or imply that the apparatus or element in question must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the present application.
It should be noted that although a logical order is illustrated in the flowchart in the description of the present application, in some cases, the steps illustrated or described may be performed in an order different from that in the flowchart. In the description of the present application, a plurality means one or more, and a plurality means two or more. The description of "first" and "second" is used for the purpose of distinguishing between technical features only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
The application provides a system testing method for UFS equipment, a testing host, electronic equipment and a computer readable storage medium, and relates to the technical field of UFS testing. The method comprises the steps of generating a plurality of operation commands of different types, determining a first queue depth according to a preset command sending mode, asynchronously sending the operation commands of the first queue depth to the UFS equipment, enabling the UFS equipment to process the operation commands according to a queue sequence, returning a response after each operation command is completed, receiving the response returned by the UFS equipment, determining a second queue depth according to the preset command sending mode and the number of statistic response, sending the operation commands of the second queue depth to the UFS equipment, and continuing to enable the UFS equipment to process the operation commands according to the queue sequence until all the operation commands are sent and executed, and completing system testing of the UFS equipment. The test period of system test on the UFS equipment can be shortened, and the test efficiency is improved.
Embodiments of the present application will be further described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic diagram of a functional module of a test host according to an embodiment of the present application. The test host 100 includes a command generation module 110, a first command transmission module 120, a response reception module 130, a depth adjustment module 140, and a second command transmission module 150.
Specifically, the command generation module 110 is configured to generate a plurality of different types of operation commands.
Specifically, the first command sending module 120 is configured to determine a first queue depth according to a preset command sending mode, and asynchronously send an operation command of the first queue depth to the UFS device, so that the UFS device stores the operation command in a command queue, processes the operation command according to a queue order, and returns a response when one operation command is completed, where the preset command sending mode includes a fixed depth mode and a random depth mode.
Specifically, the response receiving module 130 is configured to receive an acknowledgement response returned by the UFS device.
Specifically, the depth adjustment module 140 is configured to determine, according to the preset command transmission mode and the counted number of received response responses, a second queue depth of the operation command to be transmitted next.
Specifically, the second command sending module 150 is configured to send the operation command with the second queue depth to the UFS device, and continue to enable the UFS device to store the operation command in the form of a command queue and process the operation command according to the queue order until all the operation commands are sent and executed, so as to complete the system test of the UFS device.
It will be appreciated that during actual application, multiple threads are created, each for implementing the functionality of a module.
The test host 100 provided by the embodiment of the application can adjust the queue depth of the operation command sent next time according to the command processing condition of the UFS device through the mutual cooperation among the command generating module 110, the first command sending module 120, the response receiving module 130, the depth adjusting module 140 and the second command sending module 150, thereby fully utilizing the command processing capability of the UFS device, shortening the test period for performing system test on the UFS device, and improving the test efficiency.
As shown in fig. 2, the test host 100 is electrically connected to the UFS device 200, the host 300, and the power supply module 400, respectively. Specifically, the test case executable program is burned into the test host 100 from the host 300 by connecting the USB cable to the host 300, so as to run the test case and complete the system test for the UFS device 200. The test host is supplied with a voltage of 5V through the power supply module 400 to enable the test host 100 to start operation. A serial board is also provided on the actual test host 100 to provide serial printing. Specifically, the upper computer 300 is a PC device. The test host 100 is specifically a test board or an electronic device with a test board, and the model of the test board is not specifically limited in the present application.
It will be appreciated by persons skilled in the art that the system architecture shown in the figures is not limiting of the embodiments of the application and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
The system embodiments described above are merely illustrative, in that the units illustrated as separate components may or may not be physically separate, i.e., may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
It will be understood by those skilled in the art that the system architecture and the application scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and are not limited to the technical solution provided in the embodiments of the present application, and those skilled in the art can know that, with the evolution of the system architecture and the appearance of the new application scenario, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
Based on the above system configuration, various embodiments of the system testing method for UFS devices of the present application are set forth below.
In the first aspect, the system testing method of the UFS device can be applied to a test host as shown in fig. 2, where the test host is electrically connected to the UFS device, and as shown in fig. 3, the system testing method of the UFS device may include, but is not limited to, steps S110 to S140.
Step S110, generating a plurality of operation commands of different types.
Step S120, determining a first queue depth according to a preset command sending mode, and asynchronously sending operation commands of the first queue depth to the UFS equipment, so that the UFS equipment stores the operation commands in a command queue form, processes the operation commands according to a queue sequence, and returns a response after each operation command is completed, wherein the preset command sending mode comprises a fixed depth mode and a random depth mode.
And step S130, receiving a response returned by the UFS equipment.
Step S140, determining a second queue depth of the operation command transmitted next time according to the preset command transmission mode and the counted number of received response responses.
And step S150, sending the operation command with the second queue depth to the UFS equipment, continuing to enable the UFS equipment to store the operation command in a command queue form and process the operation command according to the queue sequence until all the operation commands are sent and executed, and completing the system test of the UFS equipment.
Specifically, the first queue depth refers to a first number of operation commands sent by the test motherboard to the UFS device.
Specifically, the second queue depth refers to a second number of operation commands sent by the test motherboard to the UFS device.
Specifically, the preset command sending modes include two different modes, and a fixed depth mode and a random depth mode are defined when the operation command sent by the test host is received from the UFS device. The depth of the command queue to be processed in the UFS device is fixed in the fixed depth mode, and the depth of the command queue to be processed in the UFS device is variable in the random depth mode.
In the process of carrying out system test on the UFS equipment by utilizing a test host, firstly, generating a plurality of operation commands of different types, secondly, determining a first queue depth according to a preset command transmission mode, asynchronously transmitting the operation commands of the first queue depth to the UFS equipment so that the UFS equipment stores the operation commands in a command queue form and processes the operation commands according to a queue sequence, and returning a response after each operation command is completed, wherein the preset command transmission mode comprises a fixed depth mode and a random depth mode, then, receiving response responses returned by the UFS equipment, then, determining a second queue depth of the operation commands transmitted next according to the preset command transmission mode and the counted number of the received response responses reflects the command processing condition of the current UFS equipment, and finally, transmitting the operation commands of the second queue depth to the UFS equipment, continuously storing the operation commands in the command queue form and processing the operation commands according to the queue sequence, until all the operation commands are transmitted, and the system test efficiency of the UFS equipment is fully shortened, and the system test capability of the UFS equipment is fully tested by utilizing the system test equipment is improved. That is, the embodiment of the application can adjust the queue depth of the operation command sent next time according to the command processing condition of the UFS device, thereby fully utilizing the command processing capability of the UFS device, shortening the test period for carrying out system test on the UFS device and improving the test efficiency.
Step S110 is further described according to some embodiments of the present application, step S110 generating a plurality of different types of operation commands including, but not limited to, steps S111 through S114.
Step S111, generating a random number with a logic address, a block size and a value in the range of 0 to 100%.
Step S112, determining a corresponding operation type according to a numerical value interval where the random number is located, wherein the operation type comprises a read operation, a write operation and an erase operation.
And step 113, performing command generation processing according to the logical address, the block size and the operation type to obtain an operation command, wherein the type of the operation command is determined by the operation type.
Step S114, repeating the command generating process for a plurality of times to obtain a plurality of operation commands, wherein the operation commands comprise a read command, a write command and an erase command.
Specifically, step S111 is further described. The logical addresses are generated in two ways, one of which is to randomly generate the logical addresses within a specified address range and the other is to generate the logical addresses by a random function within a range determined by the capacity length of the entire UFS device. The block size may be specified by pre-configuration information or may be randomly generated in the range of 1 to 128.
According to some embodiments of the present application, step S112 is further described, wherein step S112 includes determining a corresponding operation type according to a value interval in which the random number is located, including, but not limited to, determining the operation type as a read operation when the random number is greater than or equal to 0 and less than a first threshold, determining the operation type as a write operation when the random number is greater than or equal to the first threshold and less than a second threshold, wherein the second threshold is greater than the first threshold and determining the operation type as an erase operation when the random number is greater than or equal to the second threshold and less than or equal to 100%. And determining the operation type through the interval of the random number so as to indicate the type of the operation command to be generated.
As an example, a specific procedure of determining the operation type from the random number is explained.
Example one determines a first threshold, a second threshold according to a preset sequence (read, write, erase) of command duty cycle, wherein the first threshold is equal to the sum of the incoming percentage of write operations and the second threshold is equal to the sum of the incoming percentage of write operations and the incoming percentage of write operations, i.e. when the preset sequence of command duty cycle is 50% of read operations, 30% of write operations, 20% of erase operations, the preset first threshold is 50% and the second threshold is 80%, and further a value interval is determined based on the first threshold, the second threshold, in particular the value interval comprises a first interval [0, 50%) determined by 0 and the first threshold, a second interval [50%, 80%) determined by the first threshold and the second threshold, and a third interval [80%, 100%) determined by the second threshold and 100%. Generating a random number in a range of 0 to 100%, if the random number is 40%, 40% falls in a first section, judging that the operation type of the operation command to be generated is a read operation, if the random number is 50%, 50% falls in a second section, judging that the operation type of the operation command to be generated is a write operation, and if the random number is 80%, 80% falls in a third section, judging that the operation type of the operation command to be generated is an erase operation.
It will be appreciated that the command duty cycle of the preset sequence (read, write, erase) may be adjusted, and the first threshold and the second threshold may be adjusted, so the present application does not specifically limit the command duty cycle, the first threshold and the second threshold of the preset sequence (read, write, erase).
Through steps S111 to S114, a plurality of operation commands of different types are generated based on the logical address, the block size and the random number, which provides a basis for subsequent system testing of UFS devices.
After step S110 and before step S120, the system testing method for UFS devices according to the embodiment of the present application further includes determining a type of a preset command transmission mode according to the entered mode selection parameter. Specifically, when the mode selection parameter is 0, the preset command transmission mode is determined to be a random depth mode, and when the mode selection parameter is a non-zero positive number, the preset command transmission mode is determined to be a fixed depth mode.
According to some embodiments of the present application, further describing step S120, when the preset command transmission mode is a random depth mode, step S120 includes, but is not limited to, steps S210 to S220, determining the first queue depth according to the preset command transmission mode.
Step S210, obtaining the maximum command queue depth of the UFS equipment according to the random depth mode.
Step S220, determining the maximum command queue depth as the first queue depth.
Specifically, in step S210, the test host obtains the maximum command queue depth of the UFS device, where the maximum command queue depth refers to the maximum number of commands that the UFS device can simultaneously receive and process.
Through steps S210 to S220, the maximum command queue depth of the UFS device is determined as the first queue depth, and a reference is provided for the test host to initially send an operation command.
According to some embodiments of the present application, step S130 is further described, wherein when the preset command transmission mode is a random depth mode, step S130 is to determine a second queue depth of the next transmitted operation command according to the preset command transmission mode and the counted number of received response responses, including but not limited to steps S230 to S250.
Step S230, randomly generating delay time in a preset time range according to the random depth mode.
Step S240, counting the number of response responses returned by the UFS equipment received in the delay time.
Step S250, determining the number of received response responses in the delay time as the second queue depth.
It can be understood that in the random depth mode, the test host randomly generates a delay time, starts timing after sending the operation command of the first queue depth to the UFS device, counts the number of response responses returned by the received UFS device within the delay time, and determines the number of response responses received within the delay time as the second queue depth by counting the number of response responses received to reflect the command processing condition of the current UFS device and indicating that the current UFS device still has the remaining power to process a new operation command.
In the embodiment of the application, through the steps S230 to S250, the second queue depth of the operation instruction to be sent next is adjusted according to the number of the response responses received in the random delay time in the random depth mode, so that the operation command of the second queue depth is conveniently sent to the UFS equipment subsequently, the command processing capacity of the current UFS equipment is fully utilized, the test period for carrying out system test on the UFS equipment is shortened, and the test efficiency is improved.
It can be understood that the embodiment of the application realizes the asynchronous command processing mechanism based on the random depth mode through the steps S210, S220, S230, S240, S250 and S150, and under the asynchronous command processing mechanism based on the random depth mode, the system test is performed on the UFS device, so that the command processing capability of the current UFS device can be fully utilized, the test period for performing the system test on the UFS device can be shortened, and the test efficiency can be improved.
As an example, a specific process flow of an asynchronous command processing mechanism based on a random depth mode provided by an embodiment of the present application is described.
Example two when the maximum command queue depth for the UFS device is 32, the first queue depth is made equal to the maximum command queue depth 32. The test host first sends 32 operation commands to the UFS device. And when 28 response responses are received within 500ms, determining that the second queue depth of the operation command to be transmitted for the second time is 28, and transmitting 28 operation commands for the second time. And when 25 response responses are received within 400ms, determining that the second queue depth of the operation command to be transmitted for the third time is 25, and transmitting 25 operation commands for the third time. And the like, carrying out command sending processing for a plurality of times until the system test is completed. It is understood that the second queue depth of the operation command transmitted in each command transmission process is equal to the number of response responses received within a random delay time after the last command transmission process, except for the first command transmission process. Therefore, the command processing capability of the UFS equipment can be fully utilized, and the test period is shortened.
According to some embodiments of the present application, step S120 is further described, wherein when the preset command transmission mode is a fixed depth mode, step S120 is performed to determine the first queue depth according to the preset command transmission mode, including but not limited to steps S310 to S320.
Step S310, obtaining preset fixed depth according to a fixed depth mode, wherein the fixed depth is smaller than or equal to the maximum command queue depth of the UFS equipment.
Step S320, determining the fixed depth as the first queue depth.
It is understood that the fixed depth is preset, as long as the fixed depth is less than or equal to the maximum command queue depth of the UFS device, the value of the fixed depth is not specifically limited by the present application.
Through steps S310 to S320, a preset fixed depth is determined as a first queue depth, and a reference is provided for the test host to initially send an operation command.
According to some embodiments of the present application, step S130 is further described, wherein when the preset command transmission mode is a fixed depth mode, step S130 is to determine a second queue depth of the next transmitted operation command according to the preset command transmission mode and the counted number of received response responses, including but not limited to steps S330 to S340.
Step S330, according to the fixed depth mode, the number of response responses returned by the UFS equipment received each time is counted in real time.
And step 340, determining the number of response responses returned by the UFS equipment obtained through immediate statistics as a second queue depth, wherein the second queue depth is smaller than or equal to the fixed depth in a fixed depth mode.
It can be understood that in the fixed depth mode, the number of response responses returned by the UFS device received each time, counted by the test host in real time, reflects the command processing condition of the current UFS device, which indicates that the current UFS device still has the remaining power to process a new operation command, and the test host responds in real time, and determines the number of response responses returned by the UFS device obtained in real time as the second queue depth.
Through the steps S330 to S340, in the fixed depth mode, the number of response responses returned by the UFS equipment, which are obtained through statistics, is determined to be the second queue depth according to the response responses returned by the UFS equipment, so that the operation commands of the second queue depth are sent to the UFS equipment, the depth of a command queue storing the operation commands to be processed in the UFS equipment is kept to be the fixed depth, the UFS equipment is enabled to process the operation commands of the fixed depth efficiently and stably, the command processing capability of the current UFS equipment is fully utilized, the test period of system test on the UFS equipment is shortened, and the test efficiency is improved.
It can be understood that the embodiment of the application realizes the asynchronous command processing mechanism based on the fixed depth mode through the steps S310, S320, S330, S340 and S150, and under the asynchronous command processing mechanism based on the fixed depth mode, the system test is performed on the UFS device, so that the command processing capability of the current UFS device can be fully utilized, the test period for performing the system test on the UFS device is shortened, and the test efficiency is improved.
As an example, a specific process flow of an asynchronous command processing mechanism based on a fixed depth mode provided by an embodiment of the present application is described.
In an example III, when the preset parameter of the fixed depth is 8, the first queue depth is equal to the fixed depth of 8, and the test host sends 8 operation commands to the UFS device for the first time. When the test host receives one response, 1 operation command is immediately sent to enable the total number of operation commands to be processed in the UFS equipment to be not more than 8 (namely less than or equal to 8), when the test host receives two response, two operation commands are immediately sent to enable the total number of operation commands to be processed in the UFS equipment to be not more than 8 (namely less than or equal to 8), namely, one operation command is immediately sent to the UFS equipment as long as the response of the UFS equipment is received, and the command processing capacity of the UFS equipment can be fully utilized to shorten the test period.
From examples two and three, it can be appreciated that the asynchronous command processing mechanism based on the random depth mode is different from the asynchronous command processing mechanism based on the fixed depth mode in that in the random depth mode, the same number of operation instructions is sent by counting the number of all response responses received within a random event range, and in the fixed depth mode, the same number of operation instructions is sent immediately as soon as the response responses are received. From the perspective of the timing of transmitting the operation instruction, the random depth mode may be understood as a random delay transmission mode, and the fixed depth mode may be understood as a response transmission mode.
Further describing the system test method for the UFS device according to the embodiment of the present application, step S130 includes, after receiving the response returned by the UFS device, parsing the response to obtain execution status information, and when the execution status information is successful, judging that the response is normal and the operation command is successful, and when the execution status information is unsuccessful, judging that the response is abnormal and the operation command is unsuccessful. If the type of the operation command is a read operation, the original data written into the UFS device and the read data read from the UFS device are required to be compared, if the data are consistent, the read is judged to be correct, and if the data are inconsistent, the read is judged to be incorrect.
Step S150 is further described. It can be understood that the number of the operation commands to be sent by the test host and the specific content for performing the system test are determined by the program recorded in the test host by the upper computer, and when all the operation commands to be sent are processed, and the execution of the UFS device is completed, the system test is judged to be completed.
As shown in fig. 4, the present application further provides an electronic device, including:
The processor 401 may be implemented by a general purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an Application SPECIFIC INTEGRATED Circuit (ASIC), or one or more integrated circuits, etc. to execute related programs to implement the technical solution provided by the embodiments of the present application;
the Memory 402 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a random access Memory (Random Access Memory, RAM). Memory 402 may store an operating system and other application programs, and when implementing the technical solutions provided in the embodiments of the present disclosure by software or firmware, relevant program codes are stored in memory 402, and processor 401 invokes a system test method for performing the UFS device according to the embodiments of the present disclosure;
an input/output interface 403 for implementing information input and output;
The communication interface 404 is configured to implement communication interaction between the device and other devices, and may implement communication in a wired manner (such as USB, network cable, etc.), or may implement communication in a wireless manner (such as mobile network, WIFI, bluetooth, etc.);
A bus 405 for transferring information between the various components of the device (e.g., processor 401, memory 402, input/output interface 403, and communication interface 404);
wherein the processor 401, the memory 402, the input/output interface 403 and the communication interface 404 are in communication connection with each other inside the device via a bus 405.
The embodiment of the application also provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program realizes the system testing method for the UFS device when being executed by a processor.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The apparatus embodiments described above are merely illustrative, in which the elements illustrated as separate components may or may not be physically separate, implemented to reside in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and may include any information delivery media.
While the preferred embodiments of the present application have been described in detail, the present application is not limited to the above embodiments, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the present application, and these equivalent modifications and substitutions are intended to be included in the scope of the present application.

Claims (8)

1. The system testing method for the UFS equipment is characterized by being applied to a testing host, wherein the testing host is electrically connected with the UFS equipment, and comprises the following steps of:
Generating a plurality of different types of operation commands;
Determining a first queue depth according to a preset command sending mode, and asynchronously sending the operation commands of the first queue depth to UFS equipment so that the UFS equipment stores the operation commands in a command queue form, processes the operation commands according to a queue sequence, and returns a response after completing one operation command, wherein the preset command sending mode comprises a fixed depth mode and a random depth mode;
receiving a response returned by the UFS equipment;
Determining a second queue depth of the operation command transmitted next time according to the preset command transmission mode and the counted number of received response responses;
Sending the operation command with the second queue depth to the UFS equipment, continuing to enable the UFS equipment to store the operation command in a command queue form and process the operation command according to a queue sequence until all the operation commands are sent and executed, and completing the system test of the UFS equipment;
Wherein, the determining the second queue depth of the operation command to be sent next according to the preset command sending mode and the counted number of received response responses includes:
When the preset command sending mode is a random depth mode, randomly generating delay time in a preset time range according to the random depth mode, counting the number of response responses returned by the UFS equipment received in the delay time, and determining the number of response responses received in the delay time as the second queue depth;
When the preset command sending mode is a fixed depth mode; and determining the number of the response responses returned by the UFS equipment, which are obtained through the instant statistics, as a second queue depth, wherein the second queue depth is smaller than or equal to the fixed depth in the fixed depth mode.
2. The method for testing the system of the UFS device of claim 1, wherein when the predetermined command transmission mode is a random depth mode, the determining the first queue depth according to the predetermined command transmission mode includes:
obtaining the maximum command queue depth of the UFS equipment according to the random depth mode;
the maximum command queue depth is determined as the first queue depth.
3. The system testing method for UFS devices of claim 1, wherein when said preset command transmission mode is a fixed depth mode, said determining a first queue depth according to said preset command transmission mode comprises:
acquiring a preset fixed depth according to the fixed depth mode, wherein the fixed depth is smaller than or equal to the maximum command queue depth of the UFS equipment;
The fixed depth is determined as the first queue depth.
4. The system testing method for UFS devices of claim 1, wherein said generating a plurality of different types of operation commands comprises:
generating a random number with a logic address, a block size and a value in the range of 0 to 100%;
Determining a corresponding operation type according to a numerical value interval where the random number is located, wherein the operation type comprises a read operation, a write operation and an erase operation;
Performing command generation processing according to the logical address, the block size and the operation type to obtain the operation command, wherein the type of the operation command is determined by the operation type;
And repeating the command generating process for a plurality of times to obtain a plurality of operation commands, wherein the operation commands comprise a read command, a write command and an erase command.
5. The system testing method for UFS devices of claim 4, wherein said determining the corresponding operation type according to the numerical interval in which the random number is located includes:
When the random number is greater than or equal to 0 and less than a first threshold, determining that the operation type is a read operation;
When the random number is larger than or equal to the first threshold value and smaller than a second threshold value, determining that the operation type is write operation, wherein the second threshold value is larger than the first threshold value;
When the random number is greater than or equal to the second threshold value and less than or equal to 100%, the operation type is determined to be an erase operation.
6. A test host capable of performing the system test method for UFS devices of claim 1, said test host comprising:
the command generation module is used for generating a plurality of operation commands of different types;
The first command sending module is used for determining a first queue depth according to a preset command sending mode, and asynchronously sending the operation commands of the first queue depth to the UFS equipment so that the UFS equipment stores the operation commands in a command queue form, processes the operation commands according to a queue sequence and returns a response when one operation command is completed;
the response receiving module is used for receiving a response returned by the UFS equipment;
the depth adjustment module is used for determining the depth of a second queue of the operation command to be transmitted next according to the preset command transmission mode and the counted number of received response responses;
And the second command sending module is used for sending the operation commands with the second queue depth to the UFS equipment, continuously enabling the UFS equipment to store the operation commands in a command queue form and process the operation commands according to a queue sequence until all the operation commands are sent and executed, and completing the system test of the UFS equipment.
7. An electronic device comprising at least one processor and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the system testing method for UFS devices of any one of claims 1-5.
8. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the system testing method of UFS devices of any one of claims 1 to 5.
CN202510623667.5A 2025-05-15 2025-05-15 System testing method for UFS devices and test host, equipment and media Active CN120199314B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510623667.5A CN120199314B (en) 2025-05-15 2025-05-15 System testing method for UFS devices and test host, equipment and media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510623667.5A CN120199314B (en) 2025-05-15 2025-05-15 System testing method for UFS devices and test host, equipment and media

Publications (2)

Publication Number Publication Date
CN120199314A CN120199314A (en) 2025-06-24
CN120199314B true CN120199314B (en) 2025-08-08

Family

ID=96065758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510623667.5A Active CN120199314B (en) 2025-05-15 2025-05-15 System testing method for UFS devices and test host, equipment and media

Country Status (1)

Country Link
CN (1) CN120199314B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120581060B (en) * 2025-08-04 2025-10-03 珠海妙存科技有限公司 Stability testing method, system and device for UFS equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117012268A (en) * 2023-06-30 2023-11-07 珠海妙存科技有限公司 Method, controller, system and medium for testing maximum performance of UFS
CN117407253A (en) * 2023-09-14 2024-01-16 深圳市德明利技术股份有限公司 UFS performance test method and device and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8893146B2 (en) * 2009-11-13 2014-11-18 Hewlett-Packard Development Company, L.P. Method and system of an I/O stack for controlling flows of workload specific I/O requests
US10282220B2 (en) * 2015-11-05 2019-05-07 Dell Products, L.P. Dynamic allocation of queue depths for virtual functions in a converged infrastructure
WO2020077495A1 (en) * 2018-10-15 2020-04-23 华为技术有限公司 Command scheduling method and device and storage medium
US11698752B2 (en) * 2020-12-03 2023-07-11 Micron Tehcnology, Inc. Retransmitting messages based on command queue depth in a memory subsystem
CN116610445A (en) * 2023-04-21 2023-08-18 维沃移动通信有限公司 Queue depth adjustment method, device, electronic device and readable storage medium
CN119473740A (en) * 2024-11-06 2025-02-18 超聚变数字技术有限公司 A storage performance testing method, device and medium
CN119669017A (en) * 2024-11-28 2025-03-21 抖音视界有限公司 Memory queue depth detection method, load simulation method, device and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117012268A (en) * 2023-06-30 2023-11-07 珠海妙存科技有限公司 Method, controller, system and medium for testing maximum performance of UFS
CN117407253A (en) * 2023-09-14 2024-01-16 深圳市德明利技术股份有限公司 UFS performance test method and device and electronic equipment

Also Published As

Publication number Publication date
CN120199314A (en) 2025-06-24

Similar Documents

Publication Publication Date Title
CN120199314B (en) System testing method for UFS devices and test host, equipment and media
CN102034071B (en) Automatic test system and automatic test method for testing bar code identification device
CN112684982B (en) Data migration method, system, equipment and computer readable storage medium
CN110659171A (en) Test method, electronic device and computer readable storage medium
CN108650501B (en) A kind of method, apparatus and electronic equipment for testing stability of set-top box
US20250286750A1 (en) Communication interaction method, apparatus, device, and storage medium
CN109933479B (en) Fault simulation and simulation method and related equipment
CN103530233B (en) Automated testing method, testing server and the system of mobile browser
CN113219319B (en) Integrated test board card, chip test system and chip test method
CN112882727A (en) Networking module production testing method, production testing tool and computer equipment
CN116340191B (en) Method, device, equipment and medium for testing memory firmware
CN115985382A (en) Flash memory test method, device, equipment and storage medium
CN115002135B (en) Multi-terminal cooperation method, device, system and computer readable storage medium
CN116755024A (en) Method and device for testing electric energy meter communication interface and readable storage medium
CN116302020A (en) FPGA logic program upgrading method, device, equipment and medium
CN117724443B (en) Cabin machine testing method and device, computer equipment and storage medium
CN115277284A (en) Communication method, communication device, communication system, and computer-readable storage medium
CN114094680B (en) Charging method and device for charging wire and storage medium
CN118260131B (en) Method and device for testing operation performance of expansion module
CN114328313B (en) Information transmission method and system
CN111929615A (en) Performance detection device and method of magnetic suspension control line and electronic equipment
CN116560346A (en) Vehicle fault code testing method, device, storage medium and electronic device
CN113626279B (en) I2C communication monitoring method, device, CPLD and medium
CN117831602A (en) Flash memory repairing method, system, electronic equipment and storage medium
CN117421189A (en) Recording method and device of failure information, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant