CN114625584A - Test verification method and device for dynamic conversion of data transmission rate of solid state disk - Google Patents

Test verification method and device for dynamic conversion of data transmission rate of solid state disk Download PDF

Info

Publication number
CN114625584A
CN114625584A CN202111641152.6A CN202111641152A CN114625584A CN 114625584 A CN114625584 A CN 114625584A CN 202111641152 A CN202111641152 A CN 202111641152A CN 114625584 A CN114625584 A CN 114625584A
Authority
CN
China
Prior art keywords
solid state
state disk
pcie
tool
data transmission
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111641152.6A
Other languages
Chinese (zh)
Inventor
杨汉力
钱海明
石骁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System Co Ltd
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 Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN202111641152.6A priority Critical patent/CN114625584A/en
Publication of CN114625584A publication Critical patent/CN114625584A/en
Pending legal-status Critical Current

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
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • 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
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • 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
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • G06F11/2635Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers using a storage for the test inputs, e.g. test ROM, script files

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a test verification method, a test verification device, computer equipment and a storage medium for dynamic conversion of data transmission rate of a solid state disk, wherein the method comprises the following steps: acquiring a test verification request for the dynamic conversion of the data transmission rate of the solid state disk; dynamically judging the speed of data transmission rate in PCIe and solid state disk registers by utilizing an lspci tool according to the test verification request; setting a data transmission rate of dynamic switching by using a setpci tool; and calling the lspci tool and the setpci tool through a Shell script to verify the consistency of the data in different data transmission rates of the solid state disk to be tested on the test platform. The method can quickly and efficiently verify the compatibility problems of the solid state disk under different data transmission rates, such as data consistency and performance problems under different data transmission rates, can effectively improve the testing efficiency, and saves unnecessary labor cost.

Description

