Power supply mode test method and device, storage medium and electronic equipment

By generating a target information table, determining the power state switching relationship of the components to be tested and performing the corresponding test process, the problems of power mode testing stability and convenience in electronic equipment circuit design are solved, and efficient power mode switching and performance verification are achieved.

CN119535054APending Publication Date: 2025-02-28SMARTER SILICON (SHANGHAI) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411737008.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the electronic equipment circuit design, how to ensure the stability and convenience of power mode testing, especially in the performance verification of switching under different power modes.

Method used

By generating a target information table, the table includes at least the power state corresponding to the component to be tested and its association relationship, determines the second power state corresponding to the first power state, and executes a test process corresponding to the second power state to obtain the test results.

Benefits of technology

The stability and convenience of power mode testing are achieved, ensuring performance verification of switching in different power modes, reducing power consumption problems, and improving the stability and efficiency of the test system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119535054A_ABST
    Figure CN119535054A_ABST
Patent Text Reader

Abstract

The invention discloses a power mode test method and device, a storage medium and electronic equipment. The method comprises the steps of obtaining a current first power state of a to-be-tested component; determining a second power supply state corresponding to the first power supply state based on the target information table; switching the first power supply state to a second power supply state, and executing a test process corresponding to the second power supply state on the to-be-tested component to obtain a test result; wherein the target information table at least comprises the power state corresponding to the to-be-tested component and the incidence relation of the power states.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and more specifically to a power mode testing method, device, storage medium and electronic device. Background Art

[0002] In the design of electronic device circuits, multiple power modes are usually set to ensure that the electronic device can work normally under the power consumption states corresponding to different power modes. In order to verify the working state of each power mode and the performance of switching between different power modes, each power mode will be tested. How to ensure the stability and convenience of the test has become a major issue. Summary of the invention

[0003] In view of this, this application provides the following technical solutions:

[0004] A power mode testing method, comprising:

[0005] Obtaining a current first power state of the component to be tested;

[0006] Based on the target information table, determining a second power state corresponding to the first power state;

[0007] Switching the first power state to the second power state, executing a test process corresponding to the second power state on the component to be tested, and obtaining a test result;

[0008] The target information table at least includes the power supply status corresponding to the component to be tested and the association relationship between each power supply status.

[0009] Optionally, determining the second power state corresponding to the first power state based on the target information table includes:

[0010] Determine a candidate switching power state corresponding to the first power state based on an association relationship between the power states configured in the target information table;

[0011] Determining a second power state from among the candidate switching power states based on the weights of the association relationships of the power states configured in the target information table;

[0012] The weight of the second power state as the power state to be switched from the first power state is greater than the weight of other power states among the candidate switching power states except the second power state as the power state to be switched from the first power state.

[0013] Optionally, the determining the second power state from the candidate switching power states based on the weights of the association relationships between the power states configured in the target information table includes:

[0014] Determine test requirement information based on the current test scenario;

[0015] Based on the weights of the association relationships between the power states configured in the target information table and the test requirement information, a second power state is determined from among the candidate switching power states.

[0016] Optionally, the target information table further includes switching configuration information, and the switching of the first power state to the second power state includes:

[0017] Parsing the switching configuration information to obtain a switching process and a switching completion condition for switching from the first power state to the second power state;

[0018] If the current configuration information after the switching process is completed satisfies the switching completion condition, it is determined that the first power state is successfully switched to the second power state.

[0019] Optionally, executing a test process corresponding to the second power state on the component to be tested to obtain a test result includes:

[0020] executing a test process corresponding to the second power state on the component to be tested, and generating a first test result if the test fails;

[0021] If the test is successful, determine whether the current power state switching chain meets the preset switching chain total length;

[0022] If not satisfied, determining a third power state corresponding to the second power state based on the target information table;

[0023] A test process corresponding to the third power state is executed on the component to be tested to obtain a second test result.

[0024] Optionally, it also includes:

[0025] Obtaining each power supply status of the component to be tested;

[0026] Determine the correlation between the power states based on the basic configuration conditions for switching the component to be tested in the various power states and the test requirements of the test simulation;

[0027] Determine the weights corresponding to the associations between the power states based on the application frequency information in the actual application scenarios of the power state switching;

