WO2023035413A1 - Read and write test method and apparatus, computer storage medium, and electronic device - Google Patents

Read and write test method and apparatus, computer storage medium, and electronic device Download PDF

Info

Publication number
WO2023035413A1
WO2023035413A1 PCT/CN2021/131873 CN2021131873W WO2023035413A1 WO 2023035413 A1 WO2023035413 A1 WO 2023035413A1 CN 2021131873 W CN2021131873 W CN 2021131873W WO 2023035413 A1 WO2023035413 A1 WO 2023035413A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
write
read
value
memory module
Prior art date
Application number
PCT/CN2021/131873
Other languages
French (fr)
Chinese (zh)
Inventor
黄国维
Original Assignee
长鑫存储技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 长鑫存储技术有限公司 filed Critical 长鑫存储技术有限公司
Publication of WO2023035413A1 publication Critical patent/WO2023035413A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • G11C29/18Address generation devices; Devices for accessing memories, e.g. details of addressing circuits
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the technical field of memory testing, in particular to a method and device for reading and writing testing, a computer storage medium and electronic equipment.
  • DRAM Dynamic Random Access Memory
  • DRAM is generally tested for reading and writing through test applications (such as Stress APP tools) to ensure the stability and reliability of the memory.
  • test applications such as Stress APP tools
  • the Stress APP tool needs to use the logical storage address for read and write tests, if one or more data errors occur, the Stress APP tool needs to analyze to determine the physical storage address where the error occurred.
  • the Stress APP tool needs to redesign the address mapping relationship and corresponding test parameters, and the development cycle is very long; in addition, the Stress APP tool may have compatibility problems, which leads to the flexibility of the Stress APP tool. Poor performance and versatility.
  • the disclosure provides a read-write test method and device, computer storage medium and electronic equipment, which can directly use physical storage addresses to perform read-write test on memory modules, and improve the flexibility and compatibility of read-write test.
  • an embodiment of the present disclosure provides a read-write test method, which is applied to a read-write test device, and the method includes:
  • the target storage object in the memory module is read, and the target read value sent by the memory module is received; wherein, the target storage object in the memory module is determined according to the physical storage address;
  • the target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result.
  • the method further includes: when the data instruction indicates a write operation, determining the target write value according to the data instruction; performing a write operation on the target storage object in the memory module, so as to write the target write value into the memory module The target storage object in .
  • the device for reading and writing testing includes a first storage unit and a second storage unit; the method further includes: after determining the target write value, correspondingly storing the physical storage address and the target write value in the first storage unit Middle; after determining the target read value, correspondingly storing the physical storage address and the target read value in the second storage unit.
  • the comparing the target read value with the target write value, and determining the test result of the target storage object in the memory module according to the comparison result includes:
  • From the first storage unit obtain the target write value corresponding to the physical storage address; from the second storage unit, obtain the target read value corresponding to the physical storage address; when the target write value and the target read value are the same , determining that the target storage object in the memory module is in a normal state; or, in a case where the target write value and the target read value are different, determining that the target storage object in the memory module is in an abnormal state.
  • the method further includes: when the target write value and the target read value are the same, or when the target write value and the target read value are different and the system recovery instruction has not been received, sending the memory controller return the target read value; or, when the target write value is different from the target read value and a system recovery instruction is received, perform data recovery processing on the target storage object in the memory module.
  • the performing data recovery processing on the target storage object in the memory module includes:
  • the method further includes: according to the first storage unit and the second storage unit, counting the number of reads and writes of each storage object in the memory module; after controlling the memory controller to be in an idle state, according to each The number of reads and writes of the storage object determines the storage object to be processed; the read and write test process is performed on the storage object to be processed based on the preset test mode, so that the number of reads and writes of each storage object in the memory module meets the preset requirements.
  • the method further includes:
  • the effective write value refers to the target write value in the latest write operation of the storage object to be processed before the memory controller is in an idle state; Perform write processing on the storage object to be processed, so as to write a valid write value into the storage object to be processed; control the memory controller to exit the idle state.
  • an embodiment of the present disclosure provides a read-write test device, including:
  • the parsing control unit is configured to receive a data instruction sent by the memory controller, determine the physical storage address corresponding to the data instruction; and when the data instruction indicates a read operation, perform a read operation on the target storage object in the memory module, and receive the data instruction sent by the memory module.
  • the target read value of wherein, the target storage object in the memory module is determined according to the physical storage address;
  • the comparison unit is configured to obtain the target write value of the target storage object in the memory module in the latest write operation; and compare the target read value with the target write value, and determine the target storage object in the memory module according to the comparison result test results.
  • the parsing control unit is further configured to determine the target write value according to the data command when the data command indicates a write operation; perform a write operation on the target storage object in the memory module to write the target write value into The target storage object in the memory module.
  • the reading and writing test device also includes a first storage unit and a second storage unit; wherein, the first storage unit is configured to store the write value of each storage object in the memory module; the second storage unit is configured to To store the read value of each storage object in the memory module;
  • the resolution control unit is further configured to store the physical storage address and the target write value in the first storage unit after determining the target write value; after determining the target read value, store the physical storage address and the target The read value is correspondingly stored in the second storage unit.
  • the comparison unit is specifically configured to obtain the target write value corresponding to the physical storage address from the first storage unit; obtain the target read value corresponding to the physical storage address from the second storage unit; and When the target write value and the target read value are the same, determine that the target storage object in the memory module is in a normal state; or, when the target write value and the target read value are different, determine that the target storage object in the memory module The object is in an abnormal state.
  • the reading and writing test device further includes an output unit; the output unit is configured to generate an alarm message when the target write value and the target read value are different, and display the alarm message on a preset display screen ; Wherein, the alarm information is used to indicate that the target storage object in the memory module is in an abnormal state.
  • the parsing control unit is further configured to write to the memory when the target write value is the same as the target read value, or when the target write value and the target read value are different and the The controller returns the target read value; or, when the target write value is different from the target read value and a system recovery instruction is received, data recovery processing is performed on the target storage object in the memory module.
  • the parsing control unit is further configured to perform a rewrite operation on the target storage object in the memory module, so as to write the target write value into the target storage object in the memory module; Perform a re-read operation, and receive the corrected read value sent by the memory module; when the corrected read value is the same as the target written value, return the corrected read value to the memory controller.
  • the reading and writing test device also includes a test mode unit; the test mode unit is configured to provide a preset test mode; the comparison unit is also configured to count each memory module according to the first storage unit and the second storage unit The number of reads and writes of a storage object; the analysis control unit is also configured to determine the storage object to be processed according to the number of reads and writes of each storage object in the memory module after the control memory controller is in an idle state; treat it based on a preset test mode The storage object is processed to perform read and write test processing, so that the number of reads and writes of each storage object in the memory module meets a preset requirement.
  • the parsing control unit is further configured to obtain the effective write value corresponding to the storage object to be processed from the first storage unit after performing the read and write test processing on the storage object to be processed based on the preset test mode;
  • the storage object performs write processing to write the effective write value into the storage object to be processed; and control the memory controller to exit the idle state; wherein, the effective write value refers to the value of the storage object to be processed before the memory controller is in the idle state The target write value in the most recent write operation.
  • the reading and writing test device further includes a data selector;
  • the analysis control unit is further configured to send a first selection instruction to the data selector; or, send a second selection instruction to the data selector;
  • the data selector is used to control the parsing control unit and the memory controller to be in a connected state after receiving the first selection instruction; or, to control the parsing control unit and the memory module to be in a connected state after receiving the second selection instruction.
  • an embodiment of the present disclosure provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
  • an embodiment of the present disclosure provides an electronic device, where the electronic device includes the read/write test device as described in the second aspect.
  • Embodiments of the present disclosure provide a read-write test method and device, a computer storage medium, and electronic equipment, which receive a data instruction sent by a memory controller and determine the physical storage address corresponding to the data instruction; when the data instruction indicates a read operation, the memory The target storage object in the module performs read operation, and receives the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; The target write value in the operation; the target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result.
  • the data instruction sent by the memory controller can directly determine the physical storage address of the storage object, and then use the physical storage address for subsequent tests, without re-establishing address mapping relationships for different system control platforms; in addition, this read-write test method only It involves the operation of the memory controller and the memory module, without interaction with the external operating system, there will be no compatibility issues, and the flexibility and versatility of the read-write test can be improved.
  • FIG. 1 is a schematic flow diagram of a read-write test method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of another reading and writing test method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a read-write test device provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of another read-write test device provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of another read-write test device provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of Module1 provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of Module2 provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • first ⁇ second ⁇ third involved in the embodiments of the present disclosure are only used to distinguish similar objects, and do not represent a specific ordering of objects. Understandably, “first ⁇ second ⁇ third 3" where permitted, the specific order or sequence may be interchanged such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein.
  • DRAM dynamic random access memory
  • DIMM Dual Inline Memory Module
  • RDIMM Dual-line memory module with registers
  • LRDIMM Low Load Dual In-line Memory Module
  • SODIMM Small Outline Dual Inline Memory Module
  • Memory memory, memory module
  • Cell the storage unit in the memory module, also known as the storage object
  • Memory Controller memory controller
  • DIMM Slot DIMM slot
  • Row Address row address
  • Pre-Charge pre-charge
  • CPU central processing unit
  • JEDEC Semiconductor industry standard specified by the Solid State Technology Association
  • Raw Card memory card type
  • SPD serial Presence detection information
  • ASIC Application Specific Integrated Circuit
  • Idle idle state.
  • DRAM is an important electronic device that provides storage functions for end devices. Specifically, since DRAM is a dynamic random access memory device, the charge for storing data can only keep the data for a certain period of time. At normal temperature, the retention time of a storage cell capacitor (Cell Capacitor) is usually about 64 milliseconds. Therefore, in order to ensure the normal storage of data, it is necessary to periodically refresh the storage unit (Periodical Refresh) to keep the data stable.
  • Cell Capacitor storage cell capacitor
  • the CPU usually puts the running data and the temporary data in the operation in the memory, that is, the memory can be understood as a large-capacity temporary storage (Temporarily Store). If the data is not kept intact in the memory, an error will occur when the operating system reads out the data, which will cause the entire system to crash or restart.
  • the corresponding instruction is sent to the DRAM through the memory controller to realize data writing and reading.
  • the memory controller (Memory Controller) sends the following parameters to the memory DRAM in sequence: (1) Select the Memory Controller; (2) Select the DIMM Slot; (3) Select the Rank address; ( 4) Select Bank Address, Row Address; (5) Select Column Address for read/write operations; (6) Other operations, such as Pre-Charge/Refresh and other operations.
  • DRAM devices In general, servers, laptops, and various consumer electronics all involve DRAM devices, which are used to store large amounts of data that are temporarily involved while the CPU is running. Therefore, errors in the data stored in DRAM will bring catastrophic failures to electronic products, such as system downtime and system restart.
  • memory reading and writing test (also known as stress test, Stress test) is an important test of memory, which is used to test the reliability and stability of DRAM.
  • Stress test is an important test of memory, which is used to test the reliability and stability of DRAM.
  • the common Stress APP tools include MemtestX86, Primer95, Memtester, StressAPP, etc.
  • these softwares are related to issues such as system compatibility and software upgrades; moreover, the addresses reported by different Stress APPs for the same test location in the memory may be different, and it is likely that the Stress APP occurred when resolving the address.
  • an embodiment of the present disclosure provides a read/write test method.
  • the basic idea is: receive the data instruction sent by the memory controller, and determine the physical storage address corresponding to the data instruction; The target storage object in the memory module is read, and receives the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; the target storage object in the memory module is acquired in the latest write operation The target write value; compare the target read value with the target write value, and determine the test result of the target storage object in the memory module according to the comparison result.
  • the data instruction sent by the memory controller can directly determine the physical storage address corresponding to the data instruction, and then use the physical storage address for subsequent testing, without re-establishing address mapping relationships for different system control platforms;
  • the read-write test method It only involves the operation of the memory controller and the memory module, without interacting with the external system control platform, there will be no compatibility issues, and the flexibility and versatility of the read-write test can be improved; in addition, the read-write test method also There is an error correction mechanism, which can correct the read and write errors found in time to avoid system crashes; finally, the read and write test method also has a pressure equalization mechanism, which can ensure that the read and write pressures of different storage units are the same and improve the test accuracy.
  • FIG. 1 shows a schematic flowchart of a read/write test method provided by an embodiment of the present disclosure. As shown in Figure 1, the method may include:
  • S101 Receive a data instruction sent by a memory controller, and determine a physical storage address corresponding to the data instruction.
  • the read-write test method provided by the embodiments of the present disclosure is applied to a read-write test device, or a terminal device integrated with a read-write test device.
  • the terminal device may be various types of devices with memory modules.
  • the terminal device may be a device such as a smart phone, a tablet computer, a palmtop computer, a television, a projector, a personal computer, a personal digital assistant (Personal Digital Assistant, PDA), a wearable device, etc., without any limitation here.
  • the read-write test device is a hardware module connected between the memory controller (Memory Controller) and the memory module (such as DIMM).
  • the memory module includes multiple storage objects (or called storage units, Cells), and the memory controller can send different instructions to the memory module to implement read/write operations on different storage objects.
  • the memory controller actually writes or reads the memory module, it needs to send the actual physical address of the target storage object to operate the memory module.
  • the read-write test device since the read-write test device is set between the memory controller and the memory module in the form of hardware, the read-write test device can receive and analyze the data instructions sent by the memory controller, and determine the The corresponding physical storage address.
  • the data instructions issued by the memory controller include at least the following addresses: memory channel address (Memory Channel), dual in-line memory module slot address (DIMM Position), memory Rank address (Rank Selection), memory Bank address (Bank Selection), row address (Row Address Selection) and column address (Column Address Selection), the above addresses constitute the physical storage address of this data instruction.
  • the embodiment of the present disclosure develops a read-write test device from the perspective of hardware, which is installed between the memory controller and the memory module. Through the read-write test device, the data instruction issued by the memory controller can be directly analyzed to obtain the physical storage address. , and then use the physical storage address instead of the logical storage address for subsequent testing. Therefore, even in different operating systems, there is no need to re-establish the address mapping relationship, thereby improving the generality and flexibility of the stress test.
  • the read/write test device can control the memory module to perform the read operation according to the physical storage address, so as to obtain the target read value of the target storage object.
  • the read/write test device has a separate storage space for storing the written value of each storage object in the memory module in the latest write operation.
  • S104 Comparing the target read value and the target write value, and determining the test result of the target storage object in the memory module according to the comparison result.
  • the target read value and the target write value should be the same. Therefore, according to the actual comparison result of the target read value and the target write value, the test result of the target storage object can be determined.
  • the method may also include:
  • a write operation is performed on the target storage object in the memory module, so as to write the target write value into the target storage object in the memory module.
  • the read-write test device needs to analyze the data command to determine the target write value, and then write the target write value into the target storage object.
  • the read-write test device can be provided with a separate storage space for storing data required in the test process. Therefore, in some embodiments, the read/write test device includes a first storage unit and a second storage unit. Correspondingly, the method may also include:
  • the physical storage address and the target read value are correspondingly stored in the second storage unit.
  • the first storage unit is configured to store the physical storage address and the value to be written (such as the target write value) in all write operations; the second storage unit is configured to store the physical storage address and the actual value in all read operations.
  • Read value eg target read value
  • the comparing the target read value with the target write value, and determining the test result of the target storage object in the memory module according to the comparison result may include:
  • target write value and the target read value are the same, determine that the target storage object in the memory module is in a normal state; or, if the target write value and the target read value are different, determine that the target storage object in the memory module is The storage object is in an abnormal state.
  • the same storage object actually has multiple read and write processes, that is, there may be multiple write values at one physical storage address in the first storage unit, and there may be multiple write values at one physical storage address in the second storage unit. read the value.
  • the target write value refers to the write value in the last write operation for the physical storage address before the read operation corresponding to the target read value occurs.
  • the read-write test device may only include the first storage unit, and immediately after the target storage object is read, the target read value obtained by reading and the value stored in the first storage unit may be combined. The target written value is compared to obtain the test result.
  • the read-write test device is enabled only when the read-write test is required. That is to say, when the system is in a normal working state, the memory controller is directly connected to the memory module. At this time, the memory controller directly sends data instructions to the memory module for corresponding read/write operations; In the test state, the memory controller is connected to the memory module through the read-write test device. At this time, the memory controller needs to send data instructions to the read-write test device, and the read-write test device performs corresponding read/write operations on the control memory module. , and at the same time, the read-write test device will also perform other test operations.
  • the memory controller issues a data instruction. Assume that the data instruction indicates to write "1" to the storage object at address A. At this time, the read-write test device stores address A and the written value "1" in the first storage unit, and control the memory module to write "1" to the storage unit corresponding to address A.
  • the read-write test device controls the memory module to read the storage object at address A, assuming that the read value "1 ”, at this time, the read-write test device stores the address A and the read value “1” into the second storage unit.
  • the read value is compared with the written value.
  • the written value "1" is the same as the read value "1”, which means that the storage object indicated by address A is in a normal state.
  • the read value is "0" it means that the storage object indicated by the address A is in an abnormal state.
  • the method may further include:
  • the warning information is used to indicate that the target storage object in the memory module is in an abnormal state; and display the warning information on a preset display screen.
  • the preset display screen can be divided into left and right parts, one part is used to display the written values of different storage objects in the memory module in real time, and the other part is used to display the read values of different storage objects in the memory module in real time. If it is found that the target write value of a storage object is different from the target read value, the staff can be reminded through pop-up messages, highlighting, red box warnings, etc.
  • the method also includes:
  • the target read value to the memory controller if the target write value is the same as the target read value, or if the target write value is different from the target read value and a system recovery command has not been received; or, When the input value is different from the target read value and a system recovery instruction is received, data recovery processing is performed on the target storage object in the memory module.
  • the embodiment of the present disclosure also sets a system recovery mechanism.
  • the system recovery mechanism can be enabled or disabled according to user needs.
  • the target read value may be directly returned to the memory controller. If the target write value is different from the target read value, and the system recovery command sent by the user is not received, the target read value is also returned to the memory controller. If the target write value is different from the target read value, and a system recovery instruction sent by the user is received, data recovery processing is performed on the target storage object.
  • the performing data recovery processing on the target storage object in the memory module may include:
  • the corrected read value is returned to the memory controller.
  • the method may also include:
  • S201 Count the read and write times of each storage object in the memory module according to the first storage unit and the second storage unit.
  • S202 After controlling the memory controller to be in an idle state, determine the storage object to be processed according to the number of reads and writes of each storage object in the memory module.
  • S203 Perform read and write test processing on the storage object to be processed based on a preset test mode, so that the number of reads and writes of each storage object in the memory module meets a preset requirement.
  • a write value will be added to the physical storage address of the storage object in the first storage unit; data, a read value will be added to the physical storage address of the storage object in the second storage unit. Therefore, according to the amount of data stored in the first storage unit and the second storage unit, the number of reads and writes of different storage objects can be counted. Then, the storage object with less read and write times is determined as the storage object to be processed, and the read and write test is performed separately on the storage object to be processed, so that the read and write times of different storage objects are about the same.
  • the number of reads and writes may indicate the number of reads, the number of writes, the sum of the number of reads and the number of writes, or the number of reads and writes may also include the number of reads and the number of writes.
  • the preset test mode may indicate a specific process of how to determine the number of reads and writes according to the number of reads and writes of the storage object to be processed. The parameters of the preset test mode can be defined by the user.
  • a threshold (for example, 5 times, 10 times) can be set according to actual needs. If the difference in the number of reads and writes between two storage objects in the memory module does not exceed the threshold, it is considered that the number of reads and writes of different storage objects meets the preset requirements. .
  • the pressure equalization mechanism is provided by the read/write test device 30 , it has nothing to do with the memory controller. Therefore, after determining those storage objects to be processed with fewer reading and writing times, it is necessary to control the memory controller 31 to enter the idle state, and to hand over the control right of the memory module 32 to the reading and writing testing device 30, and then the reading and writing testing device 30 Use the preset test mode to perform read and write test processing on the storage object to be processed.
  • the method may further include:
  • the effective write value refers to the target write value in the latest write operation of the storage object to be processed before the memory controller is in an idle state
  • the written value in the pending storage object needs to remain unchanged, otherwise the system will crash. Therefore, before the control memory controller exits the idle state, it is necessary to rewrite the previously valid write value to the storage object to be processed.
  • a stress test is performed on the memory stick through a stress test tool (Stress APP), so as to test the stability and reliability of the memory.
  • Stress APP stress test tool
  • DQ signals data input/output channel signals
  • the Stress APP needs to redevelop the software and re-establish a new address mapping analysis relationship to correctly locate the error; on the other hand, the Stress APP also needs to consider the operation System compatibility and other issues, so the Stress APP tool needs to be continuously updated, resulting in unfriendly versatility; on the other hand, when there are too many errors, it may exceed the error correction capability of the system platform.
  • the system It has already crashed, and the Stress APP crashes accordingly, that is, the Stress APP cannot cope with many errors; on the other hand, the existing Stress APP has no good way to count and guarantee the stress results of each address in the memory.
  • the embodiment of the present disclosure develops a module that can test the pressure of different storage objects in Memory and the pressure of each storage object is equal from the hardware point of view, avoiding problems caused by Stress
  • the development cycle and verification cycle of the APP are too long, which leads to the problem that the test cannot be carried out.
  • the specific command sending sequence is generally: Memory Channel, Rank Selection&DIMM Position, Bank Selection, Row Address Selection and Column Address Selection.
  • a read-write test device capable of parsing Memory commands can be established between the Memory Controller and Memory, and the write and The read data is recorded separately, that is, the first storage unit is used to store the written value in the write operation, and the second storage unit is used to store the read value in the read operation. Then, compare the written value and the read value, and display and output the comparison result through the display screen.
  • the specific physical address of the erroneous data can be directly displayed without additional address analysis.
  • the data recovery mechanism can also be used to avoid system downtime or restart due to too much error data.
  • the embodiment of the present disclosure provides a read-write test method, which determines the physical storage address corresponding to the data command by receiving the data command sent by the memory controller; when the data command indicates a read operation, reads the target storage object in the memory module Operate, and receive the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; obtain the target write value of the target storage object in the memory module in the latest write operation; The target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result.
  • the data instruction sent by the memory controller can directly determine the physical storage address corresponding to the data instruction, and then use the physical storage address for subsequent testing, without re-establishing address mapping relationships for different system control platforms;
  • the read-write test method It only involves the operation of the memory controller and the memory module, without interacting with the external system control platform, there will be no compatibility issues, and the flexibility and versatility of the read-write test can be improved; in addition, the read-write test method also There is an error correction mechanism, which can correct the read and write errors found in time to avoid system crashes; finally, the read and write test method also has a pressure equalization mechanism, which can ensure that the read and write pressures of different storage units are the same and improve the test accuracy.
  • FIG. 3 shows a schematic structural diagram of a read/write test device 30 provided by an embodiment of the present disclosure.
  • the read-write test device 30 may include:
  • the analysis control unit 301 is configured to receive a data instruction sent by the memory controller, determine the physical storage address corresponding to the data instruction; and when the data instruction indicates a read operation, perform a read operation on the target storage object in the memory module, and receive the memory module The sent target read value; wherein, the target storage object in the memory module is determined according to the physical storage address;
  • the comparison unit 302 is configured to obtain the target write value of the target storage object in the memory module in the latest write operation; and compare the target read value with the target write value, and determine the target storage object in the memory module according to the comparison result The object's test results.
  • the embodiment of the present disclosure provides a read-write test device 30 from the perspective of hardware, which is arranged between the memory controller and the memory module.
  • the read-write test device 30 can analyze the data instructions sent by the memory controller, In this way, the physical storage address corresponding to the data instruction is determined, and then the physical storage address is used for subsequent testing, instead of the logical storage address for subsequent testing, and there is no need to establish an address mapping relationship, which improves versatility.
  • FIG. 4 shows a schematic structural diagram of another read/write test device 30 provided by an embodiment of the present disclosure.
  • the read/write test device 30 is connected between the memory controller 31 and the memory module 32 .
  • the memory module 32 contains a plurality of storage objects, and the memory controller 31 can send different instructions to the memory module 32 through the read/write test device 30 to implement read/write operations on different storage objects.
  • the read/write test device 30 includes an analysis control unit 301 and a comparison unit 302 . Specifically, after the read-write test device 30 receives the data instruction sent by the memory controller 31, the analysis control unit 301 analyzes the data instruction to determine the physical storage address, and controls the memory module 32 to perform corresponding read and write according to the data instruction. operate.
  • the comparison unit 302 is configured to compare the target write value and the target read value of the target storage object, so as to determine the test result.
  • the physical storage address includes at least one of the following: channel address, dual in-line memory module slot address, memory Rank address, memory Bank address, row address and column address.
  • the parsing control unit 301 is also configured to determine the target write value according to the data instruction when the data instruction indicates a write operation; perform a write operation on the target storage object in the memory module to Writes the target write value to the target storage object in the memory module.
  • the analysis control unit 301 will perform a write operation on the target storage object in the memory module 32 according to the physical storage address , and store the physical storage address and the target write value; if the data instruction indicates a read operation, the parsing control unit 301 will read the target storage object in the memory module 32 according to the physical storage address to obtain the target object returned by the memory module 32 read the value, and store the physical storage address and the target read value; then, the comparison unit 302 compares the target write value and the target read value to determine the test result of the target storage object.
  • the read/write test device 30 may set a separate storage space to store the physical storage address/write value or the physical storage address/read value.
  • the read/write test device 30 may further include a first storage unit 303 and a second storage unit 304 .
  • the resolution control unit 301 is also configured to store the physical storage address and the target write value in the first storage unit 303 after determining the target write value; after determining the target read value, store the physical storage address It is correspondingly stored in the second storage unit 304 with the target read value.
  • the first storage unit 303 is configured to store the write value of each storage object in the memory module 32 ;
  • the second storage unit 304 is configured to store the read value of each storage object in the memory module 32 .
  • the comparison unit 302 is specifically configured to acquire the target write value corresponding to the physical storage address from the first storage unit 303; and acquire the target read value corresponding to the physical storage address from the second storage unit 304 ; and when the target write value and the target read value are the same, determine that the target storage object in the memory module 32 is in a normal state; or, when the target write value and the target read value are different, determine that the memory module The target storage object in 32 is in an abnormal state.
  • the read/write test device 30 further includes an output unit 305;
  • the output unit 305 is configured to generate warning information when the target write value and the target read value are different, and display the warning information on a preset display screen.
  • the alarm information is used to indicate that the target storage object in the memory module 32 is in an abnormal state, so as to remind the staff to handle it.
  • the preset display screen can also be divided into left and right parts to display the written value and read value corresponding to different storage objects in real time.
  • the read/write test device 30 In order to complete the logical closed-loop of the memory controller, if the memory controller 31 issues a data command indicating a read operation, the read/write test device 30 needs to reply the read value to the memory controller 31 . However, if more data errors occur, the memory controller 31 may crash. In order to solve this problem, in some implementations, the read/write test device 30 also has a system recovery mechanism. Specifically, the parsing control unit 301 is further configured to send the memory controller 31 Return the target read value; or, in the case that the target write value is different from the target read value and a system recovery instruction is received, perform data recovery processing on the target storage object in the memory module 32 .
  • system recovery mechanism can be enabled or disabled according to user needs. Therefore, only after a data error occurs (the target write value is different from the target read value) and the system recovery instruction is received, the data on the target storage object will be restored. resume processing; otherwise, return the obtained target read value to the memory controller 31 .
  • the system recovery mechanism can also be designed to be always enabled, that is, as long as a data error occurs, data recovery processing will be performed on the target storage object.
  • a data recovery button may be set in the read-write test device 30 , and if the user presses the data recovery button, it is determined that a system recovery command is received.
  • the parsing control unit 301 is also configured to perform a rewrite operation on the target storage object in the memory module 32, so as to write the target write value into the target storage object in the memory module 32;
  • the target storage object in 32 performs a re-read operation, and receives the corrected read value sent by the memory module 32; when the corrected read value is identical to the target write value, the corrected read value is returned to the memory controller 31 .
  • the read/write test device 30 may further include a test mode unit 306 . specifically,
  • a test mode unit 306 configured to provide a preset test mode
  • the comparison unit 302 is further configured to count the number of reads and writes of each storage object in the memory module 32 according to the first storage unit and the second storage unit;
  • the analysis control unit 301 is also configured to determine the storage object to be processed according to the number of reads and writes of each storage object in the memory module 32 after controlling the memory controller 31 to be in an idle state; read the storage object to be processed based on a preset test mode Write test processing, so that the number of reads and writes of each storage object in the memory module 32 meets the preset requirement.
  • the number of times of reading and writing of different storage objects can be counted, and then the reading and writing test processing can be performed on storage objects with fewer times of reading and writing. In this way, the number of reads and writes of different storage objects is controlled to meet the preset requirements.
  • the preset test mode specifies the specific method of read and write test processing, such as the default write value, the sequence of write operation and read operation, etc.
  • the preset test mode can be modified according to the needs of users.
  • the read-write test device 30 also includes a power management unit 307 configured to supply power to the read-write test device. In this way, since the read/write test device 30 has an independent power solution, it can still play a controlling role after the memory controller 31 enters the idle state.
  • the reading and writing test device 30 also needs to return the control right to the memory controller 31, that is, the memory controller 31 exits the idle state.
  • the value in the storage object to be processed must be consistent before the memory controller 31 enters the idle state and after exiting the idle state, otherwise the memory controller 31 will crash.
  • the parsing control unit 31 is further configured to obtain the effective write data corresponding to the storage object to be processed from the first storage unit 303 after performing read and write test processing on the storage object to be processed based on the preset test mode. value; perform write processing on the storage object to be processed, so as to write a valid write value into the storage object to be processed; and control the memory controller 31 to exit the idle state.
  • the effective write value refers to the target write value in the last write operation of the storage object to be processed before the memory controller 31 is in an idle state.
  • the output unit 305 is also configured to display the read/write times of each storage object in the memory module 32 on the preset display screen 33 .
  • the read-write test device 30 at first, form a data path with the memory controller 31, thereby receiving and analyzing the data instructions sent by the memory controller 31; then, form a data path with the memory module 32, so that the target The storage object performs a read operation/write operation; finally, a data path is formed with the memory controller 32 to return the operation result of the data instruction.
  • the read/write test device 30 needs to form a data path with the memory controller 31 and the memory module 32 in sequence.
  • the read-write test device 30 also includes a data selector;
  • the parsing control unit 301 is further configured to send a first selection instruction to the data selector; or, send a second selection instruction to the data selector;
  • the data selector is used to control the parsing control unit and the memory controller to be in a connected state after receiving the first selection instruction; or, to control the parsing control unit and the memory module to be in a connected state after receiving the second selection instruction.
  • the time for the DRAM to keep data stable is limited, so the DRAM needs to be constantly refreshed to keep the data stable.
  • the data retention time (Retention) of the entire storage unit (Cell) in DRAM is not enough, or the Retention of some cells is not enough, important data will be lost, such as data bits (Data Bits) change from 1 to 0, Or change from 0 to 1.
  • Data Bits data bits
  • the read/write test of DRAM is an important performance test, but there are various problems in the existing read/write test devices.
  • the embodiment of the present disclosure provides a read-write test device 30, which can be integrated into a motherboard (Motherboard) of a terminal device, or be used as an independent module.
  • the read-write test device 30 has a completely independent operating system, and it has an independent power supply system at the same time. There are four main functions:
  • An embodiment of the present disclosure provides a read-write test device, including an analysis control unit configured to receive a data instruction sent by a memory controller, and determine a physical storage address corresponding to the data instruction; and when the data instruction indicates a read operation , performing a read operation on the target storage object in the memory module, and receiving the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; the comparison unit, It is configured to obtain the target write value of the target storage object in the memory module in the latest write operation; and compare the target read value with the target write value, and determine the memory module according to the comparison result
  • the target in stores the test results for the object.
  • the data instruction sent by the memory controller can directly determine the physical storage address corresponding to the data instruction, and then use the physical storage address for subsequent testing, without re-establishing address mapping relationships for different system control platforms; in addition, the read-write test method It only involves the operation of the memory controller and the memory module, does not need to interact with the external system control platform, does not have compatibility problems, and can improve the flexibility and versatility of the read-write test.
  • FIG. 5 shows a schematic structural diagram of another read/write test device 30 provided by an embodiment of the present disclosure.
  • the application scenario includes a memory controller (Memory Controller) 31, a read-write test device 30 and at least one memory module (DIMM or Memory Down) 32.
  • a memory controller Memory Controller
  • DIMM Memory Down
  • the read/write test device 30 is arranged between the memory controller 31 and the memory module 32 .
  • Read-write test device 30 is a completely independent control system, including controller (Controller), power supply and power management unit (equivalent to power management unit 307 in Fig. 4), data recovery button, display screen, storage unit, test mode unit (or called Pattern unit), calculation/comparison unit and output unit (not shown) and so on.
  • controller Controller
  • power supply and power management unit equivalent to power management unit 307 in Fig. 4
  • data recovery button display screen
  • storage unit test mode unit (or called Pattern unit), calculation/comparison unit and output unit (not shown) and so on.
  • the principle of the controller can be FPGA or customized CPU
  • the storage unit can include writing data storage unit 1 (equivalent to the first storage unit 303 in FIG. 4 ), reading data storage unit 2 (equivalent to the first storage unit 303 in FIG. 4 ).
  • second storage unit 304 can include writing data storage unit 1 (equivalent to the first storage unit 303 in
  • the structure of the read-write test device 30 in Fig. 5 refers to some module physical structures, rather than the functional structure in the strict sense, for example, the part of the controller in Fig. Analysis control unit 301, the controller among Fig. 5 and calculation/comparison unit are functionally equivalent to comparison unit 302 among Fig. 4, controller among Fig. 5 and some devices (not shown in Fig. 5) that can carry out data output output) are functionally equivalent to the output unit 305 in FIG. 4 .
  • a read-write test device 30 can be separately set up, which is used to locate the data error address in the memory module 32 and to correct it. wrong.
  • a controller can be set separately for each Channel (such as controller 0 and controller N in Figure 5), while sharing other parts.
  • the embodiments of the present disclosure relate to various electronic products.
  • Memory such as DRAM, LR/RDIMM, UDIMM, SODIMM, etc.
  • Integrity affects the operation of the entire system, especially in server applications, the data integrity of memory is particularly important.
  • the read-write test device 30 provided by the embodiment of the present disclosure can quickly and accurately locate the wrong data address when the memory (such as normal read-write or stress test) has erroneous data, thereby effectively improving the stability and reliability of the memory.
  • the read-write test device 30 can also count the actual size of the Stress pressure of the storage object in each Rank/Bank in the Memory, and according to the Stress pressure size of the statistics, the pressure is small
  • the address of each address is subjected to a separate Stress test according to a specific Pattern, so as to ensure that the Stress of each address is equal or similar; in addition, when multiple data errors occur, the wrong data can be corrected, and it is also very important for the stable operation of the operating system. big help.
  • the read/write test device 30 can be realized by two different hardware structures, which are respectively called Module1 and Module2.
  • both Module1 and Module2 are essentially read-write test devices 30, which can play the same function.
  • the main difference between the two is: (1) Module1 is more complicated than the hardware of Module2 , the cost is also higher, and it will take a certain amount of time, but the software is slightly simpler; (2) Module2 has more complicated software, but the hardware cost is lower.
  • both the controllers in Module1 and Module2 have the function of parsing data instructions (or called Command commands) of the memory controller 31 .
  • Module1 includes a controller, a data recovery button, a high-speed data selector (High Speed Mux), a power supply and power management unit, a first storage unit (or called a write data storage unit 1), a second storage unit unit (or called read data storage unit 2), test mode unit.
  • a comparison unit, an output unit and an analysis control unit are integrated in the controller.
  • the parsing control unit is mainly configured to parse Command commands and control the high-speed data selector.
  • the controller can be realized by, for example, FPGA or ASIC.
  • the data path between the high-speed data selector and the memory controller 31 is called A
  • the data path between the high-speed data selector and the controller is called B
  • the data between the high-speed data selector and the memory module The pathway is called C.
  • the high-speed data selector when writing data, the high-speed data selector first controls AB to be turned on, so that the memory controller 31 sends data instructions to the controller (generally including CMD signal/CA signal/CTL signal/DQ signal/ DQS signal); the high-speed data selector controls the BC conduction again, so that the controller sends a control signal (generally a Control Signals signal) to the memory module 32 to control the memory module 32 to write data; otherwise, when reading data , the high-speed data selector first controls CB to be turned on, so that the controller controls the memory module 32 to read data; the high-speed data selector then controls AB to be turned on, so that the controller returns the read result to the memory controller 31 .
  • the high-speed data selector first controls CB to be turned on, so that the controller controls the memory module 32 to read data
  • the high-speed data selector then controls AB to be turned on, so that the controller returns the read result to the memory controller 31 .
  • Module1 has an independent power supply and power management unit, and can switch the data paths of the memory controller 31 , the read-write test device 30 and the memory module 32 through a high-speed data selector.
  • the read/write test device 30 can collect data commands and other information between the memory controller 31 and the memory module 32, and save these information at the same time. Then, by comparing the written and read information before and after, the comparison result is displayed on the display screen by means of the data comparison output unit, for example, the address of the wrong data can be displayed.
  • the read-write test device 30 counts the read-write times (ie, the pressure) of each address, so as to conduct individual tests more specifically.
  • each DIMM has a Raw Card definition in JEDEC.
  • the Raw Card type information can be obtained by reading the SPD information on the DIMM. If the test result indicates that there is error data, it can be based on the Raw Card information and The address of the data error is used to locate the position of the particle on the DIMM where the data error occurs (that is, to locate the storage object where the error occurs), and the error location information can be displayed on the display.
  • the controller in Module1 can analyze the Command command between the memory controller 31 and the memory module 32 , and record the read command and write command separately according to the Command command of the memory controller 31 .
  • the high-speed data selector switches to the BC channel, the controller reads the data, and reads the data according to Channel, DIMM Slot, Rank, Banks, Row, and Column Store in the second storage unit; then, compare the read data with the data in the first storage unit (comparison of the same Channel, DIMM Slot, Rank, Banks, Row, Column). If no error occurs, the controller switches the high-speed data selector from the CB channel to the BA channel. If one or more abnormalities are found in the data, the error information can be displayed on the display screen, and the corresponding Channel, DIMM Slot, Rank will be displayed at the same time. , Banks, Row, Column and other information.
  • the read operation is aimed at multiple storage objects
  • the read operation is continued according to the read command, if there is a new error after comparing the subsequent read data with the previously written data, it will also be displayed on the display screen. Error information, and display the corresponding Channel, DIMM Slot, Rank, Banks, Row, Column and other information at the same time.
  • the comparison unit Utilize the comparison unit to carry out statistics on the data in the first storage unit and the second storage unit, determine the number of reads and writes of each address according to the result of the comparison unit, and obtain the statistical result of the Stress size of different addresses. According to the statistical results, a specific stress test is performed on addresses with low stress.
  • the method is as follows: first, the memory controller 31 is made to enter the Idle mode. At this time, the memory controller 31 does not operate the DRAM. Since the Module1 has a separate power supply and power management unit, the Module1 can work normally and can operate the memory module 32; Then, according to the previous Stress test results of different addresses in the memory, Module1 performs a separate stress test on addresses with less stress according to the preset test mode.
  • the preset test mode can be provided by the test mode unit, so that the Stress of each address can be guaranteed.
  • the pressures are equal or approximately equal; finally, when the stress testing module exits the operation on the DRAM, the stress testing module writes the data previously written into the first storage unit into the DRAM.
  • Module2 includes a controller, a data recovery button, a power supply and power management unit, a display screen, a first storage unit, a second storage unit, and a test mode unit; at the same time, a comparison unit and an output unit are integrated in the controller and analytical control unit.
  • the parsing control unit is mainly configured to parse Command commands and play a control role.
  • Module2 acts as the analysis function of the data information between the memory controller 31 and the memory module 32 and the resolution of the Memory control command; according to the Command command information of the memory controller 31, write and The read data is recorded separately, and recorded according to Channel, DIMM Slot, Rank, Banks, Row, Column and other information;
  • the error information will also be displayed on the display screen, and the corresponding Channel, DIMM Slot, Rank, Banks, Row, Column and other information will be displayed at the same time.
  • a specific Pattern stress test is performed on addresses with low stress.
  • the method is as follows: first, make the memory controller 31 enter the Idle mode, at this time, the memory controller 31 does not operate the DRAM, and because the power supply and power management unit of Module2 are independent, Module2 can work normally and can operate the memory module 32 Operation, according to the previous Stress test results on different addresses in the memory, Module2 performs a separate stress test on addresses with low Stress pressure according to the preset test mode.
  • the default test mode can be to select one or more of the Pattern units in the stress test module, so as to ensure that the Stress pressure of each address is equal or approximately equal.
  • DQ/DQS are signals related to data
  • CMD/CA/CTL are signals related to commands, addresses and control.
  • the embodiment of the present disclosure aims to protect a mechanism module function and similar functions that can test the pressure of Memory Stress and ensure that the pressure is equal to each other.
  • the embodiment of the present disclosure provides a read-write test device 30, which has the following functions: On the one hand, the read-write test device 30 can detect whether there is any error data when the memory module is subjected to a Stress test, and the display screen can Visually see the physical address information where the error data occurs; on the other hand, the read-write test device 30 can count the Stress pressure size of each address, and select a specific test mode for the address with a small Stress pressure to carry out a stress test, thereby ensuring that each address The Stress size is the same or similar; on the other hand, when the memory is stress tested, the read-write test device 30 records the address according to the hardware physical method, without considering the compatibility of the Stress APP system, and will not occur when a data error occurs.
  • the embodiment of the present disclosure provides a read-write test method.
  • the data command sent by the memory controller can directly determine the corresponding The physical storage address, and then use the physical storage address to carry out subsequent tests, without re-establishing the address mapping relationship for different system control platforms;
  • this read and write test method only involves the operation of the memory controller and memory modules, and does not need to communicate with external
  • the system control platform interacts without compatibility problems, which can improve the flexibility and versatility of the read-write test;
  • the read-write test method also has an error correction mechanism, which can correct the read-write errors found in time. Avoid system crashes; finally, the read-write test method also has a pressure equalization mechanism, which can ensure that the read-write pressure of different storage units is the same and improve test accuracy.
  • FIG. 8 shows a schematic composition diagram of an electronic device 40 provided by an embodiment of the present disclosure.
  • the electronic device 40 at least includes the read/write test device 30 of any one of the foregoing embodiments.
  • the data command sent by the memory controller can directly determine the physical storage address corresponding to the data command, and then use the physical storage address to perform subsequent tests without the need for different system control
  • the platform re-establishes the address mapping relationship; secondly, the read-write test method only involves the operation of the memory controller and the memory module, and does not need to interact with the external system control platform, there will be no compatibility problems, and the read-write test can be improved.
  • the read-write test method also has an error correction mechanism, which can correct the read-write errors found in time to avoid system crashes; finally, the read-write test method also has a pressure equalization mechanism, which can ensure The reading and writing pressure of different storage units is the same, which improves the test accuracy.
  • a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a module, and it may also be non-modular.
  • each component in this embodiment may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or The part contributed by the prior art or the whole or part of the technical solution can be embodied in the form of software products, the computer software products are stored in a storage medium, and include several instructions to make a computer device (which can be a personal A computer, a server, or a network device, etc.) or a Processor (processor) executes all or part of the steps of the method of this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes.
  • this embodiment provides a computer storage medium, the computer storage medium stores a computer program, and when the computer program is executed by multiple processors, the steps of any one of the methods in the preceding embodiments are implemented.
  • Embodiments of the present disclosure provide a read-write test method and device, a computer storage medium, and electronic equipment, which receive a data instruction sent by a memory controller and determine the physical storage address corresponding to the data instruction; when the data instruction indicates a read operation, the memory The target storage object in the module performs read operation, and receives the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; The target write value in the operation; the target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result.
  • the data instruction sent by the memory controller can directly determine the physical storage address of the storage object, and then use the physical storage address for subsequent tests, without re-establishing address mapping relationships for different system control platforms; in addition, this read-write test method only It involves the operation of the memory controller and the memory module, without interaction with the external operating system, there will be no compatibility issues, and the flexibility and versatility of the read-write test can be improved.

