DDR5 memory state conversion recovery type verification method and device, equipment and medium

CN122594088BActive Publication Date: 2026-10-20SHENZHEN RAYSON TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611086373.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-10-20
Estimated Expiration
2046-07-21

AI Technical Summary

Technical Problem

[0005]本申请提供一种DDR5内存状态转换后的恢复类型验证方法,用于解决相关技术中未区分状态转换后的恢复类型而采用统一恢复后校验规则,导致DDR5内存数据保持情况、映像恢复情况和重新初始化后的稳定性验证情况易被混同的问题

Benefits of technology

[0010]与现有技术相比,本申请提供的DDR5内存状态转换后的恢复类型验证方法,通过获取包括状态转换操作和验证配置的测试任务,在发起状态转换操作前获取待测DDR5内存配置的第一运行配置数据,基于验证配置建立第一验证页集合,向第一验证页集合写入测试数据并进行读回校验以得到参考验证结果;在参考验证结果为验证通过时发起状态转换操作,并在状态转换及恢复过程结束后获取状态转换操作的执行记录、待测DDR5内存配置所在运行环境的恢复状态信息和第二运行配置数据;在第一运行配置数据与第二运行配置数据一致时,根据执行记录和恢复状态信息确定恢复类型,并针对未加载非易失恢复映像且保持状态转换操作前测试运行环境的直接保持恢复,对第一验证页集合中的测试数据进行校验,针对加载非易失恢复映像的映像恢复以及重新建立操作系统、测试运行实例或内存验证环境的重新初始化恢复,分别建立第二验证页集合并进行测试数据写入和读回校验,使不同恢复类型对应不同的验证对象和验证结果。由此,本申请能够解决现有技术中采用统一恢复后校验规则而导致数据保持情况、映像恢复情况和重新初始化后的稳定性验证情况易被混同的问题,具有提高DDR5内存状态转换后验证结果针对性和可解释性的效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594088B_ABST
    Figure CN122594088B_ABST
Patent Text Reader

Abstract

The application discloses a DDR5 memory state conversion recovery type verification method, device, equipment and medium. The method comprises the following steps: obtaining a state conversion operation and a verification configuration; obtaining first running configuration data before state conversion, establishing a first verification page set, writing test data and reading back verification to obtain a reference verification result; initiating state conversion after the reference verification passes; obtaining execution records, running environment recovery state information and second running configuration data after recovery ends; determining the recovery type according to the execution records and the recovery state information when the front and rear running configuration data are consistent; verifying the first verification page set when direct maintenance recovery is performed, establishing a second verification page set and reading and writing verification to obtain a verification result when image recovery or reinitialization recovery is performed. The application makes different recovery types correspond to different verification objects and results, avoids mixing stability verification after data maintenance, image recovery and reinitialization, and improves the pertinence and interpretability of the verification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of memory testing technology, specifically to a method, apparatus, device, and medium for verifying the recovery type after a DDR5 memory state transition. Background Technology

[0002] DDR5 memory (Double Data Rate 5 Synchronous Dynamic Random-Access Memory) serves as the main storage component of a computer system, undertaking data storage tasks during the operation of the operating system, applications, and test programs. To verify the stability of DDR5 memory under different operating conditions, relevant tests typically involve reading and writing the memory before state transition operations and continuing the verification during the recovery phase after the state transition operations are completed.

[0003] In related tests, state transition operations can cause the runtime environment of the DDR5 memory configuration under test to enter a suspended, hibernating, restarting, or other runtime state change process. After the state transition and recovery process is completed, the data that the test program can read, the runtime state of the test program, and the memory verification environment may originate from the direct retention of the test runtime environment before the state transition, or from the loading and recovery of a non-volatile recoverable image, or may be re-established by the operating system, test program, or memory verification environment. Existing verification methods usually use uniform post-recovery verification rules to judge the restored test data or test program runtime state, without distinguishing the formation method of the post-recovery test environment. Under different recovery methods, the technical meaning reflected by the post-recovery data verification results and the test program runtime state is different; for example, the continuation of the test program after loading the recovery image does not directly indicate the retention status of the test data written before the state transition, and the verification results obtained after re-establishing the test runtime instance should not be directly equated with the verification results before the state transition.

[0004] Therefore, how to identify the recovery type after the state transition and recovery process is completed, and perform corresponding verification for different recovery types, so as to improve the relevance and interpretability of the verification results after the DDR5 memory state transition, has become a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a method for verifying the recovery type after a DDR5 memory state transition, which solves the problem in related technologies where a unified post-recovery verification rule is used without distinguishing the recovery type after the state transition, leading to confusion between the data retention status, image recovery status, and stability verification status after re-initialization of DDR5 memory.

[0006] Firstly, this application provides a method for verifying the recovery type of DDR5 memory after a state transition, used to verify the recovery status of the DDR5 memory configuration under test after performing a state transition operation, including: Obtain the test task corresponding to the DDR5 memory configuration under test. The test task includes the state transition operation to be executed and the configuration verification. Before initiating the state transition operation, the first running configuration data of the DDR5 memory configuration to be tested is obtained, a first verification page set is established based on the verification configuration, test data is written into the first verification page set, and the written test data is read back for verification to obtain the reference verification result. If the reference verification result is successful, initiate a state transition operation; In response to the end of the state transition and recovery process corresponding to the state transition operation, the execution record of the state transition operation, the recovery status information of the operating environment where the DDR5 memory configuration under test is located, and the second operating configuration data of the DDR5 memory configuration under test are obtained. When the first running configuration data is consistent with the second running configuration data, the recovery type after the state transition is determined based on the execution record and recovery status information. The corresponding verification process is then executed according to the recovery type to obtain the corresponding verification result. The recovery types include direct preserve recovery of the test runtime environment before the state transition operation without loading a non-volatile recoverable image, image recovery with a non-volatile recoverable image loaded, and re-initialization recovery of the operating system, test runtime instance, or memory verification environment; and, When the recovery type is direct hold recovery, the verification process includes: verifying the test data in the first verification page set and generating direct hold verification results; When the recovery type is image recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing read-back verification, and generating image recovery verification results; When the recovery type is re-initialization recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing readback verification, and generating re-initialization stability verification results; The verification configuration includes preset verification page set capacity, verification pattern seed, pattern sequence, number of loops, page access order, and error recording rules; the first and second running configuration data respectively include slot identifier, serial presence detection SPD information, capacity, Rank organization, running frequency, main timing parameters, channel configuration, interleaving configuration, controller working mode, and firmware test configuration identifier.