[0028] A target information table is generated according to the association relationships between the power supply states and the weights corresponding to the association relationships between the power supply states.

[0029] Optionally, it also includes:

[0030] Determine switching configuration information for each power state, wherein the switching configuration information includes a switching process for each power state and a switching completion condition corresponding to the switching process;

[0031] Determine test configuration information for each power state, wherein the test configuration information includes a test flow corresponding to the power state;

[0032] The switching configuration information and the test configuration information are written into the target information table.

[0033] A power mode testing device, comprising:

[0034] An acquisition unit, used for acquiring a current first power state of the component to be tested;

[0035] a determining unit, configured to determine, based on a target information table, a second power state corresponding to the first power state;

[0036] A testing unit, configured to switch the first power state to the second power state, execute a test process corresponding to the second power state on the component to be tested, and obtain a test result;

[0037] The target information table at least includes the power supply status corresponding to the component to be tested and the association relationship between each power supply status.

[0038] A storage medium stores a computer program thereon, and when the computer program is executed by a processor, the power mode testing method as described in any one of the above is implemented.

[0039] An electronic device, comprising:

[0040] A memory, used to store applications and data generated by the operation of the applications;

[0041] The processor is used to execute the application program to implement the power mode testing method as described in any one of the above. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 A schematic diagram of a flow chart of a power mode testing method provided in an embodiment of the present application;

[0044] Figure 2 A schematic diagram of a process for determining a power supply state to be switched provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of a flow chart of a simulation test based on different power supply states provided in an embodiment of the present application;

[0046] Figure 4 A schematic diagram of the structure of a power mode testing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] The terms "first" and "second" etc. in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0049] The embodiment of the present application provides a power mode test method, which is applied to the low-power design scenario of a very large-scale integrated circuit, such as the functional simulation verification scenario of a low-power design chip. Based on the power mode test method, various power states of the component to be tested can be simulated and tested, ensuring the stability and convenience of the test.

[0050] For details, see Figure 1 , is a flow chart of a power mode testing method provided in an embodiment of the present application, the method may include the following steps:

[0051] S101: Obtain a current first power state of a component to be tested.

[0052] The component under test can be a component that needs to be tested for low-power power state simulation. For example, the component under test can be a chip in an integrated circuit of an electronic device. The power state is the operating mode of the power supply in an electronic device or system, which describes the power consumption and performance state of the electronic device under different working or non-working conditions. In simulation testing, these power states will be simulated and tested to verify the behavior and power consumption of the component under test under different working conditions, thereby ensuring the performance and efficiency of the component under test in actual applications.

[0053] The current first power state of the component to be tested can be a specified power state or a power state completed in the previous simulation test cycle. Different power states can correspond to different voltage domains and corresponding voltage points. The corresponding test results can be obtained by testing the voltage points in the voltage domain corresponding to the relevant power state.

[0054] S102: Determine a second power state corresponding to the first power state based on the target information table.

[0055] In the embodiment of the present application, a target information table can be generated in advance, and the target information table at least includes the power state corresponding to the component to be tested and the association relationship of each power state. The target information table can be generated according to the basic configuration conditions and configurable conditions of the electronic device, wherein the basic configuration conditions can be based on the working state of the electronic device, such as the basic configuration conditions will limit the power states between which the electronic device can be switched, and these power state switching will not have a poor impact on the subsequent state switching, such as the current power state switching will not affect the power consumption of the electronic device. The configurable condition can be based on the basic configuration conditions of the electronic device, according to the actual application requirements or test requirements of the electronic device, the switching information of the power state of the electronic device is defined. In order to achieve efficient testing of different power states, the corresponding power state switching process and related configuration information can also be configured in the target information table. Specifically, the target information table can be configured with a variety of power states of the electronic device including the component to be tested, such as all power states, or commonly used power states, etc. Correspondingly, the target information table also includes the association relationship between each power state, which can characterize the switchable relationship between the power states, such as switching from power state A to power state D, power state D to power state E, etc. In this way, the target information table can be queried according to the current first power state to determine the switchable second power state corresponding to the first power state, so that the corresponding power state can be determined efficiently, without having to perform a lot of work verification before each switch, or try different power state switches, so as to reduce the power consumption problem caused by the power state switch and ensure the stability of the simulation test system. Specifically, the weight of the power state switch can also be set in the target information table, and the weight can also be determined according to the basic configuration conditions and configurable conditions of the electronic device. The weight represents the possibility parameter of switching a power state to another power state. For example, if the weight of the first power state switching to the second power state is greater than the weight of the first power state switching to the third power state, then when the next power state is determined according to the weight of the first power state, the next power state can be the second power state. Specifically, this process will be described in detail in the subsequent embodiments of this application in combination with the corresponding application scenarios.