Test verification method and device for dynamic conversion of data transmission rate of solid state disk
Technical Field
The invention relates to the technical field of solid state disk testing, in particular to a test verification method and device for dynamic conversion of data transmission rate of a solid state disk, computer equipment and a storage medium.
Background
The data transmission rate is the average number of bits, characters transmitted between respective devices in the data transmission system per unit time. The corresponding devices refer to a PCIe (peripheral component interconnect express, hereinafter referred to as PCIe) controller and a solid state disk supporting a PCIe interface channel. PCIe supported data transfer rates are 2.5GT/s, 5.0GT/s, 8.0GT/s, 16.0GT/s, etc. For example, an X4 solid state disk supporting 16.0GT/s must be able to normally operate on a 16GT/s platform with a theoretical performance close to 4GB/s, and must also be able to normally operate on a computer supporting only 2.5GT/s or 8 GT/s.
At present, in the conventional technology, data transmission rate compatibility verification of a solid state disk is usually performed by modifying a PCIe rate under a BIOS (Basic Input Output System, hereinafter referred to as BIOS). After the PCIe data transmission rate is modified by the method, the SSD can work at the rate until the SSD is modified again after the next boot-up into the BIOS, the operation is convenient, simple and inflexible, the dynamic switching of the data transmission rate cannot be realized, and the requirement of the automatic test of the data transmission rate compatibility cannot be met.
Disclosure of Invention
Therefore, it is necessary to provide a test verification method, an apparatus, a computer device, and a storage medium for dynamic conversion of data transmission rate of a solid state disk, in order to solve the above technical problems.
A test verification method for dynamic conversion of data transmission rate of a solid state disk comprises the following steps:
acquiring a test verification request for the dynamic conversion of the data transmission rate of the solid state disk;
dynamically judging the speed of data transmission rate in PCIe and solid state disk registers by utilizing an lspci tool according to the test verification request;
setting a data transmission rate of dynamic switching by using a setpci tool;
and calling the lspci tool and the setpci tool through a Shell script to verify the consistency of the data in different data transmission rates of the solid state disk to be tested on the test platform.
In one embodiment, the step of dynamically determining the speed of data transfer rates in PCIe and solid state disk registers using an lspci tool according to the test validation request includes:
starting up and electrifying, and reading a BDF value of the solid state disk on a PCIe bus through an lspci tool;
reading the BDF value of the upstream device mounted on the solid state disk on the PCIe bus through an lspci tool.
In one embodiment, after the step of reading out the BDF value of the upstream device mounted on the solid state disk on the PCIe bus by the lspci tool, the method further includes:
taking the ID of the PCIe register offset 34 of the solid state disk as an entry, and reading the ID value of the capability register at the position of the solid state disk through a setpci tool;
if the read value is not the PCIe capability register ID, continuously traversing the next capability pointer on the solid state disk until the PCIe capability register ID of the solid state disk is found;
the PCIe register offset 34 in the uplink interface of the solid state disk is used as an inlet, and the value in the control register is read out through a setpci tool;
if the read ID value is not a register in the PCIe controller representing PCIe capability, continue traversing the next capability pointer of the PCIe control register until a PCIe capability register ID representing the PCIe controller is found.
In one embodiment, the method further comprises:
reading the link data transmission rate of the PCIe capacity register offset 12 of the solid state disk through a setpci tool, wherein if the low nibble is 1, the data transmission rate is 2.5 GT/s;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 2.5 GT/s;
modifying the value of PCIe capacity register offset 30 of a PCIe controller through a setpci tool, setting a low nibble to be 2, and setting the data transmission rate to be 5.0 GT/s;
modifying the value of the PCIe capacity register offset 10 of the PCIe controller through a setpci tool, setting bit 5 to 1, and automatically switching the data transmission rate to the set 5.0GT/s after the state machine enters a Recovery mode;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 5.0 GT/s;
and verifying the data consistency and performance at the rest data transmission rate by circularly executing the steps.
A test verification device for dynamic conversion of data transmission rate of a solid state disk, the device comprising:
the acquisition module is used for acquiring a test verification request of the dynamic conversion of the data transmission rate of the solid state disk;
the first tool module is used for dynamically judging the speed of data transmission rates in PCIe and solid state disk registers by utilizing an lspci tool according to the test verification request;
a second tool module for setting a dynamically switched data transfer rate using a setpci tool;
and the script calling module is used for calling the lspci tool and the setpci tool through the Shell script so as to verify the consistency of the data in different data transmission rates of the solid state disk to be tested on the test platform.
In one embodiment, the first tool module is further configured to:
starting up and electrifying, and reading a BDF value of the solid state disk on a PCIe bus through an lspci tool;
reading out the BDF value of the upstream device mounted on the solid state disk on the PCIe bus through an lspci tool.
In one embodiment, the second tool module is further configured to:
taking the ID of the PCIe register offset 34 of the solid state disk as an entry, and reading the ID value of the capability register at the position of the solid state disk through a setpci tool;
if the read value is not the PCIe capability register ID, continuously traversing the next capability pointer on the solid state disk until the PCIe capability register ID of the solid state disk is found;
the PCIe register offset 34 in the uplink interface of the solid state disk is used as an inlet, and the value in the control register is read out through a setpci tool;
if the read ID value is not a register in the PCIe controller representing PCIe capability, continue traversing the next capability pointer of the PCIe control register until a PCIe capability register ID representing the PCIe controller is found.
In one embodiment, the second tool module is further configured to:
reading the link data transmission rate of the PCIe capacity register offset 12 of the solid state disk through a setpci tool, wherein if the low nibble is 1, the data transmission rate is 2.5 GT/s;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 2.5 GT/s;
modifying the value of PCIe capacity register offset 30 of a PCIe controller through a setpci tool, setting a low nibble to be 2, and setting the data transmission rate to be 5.0 GT/s;
modifying the value of the PCIe capacity register offset 10 of the PCIe controller through a setpci tool, setting bit 5 to 1, and automatically switching the data transmission rate to the set 5.0GT/s after the state machine enters a Recovery mode;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 5.0 GT/s;
and verifying the data consistency and performance at the rest data transmission rate by circularly executing the steps.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the above methods when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of any of the above-mentioned methods.
The test verification method, the test verification device, the computer equipment and the storage medium for the dynamic conversion of the data transmission rate of the solid state disk obtain a test verification request for the dynamic conversion of the data transmission rate of the solid state disk; dynamically judging the speed of data transmission rate in PCIe and solid state disk registers by utilizing an lspci tool according to the test verification request; setting a data transmission rate of dynamic switching by using a setpci tool; and calling the lspci tool and the setpci tool through a Shell script to verify the consistency of the data in different data transmission rates of the solid state disk to be tested on the test platform. The method can quickly and efficiently verify the compatibility problems of the solid state disk under different data transmission rates, such as data consistency and performance problems under different data transmission rates, can effectively improve the testing efficiency, and saves unnecessary labor cost.
Drawings
FIG. 1 is a flowchart illustrating a test verification method for dynamic conversion of data transmission rate of a solid state disk according to an embodiment;
FIG. 2 is a flowchart illustrating a test verification method for dynamic conversion of data transmission rate of a solid state disk according to another embodiment;
FIG. 3 is a flowchart illustrating a test verification method for dynamic transition of data transmission rate of a solid state drive according to yet another embodiment;
FIG. 4 is a flowchart illustrating a test verification method for dynamic transition of data transmission rate of a solid state disk according to yet another embodiment;
FIG. 5 is a block diagram of an embodiment of a device for testing and verifying dynamic conversion of data transmission rate of a solid state disk;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
At present, in the conventional technology, data transmission rate compatibility verification of a solid state disk is usually performed by modifying a PCIe rate under a BIOS (Basic Input Output System, hereinafter referred to as BIOS). After the PCIe data transmission rate is modified by the method, the SSD can work at the rate until the SSD is modified again after being started into the BIOS next time, the operation is convenient, simple and inflexible, the dynamic switching of the data transmission rate cannot be realized, and the requirement of automatic testing of the compatibility of the data transmission rate cannot be met.
Based on this, the patent provides a test verification method for dynamic conversion of data transmission rate of a solid state disk, aiming at efficiently verifying data consistency and performance test of the solid state disk.
In one embodiment, as shown in fig. 1, a test verification method for dynamic conversion of data transmission rate of a solid state disk is provided, where the method includes:
102, acquiring a test verification request for dynamic conversion of data transmission rate of the solid state disk;
step 104, dynamically judging the speed of data transmission rate in PCIe and solid state disk registers by using an lspci tool according to the test verification request;
step 106, setting the data transmission rate of dynamic switching by using a setpci tool;
and step 108, calling an lspci tool and a setpci tool through the Shell script to verify the consistency of the data of the solid state disk to be tested on the test platform in different data transmission rates.
In this embodiment, a test and verification method for dynamic conversion of data transmission rate of a solid state disk is provided, where the test method uses an fio (flexible Input and output) tool under Linux to perform data consistency verification on data in the solid state disk.
Specifically, a test verification request for dynamically converting the data transmission rate of the solid state disk is obtained first. Then, the speed of the data transmission rate in the registers of the PCIe and the solid state disk is dynamically judged by using an lspci tool according to the test verification request. lspci is a tool used to display all PCI bus devices in the system or all devices connected to the bus.
Then, the setpci tool is used to set the data transfer rate to be dynamically switched. The setpci command is a use tool to query and configure PCI devices. And finally, coordinating the tools in cooperation with Shell scripts, realizing dynamic switching of SSD in data transmission rates of 2.5GT/s, 5.0GT/s, 8.0GT/s, 16.0GT/s and the like on a Lenovo X1 Carbon 9th notebook platform, and testing and verifying data consistency in various data transmission rates.
In the embodiment, a test verification request for dynamic conversion of data transmission rate of the solid state disk is obtained; dynamically judging the speed of data transmission rate in PCIe and solid state disk registers by utilizing an lspci tool according to the test verification request; setting a data transmission rate of dynamic switching by using a setpci tool; and calling the lspci tool and the setpci tool through a Shell script to verify the consistency of the data in different data transmission rates of the solid state disk to be tested on the test platform. The scheme can quickly and efficiently verify the compatibility problem of the solid state disk under different data transmission rates, such as the data consistency and performance problems existing under different data transmission rates, so that the test efficiency can be effectively improved, and unnecessary labor cost can be saved.
In an embodiment, as shown in fig. 2, a method for testing and verifying dynamic conversion of data transmission rate of a solid state disk is provided, where the method further includes:
step 202, starting up and electrifying, and reading a BDF value of the solid state disk on a PCIe bus through an lspci tool;
step 204, reading a BDF value of the uplink device mounted on the solid state disk on the PCIe bus through an lspci tool;
step 206, reading the ID value of the capability register at the position of the solid state disk by using the ID of the PCIe register offset 34 of the solid state disk as an entry through a setpci tool;
step 208, if the read value is not the PCIe capability register ID, continuously traversing the next capability pointer on the solid state disk until the PCIe capability register ID of the solid state disk is found;
step 210, reading a value in a control register by using a PCIe register offset 34 in the uplink interface of the solid state disk as an entry through a setpci tool;
if the read ID value is not a register representing PCIe capability in the PCIe controller, the next capability pointer of the PCIe control register is continuously traversed until a PCIe capability register ID representing the PCIe controller is found, step 212.
In an embodiment, as shown in fig. 3, a test verification method for dynamic conversion of data transmission rate of a solid state disk is provided, where the method further includes:
step 302, reading out the link data transmission rate of the PCIe capability register offset 12 of the solid state disk through a setpci tool, wherein if the low nibble is 1, the data transmission rate is 2.5 GT/s;
step 304, invoking an FIO tool to verify the data consistency and performance of the solid state disk at the transmission rate of 2.5 GT/s;
step 306, modifying the value of the PCIe capacity register offset 30 of the PCIe controller through the setpci tool, setting the low nibble to be 2, and setting the data transmission rate to be 5.0 GT/s;
step 308, modifying the value of the PCIe capacity register offset 10 of the PCIe controller through the setpci tool, setting bit 5 to 1, and automatically switching the data transmission rate to the set 5.0GT/s after the state machine enters the Recovery mode;
step 310, invoking an FIO tool to verify the data consistency and performance of the solid state disk at the transmission rate of 5.0 GT/s;
and step 312, verifying the data consistency and performance at the rest data transmission rate by circularly executing the steps.
Specifically, referring to the test verification method for complete data transmission rate dynamic conversion shown in fig. 4, the specific test environment is as follows:
hardware requirements:
the computer to be tested: for the computer to be tested, the method in this embodiment is applicable to the notebook and the desktop, and the specific model is not made into a mandatory requirement. In this embodiment, a Lenovo X1 Carbon 9th notebook is preferably used as the computer to be tested.
The solid state disk to be tested: and the solid state disk supports a PCIe interface protocol.
Software requirements:
operating the system: linux Ubuntu 20.04 operating system.
Testing the tool: setpci, lspci, FIO.
Testing the script: self-written Shell test scripts.
The specific test flow steps are as follows:
and step 1, starting up and electrifying, and reading the BDF value of the solid state disk on the PCIe bus through the lspci. Each Function (Function) in the PCIe Bus has a unique identifier corresponding to it, and this identifier is the BDF (Bus: device: Function).
And 2, reading the BDF value of the uplink equipment mounted on the solid state disk on the PCIe bus through tools such as lspci, awk, grep and the like.
And 3, reading the ID value of the capability register at the position of the solid state disk by using the ID of the PCIe register offset 34 of the solid state disk as an entry through a setpci tool.
And 4, if the read value is not the PCIe capability register ID, continuously traversing the next capability pointer on the solid state disk until the PCIe capability register ID of the solid state disk is found.
And 5, reading the value in the control register by using the PCIe register offset 34 in the solid state disk uplink interface as an inlet through a setpci tool.
And 6, if the read ID value is not the register representing the PCIe capability in the PCIe controller, continuously traversing the next capability pointer of the PCIe control register until finding the PCIe capability register ID representing the PCIe controller.
And 7, reading the link data transmission rate of the PCIe capability register offset 12 of the solid state disk through a setpci tool, wherein if the low nibble is 1, the data transmission rate is 2.5 GT/s.
And 8, calling an FIO tool to verify the data consistency and performance of the solid state disk at the transmission rate of 2.5 GT/s.
And 9, modifying the value of the PCIe capacity register offset 30 (link controller 2) of the PCIe controller through the setpci tool, setting the low nibble to be 2, and setting the data transmission rate to be 5.0 GT/s.
Step 10, modifying the value of PCIe capacity register offset 10 (link controller 1) of the PCIe controller through a setpci tool, setting bit 5 to 1, and automatically switching the data transmission rate to the set 5.0GT/s after the state machine of the PCIe controller enters a Recovery mode.
And 11, calling an FIO tool to verify the data consistency and performance of the solid state disk at the transmission rate of 5 GT/s.
And step 12, verifying the rest data transmission rate according to the method of the steps 9-11.
And step 13, circulating the steps 7-12 and writing the data into the Shell script to realize the automation of data consistency and performance test verification on the data after the dynamic switching of different data transmission rates is realized.
It should be understood that although the various steps in the flow charts of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, a test verification apparatus 500 for dynamic conversion of data transmission rate of a solid state disk is provided, the apparatus includes:
an obtaining module 501, configured to obtain a test verification request for dynamic conversion of data transmission rate of a solid state disk;
a first tool module 502, configured to dynamically determine, according to the test verification request, speeds of data transmission rates in PCIe and solid state disk registers using an lspci tool;
a second tool module 503 for setting the dynamically switched data transfer rate using a setpci tool;
and the script calling module 504 is used for calling the lspci tool and the setpci tool through the Shell script so as to verify the consistency of the data of the solid state disk to be tested on the test platform in different data transmission rates.
In one embodiment, the first tool module 502 is further configured to:
starting up and electrifying, and reading a BDF value of the solid state disk on a PCIe bus through an lspci tool;
reading out the BDF value of the upstream device mounted on the solid state disk on the PCIe bus through an lspci tool.
In one embodiment, the second tool module 503 is further configured to:
taking the ID of the PCIe register offset 34 of the solid state disk as an entry, and reading the ID value of the capability register at the position of the solid state disk through a setpci tool;
if the read value is not the PCIe capability register ID, continuously traversing the next capability pointer on the solid state disk until the PCIe capability register ID of the solid state disk is found;
the PCIe register offset 34 in the uplink interface of the solid state disk is used as an inlet, and the value in the control register is read out through a setpci tool;
if the read ID value is not a register in the PCIe controller representing PCIe capability, continue traversing the next capability pointer of the PCIe control register until a PCIe capability register ID representing the PCIe controller is found.
In one embodiment, the second tool module 503 is further configured to:
reading the link data transmission rate of the PCIe capacity register offset 12 of the solid state disk through a setpci tool, wherein if the low nibble is 1, the data transmission rate is 2.5 GT/s;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 2.5 GT/s;
modifying the value of PCIe capacity register offset 30 of a PCIe controller through a setpci tool, setting a low nibble to be 2, and setting the data transmission rate to be 5.0 GT/s;
modifying the value of the PCIe capacity register offset 10 of the PCIe controller through a setpci tool, setting bit 5 to 1, and automatically switching the data transmission rate to the set 5.0GT/s after the state machine enters a Recovery mode;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 5.0 GT/s;
and verifying the data consistency and performance at the rest data transmission rate by circularly executing the steps.
For specific limitations of the test verification apparatus for dynamically converting the data transmission rate of the solid state disk, reference may be made to the above limitations of the test verification method for dynamically converting the data transmission rate of the solid state disk, and details are not repeated here.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in FIG. 6. The computer apparatus includes a processor, a memory, and a network interface connected by a device bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The nonvolatile storage medium stores an operating device, a computer program, and a database. The internal memory provides an environment for the operation device in the nonvolatile storage medium and the execution of the computer program. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to realize a test verification method for dynamic conversion of data transmission rate of the solid state disk.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above respective method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A test verification method for dynamic conversion of data transmission rate of a solid state disk is characterized by comprising the following steps:
acquiring a test verification request for the dynamic conversion of the data transmission rate of the solid state disk;
dynamically judging the speed of data transmission rate in PCIe and solid state disk registers by utilizing an lspci tool according to the test verification request;
setting a data transmission rate of dynamic switching by using a setpci tool;
and calling the lspci tool and the setpci tool through a Shell script to verify the consistency of the data in different data transmission rates of the solid state disk to be tested on the test platform.
2. The method for testing and verifying the dynamic conversion of the data transmission rate of the solid state disk according to claim 1, wherein the step of dynamically judging the speed of the data transmission rate in the registers of the PCIe and the solid state disk by using an lspci tool according to the test and verification request comprises:
starting and electrifying, and reading a BDF value of the solid state disk on a PCIe bus through an lspci tool;
reading the BDF value of the upstream device mounted on the solid state disk on the PCIe bus through an lspci tool.
3. The method for testing and verifying dynamic conversion of data transmission rate of a solid state disk according to claim 2, wherein after the step of reading out the BDF value of the upstream device mounted on the solid state disk on the PCIe bus by the lspci tool, the method further comprises:
taking the ID of the PCIe register offset 34 of the solid state disk as an entry, and reading the ID value of the capability register at the position of the solid state disk through a setpci tool;
if the read value is not the PCIe capability register ID, continuously traversing the next capability pointer on the solid state disk until the PCIe capability register ID of the solid state disk is found;
the PCIe register offset 34 in the solid state disk uplink interface is taken as an inlet, and a value in the control register is read through a setpci tool;
if the read ID value is not a register in the PCIe controller representing PCIe capability, continue traversing the next capability pointer of the PCIe control register until a PCIe capability register ID representing the PCIe controller is found.
4. The method for testing and verifying dynamic conversion of data transmission rate of a solid state disk according to claim 3, further comprising:
reading out the link data transmission rate of the PCIe capacity register offset 12 of the solid state disk through a setpci tool, wherein if the low nibble is 1, the data transmission rate is 2.5 GT/s;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 2.5 GT/s;
modifying the value of PCIe capacity register offset 30 of a PCIe controller through a setpci tool, setting a low nibble to be 2, and setting the data transmission rate to be 5.0 GT/s;
modifying the value of the PCIe capacity register offset 10 of the PCIe controller through a setpci tool, setting bit 5 to 1, and automatically switching the data transmission rate to the set 5.0GT/s after the state machine enters a Recovery mode;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 5.0 GT/s;
and verifying the data consistency and performance at the rest data transmission rate by circularly executing the steps.
5. A test and verification device for dynamic conversion of data transmission rate of a solid state disk is characterized by comprising:
the acquisition module is used for acquiring a test verification request of the dynamic conversion of the data transmission rate of the solid state disk;
the first tool module is used for dynamically judging the speed of data transmission rates in PCIe and solid state disk registers by utilizing an lspci tool according to the test verification request;
a second tool module for setting a dynamically switched data transfer rate using a setpci tool;
and the script calling module is used for calling the lspci tool and the setpci tool through the Shell script so as to verify the consistency of the data in different data transmission rates of the solid state disk to be tested on the test platform.
6. The apparatus for testing and verifying dynamic conversion of data transmission rate of a solid state disk according to claim 5, wherein the first tool module is further configured to:
starting up and electrifying, and reading a BDF value of the solid state disk on a PCIe bus through an lspci tool;
reading out the BDF value of the upstream device mounted on the solid state disk on the PCIe bus through an lspci tool.
7. The apparatus for testing and verifying dynamic conversion of data transmission rate of a solid state disk according to claim 6, wherein the second tool module is further configured to:
taking the ID of the PCIe register offset 34 of the solid state disk as an entry, and reading the ID value of the capability register at the position of the solid state disk through a setpci tool;
if the read value is not the PCIe capability register ID, continuously traversing the next capability pointer on the solid state disk until the PCIe capability register ID of the solid state disk is found;
the PCIe register offset 34 in the solid state disk uplink interface is taken as an inlet, and a value in the control register is read through a setpci tool;
if the read ID value is not a register representing PCIe capability in the PCIe controller, continue traversing the next capability pointer of the PCIe control register until a PCIe capability register ID representing the PCIe controller is found.
8. The apparatus for testing and verifying dynamic transition of data transmission rate of a solid state disk according to claim 7, wherein the second tool module is further configured to:
reading the link data transmission rate of the PCIe capacity register offset 12 of the solid state disk through a setpci tool, wherein if the low nibble is 1, the data transmission rate is 2.5 GT/s;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 2.5 GT/s;
modifying the value of PCIe capacity register offset 30 of a PCIe controller through a setpci tool, setting a low nibble to be 2, and setting the data transmission rate to be 5.0 GT/s;
modifying the value of the PCIe capacity register offset 10 of the PCIe controller through a setpci tool, setting bit 5 to 1, and automatically switching the data transmission rate to the set 5.0GT/s after the state machine enters a Recovery mode;
an FIO tool is called to verify the data consistency and performance of the solid state disk at the transmission rate of 5.0 GT/s;
and verifying the data consistency and performance at the rest data transmission rate by circularly executing the steps.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 4 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN202111641152.6A 2021-12-29 2021-12-29 Test verification method and device for dynamic conversion of data transmission rate of solid state disk Pending CN114625584A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111641152.6A CN114625584A (en) 2021-12-29 2021-12-29 Test verification method and device for dynamic conversion of data transmission rate of solid state disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111641152.6A CN114625584A (en) 2021-12-29 2021-12-29 Test verification method and device for dynamic conversion of data transmission rate of solid state disk