[0007] Secondly, this application provides a recovery type verification device for DDR5 memory after state transition, used to verify the recovery status of the DDR5 memory configuration under test after performing a state transition operation, including: The test task acquisition module is used to acquire the test tasks corresponding to the DDR5 memory configuration under test. The test tasks include state transition operations to be executed and verification configurations. The reference verification module is used to obtain the first running configuration data of the DDR5 memory configuration under test before initiating the state transition operation, establish a first verification page set based on the verification configuration, write test data into the first verification page set, and read back and verify the written test data to obtain the reference verification result. The state transition initiation module is used to initiate a state transition operation in response to a reference verification result indicating that the verification has passed. The recovery information acquisition module is used to acquire the execution record of the state transition operation, the recovery status information of the operating environment where the DDR5 memory configuration under test is located, and the second operating configuration data of the DDR5 memory configuration under test in response to the state transition operation and the end of the recovery process. The recovery type verification module is used to determine the recovery type after the state transition based on the execution record and recovery status information when the first running configuration data and the second running configuration data are consistent, and to perform the corresponding verification process according to the recovery type to obtain the corresponding verification result; The recovery types include direct preserve recovery of the test runtime environment before the state transition operation without loading a non-volatile recoverable image, image recovery with a non-volatile recoverable image loaded, and re-initialization recovery of the operating system, test runtime instance, or memory verification environment; and, When the recovery type is direct hold recovery, the verification process includes: verifying the test data in the first verification page set and generating direct hold verification results; When the recovery type is image recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing read-back verification, and generating image recovery verification results; When the recovery type is re-initialization recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing readback verification, and generating re-initialization stability verification results; The verification configuration includes preset verification page set capacity, verification pattern seed, pattern sequence, number of loops, page access order, and error recording rules; the first and second running configuration data respectively include slot identifier, serial presence detection SPD information, capacity, Rank organization, running frequency, main timing parameters, channel configuration, interleaving configuration, controller working mode, and firmware test configuration identifier.

[0008] Thirdly, this application provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device performs the above-described method for verifying the recovery type after the DDR5 memory state transition.

[0009] Fourthly, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, causes the processor to perform the above-described method for verifying the recovery type after the DDR5 memory state transition.

[0010] Compared with existing technologies, the DDR5 memory state transition recovery type verification method provided in this application obtains a test task including state transition operation and verification configuration. Before initiating the state transition operation, it obtains the first running configuration data of the DDR5 memory configuration under test, establishes a first verification page set based on the verification configuration, writes test data to the first verification page set and performs read-back verification to obtain a reference verification result. When the reference verification result is a successful verification, it initiates the state transition operation, and after the state transition and recovery process is completed, it obtains the execution record of the state transition operation, the recovery status information of the running environment where the DDR5 memory configuration under test is located, and the second running configuration data. When the first running configuration data and the second running configuration data are consistent, it determines the recovery type based on the execution record and recovery status information. For direct hold recovery without loading a non-volatile recovery image and maintaining the test running environment before the state transition operation, it verifies the test data in the first verification page set. For image recovery with a loaded non-volatile recovery image and re-initialization recovery of re-establishing the operating system, test running instance, or memory verification environment, it establishes a second verification page set and performs test data writing and read-back verification respectively, so that different recovery types correspond to different verification objects and verification results. Therefore, this application can solve the problem that the data preservation status, image recovery status and stability verification status after re-initialization are easily confused due to the use of unified post-recovery verification rules in the prior art, and has the effect of improving the relevance and interpretability of the verification results after DDR5 memory state transition. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart of the recovery type verification method after DDR5 memory state transition provided in an embodiment of this application is shown.

[0013] Figure 2 A flowchart illustrating a specific implementation of step S200 provided in an embodiment of this application is shown.

[0014] Figure 3 A flowchart illustrating a specific implementation of step S500 provided in an embodiment of this application is shown.

[0015] Figure 4 A flowchart illustrating another specific implementation of step S500 provided in the embodiments of this application is shown.

[0016] Figure 5 A flowchart illustrating another specific implementation of step S500 provided in the embodiments of this application is shown.

[0017] Figure 6 A schematic diagram of the recovery type verification device after DDR5 memory state transition provided in an embodiment of this application is shown.

[0018] Figure 7 A schematic diagram of an electronic device provided in an embodiment of this application is shown.

[0019] Figure 8 A schematic diagram of a computer-readable storage medium provided in an embodiment of this application is shown. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are all within the scope of protection of this application.

[0021] It should be noted that the relational terms such as "first" and "second" used in this article are only used to distinguish one entity, operation, or state from another entity, operation, or state, and are not used to limit the existence of actual relationships, order, or differences in importance between these entities, operations, or states.

[0022] The terms “comprising,” “including,” and any variations thereof are intended to cover non-exclusive inclusion, such that a process, method, apparatus, device, or system that comprises a list of elements may include not only those elements expressly listed, but also other elements not expressly listed, or elements inherent to that process, method, apparatus, device, or system. Unless otherwise specified, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the process, method, apparatus, device, or system that includes that element.