[0056] S103: Switch the first power state to the second power state, execute a test process corresponding to the second power state on the component to be tested, and obtain a test result.

[0057] After determining the second power state corresponding to the first power state, the power state can be automatically switched according to the relevant information in the target information table, such as the switching process, and the test process of the second power state after the switch is executed to obtain the test result. The test process can also be set in the target information table, or it can be a test process obtained by adjusting the relevant test process in the target information table according to the actual test requirements.

[0058] The power mode testing method provided in the embodiment of the present application can determine the switching conditions of different power states by pre-generating a target information table, so as to determine the power state corresponding to the current power state for the next test, so that the power state switching is closer to the actual working scenario, ensuring that each power state switching will not affect subsequent state switching and low power consumption scenarios, so as to ensure the stability of the test system; efficiently cover arbitrarily complex switching paths and reduce workload.

[0059] The power mode testing method of the embodiment of the present application is described below in conjunction with specific application scenarios.

[0060] In order to ensure that the corresponding power state can be quickly determined during the test, and that the switching of the power state will not affect subsequent state switching and low-power consumption scenarios, thereby ensuring the stability of the test system, a target information table is also pre-generated in an embodiment of the present application. The target information table collects the range and conditions of random switching of power states, determines the correlation between each power state, and related switching configurations, test processes and other information, thereby meeting the needs for power state switching in the test scenario.

[0061] In one implementation of an embodiment of the present application, the process of generating target information includes: obtaining each power state of the component to be tested; determining the association between each power state based on the basic configuration conditions for switching the component to be tested in each power state, and the test requirements of the test simulation; determining the weight corresponding to the association between each power state based on the application frequency information in the actual application scenario of the power state switching; generating a target information table according to the association between each power state and the weight corresponding to the association between the power states.

[0062] Among them, each power state of the component to be tested refers to the power state of the electronic device where the component to be tested is located, such as the power state of the electronic device in different working modes. Specifically, the power state can be the power state of the electronic device in a normal working state, or the power state of the electronic device in an idle state, or the power state of the electronic device in a sleep state, or the power state of the electronic device in a standby state, etc. Then, according to the basic configuration conditions of the power state switching and the test simulation requirements, the association between the various power states is determined. The basic configuration conditions of the power state switching can be the constraints of the power state switching, such as the power state can only be switched from power state 1 to power state 2, or switched to power state 3, but not to power state 4, etc. Specifically, the constraints can be determined according to the actual working state of the electronic device, power configuration parameters, etc. The test requirements of the test simulation can be test requirements determined according to the component to be tested. If the test component is usually applied in the working state of the electronic device, the corresponding power state to be tested is the power state in the working state of the electronic device. Alternatively, the approximate range of the power state switching can be configured according to the test requirements, so as to determine the association relationship between the various power states, which can characterize the relationship between the power state switching, such as the first power state can be switched to the second power state, the second power state can be switched to the third power state, etc. Further, a weight can be set for each power state switching, and the power state to be switched can be selected by the weight. Specifically, the weight corresponding to the association relationship between the various power states can be determined based on the application frequency information in the actual application scenario of the power state switching. For example, the first power state can be switched to the second power state, or it can be switched to the third power state. The corresponding weight can be set according to the switching frequency in the actual use scenario. For example, in actual use, the first power state is usually switched to the second power state, and the weight of the first power state switching to the second power state will be greater than the weight of the first power state switching to the third power state. Therefore, a target information table can be generated according to the above information, so that when the power state needs to be switched during the test, the corresponding power state to be switched can be determined by querying the target information table, so that the power state switching is closer to the actual working scenario, and there is no need for professional staff to verify and deploy the switching of the power state, thereby improving the processing efficiency.

