Method and device for initializing interactive interface of virtual nonvolatile memory

By adding a device message listening unit to the simulation system interface of virtual nonvolatile memory, we can determine whether the NVMe device has completed the initialization configuration and initialize the interactive interface after completion, the load failure problem caused by the initialization delay of the NVMe device is solved, and the stable and efficient initialization of the NVMe device is achieved.

CN119883520APending Publication Date: 2025-04-25SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510059338.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The NVMe device initialization delay causes the NVMe driver to fail to load, affecting the normal operation of the system and debugging process.

Method used

By adding a device message listening unit to the simulation system interface of virtual nonvolatile memory, the information generated by the device during the initial configuration process is obtained, and whether the device has completed the configuration is determined, and the interactive interface is initialized after the configuration is completed.

Benefits of technology

This avoids loading failure caused by NVMe device initialization delay, and ensures that the simulation debugging system can load the driver normally after the NVMe device initialization is completed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883520A_ABST
    Figure CN119883520A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of simulation testing, and discloses a method and a device for initializing an interactive interface of a virtual nonvolatile memory. Acquiring a communication link between a monitoring interface of the virtual nonvolatile memory device and a communication interface of the virtual nonvolatile memory; acquiring device information of the virtual nonvolatile memory through the communication link, wherein the device information is generated in the initialization configuration process of the virtual nonvolatile memory; judging whether the configuration of the virtual nonvolatile memory is completed or not according to the equipment information; if yes, an interactive interface of the virtual nonvolatile memory is initialized, and the interactive interface is used for being in butt joint with an interactive interface of a simulation debugging system. The technical effect of opening the interactive interface of the virtual nonvolatile memory in a delayed manner is achieved, and loading failure caused by initialization delay of the virtual nonvolatile memory is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of simulation testing, and in particular to a method and device for initializing an interactive interface of a virtual non-volatile memory. Background Art

[0002] During the chip development and debugging phase, the virtual host needs to load the NVMe (Non-Volatile Memory Express) driver in order to interact with the virtual NVMe device. However, due to the slow initialization speed of the NVMe device, the device configuration is often not completed during the driver loading. This situation causes the debugging software to fail when trying to load the NVMe driver, thus affecting the normal operation and debugging process of the system.

[0003] Therefore, it is urgent to propose an effective solution to the loading failure problem caused by the initialization delay of NVMe devices. Summary of the invention

[0004] In view of this, the present invention provides a method and device for initializing an interactive interface of a virtual non-volatile memory to solve the problem of loading failure caused by NVMe device initialization delay.

[0005] In a first aspect, the present invention provides a method for initializing an interactive interface of a virtual non-volatile memory, the method being applied to a simulation system, the simulation system comprising: an interactive interface of the virtual non-volatile memory, a communication interface of the virtual non-volatile memory, a virtual non-volatile memory device monitoring interface and a virtual non-volatile memory, the method comprising:

[0006] When the communication interface of the virtual non-volatile memory is configured, obtaining a communication link between the monitoring interface of the virtual non-volatile memory device and the communication interface of the virtual non-volatile memory;

[0007] Acquiring device information of the virtual non-volatile memory through the communication link, wherein the device information is generated by the virtual non-volatile memory during initialization configuration;

[0008] According to the device information, determining whether the virtual non-volatile memory has been configured;

[0009] If yes, then initialize the interactive interface of the virtual non-volatile memory, where the interactive interface is used to connect to the interactive interface of the simulation debugging system.

[0010] The invention provides a method for initializing an interactive interface of a virtual non-volatile memory, which has the following advantages: by adding a virtual non-volatile memory device message monitoring unit to a virtual non-volatile memory simulation system interface, device information generated by the virtual non-volatile memory during the initialization configuration process is obtained from the communication interface of the virtual non-volatile memory, and it is determined whether the virtual non-volatile memory has completed the configuration. After the configuration is completed, the interactive interface of the virtual non-volatile memory device is initialized, so that the simulation debugging system takes precedence over the problem of failure to load the virtual non-volatile memory driver after the virtual non-volatile memory is initialized, and the interactive interface of the virtual non-volatile memory is opened after it is determined that the virtual non-volatile memory configuration is completed, thereby achieving the technical effect of delayed opening of the interactive interface of the virtual non-volatile memory and avoiding the loading failure caused by the delay in the initialization of the virtual non-volatile memory.

[0011] In an optional implementation, judging whether the virtual non-volatile memory has completed configuration according to the device information includes:

[0012] Parsing the device information to obtain device status information or a configuration completion flag, wherein the device status information or the configuration completion flag contains a keyword;

[0013] According to the matching of the above keywords and the preset events, judging whether the above virtual non-volatile memory has completed configuration;

[0014] The above-mentioned preset event includes at least one of the following events: configuration completion information in the virtual non-volatile memory log, and a virtual non-volatile memory state mark indicating configuration completion.

[0015] Specifically, in the steps of the method, the device status information in the device information or the keyword corresponding to the configuration completion mark is matched with the preset event to determine whether the corresponding keyword matches the configuration completion information in the virtual non-volatile memory log or the virtual non-volatile memory status mark indicating that the configuration is completed. If so, it is determined that the above-mentioned virtual non-volatile memory has completed configuration. Through the above scheme, the keywords in the specific device information are parsed, and based on the keywords, it is determined whether the above-mentioned virtual non-volatile memory has completed configuration, thereby achieving the technical effect of quickly and accurately determining the configuration progress of the virtual non-volatile memory.

[0016] In an optional implementation, initializing the interaction interface of the virtual non-volatile memory includes:

[0017] In the case of determining that the configuration of the virtual non-volatile memory is completed, generating a trigger message of a preset event, the trigger message is used to indicate that the configuration of the virtual non-volatile memory is completed, and the interactive interface of the virtual non-volatile memory is initialized, and the preset event includes at least one of the following events: configuration completion information in the virtual non-volatile memory log, and the virtual non-volatile memory state flag indicates that the configuration is completed;

[0018] Sending the trigger message to the interactive interface of the virtual non-volatile memory;

[0019] Establishing a communication connection with the interaction interface of the simulation debugging system through the interaction interface of the virtual non-volatile memory;

[0020] Generate a local handshake data packet, the local handshake data packet including: system version information and device function information of the virtual non-volatile memory;

[0021] Sending the local handshake data packet to the interactive interface of the simulation debugging system;

[0022] Receiving a remote handshake data packet sent by the interactive interface of the simulation debugging system;

[0023] Based on the above remote handshake data packet, memory space is allocated and a receiving buffer is set;

[0024] Read and decode the packet header and payload in the above remote handshake packet;

[0025] Based on the data packet header, determining the data packet type of the remote handshake data packet;

[0026] Based on the data packet type of the remote handshake data packet, a processing operation of the payload is configured.