[0023] The DDR5 memory state transition recovery type verification method provided in this application is applied to a test scenario for reliability verification of the DDR5 memory configuration under test. The DDR5 memory configuration under test is set up in a corresponding runtime environment. The runtime environment is used to support the operation of the DDR5 memory configuration under test and initiates suspend, hibernation, restart, or other state transition operations according to the test task. The DDR5 memory configuration under test is the verification object of this application. The runtime environment, as the runtime carrier of the DDR5 memory configuration under test, is not the primary verification object of this application, but provides execution conditions and recovery status information for the state transition and recovery process.

[0024] It is understood that the runtime environment of the DDR5 memory configuration under test can be a computer runtime environment or test runtime environment capable of enabling the DDR5 memory configuration under test to enter a working state and initiating suspend, hibernate, restart, or other state transition operations according to the test task. This runtime environment may include the memory controller, firmware, operating system, test programs, and memory verification environment that work with the DDR5 memory configuration under test. The runtime environment is not the primary verification object of this application; its role is to provide the operating conditions for the DDR5 memory configuration under test and to generate corresponding execution records and recovery status information during the state transition and recovery processes corresponding to the state transition operations. The recovery status information can characterize whether the runtime environment loads a non-volatile recovery image, whether it maintains the test runtime environment before the state transition operation, or whether it re-establishes the operating system, test runtime instance, or memory verification environment.

[0025] The DDR5 memory state transition recovery type verification method provided in this application embodiment is used to verify the recovery status of the DDR5 memory configuration under test after performing a state transition operation. Figure 1 A flowchart of the recovery type verification method after DDR5 memory state transition provided in an embodiment of this application is shown, such as... Figure 1 As shown, the method includes: Step S100: Obtain the test task corresponding to the DDR5 memory configuration under test. The test task includes the state transition operation to be executed and the verification configuration. Optionally, the test task is used to determine the state transition target of this verification and the verification conditions used before and after the state transition. The state transition operation can be suspend, hibernate, restart, or other operations that can cause the running environment of the DDR5 memory configuration under test to change state and enter the recovery process. The verification configuration is used to constrain the establishment method of the first verification page set or the second verification page set, the test data generation method, the access process, and the result recording method, so that the verification process before and after the state transition can be executed according to the same set of verification requirements.

[0026] Step S200: Before initiating the state transition operation, obtain the first running configuration data of the DDR5 memory configuration under test, establish a first verification page set based on the verification configuration, write test data into the first verification page set, and perform read-back verification on the written test data to obtain a reference verification result. Optionally, the first running configuration data is used to characterize the running configuration state of the DDR5 memory configuration under test before the state transition operation. The first verification page set is the verification object established before the state transition operation. Writing test data into the first verification page set and performing read-back verification can confirm that the data writing, reading, and comparison processes to be verified are in a normal state before initiating the state transition operation. The reference verification result provides a preliminary basis for subsequent post-state transition verification. Only when the reference verification result shows that the verification is successful will subsequent post-state transition anomalies or verification differences have further analytical value; if the reference verification before the state transition operation has failed, it is not appropriate to directly attribute the post-state transition anomalies to the state transition and recovery process.

[0027] Step S300: In response to a successful reference verification result, initiate a state transition operation. Optionally, after a successful reference verification result, initiate a state transition operation according to the test task. After the state transition operation is initiated, the runtime environment of the DDR5 memory configuration under test enters the corresponding state transition and recovery process. Before the end of this process, no conclusion is drawn about the recovery type; after the recovery process is completed, the actual recovery situation is identified by combining the execution record and recovery status information.

[0028] Step S400: In response to the completion of the state transition and recovery process corresponding to the state transition operation, acquire the execution record of the state transition operation, the recovery status information of the operating environment where the DDR5 memory configuration under test is located, and the second operating configuration data of the DDR5 memory configuration under test. Optionally, the execution record of the state transition operation is used to characterize the initiation, execution, or completion of the state transition operation. The recovery status information of the operating environment where the DDR5 memory configuration under test is located is used to characterize whether a non-volatile recovery image is loaded during the recovery process, whether the test operating environment before the state transition operation is maintained, and whether the operating system, test running instance, or memory verification environment is re-established. The second operating configuration data is used to characterize the operating configuration state of the DDR5 memory configuration under test after the state transition and recovery process is completed. By acquiring the above information, it is possible to avoid judging the recovery status of the DDR5 memory configuration based solely on a single phenomenon such as "the test program can still run" or "test data can be read". Under different recovery types, test data may come from different formation methods, and test programs may also be recovered or re-established in different ways. Therefore, it is necessary to combine the execution record, recovery status information, and second operating configuration data for subsequent judgment.

[0029] In this embodiment, the end of the state transition and recovery process corresponding to the state transition operation refers to the moment when the state transition operation has been completed, and the operating environment of the DDR5 memory configuration under test has entered the corresponding recovery state, at which point the execution record of the state transition operation, the recovery status information, and the second operating configuration data can be obtained. For different state transition operations, the end of the state transition and recovery process can be determined based on the corresponding execution record, recovery status information, or the state where the verification conditions after recovery are met.

[0030] Step S500: When the first running configuration data and the second running configuration data are consistent, determine the recovery type after the state transition based on the execution record and recovery status information, and execute the corresponding verification process according to the recovery type to obtain the corresponding verification result. Optionally, the consistency between the first running configuration data and the second running configuration data indicates that the key operating conditions of the DDR5 memory configuration under test remain consistent before and after the state transition. Under this condition, the verification process before and after the state transition has a basis for correlation evaluation. If the first running configuration data and the second running configuration data are inconsistent, the verification results before and after the state transition operation will not be correlated for evaluation to avoid interference from changes in operating frequency, main timing parameters, channel configuration, interleaving configuration, or controller operating mode.