[0063] Further, in order to quickly complete the corresponding test requirements, the process, conditions, and subsequent test processes of the power state switching can also be configured in the target information table. In one implementation of the embodiment of the present application, it also includes: determining the switching configuration information of each power state; determining the test configuration information of each power state; writing the switching configuration information and the test configuration information into the target information table. Among them, the switching configuration information includes the switching process of each power state and the switching completion condition corresponding to the switching process. The test configuration information includes the test process corresponding to the power state, and further includes the relevant test parameters corresponding to the test process. In this way, the power state can be switched according to the switching configuration information, and the test process under the corresponding power state can be executed according to the test configuration information. For example, the switching process may include the switching process of executing the power state, for example, how to implement the process of switching the first power state to the second power state, and the switching process may also include the synchronization configuration information after the switching is completed, such as when switching from the first power state to the second power state, the synchronization processing process of the configuration information, etc., which may be a register configuration process for different power states. Correspondingly, the switching completion condition can ensure the conditions for successful switching of the power state, such as the flag information of the electronic device after the power state is switched, or related parameters such as voltage and current. The test configuration information may include test procedures and test conditions, etc. The test procedure is the test procedure for the component to be tested under the current power state. If the component to be tested is a data storage component, the test procedure may be a test procedure for reading and writing data for the data storage component under the corresponding power state. In this way, after the power state is successfully switched, the corresponding test procedure can be directly called to complete the test of the component to be tested and obtain the test results, thereby improving the test efficiency.

[0064] See Table 1, which is an example of the content of a target information table provided in an embodiment of the present application. In the target information table, the next power state to which each power state can be switched, the corresponding power state switching process and the corresponding switching completion condition are configured, as well as the test process under the power state, and the weight information corresponding to the corresponding power state switching, etc. For example, in Table 1, the current power state is represented by St.A, and the next power state to which it can be switched can be St.B and St.C. When the power state is switched from St.A to St.B, it can be completed through the switching process Step.A_B.1, or the switching process Step.A_B.2. Specifically, the corresponding switching process can be selected according to the actual application scenario, or any of the switching processes can be randomly selected to complete the power state switching. After executing the corresponding switching process, the corresponding switching completion condition of the power state switching from St.A to St.B can be verified to determine that the switching of the relevant power state is successfully completed, such as the switching completion condition represented by Cond.A_B.1 in Table 1. After executing the power state switching, the test process can be executed according to the corresponding test process (such as represented by Test.A_B.1 in Table 1), and the weight of switching from the current power state to the next power state can also be determined. The weight of switching from power state St.A to power state St.B is represented by W.A_B in Table 1. In this way, the power state switching and the test process in the power state can be realized through the target information table, which improves the test efficiency and ensures the stability of the test system. The switching examples of other power states (such as St.B, St.C, St.D, etc.) shown in Table 1 can be found in the above description, and will not be described in detail here.

[0065] Table 1

[0066]

[0067]

[0068] The power mode testing method in the embodiment of the present application is described in detail below in conjunction with the target information table pre-generated in the embodiment of the present application.

[0069] See also Figure 2 , is a flow chart of determining a power state to be switched provided by an embodiment of the present application. The method may include the following steps:

[0070] S201: Obtain a current first power state of a component to be tested.

[0071] S202: Determine a candidate switching power state corresponding to the first power state based on the association relationship between the power states configured in the target information table.

[0072] S203: Determine a second power state from candidate switching power states based on the weights of the association relationships between the power states configured in the target information table.

[0073] Among them, the weight of the second power state as the power state to be switched of the first power state is greater than the weight of other power states in the candidate switching power state except the second power state as the power state to be switched of the first power state. The first power state can be the current power state of the electronic device to which the component to be tested belongs, or it can be the power state after the test of the previous test cycle is completed. Then, according to the switchable association relationship of each power state in the target information table, the candidate switching power state is determined. For example, taking the target information table shown in Table 1 as an example, if the first power state is St.A, it can be determined from Table 1 that its corresponding candidate switching power state may include St.B, St.C and St.D. That is, it can be switched from St.A to any power state in the candidate switching power state, and then according to the weight information configured in the target information table, the weight information can characterize the frequency of switching of each power state in the actual application scenario or test simulation requirements. For example, in the actual application scenario, St.A is usually switched to St.B, then the weight corresponding to St.B will be greater than the weight of switching to St.C and St.D, and St.B is used as the second power state.