[0027] Specifically, in the steps of the method, a trigger message is sent to the interactive interface of the virtual non-volatile memory to initialize the interactive interface of the virtual non-volatile memory, and a communication protocol is established between the interactive interface of the virtual non-volatile memory and the interactive interface of the simulation debugging system to ensure that the subsequent simulation process of the two is based on each other's functions and conditions. Then, simulation instruction interaction is performed through a handshake data packet, memory space and buffer are allocated, and processing operations of the effective load are configured, thereby performing a simulation test process of the virtual non-volatile memory, thereby achieving the effect of accurately and smoothly testing the virtual non-volatile memory.

[0028] In an optional implementation manner, when the communication interface configuration of the virtual non-volatile memory is completed, the method further includes:

[0029] In the case where the communication link fails to establish a communication relationship, a first error code is written into the register and the initialization configuration is terminated, wherein the first error code is used to indicate that the communication relationship fails to be established;

[0030] Or, when a communication relationship is successfully established with the above-mentioned communication interface and the above-mentioned device information is not received within the first threshold time, a second error code is written in the register and error information corresponding to the above-mentioned second error code is output, and the above-mentioned second error code is used to indicate that the above-mentioned device information acquisition failed.

[0031] Specifically, in the steps of the method, according to the establishment of the communication link, the corresponding error code is written in the register to record the establishment of the communication relationship. At the same time, the acquisition of device information within the specified time is also detected, and according to the specific acquisition situation, the corresponding error code is written in the register to record the acquisition of the device information. By detecting various situations of the above-mentioned communication link establishment process and device information acquisition process, and setting the corresponding error code in the register, and recording the error information of each situation, the configuration status of the communication interface of the virtual non-volatile memory is accurately monitored and recorded, so as to facilitate the debugging personnel to perform subsequent debugging processing.

[0032] In an optional implementation, when it is determined that the virtual non-volatile memory has not completed configuration, the method further includes:

[0033] Writing a third error code into the register and outputting error information corresponding to the third error code, wherein the third error code is used to indicate that the configuration progress has timed out;

[0034] Or, when determining that the virtual non-volatile memory has completed configuration, the method further includes:

[0035] When the above-mentioned keyword matches the above-mentioned preset event and the trigger message of the above-mentioned preset event is not generated within the third threshold time, a fourth error code is written in the register and the error information corresponding to the above-mentioned fourth error code is output, the above-mentioned trigger message is used to indicate the initialization of the interactive interface of the above-mentioned virtual non-volatile memory, and the above-mentioned fourth error code is used to indicate that the initialization instruction of the interactive interface of the above-mentioned virtual non-volatile memory is missing.

[0036] Specifically, in the steps of the method, according to the configuration of the virtual non-volatile memory, a corresponding error code is written into a register to record the configuration of the virtual non-volatile memory. Whether the virtual non-volatile memory is configured within a specified time is monitored. By detecting various situations of the configuration process of the virtual non-volatile memory, and setting corresponding error codes in registers, and recording error information of each situation, the technical effect of accurately monitoring and recording the initialization state of the virtual non-volatile memory is achieved, so as to facilitate the debugging personnel to perform subsequent debugging processing.

[0037] In an optional implementation manner, before determining whether the above communication interface has completed configuration, the method further includes:

[0038] Configure a readable and writable register and receive an error code generated by the message monitoring unit of the virtual non-volatile memory device;

[0039] Acquire status information of the register, where the status information is used to indicate whether the register is in an empty state or a non-empty state;

[0040] If it is in a non-empty state and at least one error code is stored in the register, at least one error code is generated and recorded and error information is output;

[0041] Determine the error type of the virtual non-volatile memory by reading the error code;

[0042] Determine whether to exit the initialization program based on the above error type.

[0043] Specifically, in the steps of the method, before judging the configuration of the communication interface, it is also necessary to prepare a register for receiving the error code generated by the message monitoring unit of the virtual non-volatile memory device. Then, when using the register, by detecting whether the register is in an empty state, it can be determined whether there is an error. In a non-empty state, the error code and corresponding error information in the register are output to determine the error condition of the virtual non-volatile memory. Thus, the effect of quickly detecting the error state of the virtual non-volatile memory can be achieved, and by quickly judging the specific error type of the virtual non-volatile memory, it is convenient for the debugging personnel to quickly adjust the virtual non-volatile memory.

[0044] In an optional implementation, the above initialization configuration process further includes:

[0045] The performance data of the virtual non-volatile memory is used to obtain analysis results;

[0046] According to the above analysis results, determining whether the above virtual non-volatile memory meets the predetermined performance standard;

[0047] If the predetermined performance standard is not met, a fifth error code is written into the register and error information related to the device performance is output, wherein the fifth error code is used to indicate that the initialization performance of the virtual non-volatile memory does not meet the standard.

[0048] Specifically, in the steps of the method, during the process of initializing and configuring the virtual non-volatile memory, the performance data of the virtual non-volatile memory is also collected and analyzed to determine whether the virtual non-volatile memory has reached a predetermined performance index. Similarly, an error code of the non-standard condition is input into a register. Thus, the performance of the initialization of the virtual non-volatile memory can be evaluated, and the technical effect of further monitoring the initialization performance of the virtual non-volatile memory is achieved.

[0049] In a second aspect, the present invention provides an interactive interface initialization device for a virtual non-volatile memory, the device is applied to a simulation system, the simulation system comprises: an interactive interface of the virtual non-volatile memory, a communication interface of the virtual non-volatile memory, a virtual non-volatile memory device monitoring interface and a virtual non-volatile memory, the device comprises:

[0050] A first acquisition module, used for acquiring a communication link between the virtual non-volatile memory device monitoring interface and the communication interface of the virtual non-volatile memory when the communication interface of the virtual non-volatile memory is configured;

[0051] A second acquisition module, configured to acquire device information of the virtual non-volatile memory through the communication link, wherein the device information is generated by the virtual non-volatile memory during initialization configuration;

[0052] A judging module, used to judge whether the virtual non-volatile memory has been configured according to the device information;

[0053] The initialization module is used to initialize the interactive interface of the virtual non-volatile memory if yes, and the interactive interface is used to connect to the interactive interface of the simulation debugging system.

[0054] The invention provides an interactive interface initialization device for a virtual non-volatile memory, which has the following advantages: by adding a virtual non-volatile memory device message monitoring unit to a virtual non-volatile memory simulation system interface, the device information generated by the virtual non-volatile memory during the initialization configuration process is obtained from the communication interface of the virtual non-volatile memory, and it is determined whether the virtual non-volatile memory has completed the configuration. After the configuration is completed, the interactive interface of the virtual non-volatile memory device is initialized, so that the simulation debugging system takes precedence over the problem of failure to load the virtual non-volatile memory driver after the virtual non-volatile memory is initialized, and the interactive interface of the virtual non-volatile memory is opened after it is determined that the virtual non-volatile memory configuration is completed, thereby achieving the technical effect of delayed opening of the interactive interface of the virtual non-volatile memory and avoiding the loading failure caused by the delay in the initialization of the virtual non-volatile memory.