[0031] The recovery types include direct hold recovery (where the non-volatile recoverable image is not loaded and the test runtime environment before the state transition operation is maintained), image recovery (loading the non-volatile recoverable image), and re-initialization recovery (rebuilding the operating system, test runtime instance, or memory verification environment). Direct hold recovery refers to the recovery scenario where, after the state transition and recovery process, the non-volatile recoverable image is not loaded, and the test runtime environment before the state transition operation remains usable. In this scenario, the first verification page set is still considered the verification object established and retained before the state transition operation. Image recovery refers to the recovery scenario where, after the state transition and recovery process, the non-volatile recoverable image is loaded to restore the test program or its runtime data before the state transition operation. In this scenario, the test program, runtime data, or other restored content may come from the non-volatile recoverable image; therefore, the data written before the state transition operation in the first verification page set is not used as the verification object for data retention capability. Re-initialization recovery refers to the recovery scenario where, after the state transition and recovery process, the operating system is restarted, the test runtime instance is restarted, or the memory verification environment is rebuilt. In this scenario, the test instance before the state transition operation is no longer the direct execution subject for subsequent verification. The verification object needs to be re-established according to the saved verification configuration and subsequent stability verification needs to be performed.

[0032] In some embodiments, a non-volatile recoverable image may include a hibernation image, a system context image saved by firmware, or other non-volatile recoverable data used to restore test programs, runtime data, or runtime environment states during state transitions and recovery processes. Whether or not a non-volatile recoverable image is loaded can be one of the criteria for distinguishing between direct hold recovery and image recovery.

[0033] When the recovery type is direct hold recovery, the verification process includes: verifying the test data in the first verification page set and generating a direct hold verification result. Optionally, the direct hold recovery path uses the first verification page set as the verification object. The first verification page set stores test data that was written and verified before the state transition operation. After the state transition and recovery process is completed, the test data in the first verification page set is read and compared with the expected test data determined according to the verification configuration to obtain the direct hold verification result. The direct hold verification result is used to characterize whether the test data in the first verification page set of the DDR5 memory configuration under the corresponding direct hold recovery conditions can pass the post-recovery verification. This result corresponds to the verification page set established before the state transition operation and is not used to characterize the stability of re-establishing the verification page set under image recovery or re-initialization recovery conditions.

[0034] When the recovery type is image recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing read-back verification, and generating an image recovery verification result. Optionally, the image recovery path uses the second verification page set established after the state transition and recovery process as the verification object. The second verification page set is used to perform post-recovery stability verification, and it is not required to use the same physical page address as the first verification page set. By writing test data to the second verification page set according to the verification configuration and performing read-back verification, the image recovery verification result can be obtained. The image recovery verification result is used to reflect the stability verification of the DDR5 memory configuration under test according to the verification configuration in the test running environment after loading the non-volatile recovery image. This result is not used to prove that the test data in the first verification page set before the state transition was directly retained without the recovery image.

[0035] When the recovery type is re-initialization recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing read-back verification, and generating re-initialization stability verification results. Optionally, the re-initialization recovery path also establishes a second verification page set, but its execution is based on a newly established operating system, test instance, or memory verification environment. The re-initialization stability verification results are used to characterize the read-write verification of the DDR5 memory configuration under test after re-initialization according to the verification configuration. Since the second verification page set after re-initialization recovery may use different physical pages than the first verification page set before the state transition operation, the re-initialization stability verification process can also combine physical address segment coverage information to evaluate whether the verification object before and after the state transition meets the preset coverage conditions. When the preset coverage conditions are met, the re-initialization stability verification results can be used to characterize the post-recovery stability under the corresponding physical address segment coverage conditions; when the preset coverage conditions are not met, results that are not comparable under the coverage conditions are output.

[0036] In this embodiment, before the state transition operation, the first running configuration data of the DDR5 memory configuration under test is obtained, a first verification page set is established, and the write and read-back verification of test data is completed to form a reference verification result before the state transition. After the reference verification result is verified as passed, the state transition operation is initiated, and after the state transition and recovery process is completed, the execution record, the recovery status information of the running environment where the DDR5 memory configuration under test is located, and the second running configuration data are obtained. Under the condition that the running configuration data before and after are consistent, direct hold recovery, image recovery, and re-initialization recovery are distinguished according to the execution record and recovery status information: for direct hold recovery, the first verification page set established before the state transition is used as the verification object, and the test data therein is verified; for image recovery and re-initialization recovery, a second verification page set is re-established and the write and read-back verification of test data is performed. Thus, the data hold verification of direct hold recovery, the verification after image recovery, and the stability verification after re-initialization correspond to different verification objects and verification results, avoiding the use of the same rule to interpret different situations such as image loading, re-establishment of the test environment, or retention of the original test data, thereby improving the specificity and interpretability of the verification results after the DDR5 memory state transition.

[0037] In some embodiments, to further improve the reliability of the correlation between the verification results before and after the state transition operation, the temperature status of the DDR5 memory configuration under test can be collected before and after the state transition operation. For example, temperature values ​​can be collected at two fixed reference locations of the DDR5 memory configuration under test, and the higher temperature value can be used as the temperature status at the corresponding time. The temperature change rate can also be calculated based on the temperature values ​​at the two sampling times. When the temperature before and after the state transition operation is within the same preset temperature range, and the temperature change rate meets the preset stability requirements, the corresponding verification results are used for correlation evaluation. This temperature status represents a further constraint on the operating conditions and does not affect the basic flow of the above-described recovery type verification method.

[0038] In some embodiments, the DDR5 memory state transition recovery type verification method provided in this application includes a preset verification page set capacity, verification pattern seed, pattern sequence, loop count, page access order, and error recording rules. Optionally, the verification page set capacity is used to determine the verification range of the first verification page set or the second verification page set. The verification pattern seed is used to determine the starting point for generating test data, the pattern sequence is used to determine the order of test patterns used in each round of verification, the loop count is used to determine the number of repeated verification rounds, the page access order is used to determine the access order of each verification page, and the error recording rules are used to record the data differences found during the comparison process and their corresponding positions, rounds, or types.