[0074] Since the weight information can be pre-configured in the target information table, it represents the frequency information of switching between various power states in the usual scenario. In some specific test scenarios or simulation requirements, the power state to be switched can also be determined in combination with the actual application requirements and the weights in the target information table, so that the real-time test requirements can be better met and the accuracy of the test is improved. Further, based on the weights of the association relationship of each power state configured in the target information table, the second power state is determined in the candidate switching power state, including: based on the current test scenario, determining the test requirement information; based on the weights of the association relationship of each power state configured in the target information table and the test requirement information, determining the second power state in the candidate switching power state. Specifically, the adjustment coefficient can be determined according to the test requirement information, and then the calculated value between the adjustment coefficient and the weight is calculated, and the second power state is determined based on the calculated value. For example, the test requirement is to test the voltage value within a certain range, and the adjustment coefficient of the candidate switching power state that meets the voltage value range is set to a relatively large value, so that the test requirement of the voltage value range can be met in the process of determining the power state after switching, and the test accuracy is improved.

[0075] In the process of executing the corresponding power state switching, the power state switching can be automatically completed based on the switching configuration recorded in the target information table, and the switching completion can be verified, thereby improving the efficiency of the power state switching. Correspondingly, in one implementation of the embodiment of the present application, the target information table also includes switching configuration information, and switching the first power state to the second power state includes: parsing the switching configuration information, obtaining the switching process and switching completion conditions of the first power state to the second power state; if the current configuration information after the switching process is completed satisfies the switching completion conditions, it is determined that the first power state is successfully switched to the second power state.

[0076] In this embodiment, the target configuration table includes switching configuration information for switching the power state. Further, the switching configuration information includes a switching process and a switching completion condition. The switching of the corresponding power state can be executed through the switching process, and then according to the current configuration information after the switching process is completed and the switching completion condition, it is determined whether the current power state has been successfully switched. If the flag bit information about the power state after switching is configured in the switching completion condition, it can be determined whether the current power state switching is completed according to the flag bit information. For another example, if the switching completion condition is a voltage parameter of a reference bit for different power states, the voltage parameter in the current configuration information can be compared with the voltage parameter corresponding to the power state after switching under the switching completion condition. If it is within the error range, it means that the power state has been successfully switched. If it is not within the error range, it means that the switching has failed. The corresponding switching process can be re-executed to ensure the successful switching of the power state, so as not to affect the candidate test process.

[0077] After the power state switching is completed, the test process corresponding to the current power state can be executed to complete the simulation test for the component to be tested. In one embodiment, the test process corresponding to the second power state is executed on the component to be tested, and the process of obtaining the test result includes: executing the test process corresponding to the second power state on the component to be tested, and if the test fails, generating a first test result. If the test is successful, determine whether the current power state switching chain meets the preset switching chain total length; if not, determine the third power state corresponding to the second power state based on the target information table; execute the test process corresponding to the third power state on the component to be tested to obtain a second test result.

[0078] In this implementation, starting from the initial power state, i.e., the first power state, the corresponding second power state can be determined for switching and testing according to the association relationship of the power states in the target information table. After the test process corresponding to the second power state is completed, if it is necessary to continue to perform the test under the corresponding power state, the second power state can be used as the initial power state for the next switch, and then the corresponding power state after switching, such as the third power state, can be determined according to the target information table. In the simulation test process of the component to be tested based on different power states, the number of power state switches can be specified, or the corresponding total length of the switching chain can be set so that the number of power state switches meets the total length of the switching chain. For example, the total length of the switching chain needs to be switched in three power states. If the performance of the component to be tested in only two power states is currently tested, it is necessary to continue to perform the test of the third power state. In this way, the power mode switching of complex long links can be fully covered based on the target information table, without being limited by the engineer's understanding of the power state switching scenario, thereby improving the power state switching and testing efficiency.

[0079] See also Figure 3 , is a flow chart of a simulation test based on different power supply states provided in an embodiment of the present application. First, a simulation platform can be built, and then a simulation test for the component to be tested is performed. Specifically, the simulation test process includes the following steps:

[0080] S301, obtaining an initial power state.

[0081] S302: Determine the next target power state according to the target information table.

[0082] The weights for switching between power states are configured in the target information table, and the corresponding next target power state can be selected based on the weights. In some application scenarios, the next target power state can also be randomly selected based on the association between the power states in the target information table.

[0083] S303: Execute a power state switching process corresponding to the target power state according to the target information table.

[0084] S304: Determine whether the power switching is completed according to the switching completion conditions in the target information table. If yes, execute step S305; otherwise, execute step S03.

[0085] S305: Perform a test based on the test process corresponding to the target power state in the target information table.

[0086] S306: Determine whether the test passes. If so, execute step S307; otherwise, the simulation test ends.

[0087] S307, determine whether the total length of the switching chain meets the preset length, if yes, the simulation test ends; otherwise, execute step S308.

[0088] S308: Use the target power state as the next initial power state, and re-execute the above steps S302 to S308 until the preset length of the switching chain for power state switching is met, and the simulation test ends.

[0089] In the embodiment of the present application, by constructing a target information table for power state switching and testing, the scope and conditions of random power state switching can be collected, and weights are set for each power state, so that the power state switching is closer to the actual working scenario. During the simulation test, the target information table can be parsed, starting from the initial power state, according to the current power state, the next target power state is selected by looking up the table for switching and testing. After completion, the target power state is used as the initial state of the next switch, and the next round of power state switching continues. Thus, the above steps can be repeated in the control process, and the continuous power state switching path can be efficiently covered under the premise of controllable workload. In this way, it can be ensured that each power state switch will not affect the subsequent state switching and low power consumption scenarios to ensure the stability of the test system; and it can efficiently cover any complex switching path to reduce the workload; and based on the target information table, the control process and constraints of the power mode switching are decoupled to improve the reusability of the verification framework and use cases.

[0090] In another embodiment of the present application, a power mode test device is provided. Figure 4 , the device may include:

[0091] An acquisition unit 401 is used to obtain a current first power state of the component to be tested;

[0092] A determining unit 402, configured to determine a second power state corresponding to the first power state based on a target information table;

[0093] The testing unit 403 is used to switch the first power state to the second power state, execute a test process corresponding to the second power state on the component to be tested, and obtain a test result;

[0094] The target information table at least includes the power supply status corresponding to the component to be tested and the association relationship between each power supply status.

[0095] Optionally, the determining unit includes:

[0096] A first determining subunit, configured to determine a candidate switching power state corresponding to the first power state based on an association relationship between the power states configured in the target information table;

[0097] a second determining subunit, configured to determine a second power state from among the candidate switching power states based on the weights of the association relationships of the various power states configured in the target information table;

[0098] The weight of the second power state as the power state to be switched from the first power state is greater than the weight of other power states among the candidate switching power states except the second power state as the power state to be switched from the first power state.

[0099] Optionally, the second determining subunit is configured to:

[0100] Determine test requirement information based on the current test scenario;

[0101] Based on the weights of the association relationships between the power states configured in the target information table and the test requirement information, a second power state is determined from among the candidate switching power states.

[0102] Optionally, the target information table further includes switching configuration information, the test unit includes a switching subunit, the switching subunit is used to switch the first power state to a second power state, and the switching subunit is configured as:

[0103] Parsing the switching configuration information to obtain a switching process and a switching completion condition for switching from the first power state to the second power state;

[0104] If the current configuration information after the switching process is completed satisfies the switching completion condition, it is determined that the first power state is successfully switched to the second power state.

[0105] Optionally, the test unit is configured to:

[0106] executing a test process corresponding to the second power state on the component to be tested, and generating a first test result if the test fails;

[0107] If the test is successful, determine whether the current power state switching chain meets the preset switching chain total length;

[0108] If not satisfied, determining a third power state corresponding to the second power state based on the target information table;

[0109] A test process corresponding to the third power state is executed on the component to be tested to obtain a second test result.

[0110] Optionally, the device further includes an information table generating unit, and the information table generating unit includes:

[0111] A first acquisition subunit, used to obtain each power supply status of the component to be tested;

[0112] A third determining subunit is used to determine the association relationship between the various power states based on the basic configuration conditions of the component to be tested switching between the various power states and the test requirements of the test simulation;

[0113] A fourth determining subunit, configured to determine a weight corresponding to an association relationship between each power state based on application frequency information in an actual application scenario of power state switching;

[0114] The generating subunit is used to generate a target information table according to the association relationship between each of the power supply states and the weight corresponding to the association relationship between the power supply states.

