UFS power consumption switching verification method, test host, equipment and medium
By determining the target path and power consumption selection mode in the test host and simulating multiple switching scenarios for cyclic testing, the reliability issue of UFS devices in low power consumption mode was resolved, ensuring the effectiveness and reliability of power consumption switching.
Patent Information
- Application Number
- CN202510659567.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-16
AI Technical Summary
In the prior art, when a UFS device switches from a normal working mode to a low power mode, problems such as failure to meet low power requirements and difficulty in waking up may occur, resulting in unreliable power switching verification.
By determining the target path selection mode and power consumption selection mode in the test host, simulating multiple power consumption switching scenarios, and performing cyclic testing to verify the power consumption switching function of the UFS device, ensuring that the requirements are met after switching into low-power mode and successfully exiting.
It achieves reliable power consumption switching verification of UFS devices, ensures the effectiveness of performance in different low-power modes, and improves the reliability and comprehensiveness of the test.
Smart Images

Figure CN120653550A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of UFS testing technology, and in particular to a method for verifying power consumption switching of UFS, as well as a test host, device, and medium. Background Art
[0002] With the rapid development of UFS, the industry's power consumption requirements are becoming increasingly stringent. Given that UFS (Universal Flash Storage) devices are priced similarly, the lower the power consumption, the greater the advantage. Low power consumption has become a key focus for every memory chip manufacturer, and each manufacturer has a different power consumption model. UFS devices must be verified and tested before they leave the factory.
[0003] Currently, when a UFS device switches from normal operating mode to a low-power mode (such as Standby or Sleep), power consumption is significantly reduced. However, after entering low-power mode, problems may arise, such as failing to meet low-power requirements, being unable to exit low-power mode, and difficulty waking up. Therefore, reliably verifying the effectiveness of UFS devices' power switching capabilities and their performance in different low-power modes is an urgent issue. Summary of the Invention
[0004] This application aims to solve at least one of the technical problems existing in the prior art. To this end, this application proposes a power switching verification method for UFS, as well as a test host, device, and medium. The method can determine the target test path and target power switching mode through a preset selection method, simulate multiple power switching test scenarios, and thus reliably complete power switching verification for UFS devices.
[0005] In a first aspect, an embodiment of the present application provides a method for verifying power consumption switching of a UFS, which is applied to a test host, wherein the test host is communicatively connected to a UFS device; the method includes:
[0006] determining a target path selection mode from candidate path selection modes;
[0007] determining a target power consumption selection mode from candidate power consumption selection modes;
[0008] Performing a test path determination process according to the target path selection mode to determine a target test path from candidate test paths;
[0009] performing a power consumption mode determination process according to the target power consumption selection mode, and determining a target power consumption switching mode from candidate power consumption switching modes;
[0010] Performing a power consumption switching verification test according to the target test path and the target power consumption switching mode to obtain a verification test result;
[0011] When the verification test result is: the low power consumption requirement is met after switching into the low power consumption mode and the low power consumption mode is successfully exited, the path determination process, the power consumption mode determination process, and the power consumption switching verification test process are re-performed to establish a cyclic test.
[0012] In a second aspect, an embodiment of the present application provides a test host comprising at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the power consumption switching verification method for UFS as described in any one of the embodiments of the first aspect.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, including: a test host as described in the embodiment of the second aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the power consumption switching verification method for UFS as described in any one of the embodiments of the first aspect.
[0015] An embodiment of the present application includes: in the process of performing power consumption switching verification on UFS, first, determining a target path selection mode from candidate path selection modes; secondly, determining a target power consumption selection mode from candidate power consumption selection modes; then, performing a test path determination process according to the target path selection mode, and determining a target test path from candidate test paths; then, performing a power consumption mode determination process according to the target power consumption selection mode, and determining a target power consumption switching mode from candidate power consumption switching modes; then, performing a power consumption switching verification test process according to the target test path and the target power consumption switching mode to obtain a verification test result; simulating a power consumption switching test scenario by selecting the target test path and the target power consumption switching mode, and completing a reliable power consumption switching verification test for the UFS device; when the verification test result is: meeting the low power consumption requirements after switching into the low power consumption mode, and successfully exiting the low power consumption mode, re-performing the path determination process, the power consumption mode determination process, and the power consumption switching verification test process to establish a loop test. In this way, a long-term cyclic test is established. During the long-term cyclic test, the target test path and target power consumption switching mode are determined by a preset selection method, and various power consumption switching test scenarios are simulated, thereby reliably verifying the effectiveness of the power consumption switching function of the UFS device and its performance in different low-power modes. In other words, the power consumption switching verification of the UFS device is reliably completed. In other words, the embodiments of the present application can determine the target test path and target power consumption switching mode by a preset selection method, simulate various power consumption switching test scenarios, and thus reliably complete the power consumption switching verification of the UFS device.
[0016] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 1 is a schematic diagram of a system architecture for executing a power consumption switching verification method for a UFS provided by an embodiment of the present application;
[0018] Figure 2 This is a flowchart of a method for verifying power consumption switching of a UFS provided by an embodiment of the present application;
[0019] Figure 3 This is an embodiment of the present application. Figure 1 Flow chart of the specific method of step S150;
[0020] Figure 4 This is a schematic diagram of the overall process of a power consumption switching verification method for UFS provided by an embodiment of the present application;
[0021] Figure 5 This is a hardware structure diagram of a test host provided in one embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of this application more clear, this application is further described in detail below with reference to the accompanying drawings and embodiments.
[0023] It should be understood that in the description of this application, descriptions of orientations, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on this application.
[0024] It should be noted that although a logical order is shown in the flowchart in the description of this application, in some cases, the steps shown or described may be performed in an order different from that in the flowchart. In the description of this application, "several" means one or more, and "more" means two or more. The description of "first" and "second" is only used to distinguish technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0026] The present application provides a method for verifying power consumption switching of a UFS, a test host, an electronic device, and a computer-readable storage medium, and relates to the field of UFS testing technology. The method includes: performing a test path determination process based on a target path selection mode determined from candidate path selection modes, and determining a target test path from candidate test paths; performing a power consumption mode determination process based on a target power consumption selection mode determined from candidate power consumption selection modes, and determining a target power consumption switching mode from candidate power consumption switching modes; performing a power consumption switching verification test process based on the target test path and the target power consumption switching mode to obtain a verification test result; when the verification test result is: after switching to a low power consumption mode, the low power consumption requirement is met, and the low power consumption mode is successfully exited, the path determination process, the power consumption mode determination process, and the power consumption switching verification test process are re-performed to establish a loop test. The power consumption switching verification of the UFS device can be reliably completed.
[0027] The embodiments of the present application are further described below with reference to the accompanying drawings.
[0028] like Figure 1 As shown, the test host 100 is electrically connected to the UFS device 200, the host computer 300, and the power supply module 400, respectively. Specifically, it is connected to the host computer 300 via a USB cable, so that the test case executable program is burned from the host computer 300 to the test host 100, so as to run the test case and complete the power consumption switching verification of the UFS device 200. Among them, a 5V voltage is provided to the test host through the power supply module 400 so that the test host 100 can start working. The actual test host 100 is also provided with a serial port board to provide serial port printing. Specifically, the host computer 300 is a PC device. The test host 100 is specifically a test board, or an electronic device or electronic device equipped with a test board; this application does not impose specific restrictions on the model of the test board.
[0029] Those skilled in the art will understand that the system structure shown in the figure does not constitute a limitation on the embodiments of the present application, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0030] The system embodiment described above is merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0031] Those skilled in the art will understand that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will know that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0032] Based on the above system structure, various embodiments of the power consumption switching verification method for UFS of the present application are proposed below.
[0033] First, as Figure 3 As shown, the power consumption switching verification method for UFS can be applied to Figure 1 The test host shown is in communication with the UFS device; the power consumption switching verification method for the UFS may include but is not limited to steps S110 to S160.
[0034] Step S110: determining a target path selection mode from candidate path selection modes.
[0035] Step S120: determining a target power consumption selection mode from candidate power consumption selection modes.
[0036] Step S130: performing a test path determination process according to the target path selection mode, and determining a target test path from the candidate test paths.
[0037] Step S140: performing a power consumption mode determination process according to the target power consumption selection mode, and determining a target power consumption switching mode from the candidate power consumption switching modes.
[0038] Step S150: performing a power consumption switching verification test according to the target test path and the target power consumption switching mode to obtain a verification test result.
[0039] Step S160: When the verification test result is: the low power consumption requirement is met after switching into the low power consumption mode and the low power consumption mode is successfully exited, the path determination process, the power consumption mode determination process, and the power consumption switching verification test process are re-performed to establish a cyclic test.
[0040] To further illustrate step S110, the target path selection mode and each candidate path selection mode are used to indicate a method for selecting a target test path from multiple candidate test paths. Different candidate path selection modes indicate different methods for selecting a target test path.
[0041] Specifically, the candidate path selection modes include: a path sequential selection mode and a path random selection mode.
[0042] Specifically, one of the path sequential selection mode and the path random selection mode can be selected as the target path selection mode through instructions and pre-configured selection parameters. This application does not impose any specific restrictions on the method of determining the target path selection mode.
[0043] To further illustrate step S120, the target power consumption selection mode and each candidate power consumption selection mode are used to indicate a method for selecting a target power consumption switching mode from multiple candidate power consumption switching modes. Different candidate power consumption switching modes indicate different methods for selecting the target power consumption switching mode.
[0044] Specifically, the candidate power consumption selection modes include: a power consumption sequential selection mode and a power consumption random selection mode.
[0045] Specifically, one of the power consumption sequential selection mode and the power consumption random selection mode can be selected as the target power consumption selection mode through instructions and pre-configured selection parameters. This application does not impose any specific restrictions on the method of determining the target power consumption selection mode.
[0046] It can be understood that after permutations and combinations in the embodiments of the present application, the selection mode combinations that may be involved include: path sequence selection mode and power consumption sequence selection mode, path sequence selection mode and power consumption random selection mode, path random selection mode and power consumption sequence selection mode, and path random selection mode and power consumption random selection mode.
[0047] Specifically, the power consumption switching verification test process of the present application is used to verify whether the UFS power consumption meets the low power consumption requirements after the UFS device enters the low power consumption mode, and to verify whether the UFS device can be awakened and successfully exit the low power consumption mode.
[0048] Through steps S110 to S160, in the process of performing power consumption switching verification on the UFS, first, the target path selection mode is determined from the candidate path selection modes; secondly, the target power consumption selection mode is determined from the candidate power consumption selection modes; then, a test path determination process is performed according to the target path selection mode, and the target test path is determined from the candidate test paths; then, a power consumption mode determination process is performed according to the target power consumption selection mode, and the target power consumption switching mode is determined from the candidate power consumption switching modes; then, a power consumption switching verification test process is performed according to the target test path and the target power consumption switching mode to obtain a verification test result; the power consumption switching test scenario is simulated by the selected target test path and the target power consumption switching mode, and a reliable power consumption switching verification test is completed for the UFS device; when the verification test result is: the low power consumption requirement is met after switching to the low power consumption mode, and the low power consumption mode is successfully exited, the path determination process, the power consumption mode determination process, and the power consumption switching verification test process are re-performed to establish a loop test. In this way, a long-term cyclic test is established. During the long-term cyclic test, the target test path and target power consumption switching mode are determined by a preset selection method, and various power consumption switching test scenarios are simulated, thereby reliably verifying the effectiveness of the power consumption switching function of the UFS device and its performance in different low-power modes. In other words, the power consumption switching verification of the UFS device is reliably completed. In other words, the embodiments of the present application can determine the target test path and target power consumption switching mode by a preset selection method, simulate various power consumption switching test scenarios, and thus reliably complete the power consumption switching verification of the UFS device.
[0049] According to some embodiments of the present application, the candidate path selection mode includes: a path sequence selection mode and a path random selection mode; further explaining step S130, step S130: performing test path determination processing according to the target path selection mode, determining the target test path from the candidate test paths, including but not limited to step S131 and step S132.
[0050] Step S131: When the target path selection mode is the path sequence selection mode, when the test path determination process is performed for the first time, the first candidate test path is determined in sequence as the target test path; when the test path determination process is not performed for the first time, based on the candidate test path determined last time, the next candidate test path is determined in sequence as the target test path.
[0051] Step S132: When the target path selection mode is the random path selection mode, each time the test path determination process is performed, a candidate test path is randomly determined from a plurality of candidate test paths as the target test path.
[0052] Specifically, the candidate test paths include: a first candidate path, a second candidate path, a third candidate path, a fourth candidate path, and a fifth candidate path. It is understandable that different candidate paths indicate different types of operation commands sent to the UFS device.
[0053] Specifically, the target test path indicates the type of operation command sent to the UFS device.
[0054] It is understandable that the use of a sequential path selection mode facilitates a more comprehensive simulation of various application scenarios of UFS devices. In actual use, the operations performed on a UFS device are uncertain, and the use of a random path selection mode facilitates a more realistic simulation of UFS device application scenarios. Therefore, this application does not impose specific restrictions on the type of target path selection mode to be used, and the selected target path selection mode can be determined based on actual testing requirements.
[0055] Through step S131 or step S132, the target test path is determined from multiple candidate test paths to lay a reference foundation for the power switching verification test process. By setting multiple different candidate test paths and different test path selection modes, it is beneficial to enrich the power switching test scenarios during long-term cyclic testing and improve the reliability of power switching verification.
[0056] According to some embodiments of the present application, the candidate power consumption selection modes include: a power consumption sequential selection mode and a power consumption random selection mode. Further describing step S140, step S140: performing power consumption mode determination processing according to the target power consumption selection mode, determining the target power consumption switching mode from the candidate power consumption switching modes, including but not limited to steps S141 and S142.
[0057] Step S141: when the target power consumption selection mode is the power consumption sequence selection mode, if the power consumption mode determination process is performed for the first time, the first candidate power consumption switching mode is sequentially determined as the target power consumption switching mode; if the power consumption mode determination process is not performed for the first time, a candidate power consumption switching mode is randomly determined from multiple candidate power consumption switching modes as the target power consumption switching mode;
[0058] Step S142 : when the target power consumption selection mode is the random power consumption selection mode, determining a candidate power consumption switching mode from a plurality of candidate power consumption switching modes as the target power consumption switching mode.
[0059] Specifically, the candidate power consumption switching modes include: a first power consumption switching mode, a second power consumption switching mode, a third power consumption switching mode, and a fourth power consumption switching mode. It is understandable that different power consumption switching modes indicate different switching methods and levels of low power consumption modes entered.
[0060] Specifically, the target power consumption switching mode indicates: a switching method for causing the UFS device to enter a power consumption mode from a normal operating mode, and a level of the low power consumption mode entered by the UFS device.
[0061] It is understandable that the use of the power consumption sequence selection mode is conducive to more comprehensive simulation of various power consumption switching scenarios of UFS devices. In actual use of UFS devices, the level of low power consumption mode entered by the UFS device is uncertain, and the use of the power consumption random selection mode is conducive to simulating the real application scenarios of UFS devices. Therefore, this application does not impose specific restrictions on the type of target power consumption selection mode to be used, and it can be determined according to actual testing requirements.
[0062] Through step S141 or step S142, the target power switching mode is determined from multiple candidate power switching modes, thereby laying a reference foundation for the power switching verification test process. Therefore, by setting multiple different candidate power switching modes and different power selection modes, it is beneficial to enrich the power switching test scenarios during long-term cycle testing and improve the reliability of power switching verification.
[0063] According to some embodiments of the present application, Figure 3 As shown, step S150 is further described. Step S150: performing a power consumption switching verification test according to a target test path and a target power consumption switching mode to obtain a verification test result, including but not limited to steps S151 to S156.
[0064] Step S151: sending an operation command to the UFS device according to the target test path, so that the UFS device executes the operation command.
[0065] Step S152 : When the UFS device finishes executing the operation instruction, the UFS device is switched to a low power mode according to the target power consumption switching mode.
[0066] Step S153: performing power consumption detection processing on the UFS device switched into the low power consumption mode to obtain the UFS power consumption of the UFS device.
[0067] Step S154: comparing the UFS power consumption with a preset power consumption threshold, and determining a power consumption verification result according to the comparison result.
[0068] Step S155: When the power consumption verification result is: the low power consumption requirement is met after switching to the low power consumption mode, the UFS device is woken up to obtain a wake-up verification result.
[0069] Step S156: Determine the verification test result according to the power consumption verification result and the wake-up verification result.
[0070] Through steps S151 to S156 , a power consumption switching test scenario is simulated by using the selected target test path and target power consumption switching mode, thereby completing a reliable power consumption switching verification test for the UFS device.
[0071] According to some embodiments of the present application, step S151 is further described. Step S151: sending an operation command to the UFS device according to the target test path, so that the UFS device executes the operation command, including but not limited to steps S1511 to S1515.
[0072] Step S1511: When the target test path is the first candidate path, a write command is sent to the UFS device, so that the UFS device executes the write data operation indicated by the write command.
[0073] Step S1512: When the target test path is the second candidate path, a read command is sent to the UFS device, so that the UFS device executes the read command.
[0074] Step S1513: When the target test path is the third candidate path, an erase command is sent to the UFS device, so that the UFS device executes the erase command.
[0075] Step S1514: When the target test path is: the fourth candidate path, a SCSI command is sent to the UFS device, so that the UFS device executes the SCSI command.
[0076] Step S1515: When the target test path is the fifth candidate path, a Query command is sent to the UFS device, so that the UFS device executes the Query command.
[0077] Specifically, after executing step S1511 to send a write command to the UFS device, when the data transmission is completed, then execute step S152; when executing step S1512 to send a read command to the UFS device, when the data reception is completed, then execute step S152; when executing step S1513 to send an erase command to the UFS device, when the erase command execution is completed, then execute step S152; when executing step S1514 to send a SCSI command to the UFS device, when the SCSI command execution is completed, then execute step S152; when executing step S1515 to send a Query command to the UFS device, when the Query command is completed, then execute step S152.
[0078] Specifically, SCSI (Small Computer System Interface) commands are a standardized set of instructions used for communication between computers and storage devices (such as hard drives, tape drives, optical drives, etc.) or other peripherals. In this application, SCSI commands define how a test host sends operation requests to a UFS device and what operations the UFS device performs in response to the operation requests. The specific content of SCSI commands is determined by the protocol and is not specifically limited in this application.
[0079] Specifically, the Query command is a mechanism for device management, configuration, and status query between the test host and the UFS device. The specific content of the Query command is determined by the protocol, and this application does not impose any specific restrictions on the specific content of the Query command.
[0080] Through step S151 , the test operation on the UFS device is completed; through steps S1511 to S1515 , various scenarios of UFS device execution commands are established.
[0081] According to some embodiments of the present application, the low power consumption mode includes: a first level power consumption mode, a second level power consumption mode, a third level power consumption mode, and a fourth level power consumption mode; that is, the low power consumption mode includes: different levels of low power consumption modes. Further describing step S152, wherein the UFS device is switched to the low power consumption mode according to the target power consumption switching mode, includes but is not limited to steps S1521 to S1524.
[0082] Step S1521: When the target power consumption switching mode is the first power consumption switching mode, a first switching command is sent to the UFS device through the application layer to enable the UFS device to enter the first level power consumption mode.
[0083] Step S1522: When the target power consumption switching mode is the second power consumption switching mode, the UFS device itself is switched to the second level power consumption mode, and the UFS device is not operated within a preset period.
[0084] Step S1523: When the target power consumption switching mode is the third power consumption switching mode, a second switching command is sent to the UFS device through the communication module to enable the UFS device to enter the third level power consumption mode.
[0085] Step S1524: When the target power consumption switching mode is the fourth power consumption switching mode, a first switching command is sent to the UFS device through the application layer, and a second switching command is sent to the UFS device through the communication module, so that the UFS device enters the fourth power consumption mode.
[0086] During the execution of the method, steps S1521 to S1524 are not executed in a certain order, but are executed one by one from step S1521 to step S1524.
[0087] Specifically, in step S1523, the communication device refers to a Device Manager Entity (DME) unit, which is a core module responsible for communication between the test host and the UFS device.
[0088] Specifically, the first switching command is a START STOP UNIT command. The START STOP UNIT command is a standard command in the SCSI protocol family (including UFS, SATA, SAS, etc.), and is mainly used to control the power state or mechanical operation of the storage device.
[0089] Specifically, the second switching command is an H8 command. The H8 (Hibernate 8) command is a power state switching instruction defined by the UFS protocol.
[0090] Further explaining step S1524, when the first switching command and the second switching command are received simultaneously, the UFS device enters the fourth level power consumption mode.
[0091] It should be noted that the first level power consumption mode, the second level power consumption mode, the third level power consumption mode and the fourth level power consumption mode are different from each other. This application does not limit the specific mode content of the first level power consumption mode, the second level power consumption mode, the third level power consumption mode and the fourth level power consumption mode.
[0092] Through steps S1521 to S1524 , it is possible to switch modes to enter different levels of low power consumption modes based on the determined different target power consumptions.
[0093] Further explaining step S153, step S153 specifically includes: after the UFS device enters the low power mode, detecting the current in the UFS device through the current module, and calculating the UFS power consumption of the UFS device in the low power mode based on the detected current, thereby further determining whether the low power mode meets the low power requirements.
[0094] According to some embodiments of the present application, step S154 is further described. Step S154: comparing the UFS power consumption with a preset power consumption threshold, and determining a power consumption verification result based on the comparison result, includes step S1541 and step S1542.
[0095] Step S1541: When the comparison result is that the UFS power consumption is less than or equal to the preset power consumption threshold, determining that the power consumption verification result is that the low power consumption requirement is met after switching to the low power consumption mode;
[0096] Step S1542: When the comparison result is that the UFS power consumption is greater than the preset power consumption threshold, the power consumption verification result is determined to be that the low power consumption requirement is not met after switching to the low power consumption mode.
[0097] It should be noted that the preset power consumption threshold can be determined according to the low power consumption requirements of different manufacturers, and this application does not impose any specific restrictions on the value of the preset power consumption threshold.
[0098] By comparing the UFS power consumption with the preset power consumption threshold through steps S1541 and S1542, a power consumption verification result is obtained, which provides a reference for whether to perform subsequent wake-up processing. Among them, when the power consumption verification result is: the low power consumption requirement is met after switching to low power consumption mode, it is verified that the power consumption of the UFS device can meet the requirement after entering low power consumption mode.
[0099] In one embodiment, after determining the power consumption verification result in step S154 , when the power consumption verification result is: the low power consumption requirement is not met after switching to the low power consumption mode, the power consumption switching verification method for the UFS is terminated.
[0100] In one embodiment, when the power consumption verification result is: the low power consumption requirement is met after switching to the low power consumption mode, step S155 is continued.
[0101] Further explaining step S155, step S155 specifically includes: when the power consumption verification result is: after switching to low power consumption mode, the low power consumption requirement is met, then the UFS device is woken up to determine whether the low power consumption mode is successfully exited and the UFS device is woken up. If so, the wake-up verification result is: successful exit from low power consumption mode, verifying that after entering low power consumption mode, in common scenarios, the wake-up command is not lost, and low power consumption mode can be exited normally without affecting the subsequent use of the UFS device; if not, the wake-up verification result is: failure to exit low power consumption mode. If exiting low power consumption mode fails, the power consumption switching verification method for UFS is terminated. If exiting low power consumption mode successfully, then proceed to steps S130 to S160 of the embodiment of the present application.
[0102] Further explaining step S156, since the UFS power switching verification will be terminated if the low power requirement is not met after switching to low power mode or if the exit from low power mode fails, the verification test result determined by the power verification result and the wake-up verification result may be one of the following three: the first is that the low power requirement is met after switching to low power mode and the low power mode is successfully exited; the second is that the low power requirement is met after switching to low power mode and the exit from low power mode fails; and the third is that the low power requirement is not met after switching to low power mode. Only in the case of the first verification test result is the UFS power switching verification method repeatedly performed. In the case of the second and third verification test results, the UFS power switching verification method is terminated.
[0103] Combine Figure 4 , taking an example to further illustrate the overall process of the power consumption switching verification method for UFS provided in the embodiment of the present application.
[0104] First, determine the target path selection mode (path sequence selection mode or path random selection mode), and determine one of the path sequence selection mode and the path random selection mode as the target path selection mode; at the same time, determine the target power consumption selection mode (power consumption sequence selection mode or power consumption random selection mode), that is, determine one of the power consumption sequence selection mode and the power consumption random selection mode as the target power consumption selection mode.
[0105] Secondly, referring to the target path selection mode, a target test path is selected from the first candidate path, the second candidate path, the third candidate path, the fourth candidate path, and the fifth candidate path.
[0106] Next, execute the target test path: send an operation command to the UFS device, determine after the operation command is executed, and determine the target power consumption switching mode from the first power consumption switching mode, the second power consumption switching mode, the third power consumption switching mode, and the fourth power consumption switching mode according to the target power consumption selection mode; based on the target power consumption switching mode, the UFS device enters the low power consumption mode.
[0107] Then, the UFS power consumption is detected in low power mode.
[0108] Next, determine whether the UFS power consumption is not greater than the preset power consumption threshold. If not, end; if so, exit the low power mode; determine whether the low power mode is successfully exited. If not, end; if so, return to execution: refer to the target path selection mode, select a target test path from the first candidate path, the second candidate path, the third candidate path, the fourth candidate path, and the fifth candidate path to form a long-term loop test.
[0109] Specifically, if the target path selection mode is: path sequence selection mode, and the target power consumption selection mode is: power consumption sequence selection mode; then during the first verification, the first candidate path is selected in sequence, the first candidate path is executed, and a write command is sent to the UFS device. When the UFS device completes executing the write command, the first power consumption switching mode is selected in sequence, and the UFS device is switched into the first-level power consumption mode (low power consumption mode) according to the first power consumption switching mode. When the UFS power consumption of the UFS device in the first-level power consumption mode is not greater than the preset power consumption threshold, and the first-level power consumption mode is successfully exited; then the second candidate path is selected in sequence, and the second power consumption switching mode is selected in sequence for the second verification; if the UFS power consumption is not greater than the preset power consumption threshold, and the current low power consumption mode is successfully exited, then the third candidate path is selected in sequence, and the third power consumption switching mode is selected in sequence for the third verification; and so on, forming a long-term cycle test.
[0110] It can be seen that the power consumption switching verification method for UFS provided in the embodiment of the present application is beneficial to simulating various power consumption switching test scenarios in a long-term cycle test process by setting different test path selection modes, different power consumption selection modes, multiple different candidate test paths, and multiple different candidate power consumption switching modes, thereby improving the reliability of power consumption switching verification.
[0111] like Figure 5 As shown, the present application also provides a test host, including:
[0112] The processor 501 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0113] The memory 502 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 502 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 502, and the processor 501 calls and executes the power consumption switching verification method for UFS in the embodiments of this application;
[0114] Input / output interface 503, used to implement information input and output;
[0115] Communication interface 504, used to implement communication interaction between the apparatus and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);
[0116] Bus 505 , which transmits information between various components of the device (e.g., processor 501 , memory 502 , input / output interface 503 , and communication interface 504 );
[0117] The processor 501 , the memory 502 , the input / output interface 503 and the communication interface 504 are connected to each other in communication within the device via a bus 505 .
[0118] An embodiment of the present application also provides an electronic device, including the above test host.
[0119] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the above-mentioned power consumption switching verification method for UFS is implemented.
[0120] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory optionally includes a memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of the above-mentioned networks include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0121] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. 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 tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically includes 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.
[0122] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the present application.
Claims
1. A method for verifying power consumption switching of UFS, characterized in that: Applied to a test host, the test host is communicatively connected to a UFS device; the method includes: determining a target path selection mode from candidate path selection modes; determining a target power consumption selection mode from candidate power consumption selection modes; Performing a test path determination process according to the target path selection mode to determine a target test path from candidate test paths; performing a power consumption mode determination process according to the target power consumption selection mode, and determining a target power consumption switching mode from candidate power consumption switching modes; Performing a power consumption switching verification test according to the target test path and the target power consumption switching mode to obtain a verification test result; When the verification test result is: the low power consumption requirement is met after switching into the low power consumption mode and the low power consumption mode is successfully exited, the path determination process, the power consumption mode determination process, and the power consumption switching verification test process are re-performed to establish a cyclic test.
2. The method for verifying power consumption switching of UFS according to claim 1, wherein: The candidate path selection mode includes: a path sequential selection mode and a path random selection mode; performing test path determination processing according to the target path selection mode to determine a target test path from the candidate test paths includes: When the target path selection mode is the path sequence selection mode, in the case where the test path determination process is performed for the first time, the first candidate test path is sequentially determined as the target test path; in the case where the test path determination process is not performed for the first time, based on the candidate test path determined last time, the next candidate test path is sequentially determined as the target test path; When the target path selection mode is the path random selection mode, each time the test path determination process is performed, one of the candidate test paths is randomly determined as the target test path from among the plurality of candidate test paths.
3. The method for verifying power consumption switching of UFS according to claim 1, wherein: The candidate power consumption selection modes include: a power consumption sequential selection mode and a power consumption random selection mode; performing power consumption mode determination processing according to the target power consumption selection mode to determine the target power consumption switching mode from the candidate power consumption switching modes includes: When the target power consumption selection mode is the power consumption sequence selection mode, in the case where the power consumption mode determination process is performed for the first time, the first candidate power consumption switching mode is sequentially determined as the target power consumption switching mode; in the case where the power consumption mode determination process is not performed for the first time, one of the candidate power consumption switching modes is randomly determined from the plurality of candidate power consumption switching modes as the target power consumption switching mode; When the target power consumption selection mode is the power consumption random selection mode, one of the candidate power consumption switching modes is determined as the target power consumption switching mode from the plurality of candidate power consumption switching modes.
4. The method for verifying power consumption switching of UFS according to claim 1, wherein: The performing of the power consumption switching verification test according to the target test path and the target power consumption switching mode to obtain a verification test result includes: sending an operation command to the UFS device according to the target test path, so that the UFS device executes the operation command; When the UFS device finishes executing the operation instruction, switching the UFS device into a low power consumption mode according to the target power consumption switching mode; Performing power consumption detection processing on the UFS device that is switched into the low power consumption mode to obtain UFS power consumption of the UFS device; Comparing the UFS power consumption with a preset power consumption threshold, and determining the power consumption verification result according to the comparison result; When the power consumption verification result is that the low power consumption requirement is met after switching to the low power consumption mode, the UFS device is woken up to obtain a wake-up verification result; A verification test result is determined according to the power consumption verification result and the wake-up verification result.
5. The method for verifying power consumption switching of UFS according to claim 4, characterized in that: The sending an operation command to the UFS device according to the target test path so that the UFS device executes the operation command includes: When the target test path is: a first candidate path, sending a write command to the UFS device, so that the UFS device performs a write data operation indicated by the write command; When the target test path is: the second candidate path, sending a read command to the UFS device so that the UFS device executes the read command; When the target test path is: the third candidate path, sending an erase command to the UFS device so that the UFS device executes the erase command; When the target test path is: the fourth candidate path, sending a SCSI command to the UFS device so that the UFS device executes the SCSI command; When the target test path is: the fifth candidate path, sending a Query command to the UFS device, so that the UFS device executes the Query command.
6. The method for verifying power consumption switching of UFS according to claim 4, wherein: Switching the UFS device to a low power consumption mode according to the target power consumption switching mode includes: When the target power consumption switching mode is the first power consumption switching mode, sending a first switching command to the UFS device through the application layer to enable the UFS device to enter the first level power consumption mode; When the target power consumption switching mode is the second power consumption switching mode, the UFS device itself is switched into the second level power consumption mode, and the UFS device is not operated within a preset period; When the target power consumption switching mode is the third power consumption switching mode, sending a second switching command to the UFS device through the communication module to enable the UFS device to enter the third level power consumption mode; When the target power consumption switching mode is the fourth power consumption switching mode, a first switching command is sent to the UFS device through the application layer, and a second switching command is sent to the UFS device through the communication module, so that the UFS device enters the fourth level power consumption mode.
7. The method for verifying power consumption switching of UFS according to claim 4, characterized in that: The UFS power consumption is compared with a preset power consumption threshold, and the power consumption verification result is determined according to the comparison result. When the comparison result is that the UFS power consumption is less than or equal to the preset power consumption threshold, determining that the power consumption verification result is that the low power consumption requirement is met after switching to the low power consumption mode; When the comparison result is that the UFS power consumption is greater than the preset power consumption threshold, it is determined that the power consumption verification result is that the low power consumption requirement is not met after switching to the low power consumption mode.
8. A test host, characterized in that: The invention comprises at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the power consumption switching verification method for UFS according to any one of claims 1 to 7.
9. An electronic device, characterized in that: include: The test host according to claim 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the power consumption switching verification method for UFS according to any one of claims 1 to 7.