[0039] The aforementioned verification configuration is predetermined within the same test task and used for reference verification before the state transition and verification of the second verification page set after the state transition. Therefore, in the case of image recovery and re-initialization recovery, although the second verification page set can be re-established, its test data generation rules, access rules, and error logging rules can remain consistent with those before the state transition operation.

[0040] The first and second running configuration data include slot identifier, serial presence detection (SPD) information, capacity, rank organization, operating frequency, main timing parameters, channel configuration, interleaving configuration, controller operating mode, and firmware test configuration identifier, respectively. Optionally, the slot identifier and serial presence detection (SPD) information are used to identify the DDR5 memory configuration under test and its basic parameters; capacity and rank organization are used to characterize the capacity organization method of the DDR5 memory configuration under test; operating frequency, main timing parameters, channel configuration, interleaving configuration, and controller operating mode are used to characterize the operating conditions affecting the read and write behavior of the DDR5 memory configuration; and the firmware test configuration identifier is used to characterize the firmware-side test configuration related to this verification.

[0041] As one implementation method, the consistency of the first and second running configuration data can be determined by comparing each field individually, or by generating corresponding configuration identifiers according to preset field combinations and then comparing them. Regardless of the comparison method used, it should be possible to confirm whether the running configuration of the DDR5 memory under test before and after the state transition meets the correlation evaluation requirements.

[0042] In some embodiments, Figure 2 A flowchart illustrating a specific implementation of step S200 provided in this application embodiment is shown, as follows: Figure 2 As shown, in step 200, a first verification page set is established based on the verification configuration. Test data is written into the first verification page set, and the written test data is read back for verification to obtain a reference verification result, including: S210: Establish and lock the first verification page set via the kernel test driver. Optionally, the first verification page set is established and locked by the kernel test driver to ensure that the page set remains stable during test execution before the state transition operation. The purpose of locking the first verification page set is to prevent it from being swapped out, released, or reallocated during the test, thereby ensuring that the test data written before the state transition operation corresponds to the test data participating in verification under the subsequent directly maintained recovery path.

[0043] S220: Write test data to the first verification page set according to the verification pattern seed, pattern sequence, loop count, and page access order. In this embodiment, the test data corresponding to each position can be determined based on the verification pattern seed, pattern sequence, loop count, logical page number, and page offset. Each round of testing can sequentially write the verification pages in the first verification page set according to the page access order, so that the first verification page set forms a test data distribution corresponding to the verification configuration.

[0044] S230: Read the test data from the first verification page set. Determine the corresponding expected test data based on the verification pattern seed, pattern sequence, loop count, and page access order. Compare the read test data with the expected test data and record the comparison result according to the error recording rules to obtain a reference verification result. Optionally, if the read test data matches the expected test data, the corresponding position passes the verification; if the read test data does not match the expected test data, record the error position, corresponding loop, pattern information, or other related information according to the error recording rules. A reference verification result is formed based on the comparison results of each verification page and each round of testing. When the reference verification result is "verification passed," it indicates that the first verification page set meets the basic verification requirements of this test task before the state transition operation.

[0045] In some embodiments of this application, before initiating a state transition operation in response to a reference verification result indicating that the verification has passed, the method further includes: Perform cache write-back processing on the cached data corresponding to the first verification page set, and confirm that the corresponding write-back operation is complete. Optionally, the cache write-back processing is used to write the modified cached data corresponding to the first verification page set into the memory location corresponding to the first verification page set; after confirming that the corresponding write-back operation is complete, initiate a state transition operation to reduce the possibility that the test data before the state transition is only retained in the cache copy and not written to the memory location corresponding to the first verification page set.

[0046] Figure 3 A flowchart illustrating a specific implementation of step S500 provided in this application embodiment is shown, as follows: Figure 3 As shown, in step S500, the test data in the first verification page set is validated to generate a direct retention verification result, including: In response to the completion of the state transition and recovery process corresponding to the state transition operation, cache invalidation is performed on the cached data corresponding to the first verification page set. Optionally, after the state transition and recovery process is completed, for directly maintained recovery paths, cache invalidation is performed on the cached data corresponding to the first verification page set, so that subsequent reads do not directly use the cached copy left before the state transition operation.

[0047] It should be noted that cache invalidation processing applies only to the cached copy corresponding to the first verification page set, and does not clear the test data in the first verification page set. After completing cache invalidation processing, the test data in the first verification page set is read, the corresponding expected test data is determined according to the verification configuration, and the read test data is compared with the expected test data to generate the direct retention verification result.

[0048] The test data in the first verification page set is read, and the corresponding expected test data is determined according to the verification configuration. The read test data is compared with the expected test data to generate a direct hold verification result. Optionally, the direct hold verification result may include verification pass or verification fail. Verification pass indicates that the test data in the first verification page set is consistent with the corresponding expected test data; verification fail indicates that at least part of the read test data is inconsistent with the corresponding expected test data. This result corresponds to the data verification status of the DDR5 memory configuration under test under direct hold recovery conditions.

[0049] In some embodiments of this application, before initiating a state transition operation in response to a reference verification result indicating that the verification has passed, the method further includes: A continuation marker is generated to characterize the running state of the test program, and a summary of the continuation marker is saved. Optionally, the continuation marker is generated by the test program before the state transition operation and is used to characterize the running state of the test program before the state transition operation. Saving the summary of the continuation marker, rather than saving the plaintext of the continuation marker, can be used to subsequently determine whether the recovered test program corresponds to the running state of the test program before the state transition operation. The continuation marker is used for test program continuation identification, not for determining whether the test data in the first verification page set was recovered via a non-volatile recoverable image, nor for proving that the original test data in the DDR5 memory configuration under test is in a direct hold state.