[0115] Optionally, the information table generating unit further includes:

[0116] A fifth determining subunit, configured to determine switching configuration information of each power state, wherein the switching configuration information includes a switching process of each power state and a switching completion condition corresponding to the switching process;

[0117] A sixth determining subunit, configured to determine test configuration information for each power state, wherein the test configuration information includes a test flow corresponding to the power state;

[0118] The writing subunit is used to write the switching configuration information and the test configuration information into the target information table.

[0119] It should be noted that the specific implementation of each unit and sub-unit in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.

[0120] In another embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the power mode testing method as described in any one of the above items is implemented.

[0121] In another embodiment of the present application, an electronic device is further provided, and the electronic device may include:

[0122] A memory, used to store applications and data generated by the operation of the applications;

[0123] The processor is used to execute the application program to implement the power mode testing method as described in any one of the above.

[0124] It should be noted that the specific implementation of the processor in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.

[0125] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0126] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0127] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0128] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A power mode testing method, comprising: Obtaining a current first power state of the component to be tested; Based on the target information table, determining a second power state corresponding to the first power state; Switching the first power state to the second power state, executing a test process corresponding to the second power state on the component to be tested, and obtaining a test result; The target information table at least includes the power supply status corresponding to the component to be tested and the association relationship between each power supply status.

2. The method according to claim 1, wherein determining the second power state corresponding to the first power state based on the target information table comprises: Determine a candidate switching power state corresponding to the first power state based on an association relationship between the power states configured in the target information table; Determining a second power state from among the candidate switching power states based on the weights of the association relationships of the power states configured in the target information table; The weight of the second power state as the power state to be switched from the first power state is greater than the weight of other power states among the candidate switching power states except the second power state as the power state to be switched from the first power state.

3. The method according to claim 2, wherein determining the second power state from the candidate switching power states based on the weights of the association relationships between the power states configured in the target information table comprises: Determine test requirement information based on the current test scenario; Based on the weights of the association relationships between the power states configured in the target information table and the test requirement information, a second power state is determined from among the candidate switching power states.

4. The method according to claim 1, wherein the target information table further comprises switching configuration information, and the switching of the first power state to the second power state comprises: Parsing the switching configuration information to obtain a switching process and a switching completion condition for switching from the first power state to the second power state; If the current configuration information after the switching process is completed satisfies the switching completion condition, it is determined that the first power state is successfully switched to the second power state.

5. The method according to claim 1, wherein the step of executing a test process corresponding to the second power state on the component to be tested to obtain a test result comprises: executing a test process corresponding to the second power state on the component to be tested, and generating a first test result if the test fails; If the test is successful, determine whether the current power state switching chain meets the preset switching chain total length; If not satisfied, determining a third power state corresponding to the second power state based on the target information table; A test process corresponding to the third power state is executed on the component to be tested to obtain a second test result.

6. The method according to claim 1, further comprising: Obtaining each power supply status of the component to be tested; Determine the correlation between the power states based on the basic configuration conditions for switching the component to be tested in the various power states and the test requirements of the test simulation; Determine the weights corresponding to the associations between the power states based on the application frequency information in the actual application scenarios of the power state switching; A target information table is generated according to the association relationships between the power supply states and the weights corresponding to the association relationships between the power supply states.

7. The method according to claim 6, further comprising: Determine switching configuration information for each power state, wherein the switching configuration information includes a switching process for each power state and a switching completion condition corresponding to the switching process; Determine test configuration information for each power state, wherein the test configuration information includes a test flow corresponding to the power state; The switching configuration information and the test configuration information are written into the target information table.

8. A power mode test device, comprising: An acquisition unit, used for acquiring a current first power state of the component to be tested; a determining unit, configured to determine, based on a target information table, a second power state corresponding to the first power state; A testing unit, configured to switch the first power state to the second power state, execute a test process corresponding to the second power state on the component to be tested, and obtain a test result; The target information table at least includes the power supply status corresponding to the component to be tested and the association relationship between each power supply status. 9 . A storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the power mode test method according to claim 1 is implemented.

10. An electronic device comprising: A memory, used to store applications and data generated by the operation of the applications; A processor is used to execute the application program to implement the power mode testing method according to any one of claims 1 to 7.