Memory parameter adaptation method, device, terminal equipment and storage medium
By conducting stress tests on multiple sets of parameter values on embedded device memory, candidate values are determined and combined, the problem of low memory parameter adaptation efficiency of embedded device memory is solved, and a more efficient memory parameter adaptation process is achieved.
Patent Information
- Application Number
- CN202111653051.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Embedded devices have problems such as low adaptation efficiency and high developer experience requirements during the memory parameter adaptation process. The existing technology mainly relies on the guidance and experience of chip manufacturers to adjust parameters by themselves, which takes a long time and is inefficient in adaptation efficiency.
By obtaining the first parameter value of the M group of N memory parameters, the memory in the device to be tested is subjected to a first stress test. If the number of successful second parameter value groups is greater than H, the candidate value is determined, and the third parameter value is combined to obtain the third parameter value. Finally, the target parameter value is determined from the third parameter value of all groups to improve the adaptation efficiency of the memory parameters.
The search range of each memory parameter is narrowed, the adaptation efficiency of memory parameters is improved, and the experience dependence and time-consuming of developers during the adaptation process is reduced.
Smart Images

Figure CN114416446B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of embedded technology, and in particular relates to a memory parameter adaptation method, device, terminal equipment and storage medium. Background Art
[0002] Embedded devices have limited storage and running memory, and memory models vary. Memory initialization parameters usually vary with specific hardware. When new product developers design printed circuit boards (PCBs) for embedded devices and select memory, it is critical to choose memory parameters because actual designs often differ from reference designs. The existing technology is that chip manufacturers provide guidance, and developers adjust certain parameters for testing based on their experience. This requires a high level of developer experience, is time-consuming, and has low adaptation efficiency. Summary of the invention
[0003] Embodiments of the present application provide a memory parameter adaptation method, apparatus, terminal device, and storage medium to improve the memory parameter adaptation efficiency.
[0004] In a first aspect, an embodiment of the present application provides a memory parameter adaptation method, the memory parameter adaptation method comprising:
[0005] Obtaining M groups of first parameter values of N memory parameters, each group of the first parameter values is a value combination of the N memory parameters, M is an integer greater than 1, and N is an integer greater than zero;
[0006] Based on the M groups of the first parameter values, respectively perform a first stress test on the memory in the device under test;
[0007] If the number of groups of second parameter values that succeed in the first stress test among the M groups of first parameter values is greater than H, then determine N candidate values of the memory parameter from all values of the N memory parameters in all groups of the second parameter values, where a candidate value of the memory parameter refers to a value of the memory parameter that appears more than a frequency threshold in all groups of the second parameter values, and H is an integer greater than 1 and less than M;
[0008] Combining N candidate values of the memory parameters to obtain a third parameter value;
[0009] A target parameter value is determined from the third parameter values of all groups, and the target parameter value is the value of N memory parameters that make the stability of the memory meet preset requirements.
[0010] In a second aspect, an embodiment of the present application provides a memory parameter adaptation device, the memory parameter adaptation device comprising:
[0011] A first acquisition module, used to acquire M groups of first parameter values of N memory parameters, each group of the first parameter values is a value combination of the N memory parameters, M is an integer greater than 1, and N is an integer greater than zero;
[0012] A first testing module, configured to perform a first stress test on the memory in the device under test based on M groups of the first parameter values;
[0013] A first determination module is configured to determine, if the number of groups of second parameter values that succeed in the first stress test among the M groups of first parameter values is greater than H, N candidate values of the memory parameters from all values of the N memory parameters in all groups of the second parameter values, where a candidate value of the memory parameter refers to a value of the memory parameter that appears more than a frequency threshold in all groups of the second parameter values, and H is an integer greater than 1 and less than M;
[0014] A value combination module, used for combining N candidate values of the memory parameters to obtain a third parameter value;
[0015] The second determination module is used to determine the target parameter value from the third parameter values of all groups, and the target parameter value is the value of N memory parameters that make the stability of the memory meet the preset requirements.
[0016] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the memory parameter adaptation method as described in the first aspect above when executing the computer program.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the memory parameter adaptation method described in the first aspect above are implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the steps of the memory parameter adaptation method as described in the first aspect above.
[0019] As can be seen from the above, the present application obtains M groups of first parameter values of N memory parameters, and performs a first stress test on the memory in the device to be tested based on the M groups of first parameter values. If the number of groups of second parameter values that succeed in the first stress test is greater than H, then based on the frequency of occurrence of the value of each memory parameter in all groups of second parameter values, the values with higher occurrence frequency can be used as candidate values of the memory parameter. On this basis, the candidate values of the N memory parameters are combined to obtain third parameter values with a smaller number of groups than the second parameter values. Therefore, compared with the first parameter values and the second parameter values, determining the target parameter value from the third parameter values of all groups can narrow the search range of each memory parameter value, thereby improving the adaptation efficiency of the memory parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0021] Figure 1 It is a schematic diagram of the implementation flow of the memory parameter adaptation method provided in the first embodiment of the present application;
[0022] Figure 2 This is the flowchart of DDR initialization;
[0023] Figure 3 This is an example diagram of the process of initialization and the first stress test;
[0024] Figure 4 It is a schematic diagram of the implementation flow of the memory parameter adaptation method provided in the second embodiment of the present application;
[0025] Figure 5 This is an example diagram of the search process for memory parameters;
[0026] Figure 6 It is a structural diagram of a memory parameter adaptation device provided in Embodiment 3 of the present application;
[0027] Figure 7 It is a structural diagram of the terminal device provided in Example 4 of the present application. DETAILED DESCRIPTION
[0028] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0029] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0030] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0031] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0032] For ease of understanding, this embodiment is described by taking a double data rate synchronous dynamic random access memory (DDR SDRAM) as an example, but this does not constitute a limitation on the memory in the device under test. DDR SDRAM can also be referred to as DDR.
[0033] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0034] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0035] See also Figure 1 , is a schematic diagram of the implementation flow of the memory parameter adaptation method provided in the first embodiment of the present application, and the memory parameter adaptation method is applied to a terminal device. Figure 1 As shown, the memory parameter adaptation method may include the following steps:
[0036] Step 101, obtaining M groups of first parameter values of N memory parameters.
[0037] Among them, the N memory parameters are N parameters of the memory in the device under test. The memory in the device under test can be understood as the memory that needs to be adapted or configured with parameters. Each group of first parameter values is a value combination of N memory parameters, M is an integer greater than 1, and N is an integer greater than zero.
[0038] The N memory parameters include but are not limited to the type of memory, frequency, physical parameters of the control / read / write channels, custom register assignments, etc. Taking DDR as an example, the type of the above memory can be at least one type of DDR, such as DDR3, DDR4, DDR3L, LPDDR3, etc. The physical parameters of the control channel of the memory include but are not limited to the address signal drive strength, the clock signal drive strength, etc. The physical parameters of the read channel of the memory include but are not limited to the dynamic random access memory (Dynamic Random Access Memory, DRAM) output drive strength, DDR physical interface data signal on-chip termination impedance, etc. The physical parameters of the write channel of the memory include but are not limited to the DDR physical interface data signal drive strength, DRAM data bus on-chip termination impedance, etc. The custom register assignment of the memory can be used to adjust some other parameters, such as user-defined parameters.
[0039] Each memory parameter has at least one value. For example, for the type of DDR, it can have four values, namely, DDR3, DDR4, DDR3L, and LPDDR3.
[0040] The M groups of first parameter values are M combinations of values of the N memory parameters.
[0041] As an optional embodiment, the above-mentioned obtaining M groups of first parameter values of N memory parameters includes:
[0042] Obtain S groups of initial parameter values of N memory parameters, each group of initial parameter values is a value combination of the N memory parameters, and S is an integer greater than or equal to M;
[0043] Initialize the memory based on the initial parameter values of group S respectively;
[0044] The initial parameter value that is determined to be successfully initialized is the first parameter value.
[0045] like Figure 2 The figure shows a flow chart of DDR initialization, which mainly includes DDR phase locked loop (PLL) configuration, DDR controller initialization, DDR physical interface initialization and DDR training.
[0046] By initializing the memory, the initial parameter values of group S can be preliminarily screened to filter out the initial parameter values that fail to initialize and retain the initial parameter values that succeed in initialization, thereby narrowing the search range of each memory parameter value and improving the adaptation efficiency of the memory parameters.
[0047] In one example, all values of each memory parameter can be obtained first, and all values of N memory parameters can be combined to obtain S groups of initial parameter values, where S is the total number of combinations of all values of the N memory parameters. For example, taking four memory parameters among the N memory parameters as an example, for the convenience of description, these four memory parameters can be respectively referred to as the first memory parameter, the second memory parameter, the third memory parameter and the fourth memory parameter. The first memory parameter has six values, the second memory parameter has four values, the third memory parameter has four values, and the fourth memory parameter has one value. Then, these four memory parameters can constitute ninety-six (i.e., the product of the number of values of the four memory parameters) value combinations, that is, ninety-six groups of initial parameter values can be obtained. Based on the ninety-six groups of initial parameter values, the memory is initialized respectively, and it is determined that forty-eight groups of initial parameter values have successfully initialized the memory. Then, it can be determined that M is forty-eight, that is, the above forty-eight groups of successfully initialized initial parameter values are forty-eight groups of first parameter values.
[0048] Step 102: Perform a first stress test on the memory in the device under test based on the M groups of first parameter values.
[0049] Among them, the first stress test is used to test the stability of the memory. This application does not limit the test cases of the first stress test. For example, the first stress test can be a high-bandwidth use case, a high-power use case, a multi-module use case, etc. The high-bandwidth use case is used to test the stability of the memory under continuous high-speed reading and writing. The high-power use case is used to test the stability of the memory under high load conditions of the device under test. The multi-module use case refers to multiple hardware modules in the device under test working to read and write memory at the same time, such as the central processing unit (CPU), direct memory access (DMA) module, digital signal processor (DSP), video codec module, etc. working to read memory at the same time. The multi-module use case is used to test the stability of the memory when complex business is running.
[0050] Taking the i-th group of first parameter values as an example, the i-th group of first parameter values is any group of first parameter values in the M groups of first parameter values, and i is an integer greater than zero and less than or equal to M. Performing a first stress test on the memory in the device under test based on the i-th group of first parameter values may refer to: first setting the values of the N memory parameters of the memory in the device under test to the corresponding values in the i-th group of first parameter values, and then performing a first stress test on the memory with the N memory parameter values set. For example, the i-th group of first parameter values is (a1, b1, c2, d), a1 is the value of the first memory parameter, b1 is the value of the second memory parameter, c2 is the value of the third memory parameter, and d is the value of the fourth memory parameter. First, the first memory parameter, the second memory parameter, the third memory parameter, and the fourth memory parameter of the memory in the device under test are set to a1, b1, c2, and d, respectively, and then the first stress test is performed on the memory with the values of these four memory parameters set.
[0051] In one embodiment, if the number of groups of second parameter values that succeed in the first stress test of the memory among the M groups of first parameter values is less than or equal to H, it means that the searchable range of the N memory parameter values is small, and it may not be possible to find a value that can make the memory achieve better stability. In this case, a prompt can be issued to prompt the user to replace the first parameter value that failed the first stress test, so as to provide more values for screening and increase the probability of searching for a value that can make the memory achieve better stability.
[0052] like Figure 3 The following is an example of the process flow of initialization and the first pressure test. Figure 3In the embodiment, the terminal device can input the search configuration to the device under test through the serial port, and the search configuration includes but is not limited to S groups of initial parameter values, the number of restarts for each group of parameter values, a single test time, test cases, a maximum number of rounds (i.e., S), whether to skip failed parameters, whether to restart immediately after failure, whether to automatically increase the single test time according to the change of the number of groups in each round, etc.; after inputting the search configuration, DDR initialization can be performed based on the current group of initial parameter values, and it can be determined whether the initialization is successful; if the initialization fails, the device under test is restarted; if the initialization is successful, it is determined whether only the initialization is tested, and if only the initialization is tested, the device under test is restarted. If the first stress test is still required, the first stress test is performed and it is determined whether the first stress test is successful. If the first stress test is successful, the current group of initial parameter values (i.e., the second parameter values) that are successfully initialized and successfully tested by the first stress test are marked as successful, and the device under test is restarted (multiple restarts are allowed to ensure the stability of the first parameter values); after restarting the device under test, it is determined whether the maximum number of rounds has been reached. If the maximum number of rounds has not been reached, it is determined whether to replace the next group of initial parameter values. If replaced, based on the next group of initial parameter values, it is returned to the step of executing DDR initialization and subsequent steps until the maximum number of rounds is reached.
[0053] Step 103, if the number of groups of second parameter values that succeed in the first stress test in the M groups of first parameter values is greater than H, determine N candidate values of the memory parameters from all values of the second parameter values of all groups of the N memory parameters.
[0054] The second parameter value is the first parameter value when the first stress test is successful.
[0055] A candidate value of a memory parameter refers to a value of the memory parameter whose frequency of occurrence in at least two sets of second parameter values exceeds a frequency threshold. Optionally, a frequency threshold may be pre-set for each memory parameter. For example, the frequency threshold is The first memory parameter has six values, which are (a1, a2, a3, a4, a5, a6). The values of the first memory parameter in the forty-eight groups of first parameter values are (a1, a4, a5, a6). The frequency of a1 in the forty-eight groups of first parameter values is The frequency of a4 in the forty-eight sets of first parameter values is The frequency of a5 in the forty-eight sets of first parameter values is The frequency of a6 in the forty-eight sets of first parameter values is Based on frequency threshold Candidate values of the first memory parameter can be screened out as (a4, a5, a6).
[0056] Step 104: Combine the N candidate values of the memory parameters to obtain a third parameter value.
[0057] By combining the candidate values of the N memory parameters, a third parameter value having a smaller number of groups than the second parameter value can be obtained. Therefore, selecting the target parameter value from the third parameter values of all groups can improve the adaptation efficiency of the memory parameters.
[0058] Exemplarily, the candidate values of the first memory parameter are (a4, a5, a6), the candidate values of the second memory parameter are (b1, b2, b3), the candidate values of the third memory parameter are (c2, c3), and the candidate value of the fourth memory parameter is d. By combining the candidate values of these four memory parameters, eighteen groups of third parameter values can be obtained. Compared with forty-eight groups of first parameter values, the search range is narrowed to eighteen groups, which improves the adaptation efficiency of the memory parameters.
[0059] Step 105: determine the target parameter value from the third parameter values of all groups.
[0060] The target parameter values are the values of N memory parameters that enable the stability of the memory to meet preset requirements.
[0061] Exemplarily, among the eighteen groups of third parameter values, if (a4, b2, c3, d) can make the stability of the memory meet the preset requirements, then (a4, b2, c3, d) can be determined as the target parameter value.
[0062] It should be noted that the number of target parameter value groups may be one group or at least two groups. When the number of target parameter value groups is at least two groups, at least two groups of target parameter values can be displayed. When a selection operation of any one of the at least two groups of target parameter values is received, the N values of the selected target parameter values are determined as the final values of the N memory parameters, that is, the final values of the N memory parameters are determined according to the user's selection; or for each memory parameter, the median of all values of the memory parameter in at least two groups of target parameter values can be used as the final value of the memory parameter. When there are multiple values for a memory parameter, since the median is not affected by values that are too large or too small, and can represent the general level of all values, it is more appropriate to select the median of all values as the final value.
[0063] In an embodiment of the present application, M groups of first parameter values of N memory parameters are obtained, and a first stress test is performed on the memory in the device to be tested based on the M groups of first parameter values. If the number of groups of second parameter values that succeed in the first stress test is greater than H, then based on the frequency of occurrence of the value of each memory parameter in all groups of second parameter values, the value with a higher occurrence frequency can be used as a candidate value of the memory parameter. On this basis, the candidate values of the N memory parameters are combined to obtain a third parameter value with a smaller number of groups than the second parameter value. Therefore, compared with the first parameter value and the second parameter value, determining the target parameter value from the third parameter values of all groups can narrow the search range of each memory parameter value, thereby improving the adaptation efficiency of the memory parameters.
[0064] See also Figure 4 , is a schematic diagram of the implementation flow of the memory parameter adaptation method provided in the second embodiment of the present application, and the memory parameter adaptation method is applied to a terminal device. Figure 4 As shown, the memory parameter adaptation method may include the following steps:
[0065] Step 401, obtaining M groups of first parameter values of N memory parameters.
[0066] Step 401 is the same as step 101. For details, please refer to the relevant description of step 101, which will not be repeated here.
[0067] As an optional embodiment, before obtaining M groups of first parameter values, you can first obtain the values of N memory parameters in a reference device of the device to be tested; perform a fourth stress test on the memory based on the values of the N memory parameters in the reference device; if the fourth stress test fails, obtain M groups of first parameter values of the N memory parameters.
[0068] The reference device may refer to an embedded device that has one or more hardware conditions similar to the device under test, including but not limited to PCB, DDR frequency, and chip model.
[0069] When obtaining the M groups of first parameter values, you can first refer to the values of N memory parameters in the reference device, and try to use the values of N memory parameters in the reference device to perform the fourth stress test. If the test is successful, you can directly use the values of N memory parameters in the reference device as the final values of N memory parameters in the device under test, without the need for value search, thereby improving the adaptation efficiency of memory parameters.
[0070] As an optional embodiment, if the fourth stress test fails, then M groups of first parameter values of N memory parameters are obtained, including:
[0071] If the fourth stress test fails, the value of at least one memory parameter in the reference device is adjusted according to the hardware difference between the reference device and the device to be tested to obtain N alternative values of the memory parameters; if there are adjusted memory parameters and unadjusted memory parameters among the N memory parameters, it is determined that the alternative values of the N memory parameters include the adjusted values of the adjusted memory parameters and the values of the unadjusted memory parameters; if the N memory parameters are all adjusted memory parameters, it is determined that the alternative values of the N memory parameters include the adjusted values of the N adjusted memory parameters; the adjusted memory parameters refer to the memory parameters with adjusted values; the unadjusted memory parameters refer to the memory parameters with unadjusted values;
[0072] Performing a fourth stress test on the memory again based on the alternative values of the N memory parameters;
[0073] If the fourth stress test fails again, M groups of first parameter values of N memory parameters are obtained.
[0074] Taking PCB, DDR frequency and chip model as examples, this article describes whether it is necessary to adjust the values of N memory parameters in the reference device. For the convenience of description, the memory in the device under test is called the memory under test, and the memory in the reference device is called the reference memory. The specific adjustments are as follows:
[0075] (1) The reference memory and the memory to be tested have the same particle model and DDR frequency but different PCBs (for example, the memory to be tested is a new product or has a new hardware structure).
[0076] If the DDR layout of the memory under test remains unchanged compared to the reference memory, and other parts of the PCB are changed, it is usually not necessary to adjust the values of the N memory parameters in the reference device;
[0077] If the DDR layout and routing of the memory to be tested is changed compared to the reference memory, the values of the N memory parameters in the reference device may be adjusted according to the specific circumstances of the failure of the fourth stress test and with reference to past experience;
[0078] If the power supply of the memory under test is modified compared to the reference memory, it is usually not necessary to adjust the values of the N memory parameters in the reference device;
[0079] If the number of PCB layers of the memory to be tested is modified and the signal quality is attenuated compared to the reference memory, the values of the N memory parameters in the reference device may be adjusted according to the specific circumstances of the failure of the fourth stress test and with reference to past experience;
[0080] If the termination resistor is removed from the memory to be tested compared to the reference memory, the driving strength of the control channel (eg, clock signal, address signal) is adjusted.
[0081] (2) For the case where the reference memory and the memory to be tested have the same PCB and DDR frequency but different chip models (for example, the memory to be tested is a new product, the operating temperature range has changed, the cost has been reduced, the original model of the chip has been discontinued, etc.).
[0082] If the reference memory and the memory to be tested are from the same manufacturer, have the same capacity, and have different specifications (e.g., different maximum frequencies, different operating temperature ranges, etc.), it is usually not necessary to adjust the values of the N memory parameters in the reference device;
[0083] If the reference memory and the memory to be tested are from the same manufacturer but different tape-out versions, the values of the N memory parameters in the reference device may be adjusted according to the specific circumstances of the failure of the fourth stress test and with reference to past experience;
[0084] If the reference memory and the memory to be tested are from the same manufacturer but have different capacities, you can only modify the capacity value;
[0085] If the reference memory and the memory to be tested are from different manufacturers and have the same capacity, the values of the N memory parameters in the reference device can be fine-tuned according to the specific circumstances of the failure of the fourth stress test and with reference to past experience.
[0086] (3) If the reference memory and the memory to be tested have the same PCB and chip model but different DDR frequencies (for example, when performance requirements change), only the DDR frequency value can be modified.
[0087] (4) In the case where the reference memory and the memory to be tested have two or more different factors in terms of PCB, chip model, and DDR frequency, the values of the N memory parameters in the reference device can be fine-tuned based on the specific circumstances of the failure of the fourth stress test and with reference to past experience.
[0088] If the fourth stress test on the memory based on the values of N memory parameters in the reference device fails, it is determined that the values of N memory parameters in the reference device cannot make the stability of the memory meet the preset requirements. The fourth stress test on the memory may fail again after adjusting the values of certain memory parameters. If the fourth stress test succeeds, it can be determined that the adjusted values are the final values. If the fourth stress test fails again, M groups of first parameter values are obtained to automatically search for the final value from a wide range of values.
[0089] It should be noted that the present application does not limit the test cases and test time of the fourth stress test. For example, the test cases of the fourth stress test may be the same as the test cases of the third stress test in step 408, and the test time of the fourth stress test may be the same as the test time of the third stress test in step 408.
[0090] Step 402: Perform a first stress test on the memory in the device under test based on the M groups of first parameter values.
[0091] The step 402 is the same as the step 102. For details, please refer to the relevant description of the step 102, which will not be repeated here.
[0092] Step 403, if the number of groups of second parameter values that succeed in the first stress test in the M groups of first parameter values is greater than H, then determine N candidate values of the memory parameters from all values of the second parameter values of all groups of the N memory parameters.
[0093] Step 403 is the same as step 103. For details, please refer to the relevant description of step 103, which will not be repeated here.
[0094] Step 404: Combine the N candidate values of the memory parameters to obtain a third parameter value.
[0095] The step 404 is the same as the step 104. For details, please refer to the relevant description of the step 104, which will not be repeated here.
[0096] Step 405: If the number of groups of third parameter values is greater than L, the third parameter values of all groups are used as reference parameter values.
[0097] Wherein, L is an integer greater than 1 and less than M.
[0098] If the number of groups of the third parameter values is greater than L, it means that the value range to be searched is still relatively large. You can first perform a medium-time stress test (ie, a second stress test) on the memory based on the third parameter values to further narrow the search range.
[0099] Step 406: Perform a second stress test on the memory based on the reference parameter values of all groups.
[0100] The test time of the second stress test is greater than the test time of the first stress test. For example, the test time of the first stress test ranges from 2 minutes to 10 minutes, and the test time of the second stress test ranges from 30 minutes to 6 hours.
[0101] Step 407: If the number of groups of fourth parameter values that succeed in the second stress test among all groups of reference parameter values is greater than L, the fourth parameter values are used as reference parameter values, and the test parameters of the second stress test are adjusted.
[0102] The test parameters of the second stress test include the test time and / or test case type of the second stress test.
[0103] After executing step 407, by returning to execute the step of performing a second stress test on the memory based on reference parameter values of all groups and subsequent steps, the search range can be gradually narrowed so that the number of groups of parameter values that successfully perform the second stress test on the memory is less than or equal to L.
[0104] Step 408: If the number of groups of fourth parameter values is greater than zero and less than or equal to L, perform a third stress test on the memory based on all fourth parameter values, and determine the fourth parameter value that succeeds the third stress test as the target parameter value.
[0105] The test time of the third stress test is greater than the test time of the second stress test. For example, the test time of the third stress test has a value range of greater than 12 hours.
[0106] If the number of groups of fourth parameter values is greater than zero and less than or equal to L, it means that the value range to be searched is relatively small, and a long-term stress test (i.e., the third stress test) can be directly performed on the memory based on the fourth parameter values to further narrow the search range and find the target parameter value that can make the stability of the memory reach the preset requirements from all groups of fourth parameter values. If a group of fourth parameter values passes the third stress test on the memory successfully, it means that the group of fourth parameter values is the target parameter value.
[0107] Step 409: If the number of groups of third parameter values is greater than zero and less than or equal to L, perform a third stress test on the memory based on all third parameter values, and determine the third parameter value that succeeds the third stress test as the target parameter value.
[0108] If the number of groups of third parameter values is greater than zero and less than or equal to L, it means that the value range to be searched is relatively small, and a long-term stress test (i.e., the third stress test) can be directly performed on the memory based on the third parameter values to further narrow the search range and find the target parameter values that can make the stability of the memory reach the preset requirements from all groups of third parameter values. If a group of third parameter values succeeds in the third stress test on the memory, it means that the group of third parameter values is the target parameter value.
[0109] In an actual application scenario, the memory parameter search process example is as follows: Figure 5 As shown. Figure 5In the process, the values of N memory parameters in the reference device can be used as reference, and the fourth stress test can be performed on the memory in the device under test based on the values of the N memory parameters of the reference device. If the fourth stress test is successful, the values of the N memory parameters of the reference device are determined to be the final values of the N memory parameters, and the process ends; if the fourth stress test fails, the values of individual memory parameters in the N memory parameters can be adjusted, and the fourth stress test can be performed on the memory based on the adjusted values. If successful, the adjusted values are determined to be the final values. If it fails, a large-range search can be performed based on M groups of first parameter values, and then the search range can be automatically narrowed based on the third parameter value, and finally a small-range stress test can be performed based on the fourth parameter value (that is, when the number of groups of fourth parameter values is greater than zero and less than or equal to L, the third stress test is performed on the fourth parameter value).
[0110] The embodiment of the present application can gradually narrow the search range by performing multiple stress tests on the memory with different test times, thereby improving the accuracy of the final value of the memory parameter. The search process of the present application does not require human participation, which improves the search efficiency of the value and the adaptation efficiency of the memory parameters.
[0111] It should be noted that the present application does not limit the stress test environment of the memory. For example, in an environment with high and low temperature changes, the memory can be stress tested in the environment with high and low temperature changes first to obtain the values of the memory parameters that can make the memory more stable; if the stability of the memory is poor in the high temperature range or the low temperature range in the environment with high and low temperature changes, the memory can be stress tested separately in a constant high temperature environment or a constant low temperature environment to speed up the screening of the values of the memory parameters. Of course, the memory can also be stress tested in a normal temperature environment first, and then stress tested in a constant high temperature environment or an environment with high and low temperature changes in turn, which is not limited here. Among them, the specific temperature value can be determined according to the working requirements of the memory.
[0112] Optionally, the test cases of the first stress test, the second stress test, the third stress test and the fourth stress test may be completely the same, partially the same, or different, which is not limited here.
[0113] See also Figure 6 , is a structural diagram of the memory parameter adaptation device provided in Example 3 of the present application. For the sake of convenience of explanation, only the parts related to the embodiment of the present application are shown.
[0114] The above-mentioned memory parameter adaptation device comprises:
[0115] A first acquisition module 61 is used to acquire M groups of first parameter values of N memory parameters, each group of the first parameter values is a value combination of the N memory parameters, M is an integer greater than 1, and N is an integer greater than zero;
[0116] A first testing module 62, configured to perform a first stress test on the memory in the device under test based on the M groups of the first parameter values;
[0117] A first determination module 63 is configured to determine N candidate values of the memory parameter from all values of the N memory parameters in all groups of the second parameter values if the number of groups of the second parameter values that succeed in the first stress test in the M groups of the first parameter values is greater than H, wherein a candidate value of the memory parameter refers to a value of the memory parameter that appears more than a frequency threshold in all groups of the second parameter values, and H is an integer greater than 1 and less than M;
[0118] A value combination module 64, used for combining the N candidate values of the memory parameters to obtain a third parameter value;
[0119] The second determination module 65 is used to determine target parameter values from the third parameter values of all groups, and the target parameter values are the values of N memory parameters that make the stability of the memory meet preset requirements.
[0120] Optionally, the second determining module 65 is specifically configured to:
[0121] a parameter determination unit, configured to use the third parameter values of all groups as reference parameter values if the number of groups of the third parameter values is greater than L, where L is an integer greater than 1 and less than M;
[0122] A stress test unit, configured to perform a second stress test on the memory based on the reference parameter values of all groups, wherein the test time of the second stress test is greater than the test time of the first stress test;
[0123] a parameter adjustment unit, configured to use the fourth parameter value as the reference parameter value, and adjust the test parameters of the second stress test, and return to the execution of the stress test unit and subsequent units, if the number of groups of the fourth parameter value that succeeded the second stress test among all the groups of the reference parameter values is greater than L, wherein the test parameters of the second stress test include the test time and / or test case type of the second stress test;
[0124] A first processing unit is configured to perform a third stress test on the memory based on all the fourth parameter values if the number of groups of the fourth parameter values is greater than zero and less than or equal to L, and determine that the fourth parameter value for which the third stress test succeeds is the target parameter value, and the test time of the third stress test is greater than the test time of the second stress test;
[0125] The second processing unit is used to perform the third stress test on the memory based on all the third parameter values if the number of groups of the third parameter values is greater than zero and less than or equal to L, and determine the third parameter value that succeeds the third stress test as the target parameter value.
[0126] Optionally, the memory parameter adaptation device further includes:
[0127] A value display module, configured to display at least two groups of target parameter values if the number of groups of target parameter values is at least two;
[0128] The value selection module is used to determine that N values of the selected target parameter values are final values of the N memory parameters when receiving a selection operation on any one of the at least two groups of target parameter values.
[0129] Optionally, the memory parameter adaptation device further includes:
[0130] A median determination module is used to, if the number of groups of target parameter values is at least two, then, for each memory parameter, take the median of all values of the memory parameter in at least two groups of target parameter values as the final value of the memory parameter.
[0131] Optionally, the memory parameter adaptation device further includes:
[0132] A second acquisition module is used to obtain the values of N memory parameters in a reference device of the device under test;
[0133] A second testing module, used for performing a fourth stress test on the memory based on the values of the N memory parameters in the reference device;
[0134] The first acquisition module 61 is specifically used for:
[0135] If the fourth stress test fails, M groups of the first parameter values of N memory parameters are obtained.
[0136] Optionally, the first acquisition module 61 is specifically used for:
[0137] If the fourth stress test fails, then according to the hardware difference between the reference device and the device under test, adjust the value of at least one of the memory parameters in the reference device to obtain N alternative values of the memory parameters; if there are adjusted memory parameters and unadjusted memory parameters among the N memory parameters, then determine that the alternative values of the N memory parameters include the adjusted values of the adjusted memory parameters and the values of the unadjusted memory parameters; if the N memory parameters are all adjusted memory parameters, then determine that the alternative values of the N memory parameters include the adjusted values of the N adjusted memory parameters; the adjusted memory parameter refers to the memory parameter with the adjusted value; the unadjusted memory parameter refers to the memory parameter with the unadjusted value;
[0138] performing the fourth stress test on the memory again based on the N alternative selected values of the memory parameters;
[0139] If the fourth stress test fails again, M groups of the first parameter values of N memory parameters are obtained.
[0140] Optionally, the first acquisition module 61 is specifically used for:
[0141] Obtaining S groups of initial parameter values of the N memory parameters, each group of the initial parameter values is a value combination of the N memory parameters, and S is an integer greater than or equal to M;
[0142] Initializing the memory based on the initial parameter values of the S group respectively;
[0143] The initial parameter value that is successfully initialized is determined to be the first parameter value.
[0144] The memory parameter adaptation device provided in the embodiment of the present application can be applied in the aforementioned method embodiments 1 and 2. For details, please refer to the description of the aforementioned method embodiments 1 and 2, which will not be repeated here.
[0145] Figure 7 Schematic diagram of the structure of the terminal device provided in the fourth embodiment of the present application. Figure 7 As shown, the terminal device 7 of this embodiment includes: one or more processors 70 (only one is shown in the figure), a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70. When the processor 70 executes the computer program 72, the steps in the above-mentioned various memory parameter adaptation method embodiments are implemented.
[0146] The terminal device 7 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7 It is only an example of the terminal device 7 and does not constitute a limitation on the terminal device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0147] The processor 70 may be a neural network chip, or a CPU, other general-purpose processors, a DSP, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0148] The memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the terminal device 7. The memory 71 is used to store the computer program and other programs and data required by the terminal device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
[0149] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0150] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0151] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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.
[0152] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0154] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0155] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0156] The present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned various memory parameter adaptation method embodiments when executing the computer program product.
[0157] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A memory parameter adaptation method, characterized in that: The memory parameter adaptation method comprises: Obtaining M groups of first parameter values of N memory parameters, each group of the first parameter values is a value combination of the N memory parameters, M is an integer greater than 1, and N is an integer greater than zero; Based on the M groups of the first parameter values, respectively perform a first stress test on the memory in the device under test; If the number of groups of second parameter values that succeed in the first stress test among the M groups of first parameter values is greater than H, then determine N candidate values of the memory parameter from all values of the N memory parameters in all groups of the second parameter values, where a candidate value of the memory parameter refers to a value of the memory parameter that appears more than a frequency threshold in all groups of the second parameter values, and H is an integer greater than 1 and less than M; Combining N candidate values of the memory parameters to obtain a third parameter value; A target parameter value is determined from the third parameter values of all groups, and the target parameter value is the value of N memory parameters that make the stability of the memory meet preset requirements.
2. The memory parameter adaptation method according to claim 1, characterized in that: The step of determining a target parameter value from the third parameter values of all groups includes: If the number of groups of the third parameter values is greater than L, the third parameter values of all groups are taken as reference parameter values, where L is an integer greater than 1 and less than M; Performing a second stress test on the memory based on the reference parameter values of all groups, respectively, wherein the test time of the second stress test is greater than the test time of the first stress test; If the number of groups of fourth parameter values for which the second stress test succeeds among the reference parameter values of all groups is greater than L, the fourth parameter value is used as the reference parameter value, and the test parameters of the second stress test are adjusted, and the process returns to the step of performing the second stress test on the memory based on the reference parameter values of all groups and subsequent steps, wherein the test parameters of the second stress test include the test time and / or test case type of the second stress test; If the number of groups of the fourth parameter value is greater than zero and less than or equal to L, a third stress test is performed on the memory based on all the fourth parameter values, and the fourth parameter value for which the third stress test succeeds is determined to be the target parameter value, and the test time of the third stress test is greater than the test time of the second stress test; If the number of groups of the third parameter values is greater than zero and less than or equal to L, the third stress test is performed on the memory based on all the third parameter values, and the third parameter value that succeeds the third stress test is determined as the target parameter value.
3. The memory parameter adaptation method according to claim 1, characterized in that: Also includes: If the number of groups of the target parameter values is at least two, displaying at least two groups of the target parameter values; When a selection operation of any one of the at least two groups of target parameter values is received, it is determined that N values of the selected target parameter values are final values of the N memory parameters.
4. The memory parameter adaptation method according to claim 1, characterized in that: Also includes: If the number of groups of the target parameter values is at least two, then for each of the memory parameters, the median of all values of the memory parameter in the at least two groups of the target parameter values is used as the final value of the memory parameter.
5. The memory parameter adaptation method according to claim 1, characterized in that: Also includes: Obtaining values of N memory parameters in a reference device of the device under test; Performing a fourth stress test on the memory based on the values of the N memory parameters in the reference device; The obtaining of M groups of first parameter values of N memory parameters includes: If the fourth stress test fails, M groups of the first parameter values of N memory parameters are obtained.
6. The memory parameter adaptation method according to claim 5, characterized in that: If the fourth stress test fails, obtaining M groups of the first parameter values of N memory parameters includes: If the fourth stress test fails, then according to the hardware difference between the reference device and the device under test, adjust the value of at least one of the memory parameters in the reference device to obtain N alternative values of the memory parameters; if there are adjusted memory parameters and unadjusted memory parameters among the N memory parameters, then determine that the alternative values of the N memory parameters include the adjusted values of the adjusted memory parameters and the values of the unadjusted memory parameters; if the N memory parameters are all adjusted memory parameters, then determine that the alternative values of the N memory parameters include the adjusted values of the N adjusted memory parameters; the adjusted memory parameter refers to the memory parameter with the adjusted value; the unadjusted memory parameter refers to the memory parameter with the unadjusted value; performing the fourth stress test on the memory again based on the N alternative selected values of the memory parameters; If the fourth stress test fails again, M groups of the first parameter values of N memory parameters are obtained.
7. The memory parameter adaptation method according to any one of claims 1 to 6, characterized in that: The obtaining of M groups of first parameter values of N memory parameters includes: Obtaining S groups of initial parameter values of the N memory parameters, each group of the initial parameter values is a value combination of the N memory parameters, and S is an integer greater than or equal to M; Initializing the memory based on the initial parameter values of the S group respectively; The initial parameter value that is successfully initialized is determined to be the first parameter value.
8. A memory parameter adaptation device, characterized in that: The memory parameter adaptation device comprises: A first acquisition module, used to acquire M groups of first parameter values of N memory parameters, each group of the first parameter values is a value combination of the N memory parameters, M is an integer greater than 1, and N is an integer greater than zero; A first testing module, configured to perform a first stress test on the memory in the device under test based on M groups of the first parameter values; A first determination module is configured to determine, if the number of groups of second parameter values that succeed in the first stress test among the M groups of first parameter values is greater than H, N candidate values of the memory parameters from all values of the N memory parameters in all groups of the second parameter values, where a candidate value of the memory parameter refers to a value of the memory parameter that appears more than a frequency threshold in all groups of the second parameter values, and H is an integer greater than 1 and less than M; A value combination module, used for combining N candidate values of the memory parameters to obtain a third parameter value; The second determination module is used to determine the target parameter value from the third parameter values of all groups, and the target parameter value is the value of N memory parameters that make the stability of the memory meet the preset requirements.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the memory parameter adaptation method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the memory parameter adaptation method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Random test case generation method and device, electronic equipment and storage medium
CN112256572A
Parameter configuration method and device, electronic equipment and storage medium
CN112417041A