[0050] The continuation tag digest is generated based on the continuation tag and used for subsequent consistency comparisons. The continuation tag digest is saved before the state transition operation, and the continuation tag is retrieved and compared with the digest after the state transition and recovery process. This allows the continuation status of the test program to be determined without relying on the plaintext storage of the continuation tag.

[0051] Figure 4 A flowchart illustrating another specific implementation of step S500 provided in the embodiments of this application is shown, as follows: Figure 4 As shown, in step S500, a second verification page set is established based on the verification configuration, test data is written to the second verification page set and read-back verification is performed to generate an image recovery verification result, including: In response to the completion of the state transition and recovery process corresponding to the state transition operation, a continuation flag is obtained. This flag is compared with the digest to determine whether the test program should continue execution after image recovery. Optionally, in the case of image recovery, the recovered test program can submit a continuation flag. Comparing the obtained continuation flag with the digest saved before the state transition operation determines whether the recovered test program corresponds to the test program's running state before the state transition operation. This comparison result is used to determine the continuation status of the test program.

[0052] When the continuation marker matches the digest, a second verification page set is established based on the verification configuration. Test data is written to the second verification page set and read-back verification is performed to generate an image recovery verification result. Optionally, when the continuation marker matches the digest, a second verification page set is established and test data writing and read-back verification are performed according to the verification configuration. The comparison result between the continuation marker and the digest is used to confirm whether the test program continues to execute after image recovery and serves as a condition for establishing the second verification page set and performing subsequent verifications. The image recovery verification result is used to characterize the read-back verification status of the second verification page set. Since this path uses the second verification page set established after recovery, its verification focus is on the stability of the tested DDR5 memory configuration in the test running state after image recovery, rather than the direct retention capability of test data before the state transition operation in the first verification page set.

[0053] In some embodiments of this application, before initiating a state transition operation in response to a reference verification result indicating that the verification has passed, the method further includes: Obtain the first physical address segment coverage information and save the verification configuration, first runtime configuration data, reference verification results, and first physical address segment coverage information. Optionally, the first physical address segment coverage information is used to characterize the coverage of the first verification page set in the identifiable physical address space. Saving the verification configuration, first runtime configuration data, reference verification results, and first physical address segment coverage information enables the re-established test runtime instance to obtain the verification basis before the state transition operation and perform the re-initialization stability verification after recovery accordingly.

[0054] In some embodiments, the verification configuration, first runtime configuration data, reference verification results, and first physical address segment coverage information can be saved to a record area that can still be accessed by the re-established test runtime instance after the state transition and recovery process is completed. Thus, after the operating system, test runtime instance, or memory verification environment is re-established, the verification basis prior to the state transition operation can still be obtained, and a second verification page set can be established and a re-initialization stability verification can be performed accordingly.

[0055] Figure 5 A flowchart illustrating another specific implementation of step S500 provided in this application embodiment is shown, as follows: Figure 5 As shown, in step S500, a second verification page set is established based on the verification configuration, test data is written to the second verification page set and read back for verification, generating a re-initialization stability verification result, including: In response to the completion of the state transition and recovery process corresponding to the state transition operation, the newly established test run instance obtains the saved verification configuration, first run configuration data, reference verification results, and first physical address segment coverage information, establishes a second verification page set, and obtains the second physical address segment coverage information. Optionally, the newly established test run instance can establish the second verification page set based on the saved verification configuration. The second verification page set is not required to use the same physical page addresses as the first verification page set, but it needs to obtain the second physical address segment coverage information to determine whether the second verification page set and the first verification page set meet the preset coverage conditions.

[0056] When the coverage information of the second physical address segment meets the preset coverage conditions corresponding to the coverage information of the first physical address segment, test data is written to the second verification page set and read back for verification, generating a re-initialization stability verification result. Optionally, the preset coverage conditions are used to limit the coverage relationship between the first verification page set and the second verification page set in the physical address space. For example, the preset coverage conditions may require the second physical address segment coverage information to cover a preset address segment ratio corresponding to the first physical address segment coverage information, or require the number of pages or capacity ratio of each address segment to meet a preset deviation range. When the preset coverage conditions are met, test data is written to the second verification page set according to the verification configuration and read back for verification, forming a re-initialization stability verification result.

[0057] When the coverage information of the second physical address segment does not meet the preset coverage conditions, the result of incomparable coverage conditions is output as the result of re-initialization stability verification. Optionally, when the second verification page set does not meet the preset coverage conditions, it indicates that the coverage range of the physical address segment used for verification before and after the state transition operation does not meet the preset association conditions. In this case, the result of incomparable coverage conditions is output as a result type of re-initialization stability verification result, used to indicate that the current restored verification object is not suitable for association evaluation with the verification object before the state transition operation.

[0058] The first and second physical address segment coverage information respectively include the address segment division rules of the corresponding verification page set in the physical address space and the number or capacity ratio of pages in each address segment. Optionally, the physical address segment coverage information focuses on the address segment coverage in the physical address space that can be identified by the runtime environment or kernel test driver, and does not require locating internal addresses such as Rank, Bank Group, Bank, or Row within the DDR5 memory configuration under test. By using the address segment division rules and the number or capacity ratio of pages in each address segment, the coverage of the first and second verification page sets can be compared without relying on the internal address mapping of DDR5.

[0059] In some embodiments of this application, when the execution record and recovery status information do not meet the determination conditions for any of the recovery types—direct hold recovery, image recovery, and re-initialization recovery—a recovery type confirmation result is output. A second verification page set is established based on the verification configuration, test data is written to the second verification page set, and read-back verification is performed to generate a post-recovery stability verification result. Optionally, the recovery type confirmation result indicates that the current execution record and recovery status information are insufficient to classify the recovery process into any of the types—direct hold recovery, image recovery, or re-initialization recovery. In this case, a second verification page set can still be established based on the verification configuration, and write and read-back verification can still be performed to obtain a post-recovery stability verification result. The post-recovery stability verification result reflects the read-write verification status of the current recovered DDR5 memory configuration on the second verification page set. This result does not replace the direct hold verification result, image recovery verification result, or re-initialization stability verification result, nor is it used as a direct basis for judging the retention status of test data in the first verification page set before the state transition operation.

[0060] This application also provides a DDR5 memory state transition recovery type verification device, used to verify the recovery status of the DDR5 memory configuration under test after performing a state transition operation. Figure 6 A schematic diagram of the recovery type verification device after DDR5 memory state transition provided in an embodiment of this application is shown, such as... Figure 6 As shown, the device includes a test task acquisition module, a reference verification module, a state transition initiation module, a recovery information acquisition module, and a recovery type verification module.

[0061] The test task acquisition module is used to acquire the test tasks corresponding to the DDR5 memory configuration under test. The test tasks include state transition operations to be executed and verification configurations.

[0062] The reference verification module is used to obtain the first running configuration data of the DDR5 memory configuration under test before initiating the state transition operation, establish a first verification page set based on the verification configuration, write test data into the first verification page set, and read back and verify the written test data to obtain the reference verification result.

[0063] The state transition initiation module is used to initiate a state transition operation in response to a reference verification result indicating that the verification has passed.

[0064] The recovery information acquisition module is used to respond to the state transition corresponding to the state transition operation and the end of the recovery process, and to acquire the execution record of the state transition operation, the recovery status information of the operating environment where the DDR5 memory configuration under test is located, and the second operating configuration data of the DDR5 memory configuration under test.

[0065] The recovery type verification module is used to determine the recovery type after the state transition based on the execution record and recovery status information when the first running configuration data and the second running configuration data are consistent, and to perform the corresponding verification process according to the recovery type to obtain the corresponding verification result.

[0066] The recovery types include direct preserve recovery of the test runtime environment before the state transition operation without loading a non-volatile recoverable image, image recovery with a non-volatile recoverable image loaded, and re-initialization recovery of the operating system, test runtime instance, or memory verification environment; and, When the recovery type is direct hold recovery, the verification process includes: verifying the test data in the first verification page set and generating direct hold verification results.

[0067] When the recovery type is image recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing read-back verification, and generating image recovery verification results.

[0068] When the recovery type is re-initialization recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing readback verification, and generating re-initialization stability verification results.

[0069] It is understood that the above modules can be implemented as software functional modules, hardware logic modules, or a combination of software and hardware. The data interaction, calling order, and processing logic between the modules correspond to the aforementioned method embodiments, and will not be repeated here.

[0070] This application also provides an electronic device, such as... Figure 7 As shown, the electronic device 70 includes a processor 71 and a memory 72. The memory 72 stores a computer program. When the computer program is executed by the processor 71, the electronic device 70 performs the above-mentioned DDR5 memory state transition recovery type verification method.

[0071] The processor executes a computer program to perform processes such as acquiring test tasks, acquiring first runtime configuration data, establishing a first verification page set, writing and reading back test data for verification, initiating state transition operations, recording state transition operations and acquiring recovery state information, acquiring second runtime configuration data, determining recovery type, and generating corresponding verification results. The memory stores the computer program, as well as data used during the execution of the above processes, including verification configuration, runtime configuration data, reference verification results, continuation tag digests, physical address segment coverage information, and verification results.

[0072] This application also provides a computer-readable storage medium, such as... Figure 8As shown, a computer program 81 is stored on a computer-readable storage medium 80. When the computer program 81 is executed by the processor, it causes the processor to perform the above-described method for verifying the recovery type after the DDR5 memory state transition.

[0073] Computer-readable storage media can be tangible storage media capable of storing computer programs, including disk storage, flash memory, read-only memory, random access memory, or other non-volatile storage media.

[0074] The above description, in conjunction with specific embodiments, provides a further detailed explanation of this application and should not be construed as limiting the specific implementation of this application to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of this application, and all such modifications and substitutions should be considered within the scope of protection of this application.

Claims

1. A method for verifying the recovery type after a DDR5 memory state transition, characterized in that, Used to verify the recovery of the DDR5 memory configuration under test after performing a state transition operation, including: Obtain the test task corresponding to the DDR5 memory configuration under test. The test task includes state transition operations to be executed and configuration verification. Before initiating the state transition operation, the first running configuration data of the DDR5 memory configuration to be tested is obtained, a first verification page set is established based on the verification configuration, test data is written into the first verification page set and the written test data is read back for verification to obtain a reference verification result. In response to the reference verification result being verified as passed, the state transition operation is initiated. In response to the end of the state transition and recovery process corresponding to the state transition operation, the execution record of the state transition operation, the recovery status information of the operating environment where the DDR5 memory configuration under test is located, and the second operating configuration data of the DDR5 memory configuration under test are obtained. When the first running configuration data is consistent with the second running configuration data, the recovery type after the state transition is determined according to the execution record and the recovery status information, and the corresponding verification process is executed according to the recovery type to obtain the corresponding verification result. The recovery types include direct preserve recovery (preserving the test environment before state transition without loading a non-volatile recoverable image), image recovery (loading a non-volatile recoverable image), and re-initialization recovery (rebuilding the operating system, test instance, or memory verification environment); and, When the recovery type is direct hold recovery, the verification process includes: verifying the test data in the first verification page set and generating a direct hold verification result; When the recovery type is image recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing readback verification, and generating an image recovery verification result; When the recovery type is re-initialization recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing readback verification, and generating a re-initialization stability verification result; The verification configuration includes a preset verification page set capacity, verification pattern seed, pattern sequence, number of loops, page access order, and error recording rules; the first running configuration data and the second running configuration data respectively include slot identifier, serial presence detection SPD information, capacity, Rank organization, running frequency, main timing parameters, channel configuration, interleaving configuration, controller working mode, and firmware test configuration identifier.

2. The method for verifying the recovery type after a DDR5 memory state transition according to claim 1, characterized in that, The process of establishing a first verification page set based on the verification configuration, writing test data into the first verification page set, and reading back and verifying the written test data to obtain a reference verification result includes: The first set of verification pages is established and locked using the kernel test driver; The test data is written to the first set of verification pages according to the verification pattern seed, the pattern sequence, the number of loops, and the page access order. Read the test data of the first verification page set, determine the corresponding expected test data according to the verification pattern seed, the pattern sequence, the number of loops and the page access order, compare the read test data with the expected test data, and record the comparison result according to the error recording rules to obtain the reference verification result.

3. The method for verifying the recovery type after a DDR5 memory state transition according to claim 1, characterized in that, Before initiating the state transition operation in response to the reference verification result being verified as passed, the method further includes: Perform cache write-back processing on the cached data corresponding to the first verification page set, and confirm that the corresponding write-back operation is completed; The step of validating the test data in the first set of verification pages and generating a direct verification result includes: In response to the end of the state transition and recovery process corresponding to the state transition operation, cache invalidation processing is performed on the cached data corresponding to the first verification page set; Read the test data from the first verification page set, determine the corresponding expected test data according to the verification configuration, compare the read test data with the expected test data, and generate the direct hold verification result.

4. The method for verifying the recovery type after a DDR5 memory state transition according to claim 1, characterized in that, Before initiating the state transition operation in response to the reference verification result being verified as passed, the method further includes: Generate a continuation tag to characterize the running state of the test program, and save a summary of the continuation tag; The process of establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing read-back verification to generate an image recovery verification result includes: In response to the end of the state transition and recovery process corresponding to the state transition operation, the continuation marker is obtained, and the obtained continuation marker is compared with the digest to determine whether the test program should continue to execute after the image is restored. When the continuation tag matches the digest, a second verification page set is established based on the verification configuration, test data is written to the second verification page set and read-back verification is performed to generate the image recovery verification result.

5. The method for verifying the recovery type after a DDR5 memory state transition according to claim 1, characterized in that, Before initiating the state transition operation in response to the reference verification result being verified as passed, the method further includes: Obtain the first physical address segment coverage information, and save the verification configuration, the first running configuration data, the reference verification result, and the first physical address segment coverage information; The process of establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing readback verification, and generating a re-initialized stability verification result includes: In response to the end of the state transition and recovery process corresponding to the state transition operation, the newly established test run instance obtains the saved verification configuration, the first run configuration data, the reference verification result and the first physical address segment coverage information, establishes the second verification page set and obtains the second physical address segment coverage information; When the second physical address segment coverage information meets the preset coverage conditions corresponding to the first physical address segment coverage information, test data is written to the second verification page set and read back for verification to generate the re-initialization stability verification result. When the coverage information of the second physical address segment does not meet the preset coverage conditions, the result of incomparable coverage conditions is output as the result of the re-initialization stability verification. The first physical address segment coverage information and the second physical address segment coverage information respectively include the address segment division rules of the corresponding verification page set in the physical address space and the number or capacity ratio of pages in each address segment.

6. The method for verifying the recovery type after a DDR5 memory state transition according to claim 1, characterized in that, When the execution record and the recovery status information do not meet the judgment conditions of any of the recovery types, namely direct retention recovery, image recovery and re-initialization recovery, the recovery type confirmation result is output, a second verification page set is established based on the verification configuration, test data is written to the second verification page set and read back for verification, and a post-recovery stability verification result is generated.

7. A recovery type verification device after DDR5 memory state transition, characterized in that, Used to verify the recovery of the DDR5 memory configuration under test after performing a state transition operation, including: The test task acquisition module is used to acquire the test task corresponding to the DDR5 memory configuration under test. The test task includes a state transition operation to be executed and a verification configuration. The reference verification module is used to obtain the first running configuration data of the DDR5 memory configuration to be tested before initiating the state transition operation, establish a first verification page set based on the verification configuration, write test data into the first verification page set and read back the written test data for verification to obtain the reference verification result. The state transition initiation module is used to initiate the state transition operation in response to the reference verification result being verified as passed. The recovery information acquisition module is used to acquire the execution record of the state transition operation, the recovery status information of the operating environment where the DDR5 memory configuration under test is located, and the second operating configuration data of the DDR5 memory configuration under test in response to the state transition operation and the end of the recovery process. The recovery type verification module is used to determine the recovery type after the state transition based on the execution record and the recovery status information when the first running configuration data is consistent with the second running configuration data, and to perform the corresponding verification process according to the recovery type to obtain the corresponding verification result. The recovery types include direct preserve recovery (preserving the test environment before state transition without loading a non-volatile recoverable image), image recovery (loading a non-volatile recoverable image), and re-initialization recovery (rebuilding the operating system, test instance, or memory verification environment); and, When the recovery type is direct hold recovery, the verification process includes: verifying the test data in the first verification page set and generating a direct hold verification result; When the recovery type is image recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing readback verification, and generating an image recovery verification result; When the recovery type is re-initialization recovery, the verification process includes: establishing a second verification page set based on the verification configuration, writing test data to the second verification page set and performing readback verification, and generating a re-initialization stability verification result; The verification configuration includes a preset verification page set capacity, verification pattern seed, pattern sequence, number of loops, page access order, and error recording rules; the first running configuration data and the second running configuration data respectively include slot identifier, serial presence detection SPD information, capacity, Rank organization, running frequency, main timing parameters, channel configuration, interleaving configuration, controller working mode, and firmware test configuration identifier.

8. An electronic device, characterized in that, The device includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the electronic device to perform the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data recovery verification method, device and equipment

    CN110795269A

  • Cache consistency verification method and device, equipment and storage medium

    CN116775509A