Abstract

Embodiments of the present application provide a read and write test method and apparatus, a computer storage medium, and an electronic device. The method comprises: receiving a data instruction sent by a memory controller, and determining a physical storage address corresponding to the data instruction; when the data instruction indicates a read operation, performing a read operation on a target storage object in a memory module, and receiving a target read value sent by the memory module; obtaining a target write value of the target storage object in the memory module in the latest write operation; and comparing the target read value with the target write value, and determining a test result of the target storage object in the memory module according to the comparison result.

Description

一种读写测试方法及装置、计算机存储介质和电子设备A reading and writing test method and device, computer storage medium and electronic equipment
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202111050167.5、申请日为2021年09月08日、发明名称为“一种读写测试方法及装置、计算机存储介质和电子设备”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on the Chinese patent application with the application number 202111050167.5, the filing date is September 08, 2021, and the invention title is "A read-write test method and device, computer storage medium and electronic equipment", and requires the Chinese patent application The priority of this Chinese patent application, the entire content of this Chinese patent application is hereby incorporated into this application as a reference.
技术领域technical field
本公开涉及内存测试技术领域,尤其涉及一种读写测试方法及装置、计算机存储介质和电子设备。The present disclosure relates to the technical field of memory testing, in particular to a method and device for reading and writing testing, a computer storage medium and electronic equipment.
背景技术Background technique
在服务器、个人电脑和各种消费类电子产品中,一般以动态随机存取存储器(Dynamic Random Access Memory,DRAM)作为内存部件,以便提供临时数据存储功能。根据DRAM的数据存储原理,需要在使用过程中对DRAM进行不断刷新,从而保持数据稳定。In servers, personal computers and various consumer electronics products, dynamic random access memory (Dynamic Random Access Memory, DRAM) is generally used as a memory component to provide temporary data storage. According to the data storage principle of the DRAM, the DRAM needs to be refreshed continuously during use, so as to keep the data stable.
目前,一般通过测试应用程序(如Stress APP工具)对DRAM进行读写测试,保证内存的稳定性和可靠性。由于Stress APP工具需要利用逻辑存储地址进行读写测试,如果出现一个或者多个数据错误时候,Stress APP工具需要通过解析才能确定发生错误的物理存储地址。换句话说,针对不同的系统平台,Stress APP工具需要重新设计地址映射关系以及相应的测试参数,开发周期很长;另外,Stress APP工具还有可能存在兼容性问题,从而导致Stress APP工具的灵活性和通用性较差。At present, DRAM is generally tested for reading and writing through test applications (such as Stress APP tools) to ensure the stability and reliability of the memory. Since the Stress APP tool needs to use the logical storage address for read and write tests, if one or more data errors occur, the Stress APP tool needs to analyze to determine the physical storage address where the error occurred. In other words, for different system platforms, the Stress APP tool needs to redesign the address mapping relationship and corresponding test parameters, and the development cycle is very long; in addition, the Stress APP tool may have compatibility problems, which leads to the flexibility of the Stress APP tool. Poor performance and versatility.
发明内容Contents of the invention
本公开提供了一种读写测试方法及装置、计算机存储介质和电子设备,能够直接利用物理存储地址对内存模块进行读写测试,提高了读写测试的灵活性和兼容性。The disclosure provides a read-write test method and device, computer storage medium and electronic equipment, which can directly use physical storage addresses to perform read-write test on memory modules, and improve the flexibility and compatibility of read-write test.
本公开的技术方案是这样实现的:The disclosed technical solution is achieved in this way:
第一方面,本公开实施例提供了一种读写测试方法,应用于读写测试装置,该方法包括:In the first aspect, an embodiment of the present disclosure provides a read-write test method, which is applied to a read-write test device, and the method includes:
接收内存控制器发送的数据指令,确定数据指令对应的物理存储地址;Receive the data instruction sent by the memory controller, and determine the physical storage address corresponding to the data instruction;
在数据指令指示读操作时,对内存模块中的目标存储对象进行读操作, 并接收内存模块发送的目标读取值;其中,内存模块中的目标存储对象是根据物理存储地址确定的;When the data instruction indicates a read operation, the target storage object in the memory module is read, and the target read value sent by the memory module is received; wherein, the target storage object in the memory module is determined according to the physical storage address;
获取内存模块中的目标存储对象在最近一次写操作中的目标写入值;Obtain the target write value of the target storage object in the memory module in the latest write operation;
对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果。The target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result.
在一些实施例中,该方法还包括:在数据指令指示写操作时,根据数据指令确定目标写入值;对内存模块中的目标存储对象进行写操作,以将目标写入值写入内存模块中的目标存储对象。In some embodiments, the method further includes: when the data instruction indicates a write operation, determining the target write value according to the data instruction; performing a write operation on the target storage object in the memory module, so as to write the target write value into the memory module The target storage object in .
在一些实施例中,读写测试装置包括第一存储单元和第二存储单元;该方法还包括:在确定目标写入值之后,将物理存储地址和目标写入值对应存储到第一存储单元中;在确定目标读取值之后,将物理存储地址和目标读取值对应存储到第二存储单元中。In some embodiments, the device for reading and writing testing includes a first storage unit and a second storage unit; the method further includes: after determining the target write value, correspondingly storing the physical storage address and the target write value in the first storage unit Middle; after determining the target read value, correspondingly storing the physical storage address and the target read value in the second storage unit.
在一些实施例中,所述对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果,包括:In some embodiments, the comparing the target read value with the target write value, and determining the test result of the target storage object in the memory module according to the comparison result includes:
从第一存储单元中,获取物理存储地址对应的目标写入值;从第二存储单元中,获取物理存储地址对应的目标读取值;在目标写入值和目标读取值相同的情况下,确定内存模块中的目标存储对象处于正常状态;或者,在目标写入值和目标读取值不同的情况下,确定内存模块中的目标存储对象处于异常状态。From the first storage unit, obtain the target write value corresponding to the physical storage address; from the second storage unit, obtain the target read value corresponding to the physical storage address; when the target write value and the target read value are the same , determining that the target storage object in the memory module is in a normal state; or, in a case where the target write value and the target read value are different, determining that the target storage object in the memory module is in an abnormal state.
在一些实施例中,该方法还包括:在目标写入值和目标读取值相同,或者在目标写入值和目标读取值不同且未接收到系统恢复指令的情况下,向内存控制器返回目标读取值;或者,在目标写入值和目标读取值不同且接收到系统恢复指令的情况下,对内存模块中的目标存储对象进行数据恢复处理。In some embodiments, the method further includes: when the target write value and the target read value are the same, or when the target write value and the target read value are different and the system recovery instruction has not been received, sending the memory controller return the target read value; or, when the target write value is different from the target read value and a system recovery instruction is received, perform data recovery processing on the target storage object in the memory module.
在一些实施例中,所述对内存模块中的目标存储对象进行数据恢复处理,包括:In some embodiments, the performing data recovery processing on the target storage object in the memory module includes:
对内存模块中的目标存储对象进行重写操作,以将目标写入值写入内存模块中的目标存储对象;对内存模块中的目标存储对象进行重读操作,并接收内存模块发送的修正后读取值;在修正后读取值与目标写入值相同的情况下,向内存控制器返回修正后读取值。Rewrite the target storage object in the memory module to write the target write value into the target storage object in the memory module; perform a reread operation on the target storage object in the memory module, and receive the corrected read data sent by the memory module Get value; if the corrected read value is the same as the target written value, return the corrected read value to the memory controller.
在一些实施例中,该方法还包括:根据第一存储单元和第二存储单元,统计内存模块中每一存储对象的读写次数;在控制内存控制器处于空闲状态后,根据内存模块中每一存储对象的读写次数,确定待处理存储对象;基于预设测试模式对待处理存储对象进行读写测试处理,以使得内存模块中每一存储对象的读写次数满足预设要求。In some embodiments, the method further includes: according to the first storage unit and the second storage unit, counting the number of reads and writes of each storage object in the memory module; after controlling the memory controller to be in an idle state, according to each The number of reads and writes of the storage object determines the storage object to be processed; the read and write test process is performed on the storage object to be processed based on the preset test mode, so that the number of reads and writes of each storage object in the memory module meets the preset requirements.
在一些实施例中,在基于预设测试模式对待处理存储对象进行读写测试处理之后,该方法还包括:In some embodiments, after performing read and write test processing on the storage object to be processed based on the preset test mode, the method further includes:
从第一存储单元中获取待处理存储对象对应的有效写入值;其中,有 效写入值是指待处理存储对象在内存控制器处于空闲状态前的最近一次写操作中的目标写入值;对待处理存储对象进行写入处理,以将有效写入值写入待处理存储对象;控制内存控制器退出空闲状态。Acquiring the effective write value corresponding to the storage object to be processed from the first storage unit; wherein, the effective write value refers to the target write value in the latest write operation of the storage object to be processed before the memory controller is in an idle state; Perform write processing on the storage object to be processed, so as to write a valid write value into the storage object to be processed; control the memory controller to exit the idle state.
第二方面,本公开实施例提供了一种读写测试装置,包括:In a second aspect, an embodiment of the present disclosure provides a read-write test device, including:
解析控制单元,配置为接收内存控制器发送的数据指令,确定数据指令对应的物理存储地址;以及在数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收内存模块发送的目标读取值;其中,内存模块中的目标存储对象是根据物理存储地址确定的;The parsing control unit is configured to receive a data instruction sent by the memory controller, determine the physical storage address corresponding to the data instruction; and when the data instruction indicates a read operation, perform a read operation on the target storage object in the memory module, and receive the data instruction sent by the memory module. The target read value of ; wherein, the target storage object in the memory module is determined according to the physical storage address;
比较单元,配置为获取内存模块中的目标存储对象在最近一次写操作中的目标写入值;以及对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果。The comparison unit is configured to obtain the target write value of the target storage object in the memory module in the latest write operation; and compare the target read value with the target write value, and determine the target storage object in the memory module according to the comparison result test results.
在一些实施例中,解析控制单元,还配置为在数据指令指示写操作时,根据数据指令确定目标写入值;对内存模块中的目标存储对象进行写操作,以将目标写入值写入内存模块中的目标存储对象。In some embodiments, the parsing control unit is further configured to determine the target write value according to the data command when the data command indicates a write operation; perform a write operation on the target storage object in the memory module to write the target write value into The target storage object in the memory module.
在一些实施例中,读写测试装置还包括第一存储单元和第二存储单元;其中,第一存储单元,配置为存储内存模块中每一存储对象的写入值;第二存储单元,配置为存储内存模块中每一存储对象的读取值;In some embodiments, the reading and writing test device also includes a first storage unit and a second storage unit; wherein, the first storage unit is configured to store the write value of each storage object in the memory module; the second storage unit is configured to To store the read value of each storage object in the memory module;
相应地,解析控制单元,还配置为在确定目标写入值之后,将物理存储地址和目标写入值对应存储到第一存储单元中;在确定目标读取值之后,将物理存储地址和目标读取值对应存储到第二存储单元中。Correspondingly, the resolution control unit is further configured to store the physical storage address and the target write value in the first storage unit after determining the target write value; after determining the target read value, store the physical storage address and the target The read value is correspondingly stored in the second storage unit.
在一些实施例中,比较单元,具体配置为从第一存储单元中,获取物理存储地址对应的目标写入值;从第二存储单元中,获取物理存储地址对应的目标读取值;以及在目标写入值和目标读取值相同的情况下,确定内存模块中的目标存储对象处于正常状态;或者,在目标写入值和目标读取值不同的情况下,确定内存模块中的目标存储对象处于异常状态。In some embodiments, the comparison unit is specifically configured to obtain the target write value corresponding to the physical storage address from the first storage unit; obtain the target read value corresponding to the physical storage address from the second storage unit; and When the target write value and the target read value are the same, determine that the target storage object in the memory module is in a normal state; or, when the target write value and the target read value are different, determine that the target storage object in the memory module The object is in an abnormal state.
在一些实施例中,读写测试装置还包括输出单元;输出单元,配置为在目标写入值和目标读取值不同的情况下,生成告警信息,并将告警信息在预设显示屏进行显示;其中,告警信息用于指示内存模块中的目标存储对象处于异常状态。In some embodiments, the reading and writing test device further includes an output unit; the output unit is configured to generate an alarm message when the target write value and the target read value are different, and display the alarm message on a preset display screen ; Wherein, the alarm information is used to indicate that the target storage object in the memory module is in an abnormal state.
在一些实施例中,解析控制单元,还配置为在目标写入值和目标读取值相同,或者在目标写入值和目标读取值不同且未接收到系统恢复指令的情况下,向内存控制器返回目标读取值;或者,在目标写入值和目标读取值不同且接收到系统恢复指令的情况下,对内存模块中的目标存储对象进行数据恢复处理。In some embodiments, the parsing control unit is further configured to write to the memory when the target write value is the same as the target read value, or when the target write value and the target read value are different and the The controller returns the target read value; or, when the target write value is different from the target read value and a system recovery instruction is received, data recovery processing is performed on the target storage object in the memory module.
在一些实施例中,解析控制单元,还配置为对内存模块中的目标存储对象进行重写操作,以将目标写入值写入内存模块中的目标存储对象;对内存模块中的目标存储对象进行重读操作,并接收内存模块发送的修正后读取值;在修正后读取值与目标写入值相同的情况下,向内存控制器返回 修正后读取值。In some embodiments, the parsing control unit is further configured to perform a rewrite operation on the target storage object in the memory module, so as to write the target write value into the target storage object in the memory module; Perform a re-read operation, and receive the corrected read value sent by the memory module; when the corrected read value is the same as the target written value, return the corrected read value to the memory controller.
在一些实施例中,读写测试装置还包括测试模式单元;测试模式单元,配置为提供预设测试模式;比较单元,还配置为根据第一存储单元和第二存储单元,统计内存模块中每一存储对象的读写次数;解析控制单元,还配置为在控制内存控制器处于空闲状态后,根据内存模块中每一存储对象的读写次数,确定待处理存储对象;基于预设测试模式对待处理存储对象进行读写测试处理,以使得内存模块中每一存储对象的读写次数满足预设要求。In some embodiments, the reading and writing test device also includes a test mode unit; the test mode unit is configured to provide a preset test mode; the comparison unit is also configured to count each memory module according to the first storage unit and the second storage unit The number of reads and writes of a storage object; the analysis control unit is also configured to determine the storage object to be processed according to the number of reads and writes of each storage object in the memory module after the control memory controller is in an idle state; treat it based on a preset test mode The storage object is processed to perform read and write test processing, so that the number of reads and writes of each storage object in the memory module meets a preset requirement.
在一些实施例中,解析控制单元,还配置为在基于预设测试模式对待处理存储对象进行读写测试处理之后,从第一存储单元中获取待处理存储对象对应的有效写入值;对待处理存储对象进行写入处理,以将有效写入值写入待处理存储对象;以及控制内存控制器退出空闲状态;其中,有效写入值是指待处理存储对象在内存控制器处于空闲状态前的最近一次写操作中的目标写入值。In some embodiments, the parsing control unit is further configured to obtain the effective write value corresponding to the storage object to be processed from the first storage unit after performing the read and write test processing on the storage object to be processed based on the preset test mode; The storage object performs write processing to write the effective write value into the storage object to be processed; and control the memory controller to exit the idle state; wherein, the effective write value refers to the value of the storage object to be processed before the memory controller is in the idle state The target write value in the most recent write operation.
在一些实施例中,读写测试装置还包括数据选择器;解析控制单元,还配置为向数据选择器发送第一选择指令;或者,向数据选择器发送第二选择指令;In some embodiments, the reading and writing test device further includes a data selector; the analysis control unit is further configured to send a first selection instruction to the data selector; or, send a second selection instruction to the data selector;
数据选择器,用于在接收到第一选择指令后,控制解析控制单元和内存控制器处于连通状态;或者,在接收到第二选择指令后,控制解析控制单元与内存模块处于连通状态。The data selector is used to control the parsing control unit and the memory controller to be in a connected state after receiving the first selection instruction; or, to control the parsing control unit and the memory module to be in a connected state after receiving the second selection instruction.
第三方面,本公开实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述方法的步骤。In a third aspect, an embodiment of the present disclosure provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
第四方面,本公开实施例提供了一种电子设备,该电子设备包括如第二方面所述的读写测试装置。In a fourth aspect, an embodiment of the present disclosure provides an electronic device, where the electronic device includes the read/write test device as described in the second aspect.
本公开实施例提供了一种读写测试方法及装置、计算机存储介质和电子设备,接收内存控制器发送的数据指令,确定数据指令对应的物理存储地址;在数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收内存模块发送的目标读取值;其中,内存模块中的目标存储对象是根据物理存储地址确定的;获取内存模块中的目标存储对象在最近一次写操作中的目标写入值;对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果。这样,通过内存控制器发送的数据指令能够直接确定存储对象的物理存储地址,进而利用物理存储地址进行后续测试,无需针对不同的系统控制平台重新建立地址映射关系;另外,该读写测试方法仅涉及到对内存控制器和内存模块进行操作,无需与外部的操作系统进行交互,不会存在兼容性问题,能够提高读写测试的灵活性和通用性。Embodiments of the present disclosure provide a read-write test method and device, a computer storage medium, and electronic equipment, which receive a data instruction sent by a memory controller and determine the physical storage address corresponding to the data instruction; when the data instruction indicates a read operation, the memory The target storage object in the module performs read operation, and receives the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; The target write value in the operation; the target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result. In this way, the data instruction sent by the memory controller can directly determine the physical storage address of the storage object, and then use the physical storage address for subsequent tests, without re-establishing address mapping relationships for different system control platforms; in addition, this read-write test method only It involves the operation of the memory controller and the memory module, without interaction with the external operating system, there will be no compatibility issues, and the flexibility and versatility of the read-write test can be improved.
附图说明Description of drawings
图1为本公开实施例提供的一种读写测试方法的流程示意图;FIG. 1 is a schematic flow diagram of a read-write test method provided by an embodiment of the present disclosure;
图2为本公开实施例提供的另一种读写测试方法的流程示意图;FIG. 2 is a schematic flowchart of another reading and writing test method provided by an embodiment of the present disclosure;
图3为本公开实施例提供的一种读写测试装置的结构示意图;FIG. 3 is a schematic structural diagram of a read-write test device provided by an embodiment of the present disclosure;
图4为本公开实施例提供的另一种读写测试装置的结构示意图;FIG. 4 is a schematic structural diagram of another read-write test device provided by an embodiment of the present disclosure;
图5为本公开实施例提供的又一种读写测试装置的结构示意图;FIG. 5 is a schematic structural diagram of another read-write test device provided by an embodiment of the present disclosure;
图6为本公开实施例提供的Module1的结构示意图;FIG. 6 is a schematic structural diagram of Module1 provided by an embodiment of the present disclosure;
图7为本公开实施例提供的Module2的结构示意图;FIG. 7 is a schematic structural diagram of Module2 provided by an embodiment of the present disclosure;
图8为本公开实施例提供的一种电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure with reference to the drawings in the embodiments of the present disclosure. It should be understood that the specific embodiments described here are only used to explain the related application, not to limit the application. It should also be noted that, for the convenience of description, only the parts related to the relevant application are shown in the drawings.
除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本公开实施例的目的,不是旨在限制本公开。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terms used herein are only for the purpose of describing the embodiments of the present disclosure, and are not intended to limit the present disclosure.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, references to "some embodiments" describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.
需要指出,本公开实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本公开实施例能够以除了在这里图示或描述的以外的顺序实施。It should be pointed out that the terms "first\second\third" involved in the embodiments of the present disclosure are only used to distinguish similar objects, and do not represent a specific ordering of objects. Understandably, "first\second\third 3" where permitted, the specific order or sequence may be interchanged such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein.
以下对本公开实施例中涉及到的英文词汇及其缩写进行说明。English terms and their abbreviations involved in the embodiments of the present disclosure are described below.
Dynamic Random Access Memory,DRAM:动态随机存取存储器;Dynamic Random Access Memory, DRAM: dynamic random access memory;
Memory Down:焊接到主机板中的内存;Memory Down: the memory soldered to the motherboard;
Dual Inline Memory Module,DIMM:双列直插内存模块;Dual Inline Memory Module, DIMM: Dual Inline Memory Module;
RDIMM:带寄存器的双线内存模块;RDIMM: Dual-line memory module with registers;
LRDIMM:低负载双列直插式存储模块;LRDIMM: Low Load Dual In-line Memory Module;
UDIMM无缓冲双信道内存模块;UDIMM unbuffered dual-channel memory module;
SODIMM:小型双列直插式内存模块;SODIMM: Small Outline Dual Inline Memory Module;
Memory:内存、内存模块;Memory: memory, memory module;
Cell:内存模块中的存储单元,也称为存储对象;Cell: the storage unit in the memory module, also known as the storage object;
Temporarily Store:临时存储空间;Temporarily Store: temporary storage space;
Memory Controller:内存控制器;Memory Controller: memory controller;
DIMM Slot:DIMM插槽;DIMM Slot: DIMM slot;
Rank:内存中逻辑区块;Rank: logical block in memory;
Bank:内存中物理区块;Bank: physical block in memory;
Row Address:行地址;Row Address: row address;
Column Address:列地址;Column Address: column address;
Pre-Charge:预充电;Pre-Charge: pre-charge;
Refresh:刷新;Refresh: refresh;
Central Processing Unit,CPU:中央处理器;Central Processing Unit, CPU: central processing unit;
JEDEC:固态技术协会指定的半导体行业标准;JEDEC: Semiconductor industry standard specified by the Solid State Technology Association;
Raw Card:内存卡类型;Raw Card: memory card type;
Serial Presence Detect,SPD:序列存在检测信息;Serial Presence Detect, SPD: serial presence detection information;
Field Programmable Gate Array,FPGA:现场可编程门阵列;Field Programmable Gate Array, FPGA: Field Programmable Gate Array;
Application Specific Integrated Circuit,ASIC:特殊应用集成电路;Application Specific Integrated Circuit, ASIC: special application integrated circuit;
Idle:空闲状态。Idle: idle state.
对于半导体行业来说,DRAM是一种重要的电子器件,能够为终端设备提供存储功能。具体来说,由于DRAM是动态随机存储器件,存储数据的电荷只能让数据保持一定的时间。在常温下,通常一个存储单元电容(Cell Capacitor)的保持时间大约是64毫秒。所以,为了保证数据正常存储,需要对存储单元进行周期的刷新(Periodical Refresh),让数据保持稳定。For the semiconductor industry, DRAM is an important electronic device that provides storage functions for end devices. Specifically, since DRAM is a dynamic random access memory device, the charge for storing data can only keep the data for a certain period of time. At normal temperature, the retention time of a storage cell capacitor (Cell Capacitor) is usually about 64 milliseconds. Therefore, in order to ensure the normal storage of data, it is necessary to periodically refresh the storage unit (Periodical Refresh) to keep the data stable.
在终端设备处于正常操作期间,CPU通常将运行数据和运算中暂时的数据都放在内存中,即内存可理解为容量很大的临时存储(Temporarily Store)。如果数据在内存中没有保持完整,则操作系统在读出数据时会发生错误,将导致整个系统宕机或者系统重启。During the normal operation of the terminal device, the CPU usually puts the running data and the temporary data in the operation in the memory, that is, the memory can be understood as a large-capacity temporary storage (Temporarily Store). If the data is not kept intact in the memory, an error will occur when the operating system reads out the data, which will cause the entire system to crash or restart.
对于终端设备来说,通过内存控制器向DRAM发送相应的指令,以实现数据的写入、读出。具体地,在DARM的工作过程中,内存控制器(Memory Controller)向内存DRAM依次发送以下参数:(1)选定Memory Controller;(2)选定DIMM Slot;(3)选定Rank地址;(4)选定Bank Address,Row Address;(5)选定Column Address进行读/写操作;(6)其他操作内容,例如Pre-Charge/Refresh等操作。For the terminal equipment, the corresponding instruction is sent to the DRAM through the memory controller to realize data writing and reading. Specifically, during the working process of DARM, the memory controller (Memory Controller) sends the following parameters to the memory DRAM in sequence: (1) Select the Memory Controller; (2) Select the DIMM Slot; (3) Select the Rank address; ( 4) Select Bank Address, Row Address; (5) Select Column Address for read/write operations; (6) Other operations, such as Pre-Charge/Refresh and other operations.
总的来说,服务器、笔记本电脑和各种消费类电子产品均涉及到DRAM器件,该器件用于存储在CPU运行过程中临时涉及到的大量数据。因此,DRAM存储的数据出错会给电子产品带来灾难性的故障,例如系统宕机、系统重启。In general, servers, laptops, and various consumer electronics all involve DRAM devices, which are used to store large amounts of data that are temporarily involved while the CPU is running. Therefore, errors in the data stored in DRAM will bring catastrophic failures to electronic products, such as system downtime and system restart.
所以,内存的读写测试(又称为压力测试,Stress测试)是内存的一种重要测试,用于测试DRAM的可靠性及稳定性等。目前,通用的Stress APP工具有MemtestX86、Primer95、Memtester、StressAPP等。然而,在实际测试中发现,这些软件都涉及到系统兼容性和软件升级等问题;而且,内存中同一测试位置被不同Stress APP报错的地址可能不同,很有可能是 Stress APP在解析地址时候发生错误;再者,若内存中发生多个错误,系统可能宕机或者系统重启,此时Stress APP也跟着挂掉,给系统分析带来很大的困扰;另外,这些Stress APP均是针对特定操作系统下开发的,那么开发时候要考虑操作系统的兼容性和CPU的兼容性,开发周期相当漫长;最后,以上示出的几种Stress APP均没有办法控制对内存中每个地址施加的Stress压力大小(即每个地址进行的读写次数可能不同),导致最终测试结果不够准确。Therefore, memory reading and writing test (also known as stress test, Stress test) is an important test of memory, which is used to test the reliability and stability of DRAM. At present, the common Stress APP tools include MemtestX86, Primer95, Memtester, StressAPP, etc. However, in the actual test, it is found that these softwares are related to issues such as system compatibility and software upgrades; moreover, the addresses reported by different Stress APPs for the same test location in the memory may be different, and it is likely that the Stress APP occurred when resolving the address. error; moreover, if multiple errors occur in the memory, the system may crash or restart, and the Stress APP will also hang up at this time, which brings great trouble to system analysis; in addition, these Stress APPs are all for specific operations Developed under the system, then the compatibility of the operating system and the compatibility of the CPU must be considered during development, and the development cycle is quite long; finally, the stress apps shown above have no way to control the Stress pressure exerted on each address in the memory size (that is, the number of reads and writes performed by each address may be different), resulting in inaccurate final test results.
基于此,本公开实施例提供了一种读写测试方法,基本思想是:接收内存控制器发送的数据指令,确定数据指令对应的物理存储地址;在数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收内存模块发送的目标读取值;其中,内存模块中的目标存储对象是根据物理存储地址确定的;获取内存模块中的目标存储对象在最近一次写操作中的目标写入值;对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果。这样,通过内存控制器发送的数据指令能够直接确定数据指令对应的物理存储地址,进而利用物理存储地址进行后续测试,无需针对不同的系统控制平台重新建立地址映射关系;其次,该读写测试方法仅涉及到对内存控制器和内存模块进行操作,无需与外部的系统控制平台进行交互,不会存在兼容性问题,能够提高读写测试的灵活性和通用性;另外,该读写测试方法还存在纠错机制,可以及时对发现的读写错误进行纠错,避免系统崩溃;最后,该读写测试方法还存在压力均衡机制,可以保证不同存储单元的读写压力相同,提高测试准确性。Based on this, an embodiment of the present disclosure provides a read/write test method. The basic idea is: receive the data instruction sent by the memory controller, and determine the physical storage address corresponding to the data instruction; The target storage object in the memory module is read, and receives the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; the target storage object in the memory module is acquired in the latest write operation The target write value; compare the target read value with the target write value, and determine the test result of the target storage object in the memory module according to the comparison result. In this way, the data instruction sent by the memory controller can directly determine the physical storage address corresponding to the data instruction, and then use the physical storage address for subsequent testing, without re-establishing address mapping relationships for different system control platforms; secondly, the read-write test method It only involves the operation of the memory controller and the memory module, without interacting with the external system control platform, there will be no compatibility issues, and the flexibility and versatility of the read-write test can be improved; in addition, the read-write test method also There is an error correction mechanism, which can correct the read and write errors found in time to avoid system crashes; finally, the read and write test method also has a pressure equalization mechanism, which can ensure that the read and write pressures of different storage units are the same and improve the test accuracy.
下面将结合附图对本公开各实施例进行详细说明。Various embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
在本公开的一实施例中,参见图1,其示出了本公开实施例提供的一种读写测试方法的流程示意图。如图1所示,该方法可以包括:In an embodiment of the present disclosure, refer to FIG. 1 , which shows a schematic flowchart of a read/write test method provided by an embodiment of the present disclosure. As shown in Figure 1, the method may include:
S101:接收内存控制器发送的数据指令,确定数据指令对应的物理存储地址。S101: Receive a data instruction sent by a memory controller, and determine a physical storage address corresponding to the data instruction.
需要说明的是,本公开实施例提供的读写测试方法应用于读写测试装置,或者集成有读写测试装置的终端设备。该终端设备在实施过程中可以为各种类型的具有内存模块的设备。例如,该终端设备可以为诸如智能手机、平板电脑、掌上电脑、电视机、投影仪、个人计算机、个人数字助理(Personal Digital Assistant,PDA)、可穿戴设备等设备,这里不作任何限定。It should be noted that the read-write test method provided by the embodiments of the present disclosure is applied to a read-write test device, or a terminal device integrated with a read-write test device. During implementation, the terminal device may be various types of devices with memory modules. For example, the terminal device may be a device such as a smart phone, a tablet computer, a palmtop computer, a television, a projector, a personal computer, a personal digital assistant (Personal Digital Assistant, PDA), a wearable device, etc., without any limitation here.
读写测试装置是一种硬件模块,连接于内存控制器(Memory Controller)和内存模块(例如DIMM)之间。具体地,内存模块中包含多个存储对象(或称为存储单元,Cell),内存控制器可以向内存模块发送不同的指令,以实现对不同的存储对象进行读取/写入操作。The read-write test device is a hardware module connected between the memory controller (Memory Controller) and the memory module (such as DIMM). Specifically, the memory module includes multiple storage objects (or called storage units, Cells), and the memory controller can send different instructions to the memory module to implement read/write operations on different storage objects.
需要说明的是,内存控制器对内存模块进行实际的写入或者读取操作过程中,需要通过发送目标存储对象的实际物理地址来对内存模块进行操 作。在此基础上,由于读写测试装置是以硬件的形式设置在内存控制器和内存模块之间的,所以读写测试装置可以接收并解析内存控制器发送的数据指令,并根据该数据指令确定相应的物理存储地址。It should be noted that when the memory controller actually writes or reads the memory module, it needs to send the actual physical address of the target storage object to operate the memory module. On this basis, since the read-write test device is set between the memory controller and the memory module in the form of hardware, the read-write test device can receive and analyze the data instructions sent by the memory controller, and determine the The corresponding physical storage address.
例如,当内存模块由多个DIMM构成时,内存控制器所下达的数据指令至少包括以下地址:内存通道地址(Memory Channel)、双列直插内存模块插槽地址(DIMM Position)、内存Rank地址(Rank Selection)、内存Bank地址(Bank Selection)、行地址(Row Address Selection)和列地址(Column Address Selection),以上地址也就构成了本次数据指令的物理存储地址。For example, when the memory module is composed of multiple DIMMs, the data instructions issued by the memory controller include at least the following addresses: memory channel address (Memory Channel), dual in-line memory module slot address (DIMM Position), memory Rank address (Rank Selection), memory Bank address (Bank Selection), row address (Row Address Selection) and column address (Column Address Selection), the above addresses constitute the physical storage address of this data instruction.
换句话说,在相关技术中,一般需要通过Stress APP实现对内存模块的读写测试,而且Stress APP需要根据逻辑存储地址对内存模块进行测试,在发现错误时需要通过进一步地地址解析才能够确定物理存储地址。本公开实施例从硬件的角度开发了一种读写测试装置,设置于内存控制器和内存模块之间,通过该读写测试装置可以直接解析内存控制器下发的数据指令而获得物理存储地址,进而利用物理存储地址而非是逻辑存储地址进行后续测试。因此,即使在不同的操作系统中,也无需重新建立地址映射关系,从而提高压力测试的通用性和灵活性。In other words, in related technologies, it is generally necessary to implement the reading and writing test of the memory module through the Stress APP, and the Stress APP needs to test the memory module according to the logical storage address. When an error is found, it needs to be further resolved through address analysis. Physical storage address. The embodiment of the present disclosure develops a read-write test device from the perspective of hardware, which is installed between the memory controller and the memory module. Through the read-write test device, the data instruction issued by the memory controller can be directly analyzed to obtain the physical storage address. , and then use the physical storage address instead of the logical storage address for subsequent testing. Therefore, even in different operating systems, there is no need to re-establish the address mapping relationship, thereby improving the generality and flexibility of the stress test.
S102:在数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收内存模块发送的目标读取值;其中,内存模块中的目标存储对象是根据物理存储地址确定的。S102: When the data instruction indicates a read operation, perform a read operation on a target storage object in the memory module, and receive a target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to a physical storage address.
需要说明的是,内存模块中存在多个不同的存储对象(Cell),这些存储对象通过物理存储地址予以区分。因此,在数据指令指示读操作时,读写测试装置可以根据物理存储地址控制内存模块进行读操作,从而获得目标存储对象的目标读取值。It should be noted that there are multiple different storage objects (Cells) in the memory module, and these storage objects are distinguished by physical storage addresses. Therefore, when the data instruction indicates a read operation, the read/write test device can control the memory module to perform the read operation according to the physical storage address, so as to obtain the target read value of the target storage object.
S103:获取内存模块中的目标存储对象在最近一次写操作中的目标写入值。S103: Obtain the target write value of the target storage object in the most recent write operation in the memory module.
需要说明的是,读写测试装置具有单独的存储空间,用于存储内存模块中每一存储对象在最近一次写操作中的写入值。It should be noted that the read/write test device has a separate storage space for storing the written value of each storage object in the memory module in the latest write operation.
S104:对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果。S104: Comparing the target read value and the target write value, and determining the test result of the target storage object in the memory module according to the comparison result.
需要说明的是,在目标存储对象处于正常状态的前提下,目标读取值和目标写入值应当是相同的。因此,根据目标读取值和目标写入值的实际比较结果,可以确定目标存储对象的测试结果。It should be noted that, on the premise that the target storage object is in a normal state, the target read value and the target write value should be the same. Therefore, according to the actual comparison result of the target read value and the target write value, the test result of the target storage object can be determined.
在一些实施例中,该方法还可以包括:In some embodiments, the method may also include:
在数据指令指示写操作时,根据数据指令确定目标写入值;When the data command indicates a write operation, determine the target write value according to the data command;
对内存模块中的目标存储对象进行写操作,以将目标写入值写入内存模块中的目标存储对象。A write operation is performed on the target storage object in the memory module, so as to write the target write value into the target storage object in the memory module.
需要说明的是,在数据指令指示写操作时,读写测试装置需要解析数 据指令以确定目标写入值,然后将目标写入值写入目标存储对象。It should be noted that when the data command indicates a write operation, the read-write test device needs to analyze the data command to determine the target write value, and then write the target write value into the target storage object.
还需要说明的是,读写测试装置可以设置单独的存储空间,用于存储测试过程中所需要的数据。因此,在一些实施例中,读写测试装置包括第一存储单元和第二存储单元。相应地,该方法还可以包括:It should also be noted that the read-write test device can be provided with a separate storage space for storing data required in the test process. Therefore, in some embodiments, the read/write test device includes a first storage unit and a second storage unit. Correspondingly, the method may also include:
在确定目标写入值之后,将物理存储地址和目标写入值对应存储到第一存储单元中;After determining the target write value, correspondingly storing the physical storage address and the target write value into the first storage unit;
在确定目标读取值之后,将物理存储地址和目标读取值对应存储到第二存储单元中。After the target read value is determined, the physical storage address and the target read value are correspondingly stored in the second storage unit.
需要说明的是,第一存储单元配置为存储所有写操作中的物理存储地址和待写入值(例如目标写入值);第二存储单元配置为存储所有读操作中的物理存储地址和实际读取值(例如目标读取值)。It should be noted that the first storage unit is configured to store the physical storage address and the value to be written (such as the target write value) in all write operations; the second storage unit is configured to store the physical storage address and the actual value in all read operations. Read value (eg target read value).
这样,通过对第一存储单元和第二存储单元中同一物理存储地址下的写入值和读取值进行比较,可以获得该存储对象的读写测试结果。因此,在一些实施例中,所述对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果,可以包括:In this way, by comparing the write value and the read value at the same physical storage address in the first storage unit and the second storage unit, the read/write test result of the storage object can be obtained. Therefore, in some embodiments, the comparing the target read value with the target write value, and determining the test result of the target storage object in the memory module according to the comparison result may include:
从第一存储单元中,获取物理存储地址对应的目标写入值;Obtain a target write value corresponding to the physical storage address from the first storage unit;
从第二存储单元中,获取物理存储地址对应的目标读取值;Obtain a target read value corresponding to the physical storage address from the second storage unit;
在目标写入值和目标读取值相同的情况下,确定内存模块中的目标存储对象处于正常状态;或者,在目标写入值和目标读取值不同的情况下,确定内存模块中的目标存储对象处于异常状态。If the target write value and the target read value are the same, determine that the target storage object in the memory module is in a normal state; or, if the target write value and the target read value are different, determine that the target storage object in the memory module is The storage object is in an abnormal state.
应理解,同一个存储对象实际上会存在反复多次的读写过程,即第一存储单元中一个物理存储地址可能存在多个写入值,第二存储单元中一个物理存储地址可能存在多个读取值。在本公开实施例中,目标写入值是指目标读取值对应的读操作发生之前最近一次针对该物理存储地址的写操作中的写入值。It should be understood that the same storage object actually has multiple read and write processes, that is, there may be multiple write values at one physical storage address in the first storage unit, and there may be multiple write values at one physical storage address in the second storage unit. read the value. In the embodiment of the present disclosure, the target write value refers to the write value in the last write operation for the physical storage address before the read operation corresponding to the target read value occurs.
特别地,在一些实施例中,读写测试装置可以仅包括第一存储单元,可以在对目标存储对象进行读操作后,立刻将读取得到的目标读取值和第一存储单元中存储的目标写入值进行比较,进而获得本次测试结果。In particular, in some embodiments, the read-write test device may only include the first storage unit, and immediately after the target storage object is read, the target read value obtained by reading and the value stored in the first storage unit may be combined. The target written value is compared to obtain the test result.
还需要说明的是,对于终端设备来说,为了节省计算量,仅在需要进行读写测试的时候启用读写测试装置。也就是说,在系统处于普通工作状态下,内存控制器是与内存模块直接连接的,此时内存控制器直接将数据指令下发给内存模块进行相应的读/写操作;在系统处于读写测试状态下,内存控制器通过读写测试装置与内存模块连接,此时内存控制器需要将数据指令下发给读写测试装置,由读写测试装置对控制内存模块进行相应的读/写操作,同时读写测试装置还会执行其他的测试操作。It should also be noted that, for the terminal device, in order to save the amount of calculation, the read-write test device is enabled only when the read-write test is required. That is to say, when the system is in a normal working state, the memory controller is directly connected to the memory module. At this time, the memory controller directly sends data instructions to the memory module for corresponding read/write operations; In the test state, the memory controller is connected to the memory module through the read-write test device. At this time, the memory controller needs to send data instructions to the read-write test device, and the read-write test device performs corresponding read/write operations on the control memory module. , and at the same time, the read-write test device will also perform other test operations.
以下对读写测试过程进行详细说明。The read and write test process is described in detail below.
首先,内存控制器下发了数据指令,假设该数据指令指示向地址A的存储对象写入“1”,此时读写测试装置将地址A和写入值“1”对应存储 到第一存储单元,并控制内存模块向地址A对应的存储单元写入“1”。First, the memory controller issues a data instruction. Assume that the data instruction indicates to write "1" to the storage object at address A. At this time, the read-write test device stores address A and the written value "1" in the first storage unit, and control the memory module to write "1" to the storage unit corresponding to address A.
然后,在内存控制器又一次下发数据指令,且该数据指令指示对地址1进行读取时,读写测试装置控制内存模块对地址A的存储对象进行读取,假设获得读取值“1”,此时读写测试装置将地址A和读取值“1”存储到第二存储单元。Then, when the memory controller issues a data instruction again, and the data instruction indicates to read address 1, the read-write test device controls the memory module to read the storage object at address A, assuming that the read value "1 ”, at this time, the read-write test device stores the address A and the read value “1” into the second storage unit.
最后,将读取值和写入值进行比较,此时写入值“1”和读取值“1”相同,则说明地址A指示的存储对象处于正常状态。反之,如果读取值为“0”,则说明地址A指示的存储对象处于异常状态。Finally, the read value is compared with the written value. At this time, the written value "1" is the same as the read value "1", which means that the storage object indicated by address A is in a normal state. On the contrary, if the read value is "0", it means that the storage object indicated by the address A is in an abnormal state.
在目标存储对象处于异常状态时,还可以设置告警机制,以提醒工作人员注意。因此,在一些实施例中,在目标写入值和目标读取值不同的情况下,该方法还可以包括:When the target storage object is in an abnormal state, an alarm mechanism can also be set to remind the staff to pay attention. Therefore, in some embodiments, where the target write value and the target read value are different, the method may further include:
生成告警信息;其中,告警信息用于指示内存模块中的目标存储对象处于异常状态;将告警信息在预设显示屏进行显示。Generate warning information; wherein, the warning information is used to indicate that the target storage object in the memory module is in an abnormal state; and display the warning information on a preset display screen.
示例性地,可以将预设显示屏分为左右两部分,一部分用来实时显示内存模块中不同存储对象的写入值,一部分用来实时显示内存模块中不同存储对象的读取值。如果发现某一存储对象的目标写入值和目标读取值不同,可以通过弹窗消息、高亮标出、红框警示等方式向工作人员进行提醒。Exemplarily, the preset display screen can be divided into left and right parts, one part is used to display the written values of different storage objects in the memory module in real time, and the other part is used to display the read values of different storage objects in the memory module in real time. If it is found that the target write value of a storage object is different from the target read value, the staff can be reminded through pop-up messages, highlighting, red box warnings, etc.
在一些实施例中,该方法还包括:In some embodiments, the method also includes:
在目标写入值和目标读取值相同,或者在目标写入值和目标读取值不同且未接收到系统恢复指令的情况下,向内存控制器返回目标读取值;或者,在目标写入值和目标读取值不同且接收到系统恢复指令的情况下,对内存模块中的目标存储对象进行数据恢复处理。Returns the target read value to the memory controller if the target write value is the same as the target read value, or if the target write value is different from the target read value and a system recovery command has not been received; or, When the input value is different from the target read value and a system recovery instruction is received, data recovery processing is performed on the target storage object in the memory module.
需要说明的是,在获得目标读取值后,读写测试装置还需要向内存控制器返回目标读取值,才能够完成内存控制器的命令闭环,否则内存控制器会出现错误。然而,如果大量的存储对象/某一重要的存储对象出现了数据错误,直接返回读取值有可能导致系统崩溃。因此,本公开实施例还设置了系统恢复机制。在这里,系统恢复机制可以根据用户需求进行启用或停用。It should be noted that, after obtaining the target read value, the read-write test device needs to return the target read value to the memory controller to complete the command closed-loop of the memory controller, otherwise the memory controller will have an error. However, if there is a data error in a large number of storage objects/an important storage object, directly returning the read value may cause the system to crash. Therefore, the embodiment of the present disclosure also sets a system recovery mechanism. Here, the system recovery mechanism can be enabled or disabled according to user needs.
具体地,如果目标写入值和目标读取值相同,即目标存储对象处于正常状态,可以直接将目标读取值返回给内存控制器。如果目标写入值和目标读取值不同,且未接收到用户发送的系统恢复指令,同样将目标读取值返回给内存控制器。如果目标写入值和目标读取值不同,且接收到用户发送的系统恢复指令,则对目标存储对象进行数据恢复处理。Specifically, if the target write value is the same as the target read value, that is, the target storage object is in a normal state, the target read value may be directly returned to the memory controller. If the target write value is different from the target read value, and the system recovery command sent by the user is not received, the target read value is also returned to the memory controller. If the target write value is different from the target read value, and a system recovery instruction sent by the user is received, data recovery processing is performed on the target storage object.
还需要说明的是,数据恢复处理具体是指尝试重新向目标存储对象进行写入和读取处理。因此,在一些实施例中,所述对内存模块中的目标存储对象进行数据恢复处理,可以包括:It should also be noted that the data recovery processing specifically refers to attempting to re-write and read to the target storage object. Therefore, in some embodiments, the performing data recovery processing on the target storage object in the memory module may include:
对内存模块中的目标存储对象进行重写操作,以将目标写入值写入内存模块中的目标存储对象;Rewriting the target storage object in the memory module to write the target write value into the target storage object in the memory module;
对内存模块中的目标存储对象进行重读操作,并接收内存模块发送的修正后读取值;Perform a reread operation on the target storage object in the memory module, and receive the corrected read value sent by the memory module;
在修正后读取值与目标写入值相同的情况下,向内存控制器返回修正后读取值。In a case where the corrected read value is the same as the target written value, the corrected read value is returned to the memory controller.
需要说明的是,如果修正后读取值和目标写入值不同,则可以尝试重复以上步骤;或者向内存控制器返回错误的修正后读取值,或者提醒工作人员处理。It should be noted that if the corrected read value is different from the target written value, you can try to repeat the above steps; or return the wrong corrected read value to the memory controller, or remind the staff to deal with it.
这样,通过系统恢复机制,能够避免数据错误过多,系统宕机的情况,提高了系统的稳定性。In this way, through the system recovery mechanism, excessive data errors and system downtime can be avoided, and system stability is improved.
还需要说明的是,在相关技术中,内存模块中每一存储单元的读写次数可能是不同的,这导致不同存储单元的读写压力并不同,从而影响测试结果。为了解决这一问题,在一些实施例中,如图2所示,该方法还可以包括:It should also be noted that, in related technologies, the read and write times of each storage unit in the memory module may be different, which leads to different read and write pressures of different storage units, thus affecting the test results. In order to solve this problem, in some embodiments, as shown in Figure 2, the method may also include:
S201:根据第一存储单元和第二存储单元,统计内存模块中每一存储对象的读写次数。S201: Count the read and write times of each storage object in the memory module according to the first storage unit and the second storage unit.
S202:在控制内存控制器处于空闲状态后,根据内存模块中每一存储对象的读写次数,确定待处理存储对象。S202: After controlling the memory controller to be in an idle state, determine the storage object to be processed according to the number of reads and writes of each storage object in the memory module.
S203:基于预设测试模式对待处理存储对象进行读写测试处理,以使得内存模块中每一存储对象的读写次数满足预设要求。S203: Perform read and write test processing on the storage object to be processed based on a preset test mode, so that the number of reads and writes of each storage object in the memory module meets a preset requirement.
需要说明的是,根据前述内容,若对某一存储对象进行一次写操作,则第一存储单元中该存储对象的物理存储地址下会增加一个写入值;若对某一存储对象进行一次读数据,则第二存储单元中该存储对象的物理存储地址下会增加一个读取值。因此,根据第一存储单元和第二存储单元各自存储的数据数量,可以统计出不同存储对象的读写次数。然后,将读写次数较少的存储对象确定为待处理存储对象,对待处理存储对象单独进行读写测试,以使得不同存储对象的读写次数大约相同。It should be noted that, according to the foregoing, if a write operation is performed on a storage object, a write value will be added to the physical storage address of the storage object in the first storage unit; data, a read value will be added to the physical storage address of the storage object in the second storage unit. Therefore, according to the amount of data stored in the first storage unit and the second storage unit, the number of reads and writes of different storage objects can be counted. Then, the storage object with less read and write times is determined as the storage object to be processed, and the read and write test is performed separately on the storage object to be processed, so that the read and write times of different storage objects are about the same.
需要说明的是,读写次数可以指示读次数、写次数、读次数和写次数的总和,或者读写次数还可以同时包括读次数和写次数。相应地,预设测试模式可以指示如何根据待处理存储对象的读写次数确定读写次数的具体过程。预设测试模式的参数可以由用户进行定义。It should be noted that the number of reads and writes may indicate the number of reads, the number of writes, the sum of the number of reads and the number of writes, or the number of reads and writes may also include the number of reads and the number of writes. Correspondingly, the preset test mode may indicate a specific process of how to determine the number of reads and writes according to the number of reads and writes of the storage object to be processed. The parameters of the preset test mode can be defined by the user.
另外,可以根据实际需求设定一阈值(例如5次,10次),如果内存模块中两两存储对象的读写次数差异不超过该阈值,则认为不同存储对象的读写次数满足预设要求。In addition, a threshold (for example, 5 times, 10 times) can be set according to actual needs. If the difference in the number of reads and writes between two storage objects in the memory module does not exceed the threshold, it is considered that the number of reads and writes of different storage objects meets the preset requirements. .
还需要说明的是,由于压力均衡机制是读写测试装置30提供的,与内存控制器无关。因此,在确定了那些读写次数较少的待处理存储对象后,需要控制内存控制器31进入空闲状态,将内存模块32的控制权交于读写测试装置30,进而由读写测试装置30利用预设测试模式对待处理存储对象进行读写测试处理。It should also be noted that since the pressure equalization mechanism is provided by the read/write test device 30 , it has nothing to do with the memory controller. Therefore, after determining those storage objects to be processed with fewer reading and writing times, it is necessary to control the memory controller 31 to enter the idle state, and to hand over the control right of the memory module 32 to the reading and writing testing device 30, and then the reading and writing testing device 30 Use the preset test mode to perform read and write test processing on the storage object to be processed.
在一些实施例中,在所述基于预设测试模式对待处理存储对象进行读写测试处理之后,该方法还可以包括:In some embodiments, after the read/write test is performed on the storage object to be processed based on the preset test mode, the method may further include:
从第一存储单元中获取待处理存储对象对应的有效写入值;其中,有效写入值是指待处理存储对象在内存控制器处于空闲状态前的最近一次写操作中的目标写入值;Acquiring the effective write value corresponding to the storage object to be processed from the first storage unit; wherein, the effective write value refers to the target write value in the latest write operation of the storage object to be processed before the memory controller is in an idle state;
对待处理存储对象进行写入处理,以将有效写入值写入待处理存储对象;Perform write processing on the storage object to be processed, so as to write the effective write value into the storage object to be processed;
控制内存控制器退出空闲状态。Controls the memory controller to exit the idle state.
还需要说明的是,对于内存控制器而言,待处理存储对象中的写入值需要保持不变,否则系统会崩溃。因此,在控制内存控制器退出空闲状态之前,需要重新向待处理存储对象写入之前的有效写入值。It should also be noted that for the memory controller, the written value in the pending storage object needs to remain unchanged, otherwise the system will crash. Therefore, before the control memory controller exits the idle state, it is necessary to rewrite the previously valid write value to the storage object to be processed.
这样,通过提供压力均衡机制,能够避免不同存储对象的读写压力不同的情况,提高了测试结果的可靠性。In this way, by providing a pressure equalization mechanism, it is possible to avoid the situation that different storage objects have different reading and writing pressures, and improve the reliability of test results.
在相关技术中,一般通过压力测试工具(Stress APP)对内存条进行压力测试,从而测试内存的稳定性和可靠性。然而,一方面,由于Stress APP工具需要利用逻辑存储地址进行读写测试,如果测试过程中出现一个或者多个数据输入/输出通道信号(一般称为DQ信号)错误,Stress APP需要根据地址映射解析关系进行解析,才能知道发生错误的数据的地址,如果系统平台更换,Stress APP则需要重新开发软件重新建立新的地址映射解析关系才能正确进行错误的定位;另一方面,Stress APP还需要考虑操作系统的兼容性等问题,因此需要对Stress APP工具进行不断地更新,造成通用性不太友好;又一方面,当出现错误太多的时候,可能会超过系统平台的纠错能力,此时系统已经崩溃,Stress APP随之崩溃,即Stress APP无法应对较多错误的情况;再一方面,现有的Stress APP没有好的办法统计和保证内存中每个地址的压力结果。In related technologies, generally, a stress test is performed on the memory stick through a stress test tool (Stress APP), so as to test the stability and reliability of the memory. However, on the one hand, because the Stress APP tool needs to use the logical storage address for read and write tests, if one or more data input/output channel signals (generally called DQ signals) errors occur during the test, the Stress APP needs to analyze the data according to the address mapping. Only by analyzing the relationship can we know the address of the wrong data. If the system platform is changed, the Stress APP needs to redevelop the software and re-establish a new address mapping analysis relationship to correctly locate the error; on the other hand, the Stress APP also needs to consider the operation System compatibility and other issues, so the Stress APP tool needs to be continuously updated, resulting in unfriendly versatility; on the other hand, when there are too many errors, it may exceed the error correction capability of the system platform. At this time, the system It has already crashed, and the Stress APP crashes accordingly, that is, the Stress APP cannot cope with many errors; on the other hand, the existing Stress APP has no good way to count and guarantee the stress results of each address in the memory.
为了解决内存模块运行读写测试时所存在的问题,本公开实施例从硬件角度开发一种能测试Memory中不同存储对象的压力大小且能每个存储对象的压力相等的模块,避开因为Stress APP的开发周期和验证周期过长导致测试无法进行的问题。In order to solve the problems existing when the memory module runs the read-write test, the embodiment of the present disclosure develops a module that can test the pressure of different storage objects in Memory and the pressure of each storage object is equal from the hardware point of view, avoiding problems caused by Stress The development cycle and verification cycle of the APP are too long, which leads to the problem that the test cannot be carried out.
具体地,由于系统在对Memory进行实际的写入或者读取操作过程中,都是通过发送实际的物理存储地址来对Memory进行操作的,具体命令发送顺序一般是:Memory Channel,Rank Selection&DIMM Position,Bank Selection,Row Address Selection和Column Address Selection。Specifically, since the system operates on the Memory by sending the actual physical storage address during the actual writing or reading operation of the Memory, the specific command sending sequence is generally: Memory Channel, Rank Selection&DIMM Position, Bank Selection, Row Address Selection and Column Address Selection.
因此,可以在Memory Controller和Memory之间建立一个能解析Memory命令的读写测试装置,按照Memory Channel,Rank Selection(DIMM Selection),Bank Selection,Row Address Selection和Column Address Selection的记录方式对写入和读出数据分别记录,即利用第一存储单元存储写操作中的写入值,利用第二存储单元存储读操作中的读取值。然后, 比较写入值和读取值,并通过显示屏对比较的结果进行显示输出。Therefore, a read-write test device capable of parsing Memory commands can be established between the Memory Controller and Memory, and the write and The read data is recorded separately, that is, the first storage unit is used to store the written value in the write operation, and the second storage unit is used to store the read value in the read operation. Then, compare the written value and the read value, and display and output the comparison result through the display screen.
这样,若有错误数据发生时,则可以直接显示发生错误数据的具体物理地址,无需额外进行地址解析。另外,根据第一存储单元和第二存储单元,能够对不同地址进行Stress统计,利用自带的预设测试模式对Stress比较小的地址进行单独的Stress测试,从而保证每个地址的Stress达到相同或者近似。这样,能够通过统计内存中每个地址的Stress压力大小,可以对Stress压力小的地址进行单独压力测试,从而保证内存中每个地址的压力大小相等或者尽量相等。除此之外,还可以通过数据恢复机制避免由于错误数据太多而导致系统宕机或者重启现象。In this way, if erroneous data occurs, the specific physical address of the erroneous data can be directly displayed without additional address analysis. In addition, according to the first storage unit and the second storage unit, it is possible to carry out Stress statistics on different addresses, and use the built-in preset test mode to conduct separate Stress tests on addresses with relatively small Stress, so as to ensure that the Stress of each address reaches the same or approximately. In this way, by counting the stress of each address in the memory, individual stress tests can be performed on addresses with low stress, so as to ensure that the stress of each address in the memory is equal or as equal as possible. In addition, the data recovery mechanism can also be used to avoid system downtime or restart due to too much error data.
本公开实施例提供了一种读写测试方法,通过接收内存控制器发送的数据指令,确定数据指令对应的物理存储地址;在数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收内存模块发送的目标读取值;其中,内存模块中的目标存储对象是根据物理存储地址确定的;获取内存模块中的目标存储对象在最近一次写操作中的目标写入值;对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果。这样,通过内存控制器发送的数据指令能够直接确定数据指令对应的物理存储地址,进而利用物理存储地址进行后续测试,无需针对不同的系统控制平台重新建立地址映射关系;其次,该读写测试方法仅涉及到对内存控制器和内存模块进行操作,无需与外部的系统控制平台进行交互,不会存在兼容性问题,能够提高读写测试的灵活性和通用性;另外,该读写测试方法还存在纠错机制,可以及时对发现的读写错误进行纠错,避免系统崩溃;最后,该读写测试方法还存在压力均衡机制,可以保证不同存储单元的读写压力相同,提高测试准确性。The embodiment of the present disclosure provides a read-write test method, which determines the physical storage address corresponding to the data command by receiving the data command sent by the memory controller; when the data command indicates a read operation, reads the target storage object in the memory module Operate, and receive the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; obtain the target write value of the target storage object in the memory module in the latest write operation; The target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result. In this way, the data instruction sent by the memory controller can directly determine the physical storage address corresponding to the data instruction, and then use the physical storage address for subsequent testing, without re-establishing address mapping relationships for different system control platforms; secondly, the read-write test method It only involves the operation of the memory controller and the memory module, without interacting with the external system control platform, there will be no compatibility issues, and the flexibility and versatility of the read-write test can be improved; in addition, the read-write test method also There is an error correction mechanism, which can correct the read and write errors found in time to avoid system crashes; finally, the read and write test method also has a pressure equalization mechanism, which can ensure that the read and write pressures of different storage units are the same and improve the test accuracy.
在本公开的另一实施例中,参见图3,其示出了本公开实施例提供的一种读写测试装置30的结构示意图。如图3所示,该读写测试装置30可以包括:In another embodiment of the present disclosure, refer to FIG. 3 , which shows a schematic structural diagram of a read/write test device 30 provided by an embodiment of the present disclosure. As shown in Figure 3, the read-write test device 30 may include:
解析控制单元301,配置为接收内存控制器发送的数据指令,确定数据指令对应的物理存储地址;以及在数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收内存模块发送的目标读取值;其中,内存模块中的目标存储对象是根据物理存储地址确定的;The analysis control unit 301 is configured to receive a data instruction sent by the memory controller, determine the physical storage address corresponding to the data instruction; and when the data instruction indicates a read operation, perform a read operation on the target storage object in the memory module, and receive the memory module The sent target read value; wherein, the target storage object in the memory module is determined according to the physical storage address;
比较单元302,配置为获取内存模块中的目标存储对象在最近一次写操作中的目标写入值;以及对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果。The comparison unit 302 is configured to obtain the target write value of the target storage object in the memory module in the latest write operation; and compare the target read value with the target write value, and determine the target storage object in the memory module according to the comparison result The object's test results.
需要说明的是,本公开实施例从硬件的角度提供了一种读写测试装置30,设置于内存控制器和内存模块之间,该读写测试装置30能够解析内存控制器发送的数据指令,从而确定数据指令对应的物理存储地址,进而利用物理存储地址进行后续测试,而非是利用逻辑存储地址进行后续测试,无需建立地址映射关系,提高通用性。It should be noted that the embodiment of the present disclosure provides a read-write test device 30 from the perspective of hardware, which is arranged between the memory controller and the memory module. The read-write test device 30 can analyze the data instructions sent by the memory controller, In this way, the physical storage address corresponding to the data instruction is determined, and then the physical storage address is used for subsequent testing, instead of the logical storage address for subsequent testing, and there is no need to establish an address mapping relationship, which improves versatility.
请参考图4,其示出了本公开实施例提供的另一种读写测试装置30的结构示意图。如图4所示,读写测试装置30连接于内存控制器31和内存模块32之间。内存模块32中包含多个存储对象,内存控制器31通过读写测试装置30可以向内存模块32发送不同的指令,以实现对不同的存储对象进行读取/写入操作。Please refer to FIG. 4 , which shows a schematic structural diagram of another read/write test device 30 provided by an embodiment of the present disclosure. As shown in FIG. 4 , the read/write test device 30 is connected between the memory controller 31 and the memory module 32 . The memory module 32 contains a plurality of storage objects, and the memory controller 31 can send different instructions to the memory module 32 through the read/write test device 30 to implement read/write operations on different storage objects.
读写测试装置30包括解析控制单元301和比较单元302。具体地,在读写测试装置30接收到内存控制器31发送的数据指令后,由解析控制单元301对数据指令进行解析以确定物理存储地址,并根据数据指令控制内存模块32进行相应的读写操作。而比较单元302配置为比较目标存储对象的目标写入值和目标读取值,从而确定测试结果。The read/write test device 30 includes an analysis control unit 301 and a comparison unit 302 . Specifically, after the read-write test device 30 receives the data instruction sent by the memory controller 31, the analysis control unit 301 analyzes the data instruction to determine the physical storage address, and controls the memory module 32 to perform corresponding read and write according to the data instruction. operate. The comparison unit 302 is configured to compare the target write value and the target read value of the target storage object, so as to determine the test result.
在这里,物理存储地址至少包括下述的其中一项:通道地址、双列直插内存模块插槽地址、内存Rank地址、内存Bank地址、行地址和列地址。Here, the physical storage address includes at least one of the following: channel address, dual in-line memory module slot address, memory Rank address, memory Bank address, row address and column address.
还需要说明的是,在一些实施例中,解析控制单元301,还配置为在数据指令指示写操作时,根据数据指令确定目标写入值;对内存模块中的目标存储对象进行写操作,以将目标写入值写入内存模块中的目标存储对象。It should also be noted that, in some embodiments, the parsing control unit 301 is also configured to determine the target write value according to the data instruction when the data instruction indicates a write operation; perform a write operation on the target storage object in the memory module to Writes the target write value to the target storage object in the memory module.
也就是说,在读写测试装置30接收到内存控制器31发送的数据指令后,如果数据指令指示写操作,解析控制单元301会按照物理存储地址对内存模块32中的目标存储对象进行写操作,并存储物理存储地址和目标写入值;如果数据指令指示读操作时,解析控制单元301会按照物理存储地址对内存模块32中的目标存储对象进行读操作,以获取内存模块32返回的目标读取值,并存储物理存储地址和目标读取值;然后,比较单元302对目标写入值和目标读取值进行比较以确定目标存储对象的测试结果。That is to say, after the read/write test device 30 receives the data command sent by the memory controller 31, if the data command indicates a write operation, the analysis control unit 301 will perform a write operation on the target storage object in the memory module 32 according to the physical storage address , and store the physical storage address and the target write value; if the data instruction indicates a read operation, the parsing control unit 301 will read the target storage object in the memory module 32 according to the physical storage address to obtain the target object returned by the memory module 32 read the value, and store the physical storage address and the target read value; then, the comparison unit 302 compares the target write value and the target read value to determine the test result of the target storage object.
读写测试装置30可以设置单独的存储空间,以便存储物理存储地址/写入值或者物理存储地址/读取值。The read/write test device 30 may set a separate storage space to store the physical storage address/write value or the physical storage address/read value.
如图4所示,读写测试装置30还可以包括第一存储单元303和第二存储单元304。相应地,解析控制单元301,还配置为在确定目标写入值之后,将物理存储地址和目标写入值对应存储到第一存储单元303中;在确定目标读取值之后,将物理存储地址和目标读取值对应存储到第二存储单元304中。As shown in FIG. 4 , the read/write test device 30 may further include a first storage unit 303 and a second storage unit 304 . Correspondingly, the resolution control unit 301 is also configured to store the physical storage address and the target write value in the first storage unit 303 after determining the target write value; after determining the target read value, store the physical storage address It is correspondingly stored in the second storage unit 304 with the target read value.
需要说明的是,第一存储单元303配置为存储内存模块32中每一存储对象的写入值;第二存储单元304,配置为存储内存模块32中每一存储对象的读取值。It should be noted that the first storage unit 303 is configured to store the write value of each storage object in the memory module 32 ; the second storage unit 304 is configured to store the read value of each storage object in the memory module 32 .
在一些实施例中,比较单元302,具体配置为从第一存储单元303中,获取物理存储地址对应的目标写入值;从第二存储单元304中,获取物理存储地址对应的目标读取值;以及在目标写入值和目标读取值相同的情况下,确定内存模块32中的目标存储对象处于正常状态;或者,在目标写入值和目标读取值不同的情况下,确定内存模块32中的目标存储对象处于异常状态。In some embodiments, the comparison unit 302 is specifically configured to acquire the target write value corresponding to the physical storage address from the first storage unit 303; and acquire the target read value corresponding to the physical storage address from the second storage unit 304 ; and when the target write value and the target read value are the same, determine that the target storage object in the memory module 32 is in a normal state; or, when the target write value and the target read value are different, determine that the memory module The target storage object in 32 is in an abnormal state.
在一些实施例中,如图4所示,读写测试装置30还包括输出单元305;In some embodiments, as shown in FIG. 4 , the read/write test device 30 further includes an output unit 305;
输出单元305,配置为在目标写入值和目标读取值不同的情况下,生成告警信息,并将告警信息在预设显示屏进行显示。The output unit 305 is configured to generate warning information when the target write value and the target read value are different, and display the warning information on a preset display screen.
需要说明的是,告警信息用于指示内存模块32中的目标存储对象处于异常状态,从而提醒工作人员进行处理。除此之外,还可以将预设显示屏分为左右两个部分,实时显示不同存储对象对应的写入值和读取值。It should be noted that the alarm information is used to indicate that the target storage object in the memory module 32 is in an abnormal state, so as to remind the staff to handle it. In addition, the preset display screen can also be divided into left and right parts to display the written value and read value corresponding to different storage objects in real time.
为了完成内存控制器的逻辑闭环,如果内存控制器31下发了指示读操作的数据指令,那么读写测试装置30需要向内存控制器31回复读取值。但是,如果出现了较多的数据错误,可能会导致内存控制器31崩溃。为了解决这一问题,在一些实施中,读写测试装置30还存在系统恢复机制。具体地,解析控制单元301,还配置为在目标写入值和目标读取值相同,或者在目标写入值和目标读取值不同且未接收到系统恢复指令的情况下,向内存控制器31返回目标读取值;或者,在目标写入值和目标读取值不同且接收到系统恢复指令的情况下,对内存模块32中的目标存储对象进行数据恢复处理。In order to complete the logical closed-loop of the memory controller, if the memory controller 31 issues a data command indicating a read operation, the read/write test device 30 needs to reply the read value to the memory controller 31 . However, if more data errors occur, the memory controller 31 may crash. In order to solve this problem, in some implementations, the read/write test device 30 also has a system recovery mechanism. Specifically, the parsing control unit 301 is further configured to send the memory controller 31 Return the target read value; or, in the case that the target write value is different from the target read value and a system recovery instruction is received, perform data recovery processing on the target storage object in the memory module 32 .
需要说明的是,系统恢复机制可以根据用户需要启用或者停用,因此,只有在发生数据错误(目标写入值和目标读取值不同)且收到系统恢复指令后,对目标存储对象进行数据恢复处理;反之,将所获得的目标读取值返回给内存控制器31。当然,在其他实施例中,系统恢复机制也可以设计成始终启用的状态,即只要发生数据错误,就对目标存储对象进行数据恢复处理。It should be noted that the system recovery mechanism can be enabled or disabled according to user needs. Therefore, only after a data error occurs (the target write value is different from the target read value) and the system recovery instruction is received, the data on the target storage object will be restored. resume processing; otherwise, return the obtained target read value to the memory controller 31 . Of course, in other embodiments, the system recovery mechanism can also be designed to be always enabled, that is, as long as a data error occurs, data recovery processing will be performed on the target storage object.
另外,可以在读写测试装置30中设置一数据恢复按键,若用户按下该数据恢复按键,则确定接收到系统恢复指令。In addition, a data recovery button may be set in the read-write test device 30 , and if the user presses the data recovery button, it is determined that a system recovery command is received.
还需要说明的是,数据恢复处理的本质是对目标存储对象进行重写和重读处理。因此,在一些实施例中,解析控制单元301,还配置为对内存模块32中的目标存储对象进行重写操作,以将目标写入值写入内存模块32中的目标存储对象;对内存模块32中的目标存储对象进行重读操作,并接收内存模块32发送的修正后读取值;在修正后读取值与目标写入值相同的情况下,向内存控制器31返回修正后读取值。It should also be noted that the essence of data recovery processing is to rewrite and reread the target storage object. Therefore, in some embodiments, the parsing control unit 301 is also configured to perform a rewrite operation on the target storage object in the memory module 32, so as to write the target write value into the target storage object in the memory module 32; The target storage object in 32 performs a re-read operation, and receives the corrected read value sent by the memory module 32; when the corrected read value is identical to the target write value, the corrected read value is returned to the memory controller 31 .
在相关技术中,不同存储对象在进行测试过程中的读写次数可能并不相同,进而影响了测试结果的准确性。因此,在一些实施例中,读写测试装置30还可以包括测试模式单元306。具体地,In related technologies, the read and write times of different storage objects may be different during the testing process, thereby affecting the accuracy of the test results. Therefore, in some embodiments, the read/write test device 30 may further include a test mode unit 306 . specifically,
测试模式单元306,配置为提供预设测试模式;A test mode unit 306 configured to provide a preset test mode;
比较单元302,还配置为根据第一存储单元和第二存储单元,统计内存模块32中每一存储对象的读写次数;The comparison unit 302 is further configured to count the number of reads and writes of each storage object in the memory module 32 according to the first storage unit and the second storage unit;
解析控制单元301,还配置为在控制内存控制器31处于空闲状态后,根据内存模块32中每一存储对象的读写次数,确定待处理存储对象;基于预设测试模式对待处理存储对象进行读写测试处理,以使得内存模块32中 每一存储对象的读写次数满足预设要求。The analysis control unit 301 is also configured to determine the storage object to be processed according to the number of reads and writes of each storage object in the memory module 32 after controlling the memory controller 31 to be in an idle state; read the storage object to be processed based on a preset test mode Write test processing, so that the number of reads and writes of each storage object in the memory module 32 meets the preset requirement.
需要说明的是,根据第一存储单元303中的数据和第二存储单元304中的数据,能够统计不同存储对象的读写次数,进而针对读写次数较少的存储对象进行读写测试处理,从而控制不同存储对象的读写次数满足预设要求。It should be noted that, according to the data in the first storage unit 303 and the data in the second storage unit 304, the number of times of reading and writing of different storage objects can be counted, and then the reading and writing test processing can be performed on storage objects with fewer times of reading and writing. In this way, the number of reads and writes of different storage objects is controlled to meet the preset requirements.
需要说明的是,预设测试模式规定了读写测试处理的具体方法,例如默认写入值是多少、写操作和读操作的顺序等等,预设测试模式可以根据用户的需求进行相应修改。It should be noted that the preset test mode specifies the specific method of read and write test processing, such as the default write value, the sequence of write operation and read operation, etc. The preset test mode can be modified according to the needs of users.
另外,读写测试装置30还包括电源管理单元307,配置为为读写测试装置供电。这样,由于读写测试装置30具备单独的电源方案,因此可以在内存控制器31进入空闲状态后,仍然发挥控制作用。In addition, the read-write test device 30 also includes a power management unit 307 configured to supply power to the read-write test device. In this way, since the read/write test device 30 has an independent power solution, it can still play a controlling role after the memory controller 31 enters the idle state.
还需要说明的是,在不同存储对象的读写次数满足预设要求之后,当每一存储对象的读写次数满足预设要求后,读写测试装置30还需要将控制权交回内存控制器31,即内存控制器31退出空闲状态。但是,待处理存储对象中的数值必须在内存控制器31进入空闲状态之前和退出空闲状态之后保持一致,否则会造成内存控制器31崩溃。It should also be noted that after the number of times of reading and writing of different storage objects meets the preset requirements, when the number of times of reading and writing of each storage object meets the preset requirements, the reading and writing test device 30 also needs to return the control right to the memory controller 31, that is, the memory controller 31 exits the idle state. However, the value in the storage object to be processed must be consistent before the memory controller 31 enters the idle state and after exiting the idle state, otherwise the memory controller 31 will crash.
因此,在一些实施例中,解析控制单元31,还配置为在基于预设测试模式对待处理存储对象进行读写测试处理之后,从第一存储单元303中获取待处理存储对象对应的有效写入值;对待处理存储对象进行写入处理,以将有效写入值写入待处理存储对象;以及控制内存控制器31退出空闲状态。Therefore, in some embodiments, the parsing control unit 31 is further configured to obtain the effective write data corresponding to the storage object to be processed from the first storage unit 303 after performing read and write test processing on the storage object to be processed based on the preset test mode. value; perform write processing on the storage object to be processed, so as to write a valid write value into the storage object to be processed; and control the memory controller 31 to exit the idle state.
需要说明的是,有效写入值是指待处理存储对象在内存控制器31处于空闲状态前的最近一次写操作中的目标写入值。It should be noted that the effective write value refers to the target write value in the last write operation of the storage object to be processed before the memory controller 31 is in an idle state.
还需要说明的是,为了方便工作人员掌握测试情况,输出单元305,还配置为将内存模块32中每一存储对象的读写次数在预设显示屏33进行显示。It should also be noted that, in order to facilitate staff to grasp the test situation, the output unit 305 is also configured to display the read/write times of each storage object in the memory module 32 on the preset display screen 33 .
从以上可以看出,对于读写测试装置30,首先,与内存控制器31形成数据通路,从而接收并解析内存控制器31发送的数据指令;然后,与内存模块32形成数据通路,从而对目标存储对象进行读操作/写操作;最后,再与内存控制器32形成数据通路,从而返回数据指令的操作结果。As can be seen from the above, for the read-write test device 30, at first, form a data path with the memory controller 31, thereby receiving and analyzing the data instructions sent by the memory controller 31; then, form a data path with the memory module 32, so that the target The storage object performs a read operation/write operation; finally, a data path is formed with the memory controller 32 to return the operation result of the data instruction.
换句话说,读写测试装置30需要依次与内存控制器31、与内存模块32形成数据通路。为了达到这一目的,在一些实施例中,读写测试装置30还包括数据选择器;In other words, the read/write test device 30 needs to form a data path with the memory controller 31 and the memory module 32 in sequence. In order to achieve this purpose, in some embodiments, the read-write test device 30 also includes a data selector;
解析控制单元301,还配置为向数据选择器发送第一选择指令;或者,向数据选择器发送第二选择指令;The parsing control unit 301 is further configured to send a first selection instruction to the data selector; or, send a second selection instruction to the data selector;
数据选择器,用于在接收到第一选择指令后,控制解析控制单元和内存控制器处于连通状态;或者,在接收到第二选择指令后,控制解析控制单元与内存模块处于连通状态。The data selector is used to control the parsing control unit and the memory controller to be in a connected state after receiving the first selection instruction; or, to control the parsing control unit and the memory module to be in a connected state after receiving the second selection instruction.
需要说明的是,除了设置数据选择器外,也可以采用软件控制的方法实现上述目的。It should be noted that, in addition to setting the data selector, the above purpose can also be achieved by using software control.
在相关技术中,根据DRAM的数据存储原理,DRAM保持数据稳定的时间有限,因此DRAM需要不断地刷新才能是保持数据稳定。换句话说,如果DRAM中整体存储单元(Cell)的数据保持时间(Retention)不够,或者部分Cell的Retention不够的时候,会导致重要数据丢失,例如数据位(Data Bits)由1变成0,或者由0变成1。在数据位意外改变时,可能导致整个系统宕机或者系统重启。因此,DRAM的读写测试是一种重要的性能测试,但是现有的读写测试装置存在种种问题。In related technologies, according to the data storage principle of the DRAM, the time for the DRAM to keep data stable is limited, so the DRAM needs to be constantly refreshed to keep the data stable. In other words, if the data retention time (Retention) of the entire storage unit (Cell) in DRAM is not enough, or the Retention of some cells is not enough, important data will be lost, such as data bits (Data Bits) change from 1 to 0, Or change from 0 to 1. When the data bit changes unexpectedly, it may cause the entire system to go down or restart the system. Therefore, the read/write test of DRAM is an important performance test, but there are various problems in the existing read/write test devices.
因此,本公开实施例提供了一种读写测试装置30,该读写测试装置30可以集成于终端设备的主机板(Motherboard),或者作为一个独立的模块。特别地,读写测试装置30拥有完全独立的操作系统,同时它有一个独立的供电系统。有四个主要功能:Therefore, the embodiment of the present disclosure provides a read-write test device 30, which can be integrated into a motherboard (Motherboard) of a terminal device, or be used as an independent module. In particular, the read-write test device 30 has a completely independent operating system, and it has an independent power supply system at the same time. There are four main functions:
(1)通过读写测试装置30,能够在Stress压力测试的过程中判断内存模块中每个地址的压力大小,进而通过显示屏来显示每个地址(按照Channel/DIMM/Rank/Row地址)的压力大小。同时,在测试到错误数据时,通过显示屏显示错误地址的信息。(1) By reading and writing the test device 30, the pressure of each address in the memory module can be judged in the process of the Stress pressure test, and then the value of each address (according to Channel/DIMM/Rank/Row address) is displayed through the display screen Pressure size. At the same time, when the wrong data is tested, the information of the wrong address is displayed on the display screen.
(2)根据按照对Channel/DIMM/Rank/Row地址统计的压力大小,选择特定的测试模式对其压力小的地址进行单独压力测试,从而保证每个地址的压力大小相等或者近似相等。(2) According to the pressure of the Channel/DIMM/Rank/Row address statistics, select a specific test mode to perform a separate stress test on the addresses with low pressure, so as to ensure that the pressure of each address is equal or approximately equal.
(3)可以完善和替代Stress APP功能,省去了Stress APP因为平台的升级和兼容性开发周期,可以通过硬件方式来定位发生错误数据的具体信息。(3) It can improve and replace the Stress APP function, eliminating the need for the Stress APP because of the platform upgrade and compatibility development cycle, and the specific information of the error data can be located by hardware.
(4)当系统发现一个或者多个错误数据时,可以对数据进行恢复设置,保证操作系统的稳定性。(4) When the system finds one or more wrong data, it can restore the data to ensure the stability of the operating system.
本公开实施例提供了一种读写测试装置,包括解析控制单元,配置为接收内存控制器发送的数据指令,确定所述数据指令对应的物理存储地址;以及在所述数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收所述内存模块发送的目标读取值;其中,所述内存模块中的目标存储对象是根据所述物理存储地址确定的;比较单元,配置为获取所述内存模块中的目标存储对象在最近一次写操作中的目标写入值;以及对所述目标读取值与所述目标写入值进行比较,根据比较结果确定所述内存模块中的目标存储对象的测试结果。这样,通过内存控制器发送的数据指令能够直接确定数据指令对应的物理存储地址,进而利用物理存储地址进行后续测试,无需针对不同的系统控制平台重新建立地址映射关系;另外,该读写测试方法仅涉及到对内存控制器和内存模块进行操作,无需与外部的系统控制平台进行交互,不会存在兼容性问题,能够提高读写测试的灵活性和通用性。An embodiment of the present disclosure provides a read-write test device, including an analysis control unit configured to receive a data instruction sent by a memory controller, and determine a physical storage address corresponding to the data instruction; and when the data instruction indicates a read operation , performing a read operation on the target storage object in the memory module, and receiving the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; the comparison unit, It is configured to obtain the target write value of the target storage object in the memory module in the latest write operation; and compare the target read value with the target write value, and determine the memory module according to the comparison result The target in stores the test results for the object. In this way, the data instruction sent by the memory controller can directly determine the physical storage address corresponding to the data instruction, and then use the physical storage address for subsequent testing, without re-establishing address mapping relationships for different system control platforms; in addition, the read-write test method It only involves the operation of the memory controller and the memory module, does not need to interact with the external system control platform, does not have compatibility problems, and can improve the flexibility and versatility of the read-write test.
在又一种实施例中,参见图5,其示出了本公开实施例提供的又一种读写测试装置30的结构示意图。该应用场景包括内存控制器(Memory Controller)31、读写测试装置30和至少一个内存模块(DIMM或者Memory Down)32。In yet another embodiment, refer to FIG. 5 , which shows a schematic structural diagram of another read/write test device 30 provided by an embodiment of the present disclosure. The application scenario includes a memory controller (Memory Controller) 31, a read-write test device 30 and at least one memory module (DIMM or Memory Down) 32.
如图5所示,读写测试装置30设置在内存控制器31和内存模块32之间。读写测试装置30是一个完全独立的控制系统,包括控制器(Controller)、供电和电源管理单元(相当于图4中的电源管理单元307)、数据恢复按键、显示屏、存储单元、测试模式单元(或称为Pattern单元)、计算/比较单元和输出单元(未示出)等。其中,控制器的原理可以是FPGA或者定制CPU,存储单元可以包括写入数据存储单元1(相当于图4中的第一存储单元303)、读取数据存储单元2(相当于图4中的第二存储单元304)。As shown in FIG. 5 , the read/write test device 30 is arranged between the memory controller 31 and the memory module 32 . Read-write test device 30 is a completely independent control system, including controller (Controller), power supply and power management unit (equivalent to power management unit 307 in Fig. 4), data recovery button, display screen, storage unit, test mode unit (or called Pattern unit), calculation/comparison unit and output unit (not shown) and so on. Wherein, the principle of the controller can be FPGA or customized CPU, and the storage unit can include writing data storage unit 1 (equivalent to the first storage unit 303 in FIG. 4 ), reading data storage unit 2 (equivalent to the first storage unit 303 in FIG. 4 ). second storage unit 304).
应理解,图5中的读写测试装置30的结构参考了一些模块物理结构,而并非严格意义上的功能结构,例如,图5中的控制器发挥解析控制作用的部分相当于图4中的解析控制单元301,图5中的控制器和计算/比较单元在功能上共同相当于图4中的比较单元302,图5中的控制器和以及一些能够执行数据输出的器件(图5未示出)在功能上共同相当于图4中的输出单元305。It should be understood that the structure of the read-write test device 30 in Fig. 5 refers to some module physical structures, rather than the functional structure in the strict sense, for example, the part of the controller in Fig. Analysis control unit 301, the controller among Fig. 5 and calculation/comparison unit are functionally equivalent to comparison unit 302 among Fig. 4, controller among Fig. 5 and some devices (not shown in Fig. 5) that can carry out data output output) are functionally equivalent to the output unit 305 in FIG. 4 .
在实际应用中,内存控制器31可能存在多个数据通道(Channel),针对每个Channel,可以分别单独设置一个读写测试装置30,用于定位内存模块32中发生数据错误地址以及用于纠错。为了提高器件使用效率,可以为每个Channel单独设置控制器(如图5中的控制器0、控制器N等),同时共用其他部分。In practical applications, there may be multiple data channels (Channel) in the memory controller 31, and for each Channel, a read-write test device 30 can be separately set up, which is used to locate the data error address in the memory module 32 and to correct it. wrong. In order to improve device usage efficiency, a controller can be set separately for each Channel (such as controller 0 and controller N in Figure 5), while sharing other parts.
总的来说,本公开实施例涉及到各类电子产品,在服务器、计算机和消费类平台上,都应用到Memory(例如DRAM、LR/RDIMM、UDIMM、SODIMM等),而内存中的数据完整性影响着整个系统运行,尤其是在服务器应用中,内存的数据完整性特别重要。本公开实施例提供的读写测试装置30,能够在Memory(例如正常读写或压力测试)发生错误数据时,快速准确地定位发生错误的数据地址,从而有效的提高Memory的稳定性和可靠性,也有助于保证功能测试和压力测试的顺利进行;而且,读写测试装置30还可以统计Memory中每个Rank/Bank中存储对象的Stress压力实际大小,根据统计的Stress压力大小,对压力小的地址按照特定的Pattern进行单独Stress测试,从而保证每个地址的Stress相等或者相近;另外,在发生多个数据错误时,可对错误的数据进行纠错,并对操作系统的稳定工作也有很大的帮助。In general, the embodiments of the present disclosure relate to various electronic products. On servers, computers and consumer platforms, they are all applied to Memory (such as DRAM, LR/RDIMM, UDIMM, SODIMM, etc.), and the data in the memory is complete Integrity affects the operation of the entire system, especially in server applications, the data integrity of memory is particularly important. The read-write test device 30 provided by the embodiment of the present disclosure can quickly and accurately locate the wrong data address when the memory (such as normal read-write or stress test) has erroneous data, thereby effectively improving the stability and reliability of the memory. , also helps to ensure that the function test and the stress test are carried out smoothly; and, the read-write test device 30 can also count the actual size of the Stress pressure of the storage object in each Rank/Bank in the Memory, and according to the Stress pressure size of the statistics, the pressure is small The address of each address is subjected to a separate Stress test according to a specific Pattern, so as to ensure that the Stress of each address is equal or similar; in addition, when multiple data errors occur, the wrong data can be corrected, and it is also very important for the stable operation of the operating system. big help.
可以通过两种不同的硬件结构实现读写测试装置30,分别称为Module1和Module2。换句话说,在下述实施例中,Module1和Module2两类模块实质上均是读写测试装置30,能够起到相同功能,二者的主要区别是:(1)Module1相对Module2的硬件要复杂些,成本也高些,要耗费一定的时间, 但是软件稍微简单;(2)Module2是软件比较复杂,但是硬件成本要低。特别地,Module1和Module2中的控制器都具有对内存控制器31的数据指令(或称为Command命令)的解析功能。The read/write test device 30 can be realized by two different hardware structures, which are respectively called Module1 and Module2. In other words, in the following embodiments, both Module1 and Module2 are essentially read-write test devices 30, which can play the same function. The main difference between the two is: (1) Module1 is more complicated than the hardware of Module2 , the cost is also higher, and it will take a certain amount of time, but the software is slightly simpler; (2) Module2 has more complicated software, but the hardware cost is lower. In particular, both the controllers in Module1 and Module2 have the function of parsing data instructions (or called Command commands) of the memory controller 31 .
请参考图6,其示出了本公开实施例提供的Module1的结构示意图。如图6所示,Module1包括控制器、数据恢复按键、高速数据选择器(High Speed Mux)、供电和电源管理单元、第一存储单元(或称为写入数据存储单元1)、第二存储单元(或称为读取数据存储单元2)、测试模式单元。同时,控制器中集成了比较单元、输出单元和解析控制单元。其中,解析控制单元主要配置为解析Command命令以及控制高速数据选择器。特别地,控制器可以通过例如FPGA或者ASIC等实现。Please refer to FIG. 6 , which shows a schematic structural diagram of Module1 provided by an embodiment of the present disclosure. As shown in Figure 6, Module1 includes a controller, a data recovery button, a high-speed data selector (High Speed Mux), a power supply and power management unit, a first storage unit (or called a write data storage unit 1), a second storage unit unit (or called read data storage unit 2), test mode unit. At the same time, a comparison unit, an output unit and an analysis control unit are integrated in the controller. Wherein, the parsing control unit is mainly configured to parse Command commands and control the high-speed data selector. In particular, the controller can be realized by, for example, FPGA or ASIC.
在图6中,高速数据选择器和内存控制器31之间的数据通路称为A,高速数据选择器和控制器之间的数据通路称为B,高速数据选择器和内存模块之间的数据通路称为C。In Fig. 6, the data path between the high-speed data selector and the memory controller 31 is called A, the data path between the high-speed data selector and the controller is called B, and the data between the high-speed data selector and the memory module The pathway is called C.
如图6所示,在写入数据时,高速数据选择器先控制AB导通,以使得内存控制器31向控制器下发数据指令(一般包括CMD信号/CA信号/CTL信号/DQ信号/DQS信号);高速数据选择器再控制BC导通,以使得控制器向内存模块32下发控制信号(一般为Control Signals信号),以控制内存模块32进行数据写入;反之,在读取数据时,高速数据选择器先控制CB导通,以使得控制器控制内存模块32进行数据读取;高速数据选择器再控制AB导通,以使得控制器向内存控制器31返回读取结果。As shown in FIG. 6, when writing data, the high-speed data selector first controls AB to be turned on, so that the memory controller 31 sends data instructions to the controller (generally including CMD signal/CA signal/CTL signal/DQ signal/ DQS signal); the high-speed data selector controls the BC conduction again, so that the controller sends a control signal (generally a Control Signals signal) to the memory module 32 to control the memory module 32 to write data; otherwise, when reading data , the high-speed data selector first controls CB to be turned on, so that the controller controls the memory module 32 to read data; the high-speed data selector then controls AB to be turned on, so that the controller returns the read result to the memory controller 31 .
也就是说,Module1具有独立的供电和电源管理单元,能够通过高速数据选择器来切换内存控制器31、读写测试装置30和内存模块32的数据通路。这样,读写测试装置30能够收集内存控制器31和内存模块32之间的数据指令及其它信息,同时保存这些信息。然后,通过对比前后写入和读取信息,借助于数据比较输出单元在显示屏上显示比较结果,例如可显示错误数据的地址。另外,读写测试装置30统计每个地址的读写次数(即压力大小),从而更具针对性的进行单独测试。That is to say, Module1 has an independent power supply and power management unit, and can switch the data paths of the memory controller 31 , the read-write test device 30 and the memory module 32 through a high-speed data selector. In this way, the read/write test device 30 can collect data commands and other information between the memory controller 31 and the memory module 32, and save these information at the same time. Then, by comparing the written and read information before and after, the comparison result is displayed on the display screen by means of the data comparison output unit, for example, the address of the wrong data can be displayed. In addition, the read-write test device 30 counts the read-write times (ie, the pressure) of each address, so as to conduct individual tests more specifically.
特别地,每一种DIMM在JEDEC中都有对其进行Raw Card定义,在DIMM上可以通过读取SPD信息来获取Raw Card类型信息,如果测试结果指示有错误数据发生,可以根据Raw Card信息和数据发生错误的地址来定位发生数据错误的DIMM上颗粒的位置(即定位发生错误的存储对象),这些错误位置信息可以通过显示屏来显示。In particular, each DIMM has a Raw Card definition in JEDEC. The Raw Card type information can be obtained by reading the SPD information on the DIMM. If the test result indicates that there is error data, it can be based on the Raw Card information and The address of the data error is used to locate the position of the particle on the DIMM where the data error occurs (that is, to locate the storage object where the error occurs), and the error location information can be displayed on the display.
对于Module1,其具体的控制逻辑分为以下几个部分:For Module1, its specific control logic is divided into the following parts:
(1)Module1中的控制器能够解析内存控制器31和内存模块32之间的Command命令,根据内存控制器31的Command命令,将读指令和写指令分开记录。在存储数据时,还需要按照Channel,DIMM Slot,Rank,Banks,Row,Column等信息形成物理存储地址,从而进行记录。(1) The controller in Module1 can analyze the Command command between the memory controller 31 and the memory module 32 , and record the read command and write command separately according to the Command command of the memory controller 31 . When storing data, it is also necessary to form a physical storage address according to Channel, DIMM Slot, Rank, Banks, Row, Column and other information for recording.
(2)写操作,Module1中的控制器解析到写命令后,控制器记录所有 写入数据,并根据Channel,DIMM Slot,Rank,Banks,Row,Column将写入数据存入第一存储单元。同时,控制器将高速数据选择器由原来BA通路切换到BC通路,控制器将所有的写入值(按顺序记录数据)写入内存模块32中指定的存储对象。(2) Write operation, after the controller in Module1 parses the write command, the controller records all write data, and stores the write data into the first storage unit according to Channel, DIMM Slot, Rank, Banks, Row, and Column. At the same time, the controller switches the high-speed data selector from the original BA path to the BC path, and the controller writes all write values (recording data in sequence) to the specified storage object in the memory module 32 .
(3)读操作,Module1中的控制器解析到读命令后,高速数据选择器切换到BC通路,控制器读取数据,并根据Channel,DIMM Slot,Rank,Banks,Row,Column将读取数据存入第二存储单元;然后,将读取的数据和第一存储单元中数据进行比较(对相同Channel,DIMM Slot,Rank,Banks,Row,Column比较)。若没有错误发生,控制器将高速数据选择器由CB通路切换到BA通路,若发现数据有一个或者多个异常时,可通过显示屏显示错误信息,并同时显示相应的Channel,DIMM Slot,Rank,Banks,Row,Column等信息。(3) Read operation, after the controller in Module1 parses the read command, the high-speed data selector switches to the BC channel, the controller reads the data, and reads the data according to Channel, DIMM Slot, Rank, Banks, Row, and Column Store in the second storage unit; then, compare the read data with the data in the first storage unit (comparison of the same Channel, DIMM Slot, Rank, Banks, Row, Column). If no error occurs, the controller switches the high-speed data selector from the CB channel to the BA channel. If one or more abnormalities are found in the data, the error information can be displayed on the display screen, and the corresponding Channel, DIMM Slot, Rank will be displayed at the same time. , Banks, Row, Column and other information.
特别地,如果读操作是针对多个存储对象的,则按照读命令继续进行读操作时,若后续读取的数据和之前写的数据进行比较后又有新的错误,同样通过显示屏显示有错误信息,并同时显示相应的Channel,DIMM Slot,Rank,Banks,Row,Column等信息。In particular, if the read operation is aimed at multiple storage objects, when the read operation is continued according to the read command, if there is a new error after comparing the subsequent read data with the previously written data, it will also be displayed on the display screen. Error information, and display the corresponding Channel, DIMM Slot, Rank, Banks, Row, Column and other information at the same time.
(3.1)错误恢复机制(或称为系统恢复机制),如果控制器发现有一个或者几个数据错误时,用户可以按下数据恢复按键(相当于发送系统恢复指令),控制器可对内存重新写入一次,并重新读取一次,如果读取到的数据与写入的数据一致,控制器根据实际需要将高速数据选择器由原来BC通路切换到BA通路,或者由原来BC通路切换到CA通路,这时内存控制器31直接和内存模块32直接连接。(3.1) Error recovery mechanism (or system recovery mechanism), if the controller finds one or several data errors, the user can press the data recovery button (equivalent to sending a system recovery command), and the controller can restore the memory Write it once and read it again. If the read data is consistent with the written data, the controller will switch the high-speed data selector from the original BC channel to the BA channel or from the original BC channel to the CA channel according to actual needs. path, at this time, the memory controller 31 is directly connected to the memory module 32 .
(3.2)发生数据错误时,若不按数据恢复按键,控制器自动将高速数据选择器由BC通路切换到BA通路。(3.2) When a data error occurs, if the data recovery button is not pressed, the controller will automatically switch the high-speed data selector from the BC channel to the BA channel.
(4)对于工作人员来说,通过记录的Channel,DIMM Slot,Rank,Banks,Row,Column等信息和相应DIMM的Row Card信息(通过SPD信息可获得)找到DIMM上的颗粒,并可通过显示屏显示发生错误的DIMM和颗粒位置。(4) For the staff, find the particles on the DIMM through the recorded Channel, DIMM Slot, Rank, Banks, Row, Column and other information and the Row Card information of the corresponding DIMM (obtainable through SPD information), and can display The screen displays the DIMM where the error occurred and the location of the particle.
(5)利用比较单元对第一存储单元和第二存储单元中的数据进行统计,根据比较单元的结果确定每个地址的读写次数,得出不同地址的Stress大小的统计结果。根据该统计结果,对Stress压力小的地址进行特定的压力测试。方法如下:首先,使内存控制器31进入Idle模式,这时候内存控制器31不对DRAM进行操作,由于Module1具有单独的供电和电源管理单元,所以Module1可以正常工作且可以对内存模块32进行操作;然后,根据之前对内存中不同地址的Stress测试结果,Module1按照预设测试模式对Stress压力小的地址进行单独的压力测试,预设测试模式可由测试模式单元提供,这样可以保证每个地址的Stress压力相等或者近似相等;最后,在压力测试模块退出对DRAM操作时,压力测试模块将之前写入第一存储单元中的数 据写入DRAM中。(5) Utilize the comparison unit to carry out statistics on the data in the first storage unit and the second storage unit, determine the number of reads and writes of each address according to the result of the comparison unit, and obtain the statistical result of the Stress size of different addresses. According to the statistical results, a specific stress test is performed on addresses with low stress. The method is as follows: first, the memory controller 31 is made to enter the Idle mode. At this time, the memory controller 31 does not operate the DRAM. Since the Module1 has a separate power supply and power management unit, the Module1 can work normally and can operate the memory module 32; Then, according to the previous Stress test results of different addresses in the memory, Module1 performs a separate stress test on addresses with less stress according to the preset test mode. The preset test mode can be provided by the test mode unit, so that the Stress of each address can be guaranteed. The pressures are equal or approximately equal; finally, when the stress testing module exits the operation on the DRAM, the stress testing module writes the data previously written into the first storage unit into the DRAM.
这样,通过Module1,可以实现读写测试装置30的全部功能。In this way, through Module1, all the functions of the read-write test device 30 can be realized.
请参考图7,其示出了本公开实施例提供的Module2的结构示意图。如图7所示,Module2包括控制器、数据恢复按键、供电和电源管理单元、显示屏、第一存储单元、第二存储单元、测试模式单元;同时,控制器中集成了比较单元、输出单元和解析控制单元。其中,解析控制单元主要配置为解析Command命令以及发挥控制作用。Please refer to FIG. 7 , which shows a schematic structural diagram of Module2 provided by an embodiment of the present disclosure. As shown in Figure 7, Module2 includes a controller, a data recovery button, a power supply and power management unit, a display screen, a first storage unit, a second storage unit, and a test mode unit; at the same time, a comparison unit and an output unit are integrated in the controller and analytical control unit. Wherein, the parsing control unit is mainly configured to parse Command commands and play a control role.
对于Module2,其具体的控制逻辑分为以下几个部分:For Module2, its specific control logic is divided into the following parts:
(1)当主机板运行时,Module2时刻充当着对内存控制器31和内存模块32之间数据信息解析和对Memory控制命令的解析功能;根据内存控制器31的Command命令信息,将写入和读取数据分开记录,按照Channel,DIMM Slot,Rank,Banks,Row,Column等信息进行记录;(1) When the main board is running, Module2 acts as the analysis function of the data information between the memory controller 31 and the memory module 32 and the resolution of the Memory control command; according to the Command command information of the memory controller 31, write and The read data is recorded separately, and recorded according to Channel, DIMM Slot, Rank, Banks, Row, Column and other information;
(2)写操作,当Module2中的控制器解析到写命令后,控制器记录所有写入数据,并根据Channel,DIMM Slot,Rank,Banks,Row,Column将写入数据存入第一存储单元;(2) Write operation, when the controller in Module2 parses the write command, the controller records all written data, and stores the written data into the first storage unit according to Channel, DIMM Slot, Rank, Banks, Row, and Column ;
(3)读操作,当Module2中的控制器解析到读取命令后,控制器读取数据,根据Channel,DIMM Slot,Rank,Banks,Row,Column将读取数据存入第二存储单元,并和第一存储单元中数据进行比较(针对相同Channel,DIMM Slot,Rank,Banks,Row,Column比较),若发现数据有一个或者多个不同时,可通过显示屏显示有错误信息,同时显示相应的Channel,DIMM Slot,Rank,Banks,Row,Column等信息。(3) Read operation, when the controller in Module2 parses the read command, the controller reads the data, stores the read data into the second storage unit according to Channel, DIMM Slot, Rank, Banks, Row, and Column, and Compare with the data in the first storage unit (for the same Channel, DIMM Slot, Rank, Banks, Row, Column comparison), if one or more of the data is found to be different, an error message can be displayed on the display screen, and the corresponding Channel, DIMM Slot, Rank, Banks, Row, Column and other information.
然后,在后续读操作中,若数据进行比较后发现又有新的错误信息,同样通过显示屏显示有错误信息,同时显示相应的Channel,DIMM Slot,Rank,Banks,Row,Column等信息。Then, in the subsequent read operation, if new error information is found after data comparison, the error information will also be displayed on the display screen, and the corresponding Channel, DIMM Slot, Rank, Banks, Row, Column and other information will be displayed at the same time.
(4)错误恢复机制,控制器发现有一个或者几个数据时,可立即按下Module2上的数据恢复按键,控制器可对内存重新写入一次(此时内存控制器31没有对内存模块32进行操作),然后再读取内存数据;(4) error recovery mechanism, when the controller finds one or several data, the data recovery button on the Module2 can be pressed immediately, and the controller can rewrite the memory once (the memory controller 31 does not write the memory module 32 at this moment). operation), and then read the memory data;
(5)通过记录的Channel,DIMM Slot,Rank,Banks,Row,Column等信息和相应DIMM的Row Card信息找到DIMM上的颗粒,并可通过显示器显示发生错误的DIMM和颗粒位置。(5) Find the particles on the DIMM through the recorded Channel, DIMM Slot, Rank, Banks, Row, Column and other information and the Row Card information of the corresponding DIMM, and display the DIMM and particle position where the error occurred through the display.
(6)根据比较单元的结果,统计每个地址的读写次数,得出不同地址的Stress大小的统计结果。根据统计结果,对Stress压力小的地址,进行特定的Pattern压力测试。方法如下:首先,使内存控制器31进入Idle模式,这时候,内存控制器31不对DRAM进行操作,而由于Module2的供电和电源管理单元是单独的,所以Module2可以正常工作且可以对内存模块32操作,根据之前对内存中不同地址的Stress测试结果,Module2按照预设测试模式对Stress压力小的地址进行单独的压力测试。预设测试模式可是选择压力测试模块中Pattern单元中一种或者几种,这样可以保证每个地址的 Stress压力相等或者近似相等,在Module2退出对DRAM操作时,Module2将之前写入第一存储单元中的数据写入DRAM中。(6) According to the result of the comparison unit, the number of times of reading and writing of each address is counted, and the statistical result of the stress size of different addresses is obtained. According to the statistical results, a specific Pattern stress test is performed on addresses with low stress. The method is as follows: first, make the memory controller 31 enter the Idle mode, at this time, the memory controller 31 does not operate the DRAM, and because the power supply and power management unit of Module2 are independent, Module2 can work normally and can operate the memory module 32 Operation, according to the previous Stress test results on different addresses in the memory, Module2 performs a separate stress test on addresses with low Stress pressure according to the preset test mode. The default test mode can be to select one or more of the Pattern units in the stress test module, so as to ensure that the Stress pressure of each address is equal or approximately equal. When Module2 exits the DRAM operation, Module2 will write the previous to the first storage unit The data in is written into DRAM.
在图7中,DQ/DQS分别为数据相关内容的信号,CMD/CA/CTL为一些涉及命令、地址和控制相关内容的信号。In Figure 7, DQ/DQS are signals related to data, and CMD/CA/CTL are signals related to commands, addresses and control.
这样,通过Module2,也可以实现读写测试装置30的全部功能。In this way, all the functions of the read/write test device 30 can also be realized through the Module2.
综上所述,本公开实施例在于保护一种能测试Memory Stress压力大小且能每个保证压力大小相等机制模块功能和类似功能。具体地,本公开实施例提供了一种读写测试装置30,具有以下功能:一方面,读写测试装置30可以在内存模块进行Stress压力测试时,检测是否有错误数据发生,通过显示屏可以直观地看到发生错误数据的物理地址信息;另一方面,读写测试装置30可以统计每个地址的Stress压力大小,对Stress压力小的地址选择特定测试模式进行压力测试,从而保证每个地址的Stress大小相同或者相近;又一方面,在对Memory进行压力测试时,读写测试装置30是根据硬件物理方法对地址进行记录的,不用考虑Stress APP系统兼容性,在发生数据错误时不会存在没法定位错误地址或者定位不准等问题;再一方面,当内存模块32发送数据错误时,使用读写测试装置30可以对发生错误的数据进行纠正,防止系统宕机或者重启。To sum up, the embodiment of the present disclosure aims to protect a mechanism module function and similar functions that can test the pressure of Memory Stress and ensure that the pressure is equal to each other. Specifically, the embodiment of the present disclosure provides a read-write test device 30, which has the following functions: On the one hand, the read-write test device 30 can detect whether there is any error data when the memory module is subjected to a Stress test, and the display screen can Visually see the physical address information where the error data occurs; on the other hand, the read-write test device 30 can count the Stress pressure size of each address, and select a specific test mode for the address with a small Stress pressure to carry out a stress test, thereby ensuring that each address The Stress size is the same or similar; on the other hand, when the memory is stress tested, the read-write test device 30 records the address according to the hardware physical method, without considering the compatibility of the Stress APP system, and will not occur when a data error occurs. There are problems such as being unable to locate the wrong address or inaccurate positioning; on the other hand, when the memory module 32 sends an error in data, the reading and writing test device 30 can be used to correct the erroneous data to prevent the system from going down or restarting.
本公开实施例提供了一种读写测试方法,通过本实施例对前述实施例的具体实施方法进行了详细阐述,从中可以看出,通过内存控制器发送的数据指令能够直接确定数据指令对应的物理存储地址,进而利用物理存储地址进行后续测试,无需针对不同的系统控制平台重新建立地址映射关系;其次,该读写测试方法仅涉及到对内存控制器和内存模块进行操作,无需与外部的系统控制平台进行交互,不会存在兼容性问题,能够提高读写测试的灵活性和通用性;另外,该读写测试方法还存在纠错机制,可以及时对发现的读写错误进行纠错,避免系统崩溃;最后,该读写测试方法还存在压力均衡机制,可以保证不同存储单元的读写压力相同,提高测试准确性。The embodiment of the present disclosure provides a read-write test method. Through this embodiment, the specific implementation method of the foregoing embodiment is described in detail. It can be seen from this that the data command sent by the memory controller can directly determine the corresponding The physical storage address, and then use the physical storage address to carry out subsequent tests, without re-establishing the address mapping relationship for different system control platforms; secondly, this read and write test method only involves the operation of the memory controller and memory modules, and does not need to communicate with external The system control platform interacts without compatibility problems, which can improve the flexibility and versatility of the read-write test; in addition, the read-write test method also has an error correction mechanism, which can correct the read-write errors found in time. Avoid system crashes; finally, the read-write test method also has a pressure equalization mechanism, which can ensure that the read-write pressure of different storage units is the same and improve test accuracy.
在本公开的再一实施例中,基于上述读写测试装置30的组成示意图,参见图8,其示出了本公开实施例提供的一种电子设备40的组成结构示意图。如图8所示,该电子设备40至少包括前述实施例中任一项的读写测试装置30。In yet another embodiment of the present disclosure, based on the schematic composition diagram of the above-mentioned read/write test device 30 , refer to FIG. 8 , which shows a schematic composition diagram of an electronic device 40 provided by an embodiment of the present disclosure. As shown in FIG. 8 , the electronic device 40 at least includes the read/write test device 30 of any one of the foregoing embodiments.
对于电子设备40而言,由于其包括读写测试装置30,通过内存控制器发送的数据指令能够直接确定数据指令对应的物理存储地址,进而利用物理存储地址进行后续测试,无需针对不同的系统控制平台重新建立地址映射关系;其次,该读写测试方法仅涉及到对内存控制器和内存模块进行操作,无需与外部的系统控制平台进行交互,不会存在兼容性问题,能够提高读写测试的灵活性和通用性;另外,该读写测试方法还存在纠错机制,可以及时对发现的读写错误进行纠错,避免系统崩溃;最后,该读写测试 方法还存在压力均衡机制,可以保证不同存储单元的读写压力相同,提高测试准确性。For the electronic device 40, since it includes the read-write test device 30, the data command sent by the memory controller can directly determine the physical storage address corresponding to the data command, and then use the physical storage address to perform subsequent tests without the need for different system control The platform re-establishes the address mapping relationship; secondly, the read-write test method only involves the operation of the memory controller and the memory module, and does not need to interact with the external system control platform, there will be no compatibility problems, and the read-write test can be improved. Flexibility and versatility; in addition, the read-write test method also has an error correction mechanism, which can correct the read-write errors found in time to avoid system crashes; finally, the read-write test method also has a pressure equalization mechanism, which can ensure The reading and writing pressure of different storage units is the same, which improves the test accuracy.
可以理解地,在前述实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that, in the foregoing embodiments, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a module, and it may also be non-modular. Moreover, each component in this embodiment may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或Processor(处理器)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or The part contributed by the prior art or the whole or part of the technical solution can be embodied in the form of software products, the computer software products are stored in a storage medium, and include several instructions to make a computer device (which can be a personal A computer, a server, or a network device, etc.) or a Processor (processor) executes all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes.
因此,本实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,计算机程序被多个处理器执行时实现前述实施例中任一项的方法的步骤。Therefore, this embodiment provides a computer storage medium, the computer storage medium stores a computer program, and when the computer program is executed by multiple processors, the steps of any one of the methods in the preceding embodiments are implemented.
以上,仅为本公开的较佳实施例而已,并非用于限定本公开的保护范围。The above are only preferred embodiments of the present disclosure, and are not intended to limit the protection scope of the present disclosure.
需要说明的是,在本公开中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this disclosure, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements , but also includes other elements not expressly listed, or also includes elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above-mentioned embodiments of the present disclosure are for description only, and do not represent the advantages and disadvantages of the embodiments.
本公开所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the several method embodiments provided in the present disclosure can be combined arbitrarily to obtain new method embodiments if there is no conflict.
本公开所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in the present disclosure can be combined arbitrarily without conflict to obtain new product embodiments.
本公开所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in the present disclosure may be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
以上,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保 护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope of the present disclosure, and should cover all within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be determined by the protection scope of the claims.
工业实用性Industrial Applicability
本公开实施例提供了一种读写测试方法及装置、计算机存储介质和电子设备,接收内存控制器发送的数据指令,确定数据指令对应的物理存储地址;在数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收内存模块发送的目标读取值;其中,内存模块中的目标存储对象是根据物理存储地址确定的;获取内存模块中的目标存储对象在最近一次写操作中的目标写入值;对目标读取值与目标写入值进行比较,根据比较结果确定内存模块中的目标存储对象的测试结果。这样,通过内存控制器发送的数据指令能够直接确定存储对象的物理存储地址,进而利用物理存储地址进行后续测试,无需针对不同的系统控制平台重新建立地址映射关系;另外,该读写测试方法仅涉及到对内存控制器和内存模块进行操作,无需与外部的操作系统进行交互,不会存在兼容性问题,能够提高读写测试的灵活性和通用性。Embodiments of the present disclosure provide a read-write test method and device, a computer storage medium, and electronic equipment, which receive a data instruction sent by a memory controller and determine the physical storage address corresponding to the data instruction; when the data instruction indicates a read operation, the memory The target storage object in the module performs read operation, and receives the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address; The target write value in the operation; the target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result. In this way, the data instruction sent by the memory controller can directly determine the physical storage address of the storage object, and then use the physical storage address for subsequent tests, without re-establishing address mapping relationships for different system control platforms; in addition, this read-write test method only It involves the operation of the memory controller and the memory module, without interaction with the external operating system, there will be no compatibility issues, and the flexibility and versatility of the read-write test can be improved.