[0055] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the interactive interface initialization method of the virtual non-volatile memory of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0056] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the interactive interface initialization method for a virtual non-volatile memory of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 It is a schematic diagram of the location of the simulation system and the simulation debugging system at the level of the physical host according to an embodiment of the present invention;

[0059] Figure 2 is a schematic diagram of the communication structure between the simulation system and the simulation debugging system according to an embodiment of the present invention;

[0060] Figure 3 is a flow chart of a method for initializing an interactive interface of a virtual non-volatile memory according to an embodiment of the present invention;

[0061] Figure 4is a flow chart of another method for initializing an interactive interface of a virtual non-volatile memory according to an embodiment of the present invention;

[0062] Figure 5 It is a flowchart of a method for implementing a virtual non-volatile memory device monitoring interface according to an embodiment of the present invention;

[0063] Figure 6 It is a flowchart of a method for implementing a virtual non-volatile memory device message processing subunit according to an embodiment of the present invention;

[0064] Figure 7 is a flowchart of a method for implementing a virtual non-volatile memory device error handling subunit according to an embodiment of the present invention;

[0065] Figure 8 This is one of the schematic diagrams of the initialization process of the virtual non-volatile memory interaction interface according to an embodiment of the present invention;

[0066] Fig. 9 This is a second schematic diagram of the initialization process of the virtual non-volatile memory interaction interface according to an embodiment of the present invention;

[0067] Fig.10 It is one of the running state schematic diagrams of the simulation system in the initialization configuration phase of the virtual non-volatile memory according to an embodiment of the present invention;

[0068] Fig.11 This is a second schematic diagram of the operating state of the simulation system in the initialization configuration phase of the virtual non-volatile memory according to an embodiment of the present invention;

[0069] Fig.12 3 is a schematic diagram of the operation state of the simulation system in the initialization configuration phase of the virtual non-volatile memory according to an embodiment of the present invention;

[0070] Fig.13 is a schematic diagram of the structure of an interactive interface initialization device for a virtual non-volatile memory according to an embodiment of the present invention;

[0071] Fig.14 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0073] Figure 1 Schematic diagram of the location of the simulation system and the simulation debugging system at the level of the physical host according to an embodiment of the present invention. Figure 1 As shown, the physical host includes a hardware platform, a host operating system (Host OS, Host Operating System), a simulation system, and a simulation debugging system. The simulation debugging system includes an application, a guest operating system (Guest OS, Guest Operating System), and a virtualized hardware layer. Among them, the simulation system can be built by SystemC (a hardware description language for system-level design, mainly used for modeling, simulating and verifying complex electronic systems). The simulation debugging system can be QEMU (Quick Emulator) (a computer simulator and virtualizer).

[0074] Figure 2 is a schematic diagram of the communication structure between the simulation system and the simulation debugging system according to an embodiment of the present invention. Figure 2 As shown, the simulation debugging system includes a virtual non-volatile memory driver and an interactive interface (which may be an RP (remoteport, remote port) communication interface) connected. The simulation system includes a virtual non-volatile memory simulation system interface connected to the virtual non-volatile memory. The interactive interface of the virtual non-volatile memory and the interactive interface of the simulation debugging system interact through a socket.

[0075] According to an embodiment of the present invention, an embodiment of a method for initializing an interactive interface of a virtual non-volatile memory is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0076] In this embodiment, a method for initializing an interactive interface of a virtual non-volatile memory is provided, which can be used in the above-mentioned simulation system, wherein the above-mentioned simulation system includes: an interactive interface of the virtual non-volatile memory, a communication interface of the virtual non-volatile memory, a virtual non-volatile memory device monitoring interface and a virtual non-volatile memory. Figure 3 is a flow chart of a method for initializing an interactive interface of a virtual non-volatile memory according to an embodiment of the present invention, such as Figure 3 As shown, the process includes the following steps:

[0077] Step S301, when the communication interface of the virtual non-volatile memory is configured, obtaining a communication link between the virtual non-volatile memory device monitoring interface and the communication interface of the virtual non-volatile memory.

[0078] The virtual non-volatile memory is a virtual NVMe device. The interaction interface of the virtual non-volatile memory, the communication interface of the virtual non-volatile memory, the virtual non-volatile memory device monitoring interface and the virtual non-volatile memory can all be simulated by the simulation system.

[0079] Specifically, in order to obtain device information from the communication interface of the virtual non-volatile memory, when the virtual non-volatile memory starts to be initialized, the virtual non-volatile memory device message monitoring unit obtains the configuration progress information of the communication interface of the virtual non-volatile memory. According to the configuration progress information, it is determined whether the configuration of the communication interface is completed. If yes, a communication link is established between the virtual non-volatile memory device monitoring interface and the communication interface.

[0080] Step S302: Acquire device information of the virtual non-volatile memory through the communication link. The device information is generated by the virtual non-volatile memory during initialization configuration.

[0081] The device information may be initialization progress information of the virtual non-volatile memory, or error information.

[0082] Step S303: judging whether the virtual non-volatile memory has been configured based on the device information.

[0083] In order to avoid the failure of the simulation debugging system to load the virtual non-volatile memory driver due to the delay of the virtual non-volatile memory initialization, it is necessary to first determine whether the initialization configuration of the virtual non-volatile memory is completed.

[0084] Step S304: if yes, then initialize the interaction interface of the virtual non-volatile memory, where the interaction interface is used to connect to the interaction interface of the simulation debugging system.

[0085] After it is determined that the initialization configuration of the virtual non-volatile memory is completed, the interactive interface of the virtual non-volatile memory may be initialized to facilitate subsequent communication with the simulation debugging system.

[0086] The invention provides a method for initializing an interactive interface of a virtual non-volatile memory, which has the following advantages: by adding a virtual non-volatile memory device message monitoring unit to a virtual non-volatile memory simulation system interface, device information generated by the virtual non-volatile memory during the initialization configuration process is obtained from the communication interface of the virtual non-volatile memory, and it is determined whether the virtual non-volatile memory has completed the configuration. After the configuration is completed, the interactive interface of the virtual non-volatile memory device is initialized, so that the simulation debugging system takes precedence over the problem of failure to load the virtual non-volatile memory driver after the virtual non-volatile memory is initialized, and the interactive interface of the virtual non-volatile memory is opened after it is determined that the virtual non-volatile memory configuration is completed, thereby achieving the technical effect of delayed opening of the interactive interface of the virtual non-volatile memory and avoiding the loading failure caused by the delay in the initialization of the virtual non-volatile memory.

[0087] In an optional implementation, in order to further determine whether the virtual non-volatile memory has completed configuration, Figure 4 FIG. 1 is a flowchart of another method for initializing an interactive interface of a virtual non-volatile memory according to an embodiment of the present invention. Figure 4 As shown, the above step S303 includes:

[0088] Step S3031, parse the above device information to obtain device status information or a configuration completion mark.

[0089] The device status information or the configuration completion mark contains keywords, which may be a set of predefined events that can be used to match the device status information or the keywords in the configuration completion mark to determine the configuration state of the virtual non-volatile memory, so as to subsequently perform the step S304.

[0090] Step S3032: judging whether the virtual non-volatile memory has been configured based on the matching between the keyword and the preset event.

[0091] If a matching keyword is found, it means that the virtual non-volatile memory configuration is completed. If no matching keyword is found, it means that the virtual non-volatile memory configuration is not completed, and the initialization of the interactive interface of the virtual non-volatile memory in the above step S304 is terminated.

[0092] The above-mentioned preset event includes at least one of the following events: configuration completion information in the virtual non-volatile memory log, and a virtual non-volatile memory state mark indicating configuration completion.

[0093] Specifically, in the steps of the method, the device status information in the device information or the keyword corresponding to the configuration completion mark is matched with the preset event to determine whether the corresponding keyword matches the configuration completion information in the virtual non-volatile memory log or the virtual non-volatile memory status mark indicating that the configuration is completed. If so, it is determined that the above-mentioned virtual non-volatile memory has completed configuration. Through the above scheme, the keywords in the specific device information are parsed, and based on the keywords, it is determined whether the above-mentioned virtual non-volatile memory has completed configuration, thereby achieving the technical effect of quickly and accurately determining the configuration progress of the virtual non-volatile memory.

[0094] In an optional implementation manner, in order to further illustrate the communication mode between the virtual non-volatile memory and the simulation debugging system, initializing the interaction interface of the virtual non-volatile memory includes:

[0095] When it is determined that the configuration of the virtual non-volatile memory is completed, a trigger message of a preset event is generated, wherein the trigger message is used to indicate that the configuration of the virtual non-volatile memory is completed and the interaction interface of the virtual non-volatile memory is initialized.

[0096] The above-mentioned preset events include at least one of the following events:

[0097] The configuration completion information in the virtual non-volatile memory log and the virtual non-volatile memory state flag indicate that the configuration is completed.

[0098] The two events can exist at the same time, but the existence of any one event can generate a corresponding trigger message and send it to the interactive interface of the virtual non-volatile memory. The configuration completion information in the above-mentioned virtual non-volatile memory log can be a log element in an event log in the event log of the virtual non-volatile memory, for example, the log element is "configuration completed". The above-mentioned virtual non-volatile memory status identifier indicating configuration completion can be the identification information of a status flag bit of the virtual non-volatile memory, indicating that the configuration of the virtual non-volatile memory is completed.

[0099] The trigger message is sent to the interactive interface of the virtual non-volatile memory.

[0100] The trigger message may be constructed and sent to start the initialization process of the interactive interface of the virtual non-volatile memory. The trigger message may be a trigger message corresponding to any one of the above two events.

[0101] A communication connection is established through the interactive interface of the virtual non-volatile memory and the interactive interface of the simulation debugging system.

[0102] The interactive interface of the virtual non-volatile memory may be connected to the interactive interface of the simulation debugging system using a suitable protocol.

[0103] A local handshake data packet is generated, wherein the local handshake data packet includes: system version information and device function information of the virtual non-volatile memory.

[0104] Specifically, the current system version and function description information of the virtual non-volatile memory may be extracted and packaged into a data packet to form a local handshake data packet.

[0105] The local handshake data packet is sent to the interactive interface of the simulation debugging system.

[0106] By sending the above local handshake data packet to the interactive interface of the simulation debugging interface, the simulation debugging system can grasp the function and version of the virtual non-volatile memory and perform the corresponding debugging program.

[0107] Receive a remote handshake data packet sent by the interactive interface of the simulation debugging system.

[0108] Receiving the remote handshake data packet of the simulation system can prepare the corresponding resources of the virtual non-volatile memory.

[0109] Based on the above remote handshake data packet, memory space is allocated and a receiving buffer is set.

[0110] That is, the memory space may be dynamically allocated according to the size of the received remote handshake data packet, and a receiving buffer may be set to store subsequent data.

[0111] Read and decode the packet header and payload in the above remote handshake packet.

[0112] Based on the data packet header, determine the data packet type of the remote handshake data packet.

[0113] According to the information in the data packet header, determine the data packet type (such as request, response, error, etc.) of the remote handshake data packet.

[0114] Based on the data packet type of the remote handshake data packet, a processing operation of the payload is configured.

[0115] According to the identified data packet type, the corresponding processing operation is configured, which can be: processing request type data packets, responding to return information, processing error information.

[0116] For example, for request-type packets, extract relevant parameters and call corresponding processing modules to execute predefined business logic or operations; generate processing results and encapsulate the results into response packets, ready to be sent back to the request initiator. For the information returned by the response, check its validity and integrity to ensure that the data packet has not been tampered with, and further process it according to the content. For error information that occurs during processing, analyze the error type and record detailed logs for subsequent troubleshooting and optimization; take corresponding measures based on the error type, such as retrying the request, notifying the debugger, or starting an alternative process.

[0117] Specifically, in the steps of the method, a trigger message is sent to the interactive interface of the virtual non-volatile memory to initialize the interactive interface of the virtual non-volatile memory, and a communication protocol is established between the interactive interface of the virtual non-volatile memory and the interactive interface of the simulation debugging system to ensure that the subsequent simulation process of the two is based on each other's functions and conditions. Then, simulation instruction interaction is performed through a handshake data packet, memory space and buffer are allocated, and processing operations of the effective load are configured, thereby performing a simulation test process of the virtual non-volatile memory, thereby achieving the effect of accurately and smoothly testing the virtual non-volatile memory.

[0118] In an optional implementation, in order to further determine the configuration state of the communication interface of the virtual non-volatile memory, when the configuration of the communication interface of the virtual non-volatile memory is completed, the method further includes:

[0119] In the case where the communication link fails to establish a communication relationship, a first error code is written into the register and the initialization configuration is terminated, wherein the first error code is used to indicate that the communication relationship fails to be established.

[0120] It may be that after attempting to establish a communication relationship, the return result is checked. If the communication relationship fails to be established, a predefined first error code is written into the register, and subsequent initialization operations are stopped, and the error status is recorded.

[0121] Or, when a communication relationship is successfully established with the above-mentioned communication interface and the above-mentioned device information is not received within the first threshold time, a second error code is written in the register and error information corresponding to the above-mentioned second error code is output, and the above-mentioned second error code is used to indicate that the above-mentioned device information acquisition failed.

[0122] After successfully establishing the communication relationship, a timer is set to monitor the reception of device information. If the device information is not received within the first threshold time, a predefined second error code is written into the register. According to the second error code, corresponding error information is output to indicate that the device information acquisition failed.

[0123] Specifically, in the steps of the method, according to the establishment of the communication link, the corresponding error code is written in the register to record the establishment of the communication relationship. At the same time, the acquisition of device information within the specified time is also detected, and according to the specific acquisition situation, the corresponding error code is written in the register to record the acquisition of the device information. By detecting various situations of the above-mentioned communication link establishment process and device information acquisition process, and setting the corresponding error code in the register, and recording the error information of each situation, the configuration status of the communication interface of the virtual non-volatile memory is accurately monitored and recorded, so as to facilitate the debugging personnel to perform subsequent debugging processing.

[0124] In an optional implementation, in order to further determine the initialization state of the virtual non-volatile memory, when it is determined that the virtual non-volatile memory has not been configured, the method further includes:

[0125] A third error code is written into the register, and error information corresponding to the third error code is output, where the third error code is used to indicate that the configuration progress has timed out.

[0126] When the device is configured, a timer is set to monitor the configuration progress. If the configuration is not completed within the third threshold time, a predefined third error code is written into the register. According to the third error code, corresponding error information is output to indicate that the configuration progress has timed out.

[0127] Or, when determining that the virtual non-volatile memory has completed configuration, the method further includes:

[0128] When the above-mentioned keyword matches the above-mentioned preset event and the trigger message of the above-mentioned preset event is not generated within the third threshold time, a fourth error code is written in the register and the error information corresponding to the above-mentioned fourth error code is output, the above-mentioned trigger message is used to indicate the initialization of the interactive interface of the above-mentioned virtual non-volatile memory, and the above-mentioned fourth error code is used to indicate that the initialization instruction of the interactive interface of the above-mentioned virtual non-volatile memory is missing.

[0129] For example, when determining whether the configuration of the virtual non-volatile memory is completed, the match between the keyword and the preset event is checked. When the keyword matches the preset event and within the third threshold time, if the trigger message of the preset event is not generated, a predefined fourth error code is written into the register. According to the fourth error code, the corresponding error information is output to indicate that the interactive interface initialization instruction is missing. Then, an alarm event log corresponding to the missing instruction can be generated, waiting for the debugger to intervene.

[0130] Specifically, in the steps of the method, according to the configuration of the virtual non-volatile memory, a corresponding error code is written into a register to record the configuration of the virtual non-volatile memory. Whether the virtual non-volatile memory is configured within a specified time is monitored. By detecting various situations of the configuration process of the virtual non-volatile memory, and setting corresponding error codes in registers, and recording error information of each situation, the technical effect of accurately monitoring and recording the initialization state of the virtual non-volatile memory is achieved, so as to facilitate the debugging personnel to perform subsequent debugging processing.

[0131] In an optional implementation manner, in order to further determine the error type of the virtual non-volatile memory, before determining whether the above communication interface has completed configuration, it also includes:

[0132] The readable and writable registers are configured, and the error code generated by the message monitoring unit of the virtual non-volatile memory device is received.

[0133] Specifically, a readable and writable register may be created to store the error code. When the program is started, the register state is initialized to empty. The error code may be any one or more of the first error code, the second error code, the third error code, and the fourth error code.

[0134] The state information of the register is obtained, where the state information is used to indicate whether the register is in an empty state or a non-empty state.

[0135] Set up a monitoring mechanism to receive error codes from the virtual non-volatile memory. When an error code is received, write it to the readable and writable register.

[0136] If it is in a non-empty state and at least one error code is stored in the above register, at least one error code is generated and recorded and error information is output.

[0137] That is, read the status information of the register to determine whether it is empty or not empty. If the register is not empty, and at least one error code is saved. Read the error code from the register. Generate and record the corresponding error information based on the error code read. Output the error information to the log or console for subsequent analysis.

[0138] By reading the error code, the error type of the virtual non-volatile memory is determined.

[0139] Determine whether to exit the initialization procedure based on the above error type. Determine whether to exit the initialization procedure based on the identified error type. If the error type indicates a serious error, perform the exit operation. Otherwise, continue the initialization process.

[0140] Specifically, in the steps of the method, before judging the configuration of the communication interface, it is also necessary to prepare a register for receiving the error code generated by the message monitoring unit of the virtual non-volatile memory device. Then, when using the register, by detecting whether the register is in an empty state, it can be determined whether there is an error. In a non-empty state, the error code and corresponding error information in the register are output to determine the error condition of the virtual non-volatile memory. Thus, the effect of quickly detecting the error state of the virtual non-volatile memory can be achieved, and by quickly judging the specific error type of the virtual non-volatile memory, it is convenient for the debugging personnel to quickly adjust the virtual non-volatile memory.

[0141] In an optional implementation, in order to further evaluate the performance of the initialization of the virtual non-volatile memory, it is determined that the above initialization configuration process further includes:

[0142] The performance data of the virtual non-volatile memory is obtained to obtain the analysis results.

[0143] That is, determine the performance indicators that need to be collected, such as read and write speed, latency, durability, etc. Collect these performance data through appropriate tools or methods.

[0144] Based on the above analysis results, it is determined whether the above virtual non-volatile memory meets the predetermined performance standard.

[0145] The collected performance data is processed and analyzed to calculate the actual performance value. The actual performance value is compared with the predetermined performance standard to determine whether the performance standard is met.

[0146] If the predetermined performance standard is not met, a fifth error code is written into the register and error information related to the device performance is output, wherein the fifth error code is used to indicate that the initialization performance of the virtual non-volatile memory does not meet the standard.

[0147] That is, if the performance does not meet the standard, the fifth error code is written in the readable and writable register, indicating that the initialization performance does not meet the standard. Generate and output error information related to device performance, including specific indicators and values ​​that do not meet the standard.

[0148] Specifically, in the steps of the method, during the process of initializing and configuring the virtual non-volatile memory, the performance data of the virtual non-volatile memory is also collected and analyzed to determine whether the virtual non-volatile memory has reached a predetermined performance index. Similarly, an error code of the non-standard condition is input into a register. Thus, the performance of the initialization of the virtual non-volatile memory can be evaluated, and the technical effect of further monitoring the initialization performance of the virtual non-volatile memory is achieved.

[0149] In an optional implementation, during the initialization process, baseline performance data of the system operation is collected and analyzed, including indicators such as read and write speed, latency, and throughput, so as to provide a reference for subsequent optimization.

[0150] Based on real-time performance monitoring, the memory cache strategy is dynamically adjusted. For example, the cache size is automatically increased under high load conditions to reduce the number of reads and writes and improve overall performance.

[0151] Implement multi-level storage management to optimize memory resource utilization by keeping frequently accessed data in fast storage areas and moving infrequently accessed data to slower storage areas.

[0152] Generate performance analysis reports regularly to record in detail the system's performance under different load conditions, identify bottlenecks and make optimization suggestions to help users or system administrators make decisions.

[0153] Provides a visual user interface that displays performance indicators in real time and allows users to manually adjust system parameters according to specific needs to achieve optimal performance.

[0154] During system operation, if a performance degradation trend is detected, an alarm is automatically triggered and a preset optimization program is started to restore the system to normal performance levels.

[0155] The implementation method of obtaining the device message of the virtual non-volatile memory through the virtual non-volatile memory device monitoring interface is as follows: Figure 5 FIG. 1 is a flow chart of a method for implementing a virtual non-volatile memory device monitoring interface according to an embodiment of the present invention. Figure 5 As shown, including:

[0156] Step S501 : the virtual non-volatile memory emulation system interface starts to be initialized.

[0157] Step S502: pre-processing of the virtual non-volatile memory monitoring interface.

[0158] It may be to wait for the communication interface configuration of the virtual non-volatile memory to be completed. Specifically, it may be to set an 8-bit configuration register, write 1 to bit 0 after the virtual non-volatile memory configuration is completed, and the monitoring interface polls the register. If bit 0 is 1, the configuration is completed.

[0159] Step S503: connecting to the communication interface of the virtual non-volatile memory.

[0160] That is, a relationship is established with the communication interface of the virtual non-volatile memory so as to monitor the device information of the virtual non-volatile memory later. If the connection fails, the error code 1001 can be written into the register of the error processing subunit.

[0161] Step S504: monitor device messages of the virtual non-volatile memory.

[0162] Capture the progress information, error information, etc. output during the initialization of the virtual non-volatile memory. If no device message is received within a certain period of time, write the error code 1002 into the register of the error handling subunit.

[0163] Step S505: Send the device message to the virtual non-volatile memory device processing subunit.

[0164] The implementation method of judging whether the virtual non-volatile memory has been configured based on the device information is as follows: Figure 6 FIG. 1 is a flow chart of a method for implementing a virtual non-volatile memory device message processing subunit according to an embodiment of the present invention. Figure 6 As shown, including:

[0165] Step S601: the virtual non-volatile memory emulation system interface starts initialization.

[0166] Step S602: Setting a virtual non-volatile memory configuration completion event.

[0167] That is, a virtual non-volatile memory configuration completion event is defined, and if the virtual non-volatile memory configuration completion is detected in subsequent processing, the event is triggered.

[0168] Step S603: receiving and processing a device message of the virtual non-volatile memory.

[0169] Receive the device information of the virtual non-volatile memory, specifically, redirect it to the specified NVMe device message storage file. Used to monitor the initialization progress of the NVMe device and record the NVMe initialization information for personnel analysis and debugging.

[0170] Step S604, determining whether the virtual non-volatile memory has been configured.

[0171] The keyword is used to determine whether the virtual non-volatile memory is configured. If it is completed within the specified event, the above event is triggered and passed to the event trigger message sending interface. Otherwise, the error code 2001 is written into the register of the error handling subunit.

[0172] Step S605: Send a trigger event through an event trigger message interface.

[0173] The usage of the above registers is as follows, Figure 7 FIG. 1 is a flow chart of a method for implementing a virtual non-volatile memory device error handling subunit according to an embodiment of the present invention. Figure 7 As shown, including:

[0174] Step S701: the virtual non-volatile memory emulation system interface starts initialization.

[0175] Step S702, configure registers.

[0176] It can be defined as a readable and writable error status register, which is used to store the error code of the virtual non-volatile memory monitoring unit. Its initial state can be 0.

[0177] Step S703, check the register.

[0178] By checking whether the register is in a non-zero state, if it is, it indicates an error has occurred and the error code needs to be read, otherwise continue monitoring.

[0179] Step S704, error handling.

[0180] Determine the error type based on the error code, and handle it differently according to the error type. For example, for the error code 1001, you need to record and output the error information and then exit the initialization program. For the error codes 1002, 2001, and 3001, you need to output them to the console. Such error codes may be caused by a bug in the simulation program itself or by low program efficiency. Analyze the specific situation and wait for the debugger to handle it.

[0181] Step S705, exiting the virtual non-volatile memory device message monitoring unit.

[0182] The specific implementation process of the above step S304 is as follows: Figure 8 FIG. 1 is one of the schematic diagrams of the initialization process of the virtual non-volatile memory interaction interface according to an embodiment of the present invention, such as Figure 8 As shown, including:

[0183] The interactive interface may be the above-mentioned RP interface.

[0184] Step S801: receiving a virtual non-volatile memory configuration completion trigger message.

[0185] Step S802, establishing a communication connection with the simulation debugging system.

[0186] The remote communication object of the interactive interface is the simulation debugging system. At this time, the program of the simulation debugging system is in a blocked state waiting for the communication object.

[0187] Step S803: protocol handshake.

[0188] Construct and send a handshake packet containing version information and functions. After receiving the handshake message, QEMU replies with the same format. This is to initialize the communication relationship between the remote port (RP) and the local simulation environment, ensuring that the simulation environments at both ends understand each other's functions and limitations. Functions include byte enable, data packet header layout format, etc.

[0189] Step S804, receiving a data packet.

[0190] Read and process data packets from the interactive interface, including initializing data packets, reading data packet headers and payloads, decoding data packet headers and payloads, determining data packet types and performing corresponding processing operations based on data packet types, etc.

[0191] Step S805: initialization of the interactive interface is completed.

[0192] The various implementation stages of the above virtual non-volatile memory interaction interface initialization method and the triggering start methods of each stage are as follows. Fig. 9 FIG. 2 is a second schematic diagram of a virtual non-volatile memory interaction interface initialization process according to an embodiment of the present invention. Fig. 9 As shown, including:

[0193] The simulation system starts and the simulation debugging system starts; the virtual non-volatile memory initialization configuration phase triggers the virtual non-volatile memory completion event, the interactive interface socket configuration phase, the interactive interface opens the socket, the interactive interface communication environment configuration phase, and the interactive interface configuration is completed.

[0194] The operating status of each part in the simulation system before the initialization of the virtual non-volatile memory interaction interface is as follows: Fig.10 FIG. 1 is one of the operating state diagrams of the simulation system in the initialization configuration phase of the virtual non-volatile memory according to an embodiment of the present invention, such as Fig.10 As shown, the virtual non-volatile memory device message monitoring unit in the above simulation system interface includes: a virtual non-volatile memory device message processing subunit, a virtual non-volatile memory device monitoring interface, an error processing subunit, and an event trigger message sending interface. The interactive communication unit includes an interactive interface of the virtual non-volatile memory and an event trigger message receiving interface.

[0195] During the initialization configuration of the interactive interface, the program enters a blocked state when the socket waits for a connection with the communication object. At this stage, the interactive interface of the virtual non-volatile memory simulation system interface module is in a dormant state, so it will not be initialized and will not affect the operation of other modules in the simulation system. For the simulation system, this stage is regarded as the device initialization configuration stage. At the same time, in the simulation debugging system process, since the interactive interface of the simulation system is still in a dormant state, the initialization of the interactive interface will cause the simulation debugging system process to be blocked. During this period, other business modules of the simulation debugging system have not yet started to run.

[0196] The operating status of each part in the simulation system when the virtual non-volatile memory interaction interface is initialized is as follows: Fig.11 FIG. 2 is a second schematic diagram of the operation status of the simulation system in the initialization configuration phase of the virtual non-volatile memory according to an embodiment of the present invention. Fig.11 As shown in the figure, when the virtual non-volatile memory device monitoring unit of the simulation system triggers the configuration completion event, it will end its operation. At this time, the interactive communication unit starts to initialize the configuration after receiving the event trigger information. From this stage on, the running trajectory and implementation function of the entire simulation system are different in that the other modules of the device simulation system have completed the initialization configuration at this stage.

[0197] The operating status of each part in the simulation system after the above virtual non-volatile memory interaction interface is initialized is as follows: Fig.12 FIG. 3 is a third schematic diagram of the operation status of the simulation system in the initialization configuration phase of the virtual non-volatile memory according to an embodiment of the present invention. Fig.12 As shown, after the socket of the interactive communication interface is opened, the interactive interface socket of the simulation debugging system process is connected to it. After that, the interactive interface of the simulation debugging system and the interactive communication unit begin to coordinate the configuration related to the communication environment.

[0198] In this embodiment, a virtual non-volatile memory interactive interface initialization device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0199] This embodiment provides an interactive interface initialization device for a virtual non-volatile memory. Fig.13 FIG. 1 is a schematic diagram of the structure of an interactive interface initialization device for a virtual non-volatile memory according to an embodiment of the present invention. Fig.13As shown, the above device is applied to a simulation system, the above simulation system includes: an interactive interface of a virtual non-volatile memory, a communication interface of the virtual non-volatile memory, a virtual non-volatile memory device monitoring interface and a virtual non-volatile memory, and the above device includes:

[0200] The first acquisition module 1301 is used to acquire the communication link between the virtual non-volatile memory device monitoring interface and the communication interface of the virtual non-volatile memory when the communication interface of the virtual non-volatile memory is configured;

[0201] A second acquisition module 1302 is used to acquire device information of the virtual non-volatile memory through the communication link, where the device information is generated by the virtual non-volatile memory during initialization configuration;

[0202] The judging module 1303 is used to judge whether the virtual non-volatile memory has been configured according to the device information;

[0203] The initialization module 1304 is used to initialize the interactive interface of the virtual non-volatile memory if yes, and the interactive interface is used to connect to the interactive interface of the simulation debugging system.

[0204] In an optional implementation, the above-mentioned determination module 1303 includes:

[0205] A parsing unit, used to parse the above device information to obtain device status information or a configuration completion mark, wherein the above device status information or the above configuration completion mark contains a keyword;

[0206] A first judgment unit, configured to judge whether the virtual non-volatile memory has been configured according to a matching condition between the keyword and a preset event;

[0207] The above-mentioned preset event includes at least one of the following events: configuration completion information in the virtual non-volatile memory log, and a virtual non-volatile memory state mark indicating configuration completion.

[0208] In an optional implementation, the initialization module 1304 includes:

[0209] In the case of determining that the configuration of the virtual non-volatile memory is completed, generating a trigger message of a preset event, the trigger message is used to indicate that the configuration of the virtual non-volatile memory is completed, and the interactive interface of the virtual non-volatile memory is initialized, and the preset event includes at least one of the following events: configuration completion information in the virtual non-volatile memory log, and the virtual non-volatile memory state flag indicates that the configuration is completed;

[0210] A first sending unit, used for sending the trigger message to the interactive interface of the virtual non-volatile memory;

[0211] An establishing unit, used to establish a communication connection with the interactive interface of the simulation debugging system through the interactive interface of the virtual non-volatile memory;

[0212] A generating unit, configured to generate a local handshake data packet, wherein the local handshake data packet includes: system version information and device function information of the virtual non-volatile memory;

[0213] A second sending unit, used to send the local handshake data packet to the interactive interface of the simulation debugging system;

[0214] A receiving unit, used to receive a remote handshake data packet sent by the interactive interface of the above simulation debugging system;

[0215] An allocation unit, configured to allocate memory space and set a receiving buffer based on the remote handshake data packet;

[0216] A reading unit, used for reading and decoding the data packet header and the effective load in the above remote handshake data packet;

[0217] A second determination unit, configured to determine the data packet type of the remote handshake data packet based on the data packet header;

[0218] A configuration unit is used to configure the processing operation of the above-mentioned effective load based on the data packet type of the above-mentioned remote handshake data packet.

[0219] In an optional embodiment, the above device further includes:

[0220] A first writing module, used for writing a first error code in a register and terminating the initialization configuration when the communication link fails to establish a communication relationship, wherein the first error code is used to indicate that the communication relationship fails to be established;

[0221] Or, a second writing module is used to write a second error code in a register and output error information corresponding to the second error code when a communication relationship is successfully established with the above-mentioned communication interface and the above-mentioned device information is not received within a first threshold time. The above-mentioned second error code is used to indicate that the above-mentioned device information acquisition failed.

[0222] In an optional embodiment, the above device further includes:

[0223] A third writing module, used for writing a third error code into the register and outputting error information corresponding to the third error code, wherein the third error code is used for indicating that the configuration progress has timed out;

[0224] Or, the fourth writing module is used for, when judging that the above-mentioned virtual non-volatile memory has completed configuration, further comprising:

[0225] When the above-mentioned keyword matches the above-mentioned preset event and the trigger message of the above-mentioned preset event is not generated within the third threshold time, a fourth error code is written in the register and the error information corresponding to the above-mentioned fourth error code is output, the above-mentioned trigger message is used to indicate the initialization of the interactive interface of the above-mentioned virtual non-volatile memory, and the above-mentioned fourth error code is used to indicate that the initialization instruction of the interactive interface of the above-mentioned virtual non-volatile memory is missing.

[0226] In an optional embodiment, the above device further includes:

[0227] A register configuration module, used to configure a readable and writable register and receive an error code generated by the message monitoring unit of the virtual non-volatile memory device;

[0228] A register acquisition module, used to acquire the state information of the register, wherein the state information is used to indicate whether the register is in an empty state or a non-empty state;

[0229] An error code generation module, used for generating and recording at least one error code and outputting error information if the state is not empty and at least one error code is stored in the above register;

[0230] An error type determination module, used to determine the error type of the virtual non-volatile memory by reading the error code;

[0231] The program judgment module is used to judge whether to exit the initialization program based on the above error type.

[0232] In an optional embodiment, the above device further includes:

[0233] An analysis module, used for virtualizing the performance data of the non-volatile memory and obtaining analysis results;

[0234] A performance module, used to determine whether the virtual non-volatile memory meets a predetermined performance standard based on the analysis result;

[0235] The fifth writing module is used to write a fifth error code in the register and output error information related to the device performance if the predetermined performance standard is not met, and the fifth error code is used to indicate that the initialization performance of the virtual non-volatile memory is not up to standard.

[0236] The invention provides an interactive interface initialization device for a virtual non-volatile memory, which has the following advantages: by adding a virtual non-volatile memory device message monitoring unit to a virtual non-volatile memory simulation system interface, the device information generated by the virtual non-volatile memory during the initialization configuration process is obtained from the communication interface of the virtual non-volatile memory, and it is determined whether the virtual non-volatile memory has completed the configuration. After the configuration is completed, the interactive interface of the virtual non-volatile memory device is initialized, so that the simulation debugging system takes precedence over the problem of failure to load the virtual non-volatile memory driver after the virtual non-volatile memory is initialized, and the interactive interface of the virtual non-volatile memory is opened after it is determined that the virtual non-volatile memory configuration is completed, thereby achieving the technical effect of delayed opening of the interactive interface of the virtual non-volatile memory and avoiding the loading failure caused by the delay in the initialization of the virtual non-volatile memory.

[0237] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0238] The interactive interface initialization device of the virtual non-volatile memory in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0239] The embodiment of the present invention also provides a computer device having the above Fig.13 The interactive interface initialization device of the virtual non-volatile memory is shown.

[0240] See also Fig.14 , Fig.14 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.14 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.14A processor 10 is taken as an example.

[0241] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an integrated circuit. The integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0242] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0243] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0244] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0245] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0246] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0247] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for initializing an interactive interface of a virtual non-volatile memory, characterized in that: The method is applied to a simulation system, the simulation system comprising: an interactive interface of a virtual non-volatile memory, a communication interface of the virtual non-volatile memory, a virtual non-volatile memory device monitoring interface and a virtual non-volatile memory, the method comprising: When the communication interface of the virtual non-volatile memory is configured, obtaining a communication link between the monitoring interface of the virtual non-volatile memory device and the communication interface of the virtual non-volatile memory; Acquiring device information of the virtual non-volatile memory through the communication link, wherein the device information is generated by the virtual non-volatile memory during initialization configuration; According to the device information, determining whether the virtual non-volatile memory has completed configuration; If yes, then initialize the interactive interface of the virtual non-volatile memory, where the interactive interface is used to connect to the interactive interface of the simulation debugging system.

2. The method according to claim 1, characterized in that: Judging, according to the device information, whether the virtual non-volatile memory has been configured, comprising: Parsing the device information to obtain device status information or a configuration completion flag, wherein the device status information or the configuration completion flag contains a keyword; According to the matching of the keyword and the preset event, determining whether the virtual non-volatile memory has completed configuration; The preset event includes at least one of the following events: configuration completion information in the virtual non-volatile memory log, and a virtual non-volatile memory status mark indicating configuration completion.

3. The method according to claim 2, characterized in that Initializing the interactive interface of the virtual non-volatile memory includes: In the case of determining that the configuration of the virtual non-volatile memory is completed, generating a trigger message of a preset event, the trigger message is used to indicate that the configuration of the virtual non-volatile memory is completed and the interactive interface of the virtual non-volatile memory is initialized, and the preset event includes at least one of the following events: configuration completion information in the virtual non-volatile memory log, and the virtual non-volatile memory state flag indicates that the configuration is completed; Sending the trigger message to the interactive interface of the virtual non-volatile memory; Establishing a communication connection with the interaction interface of the simulation debugging system through the interaction interface of the virtual non-volatile memory; Generate a local handshake data packet, the local handshake data packet including: system version information and device function information of the virtual non-volatile memory; Sending the local handshake data packet to the interactive interface of the simulation debugging system; Receiving a remote handshake data packet sent by an interactive interface of the simulation debugging system; Based on the remote handshake data packet, allocating memory space and setting a receiving buffer; Read and decode the data packet header and payload in the remote handshake data packet; Based on the data packet header, determining the data packet type of the remote handshake data packet; Based on the data packet type of the remote handshake data packet, a processing operation of the payload is configured.

4. The method according to any one of claims 1 to 3, characterized in that: When the communication interface configuration of the virtual non-volatile memory is completed, it also includes: In the case where the communication link fails to establish a communication relationship, writing a first error code in a register and terminating the initialization configuration, wherein the first error code is used to indicate that the communication relationship fails to be established; Or, when a communication relationship is successfully established with the communication interface and the device information is not received within a first threshold time, a second error code is written in the register and error information corresponding to the second error code is output, wherein the second error code is used to indicate that the device information acquisition failed.

5. The method according to claim 2 or 3, characterized in that: When it is determined that the virtual non-volatile memory has not been configured, the method further includes: Writing a third error code into the register and outputting error information corresponding to the third error code, wherein the third error code is used to indicate that the configuration progress has timed out; Or, when it is determined that the virtual non-volatile memory has completed configuration, the method further includes: When the keyword matches the preset event and a trigger message of the preset event is not generated within a third threshold time, a fourth error code is written in a register and error information corresponding to the fourth error code is output, the trigger message is used to indicate the initialization of the interactive interface of the virtual non-volatile memory, and the fourth error code is used to indicate that an initialization instruction of the interactive interface of the virtual non-volatile memory is missing.

6. The method according to any one of claims 1 to 3, characterized in that: Before determining whether the communication interface has completed configuration, the method further includes: configuring a readable and writable register, and receiving an error code generated by the message monitoring unit of the virtual non-volatile memory device; Acquire status information of the register, where the status information is used to indicate whether the register is in an empty state or a non-empty state; If it is in a non-empty state and at least one error code is stored in the register, at least one error code is generated and recorded and error information is output; Determining an error type of the virtual non-volatile memory by reading the error code; Determine whether to exit the initialization program based on the error type.

7. The method according to claim 6, characterized in that The initialization configuration process also includes: The performance data of the virtual non-volatile memory is used to obtain analysis results; According to the analysis result, determining whether the virtual non-volatile memory meets a predetermined performance standard; If the predetermined performance standard is not met, a fifth error code is written into the register, and error information related to device performance is output, wherein the fifth error code is used to indicate that the initialization performance of the virtual non-volatile memory does not meet the standard.

8. A virtual non-volatile memory interactive interface initialization device, characterized in that: The device is applied to a simulation system, the simulation system comprising: an interactive interface of a virtual non-volatile memory, a communication interface of the virtual non-volatile memory, a virtual non-volatile memory device monitoring interface and a virtual non-volatile memory, the device comprising: A first acquisition module, configured to acquire a communication link between the virtual non-volatile memory device monitoring interface and the communication interface of the virtual non-volatile memory when the communication interface of the virtual non-volatile memory is configured; A second acquisition module, configured to acquire device information of the virtual non-volatile memory through the communication link, wherein the device information is generated by the virtual non-volatile memory during initialization configuration; A judging module, used for judging whether the virtual non-volatile memory has completed configuration according to the device information; An initialization module is used to initialize the interactive interface of the virtual non-volatile memory if yes, and the interactive interface is used to connect to the interactive interface of the simulation debugging system.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the interactive interface initialization method of the virtual non-volatile memory described in any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the interactive interface initialization method of the virtual non-volatile memory according to any one of claims 1 to 7.