Publications (1)

Publication Number Publication Date
CN114625584A true CN114625584A (en) 2022-06-14

Family

ID=81899059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111641152.6A Pending CN114625584A (en) 2021-12-29 2021-12-29 Test verification method and device for dynamic conversion of data transmission rate of solid state disk

Country Status (1)

Country Link
CN (1) CN114625584A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117743063A (en) * 2024-02-21 2024-03-22 江苏华存电子科技有限公司 Verification method and verification device for virtualization function of solid state disk

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117743063A (en) * 2024-02-21 2024-03-22 江苏华存电子科技有限公司 Verification method and verification device for virtualization function of solid state disk
CN117743063B (en) * 2024-02-21 2024-04-23 江苏华存电子科技有限公司 Verification method and verification device for virtualization function of solid state disk

Similar Documents

Publication Publication Date Title
EP1899824B1 (en) Interrupt-responsive non-volatile memory system and method
CN109656630B (en) Configuration space access method, device, framework and storage medium
US11023343B2 (en) Method for injecting deliberate errors into PCIE device for test purposes, apparatus applying method, and computer readable storage medium for code of method
US20100204976A1 (en) Device emulation support apparatus, device emulation support method, device emulation support circuit and information processor
CN114625584A (en) Test verification method and device for dynamic conversion of data transmission rate of solid state disk
CN109634674B (en) Chip BOOT starting method and device, computer equipment and storage medium
CN108959020B (en) Method and device for calculating CPU utilization rate of computer
EP2194458A2 (en) Request processing device, request processing system, and access testing method
CN116312730A (en) UFS storage device monomer test driving method and device based on MT6891 platform
CN113760623A (en) Method and device for testing TCG (trusted computing group) protocol function of solid state disk and computer equipment
CN117215966B (en) Test method and test device for chip SDK interface and electronic equipment
CN111124814A (en) SOC memory access monitoring method and device and computer equipment
CN110675911B (en) DDR (double data Rate) repairing method, device, terminal and storage medium
US11893284B2 (en) Method, device and system for testing memory devices
CN109933293B (en) Data writing method and device based on SpiFlash and computer equipment
US20230089104A1 (en) Usb controller endpoint resource management
CN114780311A (en) D3hot state forward and backward test method and device based on Linux system
CN113283202B (en) Prototype verification board
CN110704218B (en) Data processing method, data processing device, computer equipment and storage medium
CN114996068A (en) Error information function testing method and device based on solid state disk and computer equipment
KR101956843B1 (en) Method for applying calibration data to vehicle using integrated software for multi vehicles and Apparatus thereof
CN116343899A (en) NVME disk performance test method, device, equipment and storage medium
CN117093427A (en) PCIE equipment state detection method, system, electronic equipment and medium
CN117234608A (en) Embedded electronic device
CN113377599A (en) Low-power-consumption hard disk test method and device for Windows system and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination