NVMe command layered processing method, verification method, device and medium

By layering NVMe command processing into transaction modules, the scalability and portability problems of NVMC verification in the prior art are solved, and efficient data transmission and verification methods are realized to adapt to the verification needs of different NVMC devices.

CN116126244BActive Publication Date: 2025-08-29SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310089353.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-03
Publication Date
2025-08-29
Estimated Expiration
2043-02-03

AI Technical Summary

Technical Problem

The existing NVMe protocol processing method limits the scalability and portability of NVMC verification, making it time-consuming and labor-intensive and difficult to adapt to the verification needs of different NVMC devices.

Method used

The NVMe command processing is layered into transaction modules, including controller and namespace management transaction modules, data transmission transaction modules and address mapping management transaction modules, and data transmission and verification are achieved through the mobilization layer, execution layer and connection layer.

Benefits of technology

It improves the scalability and portability of NVMC verification, supports flexible error-recall verification, can easily adapt to protocol updates and rich code, and improves verification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116126244B_ABST
    Figure CN116126244B_ABST
Patent Text Reader

Abstract

The present invention relates to an NVMe command layered processing method, verification method, device and medium. The NVMe command layered processing method summarizes the processing done by the NVMe command into a corresponding transaction module, and the transaction module is configured with a TLM port for interacting with the outside world; and the NVMe command processing structure is layered into an execution layer, a mobilization layer and a connection layer. The mobilization layer can pattern-mobilize the transaction module of the execution layer to perform command processing and error injection, and supports NVMC verification with strong scalability and portability. The verification method verifies the NVMC based on the NVMe command layered processing method, which can not only positively verify that the logical functions specified by the protocol can be implemented, but also flexibly inject errors to check whether there are vulnerabilities and defects. The device and storage medium based on the NVMe command layered processing method and verification method in this application can also achieve the above-mentioned effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of NVMe command processing and processing verification, and in particular to an NVMe command layered processing method, verification method, device and medium. Background Art

[0002] The NVMe standard is built on PCIe. By directly connecting the CPU and SSD, there is no performance loss between the two due to channel conversion, which can greatly improve the read and write performance of the SSD. SSDs that use the NVMe standard include: NVMC (non-volatile memory controller) and storage particles. NVMC follows the NVMe protocol and obtains commands and data from the host computer through the PCIe interface and sends the completion information generated by the completed command or the read data to the host computer.

[0003] In NVMC verification, traditional verification methods fully comply with the NVMe protocol to implement the corresponding logical functions. The local CPU verification model must not only strictly follow the NVMe protocol to simulate the functions required in actual use (forward verification), but also conduct various expected and unexpected error injection experiments to verify whether the design has loopholes and defects (reverse verification). The efficient execution of NVMC verification requires the following characteristics: in forward verification, it can more easily implement the logical functions specified by the protocol; in reverse verification, it can achieve more flexible error injection; it can have stronger scalability; and good portability. However, the way the existing NVMe protocol handles NVMe commands limits the scalability and portability of NVMC verification; when verifying different NVMC devices, targeted design verification test instructions are required, which makes NVMC verification time-consuming, labor-intensive, and inefficient. Summary of the Invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present invention provides an NVMe command layered processing method, verification method, device and medium.

[0005] In a first aspect, the present invention provides a method for hierarchical processing of NVMe commands, comprising:

[0006] The processing of NVMe commands is summarized into corresponding transaction modules, and the transaction modules configure TLM ports for interacting with the outside world;

[0007] The NVMe command processing structure is layered, and the structure layering includes: an execution layer that configures the transaction module, each transaction module in the execution layer can receive a mobilization request from the mobilization layer and return a processing result corresponding to the request, and the transaction modules can monitor each other and transmit data according to the protocol; a mobilization layer that parses the commands received by the local end and mobilizes the transaction modules in the execution layer to perform command processing and error annotation; and a connection layer that centrally interacts with the design under test.

[0008] Furthermore, the transaction module summarized from the NVMe commands related to data transmission includes: a controller and namespace management transaction module, a data transmission transaction module and an address mapping management transaction module, and the data transmission process is implemented based on the controller and namespace management transaction module, the data transmission transaction module and the address mapping management transaction module.

[0009] Furthermore, the controller and namespace management transaction module receives a data packet containing a controller or namespace modification request;

[0010] After receiving the data packet, the controller and namespace management transaction module modifies the controller and namespace information according to the controller modification request or namespace request in the data packet, and sends the latest controller and namespace information to the interested transaction module; monitors and modifies the execution process of mutually exclusive commands related to the controller or namespace.

[0011] Furthermore, the data packet received by the data transmission transaction module includes: host end address, local end address, data width, data size and transmission type;

[0012] After receiving the data packet, the data transmission transaction module called by the mobilization layer drives the design under test to complete the data transmission according to the host end address, local end address, data width, data size and transmission type in the data packet; parses the transmission result returned by the design under test and returns the command completion to the mobilization layer.

[0013] Furthermore, the data packet received by the address mapping management transaction module includes a namespace ID, a local end logical address, and the total amount of data transmitted; after the address mapping management transaction module called by the mobilization layer receives the data packet, it obtains the information required in the data transmission transaction module data packet based on the namespace ID in the data packet, and calculates the physical address of the local end based on the local end logical address, and transmits it back to the mobilization layer.

[0014] Furthermore, implementing a data transmission process based on the controller and the namespace management transaction module, the data transmission transaction module, and the address mapping management transaction module includes:

[0015] The mobilization layer mobilizes the address mapping management transaction module to obtain the local end physical address and the information required by the data packet of the data transmission transaction module;

[0016] The mobilization layer calls the data transmission transaction module based on the information required in the data transmission transaction module data packet to drive the design under test to perform data transmission; the mobilization layer waits for the data transmission transaction module to return a transmission command and sends it to the connection layer;

[0017] The controller and the namespace management transaction module monitor and record the processing process of the mobilization layer mobilization address mapping management transaction module and the data transmission transaction module;

[0018] The connection layer drives the bus to write the transmission command into the design under test.

[0019] In a second aspect, the present invention provides a verification method for verifying the NVMe data transmission process implemented based on the NVMe command layered processing method, including: forward verification of data transmission and reverse verification of data transmission, wherein,

[0020] The positive verification of data transmission includes: performing the positive verification using information on the processing of the mobilization layer mobilization address mapping management transaction module and the data transmission transaction module monitored and recorded by the controller and the namespace management transaction module during the data transmission process based on the controller and the namespace management transaction module, the data transmission transaction module and the address mapping management transaction module;

[0021] The reverse verification of data transmission includes: performing the mutually exclusive pair of commands of data transmission and namespace modification simultaneously to observe whether any abnormality occurs in the local data; configuring the wrong descriptor to observe whether the relevant error handling behavior of the design under test meets the set requirements; replying to the command cq that does not comply with the protocol regulations to observe whether the relevant error handling of the design under test meets the set requirements.

[0022] Furthermore, the data transmission process based on the controller and the namespace management transaction module, the data transmission transaction module and the address mapping management transaction module includes:

[0023] The mobilization layer mobilization address mapping management transaction module obtains the local end physical address and the information required in the data packet of the data transmission transaction module, and the controller and the namespace management transaction module monitor and record the processing process of the mobilization layer mobilization address mapping management transaction module;

[0024] The mobilization layer calls the data transmission transaction module based on the information required in the data transmission transaction module data packet to drive the design under test to perform data transmission; the mobilization layer waits for the data transmission transaction module to return a transmission command and then sends it to the connection layer; the controller and namespace management transaction module monitor and record the processing process of the mobilization layer mobilizing the data transmission transaction module;

[0025] The connection layer drives the bus to write the transmission command into the design under test;

[0026] The controller and the namespace management transaction module are used to perform positive verification on the monitoring record data mobilized by the mobilization layer mobilization address mapping management transaction module and the data transmission transaction module.

[0027] Furthermore, the simultaneous execution of the mutually exclusive pair of data transmission and namespace modification commands and observing whether data on the local side is abnormal includes: the host side sending multiple data transmission write commands associated with a specified namespace ID, while simultaneously continuously sending data packets requesting modification of the same namespace to the controller and the TLM port of the namespace management transaction module, and observing whether data written to the local side is abnormal;

[0028] The configuration error descriptor and observing whether the relevant error handling behavior of the design under test meets the set requirements include: sending an erroneous data packet to the TLM port of the data transmission transaction module and observing whether the behavior of the design under test meets the set requirements;

[0029] The reply does not comply with the command cq specified in the protocol, and observing whether the relevant error handling of the design under test complies with the set requirements includes: writing an erroneous command cq to the TLM port of the connection layer, and observing whether the behavior of the design under test complies with the set requirements.

[0030] In a third aspect, the present invention provides an electronic device comprising: at least one central processing unit, an NVMe solid-state drive directly connected to the central processing unit via a PCIe bus, an NVMC of the central processing unit and the NVMe solid-state drive connected to a memory storing a computer program, wherein the computer program implements the NVMe command layered processing method when executed by the central processing unit and the NVMC.

[0031] In a fourth aspect, the present invention provides a verification device comprising: at least one processing unit, a storage unit and a bus unit, wherein the verification device is connected to the electronic device; the storage unit stores at least one test instruction, and when the test instruction is executed by the processing unit, the verification method is implemented.

[0032] In a fifth aspect, the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processing unit, it implements the NVMe command layered processing method and / or implements the verification method.

[0033] The above technical solution provided by the embodiment of the present invention has the following advantages compared with the prior art:

[0034] The NVMe command layered processing method of the present application summarizes the processing done by the NVMe command into a corresponding transaction module, and the transaction module configures a TLM port for interacting with the outside world; and the NVMe command processing structure is layered into an execution layer, a mobilization layer, and a connection layer. The mobilization layer can pattern-mobilize the transaction module of the execution layer to perform command processing and error injection, supporting NVMC verification with strong scalability and portability. The verification method of the present application verifies the NVMC based on the NVMe command layered processing method. It can not only positively verify that the logical functions specified by the protocol can be implemented by mobilizing the transaction module, but also perform flexible error injection based on the TLM port of each transaction module in the execution layer of the NVMe command layered processing method to check whether there are vulnerabilities and defects. The device and storage medium based on the NVMe command layered processing method and verification method of the present application can also achieve the above effects. With the update of the protocol or the enrichment of the code, there may be more NVMe commands added, but it is only necessary to continue to add the corresponding transaction module in the execution layer to easily accommodate new commands, and the scalability is greatly enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0037] Figure 1 A flowchart of a method for hierarchical processing of NVMe commands provided in an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of the structural layering of NVMe command processing in an NVMe command layered processing method provided in an embodiment of the present invention;

[0039] Figure 3 A process for implementing data transmission in an NVMe command layered processing method provided in an embodiment of the present invention;

[0040] Figure 4 A schematic diagram of an electronic device based on an NVMe command layered processing method provided by an embodiment of the present invention;

[0041] Figure 5 A schematic diagram of a verification device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0043] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0044] For ease of understanding, the English terms and their meanings involved in this article are explained as follows:

[0045] PCIe: (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) is a physical interface and protocol with high transmission speed.

[0046] NVMe: (Nonvolatile Memory Express, non-volatile memory host controller interface specification) is an interface specification that can be used in conjunction with the PCIe interface.

[0047] NVMC: Non-volatile memory controller, following the NVMe protocol, obtains commands and data from the host computer through the PCIe interface and sends the completion information generated by the completed command or the read data to the host computer.

[0048] Example 1

[0049] An embodiment of the present invention provides an NVMe command hierarchical processing method, which is used to summarize the processing performed by NVMe commands into corresponding transaction modules, and set the transaction modules in the structural layering of NVMe command processing. While implementing the NVMe protocol, it supports NVMC verification with strong scalability and portability through structural layering and transactional NVMe command processing.

[0050] See Figure 1 As shown, the steps of the NVMe command layered processing method include:

[0051] S100, summarize the processing of the NVMe command into a corresponding transaction module, and the transaction module configures a TLM port for interacting with the outside world.

[0052] As summarized from the processing of NVMe commands related to data transmission, the transaction module includes: a controller and namespace management transaction module, a data transmission transaction module and an address mapping management transaction module, and the data transmission process is implemented based on the controller and namespace management transaction module, the data transmission transaction module and the address mapping management transaction module.

[0053] The functions of the controller and namespace management transaction module include:

[0054] 1. After receiving a data packet, the controller and namespace management transaction module modifies the controller and namespace information according to the controller modification request or namespace request in the data packet, and sends the latest controller and namespace information to the interested transaction module, wherein the controller and namespace management transaction module receives a data packet containing a controller or namespace modification request.

[0055] 2. The controller and namespace management transaction module monitors and modifies the execution process of mutually exclusive commands related to the controller or namespace.

[0056] The functions of the data transmission transaction module include:

[0057] 1. After receiving the data packet, the data transmission transaction module called by the mobilization layer drives the design under test to complete the data transmission according to the host end address, local end address, data width, data size and transmission type in the data packet.

[0058] 2. The data transmission transaction module parses the transmission result returned by the design under test and returns it to the dispatch layer in the form of command cq.

[0059] The functions of the address mapping management module include:

[0060] After receiving a data packet, the address mapping management transaction module, invoked by the mobilization layer, retrieves the information required by the data transmission transaction module from the data packet based on the namespace ID in the data packet. It also calculates the local end physical address based on the local end logical address in the data packet and transmits the data packet back to the mobilization layer. The data packet received by the address mapping management transaction module includes the namespace ID, the local end logical address, and the total amount of data to be transferred. For example, based on the namespace ID in the data packet, it reads the corresponding namespace identify information, determines the data width of the transferred data, and converts the local logical address in the data packet into the actual physical address.

[0061] S200, hierarchical NVMe command processing structure.

[0062] Among them, see Figure 2 As shown, the structure layer includes:

[0063] The execution layer of the transaction module is configured, and each transaction module in the execution layer can receive the mobilization request of the mobilization layer and return the processing result corresponding to the request. The transaction modules can monitor each other and transmit data according to the protocol.

[0064] Parse the commands received by the local end and mobilize the transaction module in the execution layer to process the commands and inject errors into the mobilization layer.

[0065] And, a connection layer that focuses on the interaction part with the design under test, the connection layer is responsible for receiving NVMe commands and sending commands cq (completion).

[0066] In the NVMe command layered processing method provided by the present invention, data transmission is implemented based on the controller and namespace management transaction module, data transmission transaction module and address mapping management transaction module, see Figure 3 As shown, the specific process includes:

[0067] S10: The mobilization layer invokes the address mapping management transaction module to obtain the local end physical address and the information required by the data transmission transaction module in the data packet. After receiving the data packet, the address mapping management transaction module invoked by the mobilization layer retrieves the required information from the data transmission transaction module data packet based on the namespace ID in the data packet. It also calculates the local end physical address based on the local end logical address in the data packet and returns the calculated information to the mobilization layer.

[0068] S20: The mobilization layer invokes the data transmission transaction module based on the required information in the data transmission transaction module's data packet to drive the design under test to perform data transmission. In specific implementations, the data transmission transaction module configures the transmission command into the design under test using a descriptor. The descriptor's written-back content is read and the transmission command status is analyzed.

[0069] S30: The dispatching layer waits for the data transmission transaction module to return a transmission command and then sends it to the connection layer.

[0070] S40: The connection layer drives the bus to write a transmission command into the design under test.

[0071] During the data transmission process, the controller and the namespace management transaction module are mobilized to monitor the record mobilization layer, and the address mapping management transaction module and the data transmission transaction module are mobilized to perform the data transmission processing.

[0072] Example 2

[0073] An embodiment of the present invention provides a verification method for verifying the NVMe data transmission process implemented based on the NVMe command layered processing method, including: forward verification of data transmission and reverse verification of data transmission.

[0074] Among them, the positive verification of data transmission includes: in the process of implementing data transmission based on the controller and namespace management transaction module, the data transmission transaction module and the address mapping management transaction module, the positive verification is performed using the processing process information of the mobilization layer mobilization address mapping management transaction module and the data transmission transaction module monitored and recorded by the controller and namespace management transaction module.

[0075] The data transmission process based on the controller and namespace management transaction module, the data transmission transaction module and the address mapping management transaction module includes: the mobilization layer mobilizes the address mapping management transaction module to obtain the local end physical address and the information required in the data transmission transaction module data packet, the controller and namespace management transaction module monitor and record the processing process of the mobilization layer mobilizing the address mapping management transaction module; the mobilization layer calls the data transmission transaction module based on the information required in the data transmission transaction module data packet to drive the design under test to perform data transmission; the mobilization layer waits for the data transmission transaction module to return a transmission command and then sends it to the connection layer; the controller and namespace management transaction module monitor and record the processing process of the mobilization layer mobilizing the data transmission transaction module; the connection layer drives the bus to write the transmission command into the design under test; and the controller and namespace management transaction module are used to positively verify the monitoring and recording data mobilized by the mobilization layer mobilizing the address mapping management transaction module and the data transmission transaction module.

[0076] The reverse verification of data transmission includes: performing the mutually exclusive pair of commands of data transmission and namespace modification simultaneously to observe whether any abnormality occurs in the local data; configuring the wrong descriptor to observe whether the relevant error handling behavior of the design under test meets the set requirements; replying to the command cq that does not comply with the protocol regulations to observe whether the relevant error handling of the design under test meets the set requirements.

[0077] During the specific implementation process, the simultaneous execution of the mutually exclusive pair of data transmission and namespace modification commands and observing whether any abnormalities occur in the local end data include: the host end sends multiple data transmission write commands related to the specified namespace ID, and at the same time, continuously sends data packets requesting modification of the same namespace to the TLM port of the controller and the namespace management transaction module, and observes whether any abnormalities occur in the data written to the local end.

[0078] The configuration error descriptor and observing whether the relevant error handling behavior of the design to be tested meets the set requirements include: sending an erroneous data packet to the TLM port of the data transmission transaction module to configure the configuration error descriptor and observe whether the behavior of the design to be tested meets the set requirements.

[0079] The reply does not comply with the command cq specified in the protocol, and observing whether the relevant error handling of the design under test meets the set requirements includes: writing an erroneous command cq to the TLM port of the connection layer, realizing recovery of the command cq that does not comply with the protocol, and observing whether the behavior of the design under test meets the set requirements.

[0080] Example 3

[0081] See Figure 4 As shown, an embodiment of the present invention provides an electronic device based on an NVMe command layered processing method, comprising: at least one central processing unit, an NVMe solid-state drive directly connected to the central processing unit via a PCIe bus, an NVMC of the central processing unit and the NVMe solid-state drive connected to a memory storing a computer program, wherein the computer program implements the NVMe command layered processing method when executed by the central processing unit and the NVMC, and the method comprises:

[0082] The processing of NVMe commands is summarized into corresponding transaction modules, and the transaction modules configure TLM ports for interacting with the outside world;

[0083] The NVMe command processing structure is layered, and the structure layering includes: an execution layer that configures the transaction module, each transaction module in the execution layer can receive a mobilization request from the mobilization layer and return a processing result corresponding to the request, and the transaction modules can monitor each other and transmit data according to the protocol; a mobilization layer that parses the commands received by the local end and mobilizes the transaction modules in the execution layer to perform command processing and error annotation; and a connection layer that centrally interacts with the design under test.

[0084] Example 4

[0085] See Figure 5 As shown, an embodiment of the present invention provides a verification device based on a verification method, comprising: at least one processing unit, a storage unit and a bus unit, wherein the verification device is connected to the electronic device described in Example 3; the storage unit stores at least one test instruction, and when the test instruction is executed by the processing unit, the verification method is implemented, and the verification method includes: forward verification and reverse verification of data transmission.

[0086] The positive verification of data transmission includes: in the process of implementing data transmission based on the controller and namespace management transaction module, the data transmission transaction module and the address mapping management transaction module, the positive verification is performed using the processing process information of the mobilization layer mobilization address mapping management transaction module and the data transmission transaction module monitored and recorded by the controller and namespace management transaction module.

[0087] The reverse verification of data transmission includes: performing the mutually exclusive pair of data transmission and namespace modification commands simultaneously to observe whether the local data is abnormal; configuring the wrong descriptor to observe whether the relevant error handling behavior of the design under test meets the set requirements; replying to the command cq that does not comply with the protocol to observe whether the relevant error handling of the design under test meets the set requirements

[0088] Example 5

[0089] An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processing unit, it implements the NVMe command layered processing method and / or implements the verification method.

[0090] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented with the help of software and necessary general-purpose hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling an electronic device (which can be a mobile phone, personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0091] In the embodiments provided by the present invention, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the structural embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, structure or unit, which can be electrical, mechanical or other forms.

[0092] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0093] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0094] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A verification method for NVMe data transmission implemented by NVMe command layered processing, characterized in that: NVMe command layer processing includes: The processing of NVMe commands is summarized into corresponding transaction modules, and the transaction modules configure the TLM port for interacting with the outside world; the NVMe command processing structure is layered, and the structure layering includes: configuring the execution layer of the transaction module, each transaction module in the execution layer can receive the mobilization request of the mobilization layer and return the processing result corresponding to the request, and the transaction modules can monitor each other and transmit data according to the protocol; parsing the commands received by the local end, mobilizing the transaction modules in the execution layer to perform command processing and error injection; and the connection layer that concentrates on the interaction part with the design under test; The verification of NVMe data transmission includes: forward verification of data transmission and reverse verification of data transmission, among which, The positive verification of data transmission includes: performing the positive verification using information on the processing of the mobilization layer mobilization address mapping management transaction module and the data transmission transaction module monitored and recorded by the controller and the namespace management transaction module during the data transmission process based on the controller and the namespace management transaction module, the data transmission transaction module and the address mapping management transaction module; The reverse verification of data transmission includes: performing the mutually exclusive pair of commands of data transmission and namespace modification simultaneously to observe whether any abnormality occurs in the local data; configuring the wrong descriptor to observe whether the relevant error handling behavior of the design under test meets the set requirements; replying to the command cq that does not comply with the protocol regulations to observe whether the relevant error handling of the design under test meets the set requirements.

2. The verification method for NVMe data transmission implemented by NVMe command layered processing according to claim 1, wherein The transaction module summarized from the processing of NVMe commands related to data transmission includes: a controller, a namespace management transaction module, a data transmission transaction module and an address mapping management transaction module; the data transmission process is implemented based on the controller and the namespace management transaction module, the data transmission transaction module and the address mapping management transaction module.

3. The verification method of NVMe data transmission implemented by NVMe command layered processing according to claim 2, wherein The controller and namespace management transaction module receives a data packet containing a controller or namespace modification request; After receiving the data packet, the controller and namespace management transaction module modifies the controller and namespace information according to the controller modification request or namespace request in the data packet, and sends the latest controller and namespace information to the interested transaction module; monitors and modifies the execution process of mutually exclusive commands related to the controller or namespace.

4. The verification method of NVMe data transmission implemented by NVMe command layered processing according to claim 2, wherein The data packet received by the data transmission transaction module includes: host end address, local end address, data width, data size and transmission type; After receiving the data packet, the data transmission transaction module called by the mobilization layer drives the design under test to complete the data transmission according to the host end address, local end address, data width, data size and transmission type in the data packet; parses the transmission result returned by the design under test and returns the command completion to the mobilization layer.

5. The verification method of NVMe data transmission implemented by NVMe command layered processing according to claim 2, wherein The data packet received by the address mapping management transaction module includes the namespace ID, the local end logical address and the total amount of data transmitted; After receiving the data packet, the address mapping management transaction module called by the mobilization layer obtains the information required in the data transmission transaction module data packet based on the namespace ID in the data packet, and calculates the physical address of the local end based on the local end logical address, and transmits it back to the mobilization layer.

6. The verification method for NVMe data transmission implemented by NVMe command layered processing according to claim 2, wherein: The data transmission process based on the controller and the namespace management transaction module, the data transmission transaction module and the address mapping management transaction module includes: The mobilization layer mobilizes the address mapping management transaction module to obtain the local end physical address and the information required in the data packet of the data transmission transaction module; The mobilization layer calls the data transmission transaction module based on the information required in the data transmission transaction module data packet to drive the design under test to perform data transmission; the mobilization layer waits for the data transmission transaction module to return a transmission command and sends it to the connection layer; The controller and the namespace management transaction module monitor and record the process of the mobilization layer mobilization address mapping management transaction module and the data transmission transaction module performing data transmission; The connection layer drives the bus to write the transmission command into the design under test; The controller and the namespace management transaction module are used to perform positive verification on the monitoring record data mobilized by the mobilization layer mobilization address mapping management transaction module and the data transmission transaction module.

7. The verification method for NVMe data transmission implemented by NVMe command layered processing according to claim 1, wherein: The simultaneous execution of the mutually exclusive pair of data transmission and namespace modification commands and observing whether the data on the local end is abnormal includes: the host end sending multiple data transmission write commands related to a specified namespace ID, while continuously sending data packets requesting modification of the same namespace to the TLM port of the controller and the namespace management transaction module, and observing whether the data written to the local end is abnormal; The configuration error descriptor and observing whether the relevant error handling behavior of the design under test meets the set requirements include: sending an erroneous data packet to the TLM port of the data transmission transaction module and observing whether the behavior of the design under test meets the set requirements; The reply does not comply with the command cq specified in the protocol, and observing whether the relevant error handling of the design under test complies with the set requirements includes: writing an erroneous command cq to the TLM port of the connection layer, and observing whether the behavior of the design under test complies with the set requirements.

8. A verification device, characterized in that: include: At least one processing unit, storage unit and bus unit, the verification device is connected to an electronic device that implements NVMe command layered processing; The storage unit stores at least one test instruction. When the test instruction is executed by the processing unit, the verification method of NVMe data transmission implemented by the NVMe command layered processing according to any one of claims 1 to 7 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processing unit, the verification method of NVMe data transmission implemented by the NVMe command layered processing according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • RFID label chip verification system and verification method

    CN103198341A

  • Verification platform of gigabit Ethernet chip supporting PCIe based on UVM

    CN114826995A

  • Task processing method and system

    CN115221099A