Claims (20)

  1. 一种读写测试方法,应用于读写测试装置,所述方法包括:A read-write test method applied to a read-write test device, the method comprising:
    接收内存控制器发送的数据指令,确定所述数据指令对应的物理存储地址;receiving a data instruction sent by the memory controller, and determining a physical storage address corresponding to the data instruction;
    在所述数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收所述内存模块发送的目标读取值;其中,所述内存模块中的目标存储对象是根据所述物理存储地址确定的;When the data instruction indicates a read operation, perform a read operation on the target storage object in the memory module, and receive the target read value sent by the memory module; wherein, the target storage object in the memory module is based on the The physical storage address is determined;
    获取所述内存模块中的目标存储对象在最近一次写操作中的目标写入值;Obtain the target write value of the target storage object in the memory module in the latest write operation;
    对所述目标读取值与所述目标写入值进行比较,根据比较结果确定所述内存模块中的目标存储对象的测试结果。The target read value is compared with the target write value, and the test result of the target storage object in the memory module is determined according to the comparison result.
  2. 根据权利要求1所述的读写测试方法,其中,所述方法还包括:The reading and writing test method according to claim 1, wherein said method further comprises:
    在所述数据指令指示写操作时,根据所述数据指令确定所述目标写入值;When the data instruction indicates a write operation, determine the target write value according to the data instruction;
    对所述内存模块中的目标存储对象进行写操作,以将所述目标写入值写入所述内存模块中的目标存储对象。Perform a write operation on the target storage object in the memory module, so as to write the target write value into the target storage object in the memory module.
  3. 根据权利要求2所述的读写测试方法,其中,所述读写测试装置包括第一存储单元和第二存储单元;所述方法还包括:The read-write test method according to claim 2, wherein the read-write test device comprises a first storage unit and a second storage unit; the method further comprises:
    在确定所述目标写入值之后,将所述物理存储地址和所述目标写入值对应存储到所述第一存储单元中;After determining the target write value, correspondingly storing the physical storage address and the target write value into the first storage unit;
    在确定所述目标读取值之后,将所述物理存储地址和所述目标读取值对应存储到所述第二存储单元中。After the target read value is determined, correspondingly store the physical storage address and the target read value into the second storage unit.
  4. 根据权利要求3所述的读写测试方法,其中,所述对所述目标读取值与所述目标写入值进行比较,根据比较结果确定所述内存模块中的目标存储对象的测试结果,包括:The read-write test method according to claim 3, wherein said target read value is compared with said target write value, and the test result of the target storage object in the memory module is determined according to the comparison result, include:
    从所述第一存储单元中,获取所述物理存储地址对应的目标写入值;Obtain a target write value corresponding to the physical storage address from the first storage unit;
    从所述第二存储单元中,获取所述物理存储地址对应的目标读取值;Obtain a target read value corresponding to the physical storage address from the second storage unit;
    在所述目标写入值和所述目标读取值相同的情况下,确定所述内存模块中的目标存储对象处于正常状态;或者,When the target write value and the target read value are the same, determine that the target storage object in the memory module is in a normal state; or,
    在所述目标写入值和所述目标读取值不同的情况下,确定所述内存模块中的目标存储对象处于异常状态。If the target write value and the target read value are different, it is determined that the target storage object in the memory module is in an abnormal state.
  5. 根据权利要求4所述的读写测试方法,其中,所述方法还包括:The reading and writing test method according to claim 4, wherein said method further comprises:
    在所述目标写入值和所述目标读取值相同,或者在所述目标写入值和所述目标读取值不同且未接收到系统恢复指令的情况下,向所述内存控制器返回所述目标读取值;或者,If the target write value is the same as the target read value, or if the target write value is different from the target read value and a system recovery instruction has not been received, return to the memory controller the target reading; or,
    在所述目标写入值和所述目标读取值不同且接收到所述系统恢复指 令的情况下,对所述内存模块中的目标存储对象进行数据恢复处理。When the target write value is different from the target read value and the system recovery instruction is received, perform data recovery processing on the target storage object in the memory module.
  6. 根据权利要求5所述的读写测试方法,其中,所述对所述内存模块中的目标存储对象进行数据恢复处理,包括:The read-write test method according to claim 5, wherein said performing data recovery processing on the target storage object in the memory module includes:
    对所述内存模块中的目标存储对象进行重写操作,以将所述目标写入值写入所述内存模块中的目标存储对象;performing a rewrite operation on the target storage object in the memory module, so as to write the target write value into the target storage object in the memory module;
    对所述内存模块中的目标存储对象进行重读操作,并接收所述内存模块发送的修正后读取值;Perform a reread operation on the target storage object in the memory module, and receive the corrected read value sent by the memory module;
    在所述修正后读取值与所述目标写入值相同的情况下,向所述内存控制器返回所述修正后读取值。If the corrected read value is the same as the target written value, the corrected read value is returned to the memory controller.
  7. 根据权利要求3所述的读写测试方法,其中,所述方法还包括:The reading and writing test method according to claim 3, wherein said method further comprises:
    根据所述第一存储单元和所述第二存储单元,统计所述内存模块中每一存储对象的读写次数;According to the first storage unit and the second storage unit, count the number of reads and writes of each storage object in the memory module;
    在控制所述内存控制器处于空闲状态后,根据所述内存模块中每一存储对象的读写次数,确定待处理存储对象;After controlling the memory controller to be in an idle state, determine the storage object to be processed according to the number of reads and writes of each storage object in the memory module;
    基于预设测试模式对所述待处理存储对象进行读写测试处理,以使得所述内存模块中每一存储对象的读写次数满足预设要求。A read-write test is performed on the storage object to be processed based on a preset test mode, so that the read-write times of each storage object in the memory module meet a preset requirement.
  8. 根据权利要求7所述的读写测试方法,其中,在所述基于预设测试模式对所述待处理存储对象进行读写测试处理之后,所述方法还包括:The read-write test method according to claim 7, wherein, after performing the read-write test process on the storage object to be processed based on the preset test mode, the method further comprises:
    从所述第一存储单元中获取所述待处理存储对象对应的有效写入值;其中,所述有效写入值是指所述待处理存储对象在所述内存控制器处于空闲状态前的最近一次写操作中的目标写入值;Obtain the effective write value corresponding to the storage object to be processed from the first storage unit; wherein, the effective write value refers to the latest storage object to be processed before the memory controller is in an idle state The target write value in a write operation;
    对所述待处理存储对象进行写入处理,以将所述有效写入值写入所述待处理存储对象;performing write processing on the storage object to be processed, so as to write the effective write value into the storage object to be processed;
    控制所述内存控制器退出所述空闲状态。controlling the memory controller to exit the idle state.
  9. 一种读写测试装置,包括:A reading and writing test device, comprising:
    解析控制单元,配置为接收内存控制器发送的数据指令,确定所述数据指令对应的物理存储地址;以及在所述数据指令指示读操作时,对内存模块中的目标存储对象进行读操作,并接收所述内存模块发送的目标读取值;其中,所述内存模块中的目标存储对象是根据所述物理存储地址确定的;An analysis control unit configured to receive a data instruction sent by the memory controller, determine a physical storage address corresponding to the data instruction; and when the data instruction indicates a read operation, perform a read operation on the target storage object in the memory module, and receiving the target read value sent by the memory module; wherein, the target storage object in the memory module is determined according to the physical storage address;
    比较单元,配置为获取所述内存模块中的目标存储对象在最近一次写操作中的目标写入值;以及对所述目标读取值与所述目标写入值进行比较,根据比较结果确定所述内存模块中的目标存储对象的测试结果。The comparison unit is configured to obtain a target write value of the target storage object in the memory module in the latest write operation; and compare the target read value with the target write value, and determine the target value according to the comparison result test results for the target storage object in the memory module described above.
  10. 根据权利要求9所述的读写测试装置,其中,The reading and writing test device according to claim 9, wherein,
    所述解析控制单元,还配置为在所述数据指令指示写操作时,根据所述数据指令确定所述目标写入值;对所述内存模块中的目标存储对象进行写操作,以将所述目标写入值写入所述内存模块中的目标存储对象。The parsing control unit is further configured to determine the target write value according to the data instruction when the data instruction indicates a write operation; and perform a write operation on the target storage object in the memory module to convert the The target write value is written to the target storage object in the memory module.
  11. 根据权利要求10所述的读写测试装置,其中,所述读写测试装 置还包括第一存储单元和第二存储单元;其中,The read-write test device according to claim 10, wherein, the read-write test device also includes a first storage unit and a second storage unit; wherein,
    所述第一存储单元,配置为存储所述内存模块中每一存储对象的写入值;The first storage unit is configured to store the write value of each storage object in the memory module;
    所述第二存储单元,配置为存储所述内存模块中每一存储对象的读取值;The second storage unit is configured to store the read value of each storage object in the memory module;
    相应地,所述解析控制单元,还配置为在确定所述目标写入值之后,将所述物理存储地址和所述目标写入值对应存储到所述第一存储单元中;在确定所述目标读取值之后,将所述物理存储地址和所述目标读取值对应存储到所述第二存储单元中。Correspondingly, the parsing control unit is further configured to store the physical storage address and the target write value in the first storage unit correspondingly after determining the target write value; After the target read value, correspondingly store the physical storage address and the target read value into the second storage unit.
  12. 根据权利要求11所述的读写测试装置,其中,The reading and writing test device according to claim 11, wherein,
    所述比较单元,具体配置为从所述第一存储单元中,获取所述物理存储地址对应的目标写入值;从所述第二存储单元中,获取所述物理存储地址对应的目标读取值;以及在所述目标写入值和所述目标读取值相同的情况下,确定所述内存模块中的目标存储对象处于正常状态;或者,在所述目标写入值和所述目标读取值不同的情况下,确定所述内存模块中的目标存储对象处于异常状态。The comparison unit is specifically configured to obtain the target write value corresponding to the physical storage address from the first storage unit; obtain the target read value corresponding to the physical storage address from the second storage unit. value; and when the target write value and the target read value are the same, determine that the target storage object in the memory module is in a normal state; or, when the target write value and the target read If the values are different, it is determined that the target storage object in the memory module is in an abnormal state.
  13. 根据权利要求12所述的读写测试装置,其中,所述读写测试装置还包括输出单元;The read-write test device according to claim 12, wherein the read-write test device further comprises an output unit;
    所述输出单元,配置为在所述目标写入值和所述目标读取值不同的情况下,生成告警信息,并将所述告警信息在预设显示屏进行显示;The output unit is configured to generate warning information when the target write value and the target read value are different, and display the warning information on a preset display screen;
    其中,所述告警信息用于指示所述内存模块中的目标存储对象处于异常状态。Wherein, the alarm information is used to indicate that the target storage object in the memory module is in an abnormal state.
  14. 根据权利要求12所述的读写测试装置,其中,The reading and writing test device according to claim 12, wherein,
    所述解析控制单元,还配置为在所述目标写入值和所述目标读取值相同,或者在所述目标写入值和所述目标读取值不同且未接收到系统恢复指令的情况下,向所述内存控制器返回所述目标读取值;或者,在所述目标写入值和所述目标读取值不同且接收到所述系统恢复指令的情况下,对所述内存模块中的目标存储对象进行数据恢复处理。The analysis control unit is further configured to: when the target write value is the same as the target read value, or when the target write value is different from the target read value and no system recovery instruction is received , returning the target read value to the memory controller; or, when the target write value is different from the target read value and the system recovery command is received, the memory module Perform data recovery processing on the target storage object in .
  15. 根据权利要求14所述的读写测试装置,其中,The reading and writing test device according to claim 14, wherein,
    所述解析控制单元,还配置为对所述内存模块中的目标存储对象进行重写操作,以将所述目标写入值写入所述内存模块中的目标存储对象;对所述内存模块中的目标存储对象进行重读操作,并接收所述内存模块发送的修正后读取值;在所述修正后读取值与所述目标写入值相同的情况下,向所述内存控制器返回所述修正后读取值。The parsing control unit is further configured to rewrite the target storage object in the memory module, so as to write the target write value into the target storage object in the memory module; Perform re-read operation on the target storage object, and receive the corrected read value sent by the memory module; if the corrected read value is the same as the target written value, return the corrected value to the memory controller Read the value after the above correction.
  16. 根据权利要求15所述的读写测试装置,其中,所述读写测试装置还包括测试模式单元;The read-write test device according to claim 15, wherein the read-write test device further comprises a test mode unit;
    所述测试模式单元,配置为提供预设测试模式;The test mode unit is configured to provide a preset test mode;
    所述比较单元,还配置为根据所述第一存储单元和所述第二存储单 元,统计所述内存模块中每一存储对象的读写次数;The comparison unit is further configured to count the number of reads and writes of each storage object in the memory module according to the first storage unit and the second storage unit;
    所述解析控制单元,还配置为在控制所述内存控制器处于空闲状态后,根据所述内存模块中每一存储对象的读写次数,确定待处理存储对象;基于所述预设测试模式对所述待处理存储对象进行读写测试处理,以使得所述内存模块中每一存储对象的读写次数满足预设要求。The analysis control unit is further configured to determine the storage object to be processed according to the number of reads and writes of each storage object in the memory module after controlling the memory controller to be in an idle state; The storage object to be processed is subjected to read and write test processing, so that the number of reads and writes of each storage object in the memory module meets a preset requirement.
  17. 根据权利要求16所述的读写测试装置,其中,所述解析控制单元,还配置为在基于预设测试模式对所述待处理存储对象进行读写测试处理之后,从所述第一存储单元中获取所述待处理存储对象对应的有效写入值;对所述待处理存储对象进行写入处理,以将所述有效写入值写入所述待处理存储对象;以及控制所述内存控制器退出所述空闲状态;The device for reading and writing testing according to claim 16, wherein the parsing control unit is further configured to read and write the storage object to be processed based on the preset test mode, from the first storage unit Acquiring the effective write value corresponding to the storage object to be processed; performing write processing on the storage object to be processed, so as to write the effective write value into the storage object to be processed; and controlling the memory control the device exits the idle state;
    其中,所述有效写入值是指所述待处理存储对象在所述内存控制器处于空闲状态前的最近一次写操作中的目标写入值。Wherein, the effective write value refers to the target write value in the latest write operation of the storage object to be processed before the memory controller is in an idle state.
  18. 根据权利要求9所述的读写测试装置,其中,所述读写测试装置还包括数据选择器;The read-write test device according to claim 9, wherein the read-write test device further comprises a data selector;
    所述解析控制单元,还配置为向所述数据选择器发送第一选择指令;或者,向所述数据选择器发送第二选择指令;The parsing control unit is further configured to send a first selection instruction to the data selector; or, send a second selection instruction to the data selector;
    所述数据选择器,用于在接收到所述第一选择指令后,控制所述解析控制单元和所述内存控制器处于连通状态;或者,在接收到所述第二选择指令后,控制所述解析控制单元与所述内存模块处于连通状态。The data selector is configured to, after receiving the first selection instruction, control the analysis control unit and the memory controller to be in a connected state; or, after receiving the second selection instruction, control the The analysis control unit is in communication with the memory module.
  19. 一种计算机存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8任一项所述方法的步骤。A computer storage medium, the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are realized.
  20. 一种电子设备,所述电子设备包括如权利要求9至18任一项所述的读写测试装置。An electronic device, comprising the read-write test device according to any one of claims 9-18.
PCT/CN2021/131873 2021-09-08 2021-11-19 Read and write test method and apparatus, computer storage medium, and electronic device WO2023035413A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111050167.5 2021-09-08
CN202111050167.5A CN115774635A (en) 2021-09-08 2021-09-08 Read-write test method and device, computer storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023035413A1 true WO2023035413A1 (en) 2023-03-16

Family

ID=85388104

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/131873 WO2023035413A1 (en) 2021-09-08 2021-11-19 Read and write test method and apparatus, computer storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN115774635A (en)
WO (1) WO2023035413A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093431A (en) * 2023-10-11 2023-11-21 飞腾信息技术有限公司 Test method, test device, computing equipment and storage medium
CN117407182A (en) * 2023-12-14 2024-01-16 沐曦集成电路(南京)有限公司 Process synchronization method, system, equipment and medium based on Poll instruction

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116841850A (en) * 2023-07-18 2023-10-03 北京云宽志业网络技术有限公司 Test method, test device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085710A1 (en) * 2004-09-30 2006-04-20 Michael Spica Testing memories
CN109901956A (en) * 2017-12-08 2019-06-18 英业达科技有限公司 The system and method for memory integrated testability
CN112331256A (en) * 2020-11-13 2021-02-05 深圳佰维存储科技股份有限公司 DRAM test method and device, readable storage medium and electronic equipment
CN112992252A (en) * 2019-12-18 2021-06-18 迈普通信技术股份有限公司 Read-write reliability detection method and device, electronic equipment and readable storage medium
CN112992251A (en) * 2021-04-09 2021-06-18 长鑫存储技术有限公司 Memory address test circuit and method, memory and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085710A1 (en) * 2004-09-30 2006-04-20 Michael Spica Testing memories
CN109901956A (en) * 2017-12-08 2019-06-18 英业达科技有限公司 The system and method for memory integrated testability
CN112992252A (en) * 2019-12-18 2021-06-18 迈普通信技术股份有限公司 Read-write reliability detection method and device, electronic equipment and readable storage medium
CN112331256A (en) * 2020-11-13 2021-02-05 深圳佰维存储科技股份有限公司 DRAM test method and device, readable storage medium and electronic equipment
CN112992251A (en) * 2021-04-09 2021-06-18 长鑫存储技术有限公司 Memory address test circuit and method, memory and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093431A (en) * 2023-10-11 2023-11-21 飞腾信息技术有限公司 Test method, test device, computing equipment and storage medium
CN117407182A (en) * 2023-12-14 2024-01-16 沐曦集成电路(南京)有限公司 Process synchronization method, system, equipment and medium based on Poll instruction
CN117407182B (en) * 2023-12-14 2024-03-12 沐曦集成电路(南京)有限公司 Process synchronization method, system, equipment and medium based on Poll instruction

Also Published As

Publication number Publication date
CN115774635A (en) 2023-03-10

Similar Documents

Publication Publication Date Title
WO2023035413A1 (en) Read and write test method and apparatus, computer storage medium, and electronic device
CN108320764B (en) Semiconductor device, memory module and operating method thereof
US9761298B2 (en) Method, apparatus and system for responding to a row hammer event
US7143236B2 (en) Persistent volatile memory fault tracking using entries in the non-volatile memory of a fault storage unit
US8020053B2 (en) On-line memory testing
US10754724B2 (en) Memory device for detecting a defective memory chip
CN101369240A (en) System and method for managing memory errors in an information handling system
US20220319577A1 (en) Method and apparatus for determining signal margin of memory cell and storage medium
US20150212742A1 (en) Memory control device, information processing apparatus, memory control method, and, storage medium storing memory control program
US20220050603A1 (en) Page offlining based on fault-aware prediction of imminent memory error
CN115223649A (en) Information detection method and device and electronic equipment
US20240013851A1 (en) Data line (dq) sparing with adaptive error correction coding (ecc) mode switching
US10922023B2 (en) Method for accessing code SRAM and electronic device
US11036399B2 (en) Memory system and operating method of the memory system
KR20210103069A (en) Memory test device and operation method thereof
WO2023108319A1 (en) In-system mitigation of uncorrectable errors based on confidence factors, based on fault-aware analysis
US11656929B2 (en) Memory module and operating method
EP4312219A2 (en) Memory system, operating method of the same, and controller of memory device
US11798617B2 (en) Method and apparatus for determining sense boundary of sense amplifier, medium, and device
US20220350715A1 (en) Runtime sparing for uncorrectable errors based on fault-aware analysis
EP4156192A1 (en) Page offlining based on fault-aware prediction of imminent memory error
US10255986B2 (en) Assessing in-field reliability of computer memories
US10235862B2 (en) Electronic apparatus and test method
KR20210124718A (en) Memory device for detect and refair bad wordline by itself, and memory system including the same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21956584

Country of ref document: EP

Kind code of ref document: A1